-
Notifications
You must be signed in to change notification settings - Fork 29
Motor current
In the following oscilloscope diagrams the yellow signal is the step signal. Every pulse moves the motor one microstep. The blue curve is the motor current from one of the motor coils. The current in the other coil looks the same, but has a phase shift.
SpreadCycle™ PWM Chopper is the basic chopper mode for the TMC2209
tmc.set_current(800)
tmc.set_interpolation(False)
tmc.set_spreadcycle(True)
tmc.set_mcrostepping_resolution(2)
StealthChop™ Voltage Chopper is a more advanced chopper mode on the TMC2209. It is quieter than the SpreadCycle mode, but less capable for high dynamics and high speeds. If the load on the motor is not too high this is the chopper mode, that should be used.
tmc.set_current(800)
tmc.set_interpolation(False)
tmc.set_spreadcycle(False)
tmc.set_mcrostepping_resolution(2)
In Fullstepping only a sequence of 4 different polarities of both motor coils is being used. When using microstepping the motor coils there are more steps in between in which the coils are partially energized. With microstepping the movement gets smoother, but some torque will be lost.
tmc.set_current(800)
tmc.set_interpolation(False)
tmc.set_spreadcycle(True)
tmc.set_mcrostepping_resolution(1)
The TMC2209 has the capability to interpolate the steps from the Raspberry Pi up to 256 microstepping. The Raspberry Pi with Python is not fast enough for native 256 microstepping with reasonable speeds, so this is a good possibility to get much smoother motor movement.
tmc.set_current(800)
tmc.set_interpolation(True)
tmc.set_spreadcycle(True)
tmc.set_mcrostepping_resolution(2)
tmc.set_current(200)
tmc.set_interpolation(False)
tmc.set_spreadcycle(True)
tmc.set_mcrostepping_resolution(2)