TMCstepper - Arduino - TMC2209

Its not, that's why the VACTUAL example is not particularly good. Its only useful if you have a closed loop stepper with an encoder.

This would also take the load off generating steps out from the microcontroller, so it would be optimal. But more complex.

You want to use some library like the flexystepper, or if you need more speed use speedystepper.

You could also use less microsteps, i don't think you really benefit from having 256 microsteps. This will just drain your MC unnecessarily as it needs to generate so many steps. This is the reason you can't get high enough speeds. You will also lose torque by using unnecessary microsteps. You can get perfectly smooth movement with much fewer microsteps.

Maybe also try using spreadCycle, in most cases it will make the stepper more smooth & silent.

I think toff(3) might be required for spreadCycle, not sure.

driver.en_spreadCycle(true);     // spreadCycle

Also, you need 1k resistor between the TX / RX. TMC2209 uses one wire UART?

With your setup, i think you have only one way UART connection. And if that's enough, you can just remove the other wire completely. It just means you can send commands but cant receive data from the driver.

You can test the two sided connection by setting your microsteps to anything other than 256 and then trying to read them. As it reads 256 when the connection is not working.

driver.microsteps(2);         // Set microsteps  to 2
Serial.print(F("Read microsteps via UART to test UART receive : "));
Serial.println(driver.microsteps());  //check if reads 2
1 Like