Closed jasonwebb closed 2 months ago
Good bug report, thanks for providing clear information. For future reference, we typically don't need the $$ info since it is all available in the config file and the startup messages.
Does the motor lock if you set idle_ms to 255?
After setting idle_ms to 255 and restarting, try sending $ME and $MD to see if either locks.
Note: The power wiring is probably not an issue now, but will need to be increase to at least 16awg
Does the motor lock if you set idle_ms to 255?
Nope. Restarted the ESP32 board a couple times to confirm.
try sending $ME and $MD to see if either locks.
Both get an "ok" response message, but the motor does not lock. I'm not 100% confident I have the right config setup for the enable/disable feature, but it does match the sample config on the board's wiki page. FWIW I've tried setting use_enable
to both true
and false
, and with and without the shared_stepper_disable_pin: NO_PIN
setting.
Note: The power wiring is probably not an issue now, but will need to be increase to at least 16awg
Noted!
I use that controller for my full time FluidNC test rig. This is my x axis config. You can ignore the low on the dir pin.
x:
steps_per_mm: 400.000000
max_rate_mm_per_min: 1500.000000
acceleration_mm_per_sec2: 100.000000
max_travel_mm: 1000.000000
soft_limits: false
homing:
cycle: 2
allow_single_axis: true
positive_direction: false
mpos_mm: 0.000000
feed_mm_per_min: 700.000000
seek_mm_per_min: 1500.000000
settle_ms: 250
seek_scaler: 1.100000
feed_scaler: 1.100000
motor0:
limit_neg_pin: 'gpio.35:low'
limit_pos_pin: NO_PIN
limit_all_pin: NO_PIN
hard_limits: true
pulloff_mm: 2.000000
tmc_2209:
addr: 0
cs_pin: NO_PIN
uart_num: 1
step_pin: I2SO.2
direction_pin: 'I2SO.1:low'
disable_pin: I2SO.0
r_sense_ohms: 0.110000
run_amps: 1.800000
hold_amps: 0.500000
microsteps: 16
toff_disable: 0
toff_stealthchop: 5
use_enable: false
run_mode: StealthChop
homing_mode: StealthChop
homing_amps: 1.500000
stallguard: 0
stallguard_debug: false
toff_coolstep: 3
I just copied that into my config over my X section, but got the same result. I also copied it over for my Y axis, replacing all the pin assignments to match what I had before. In each case I restarted the ESP32 a few times, tried $ME and $MD, and tried G0 cmds.
I also tried out a few different stepper motors, including a much smaller one just in case it was a current draw or internal wiring problem.
I'm attaching a closer pic of my ESP32 module, in case it sparks any questions.
Is the disable/enable handled via UART or through a direct pin connection? Is it possible that the pins on the ESP32 or some circuitry in between the chips is bad? So strange that the ESP32 can connect and send cmds to the TMC2209s over UART, and neither chip seems to think anything is wrong.
Also try with the second motor connector to see if the first TMC2209 could be faulty or poorly-soldered.
The 12.3V on the terminal blocks seems interesting, right? Does that indicate that the motors are actually in a lock state, but maybe not getting enough current? I'm still able to spin the shaft by hand as well as when it's unpowered.
Edit: I just swapped out the motor +/- wires with thicker ones I cannabalized from some alligator clip wires to check if current was a problem. Same results though :(
If the terminal blocks have 12.3 V on all the pins and the motors spin easily, the only things I can think of are either
I suppose you could try 1 for hold_amps instead of 0.5 - but 0.5 should be enough to lock. I guess you could put an ammeter in series with a motor winding.
Actually, I would expect that at least one of the terminals would be at some voltage other than 12.3, enough differential to force 0.5A of current through the motor.
I've increased the hold_amps
for the X axis to 1.0. I've also verified that r_sense
for both motors is 0.11
. Just for funsies I measured the resistance of the big 0.11 Ohm resistors near the X and Y terminal blocks (R24, R20, R25, R21) and got 0.9
Ohms -- but my multimeter only goes down to the 100s range with 1 decimal place, so maybe that's just a red herring.
I just tried a couple different ways of wiring up the motor wires. From left to right in the top-down pic you posted above, I've tried these, with the same results each time:
A- A+ B- B+
A- A+ B+ B-
A+ A- B+ B-
A+ A- B- B+
Given that (1) the config and status messages seem to be alright, (2) both the X and Y motor outputs seem to be acting identically and (3) the ESP32 seems to be able to talk to the TMC2209s OK, I'm starting to think that maybe my ESP32 board is not quite right. Seems more likely that the 1 ESP32 board is wonky vs both/all of the TMC2209s 🤔 They're cheap and easy to swap out though, so I'm down for getting another to try out.
Can either of you link to a known-good board/vendor that I can pick up for testing?
FWIW I bought the 32E variant of this: https://www.amazon.com/dp/B09MQJWQN2
How about sending the board to me to figure out the problem?
I measured the stepper driver terminals. They are all at VMot in disabled mode.
It is possible there are problems with the I2SO pin expander circuit. It is used to control the stepper signals. That is used on most FluidNC controllers. It is a relatively simple circuit and I don't recall any previous issues other than some DIY breadboards.
How about sending the board to me to figure out the problem?
Sure! I'm on the Discord if you want to DM me an address there.
Re: the I2SO expander, I just measured the voltage at pin 15 of U1 after sending $ME
and again after $MD
. In both cases I got 3.6V (high @ 3.3V logic?). Maybe I can try manually shorting pin 15 to GND to make it go low?
Is it possible that connecting or disconnecting the motors while the VMOT PSU is connected damaged the TMC2209s in some way? I've probably done that at least once when I was trying out different wire color orders and motors. I wasn't even thinking about that, but I just remembered that was a problem with older drivers like the A4988.
Forcing the i2so chips could damage them and the esp32.
Hot connecting should damage them, but it have done it several times without total failure.
The fact that $MD/$ME does not change the voltage on pin 15 makes it likely that the I2SO shift register chips are not working. It could be caused by a failed chip or by bad soldering that prevents the serial signals from reaching the chip.
I got your controller. I could not get it to work. I replaced the ESP32 and it appears to work. I'll do some more testing with your config and send it back.
Ahhh that's so annoying haha. I wonder if the chipset is a little different, or maybe the part was defective in some way 🤔 Or maybe I fried something without realizing it from plugging/unplugging it at the wrong times. Thanks for figuring that out!!
Wiki Search Terms
motor lock tmc2209
Controller Board
4 Axis TMC2209 CNC Controller
Machine Description
No machine yet, just smoke testing the electronics components and learning FluidNC. One stepper motor installed on the X axis, with a 12V PSU wired to the motor power terminal block.
Input Circuits
No response
Configuration file
Startup Messages
User Interface Software
FluidNC Web Installer and FluidTerm
What happened?
Upon powering up (motors first, then ESP32 board), the connected motor (X) does not lock/engage. I followed the Debug No Motion section of the Motor Setup Flowchart in the wiki, and have not been able to get the motor working.
I'm pretty sure the stepper motor is wired up correctly, and I've tried a few different wiring combos just in case. I've identified the 2 pairs of coil wires using a continuity checker and by the "twist test" (holding 2 wires together and manually spinning the shaft while unpowered). The wire colors correspond to the coils like so:
I've verified that the TMC2209 drivers are receiving 12V for their VMOT pins by measuring the voltage across the large cap C30.
I've verified that my ESP32 board (Espressif ESP32-DevKitC-32E) uses the WROOM chip and not WROVER - because I ordered a WROVER one first and would always get startup errors about the X and Y drivers not responding.
I've tried manually sending
G0
commands via FluidTerm to the board with a wide range of values in case the steps per mm are just way off, but the shaft doesn't spin.GCode File
No response
Other Information
Grbl settings from
$$