Hello,
I’ve been trying to get the step/dir interface working with my ODrive and ran into this odd problem:
*Been tested using Grbl Mega and Duet 2 Wifi as interfaces, issue is the same for both
The issue rises from what I see as a critical step input pulse frequency.
Below 5kHz - works perfectly, love it
Above 5-6kHz - not so much
The motor will spin slowly for a 0.25 - 0.5 turns, then stop and pause (initial movement is in the correct direction). The pause length is proportional to the commanded distance (the pause is roughly 10x longer for a 100mm move than for a 10mm move). Then the motor will execute the command properly.
In all the tests I set the mm/step = turns/step in both the config of both the microcontroller and the ODrive, as such 1mm = 1turn.
Very short commands (~1-2mm) are usually executed immediately and correctly without delay, regardless of settings.
I’ve tested the following:
-
Steps/mm = 1024, V = 1800mm/min, A = 60mm/s/s, the delay issue occurs (f = 30.720kHz)
-
Same as #1, but V = 600mm/min -> issue is the same (f = 10.240kHz)
-
Same as #1, but V = 300mm/min -> works perfectly (f = 5.120kHz)
-
Same as #1, but V = 350mm/min -> immediately executes, but has weird increase in velocity at the end (f = 5.973kHz)
-
Same as #1, but V = 400mm/min -> same as #4 (f = 6.826kHz)
**Tried a 100mm move, the slower velocity duration increases with longer moves, slower velocity seems to be ~1-3 turns/s. -
Same as #1, but V = 500mm/min -> same as #1 (f = 8.533kHz)
-
Same as #3 but a = 200 mm/s/s -> works perfectly (f = 5.120kHz)
-
Set steps/mm = 10 and turns_per_step = 1/10, same V & A as #1 -> works perfectly (f = 0.3kHz)
-
Set steps/mm = 100, turns_per_step = 1/100, same V&A as #1 -> works perfectly (f = 3kHz)
-
Set steps/mm = 400, turns_per_step = 1/400, same V & A as #1 -> issue is the same (f = 12kHz)
The site says, 50kHz maximum step rate, so I’m not sure why it stops working correctly above ~5kHz.
The motor is not attached to anything:
- Motor = Turnigy sensorless 190Kv
- 24V v3.6 board, with most recent firmware
- AS5047P in incremental with index (works great as tested from the anaconda terminal)
- vel_limit is higher than any of the commanded speeds
- 12V, 33A power supply
Ideally, I’d like to use 1/2000 or 1/4000 turns/step to get great resolution at speeds of 30turns/s
Cheers