I’m experiencing a strange bug while controlling two motors whith my odrive. I’m controlling the motors thru the step/dir interface with the same signal, but most of the time only one motor spins, and I get no error on the axis.
here some screenshots of some plots :
In this plot we can see that M0 doesn’t move, and that
axis0.controller.vel_integrator_current remain 0. And at the same time we see that vel_des goes to its lower limit.
Sometimes after a few moment I have one of the motor that start spinning very fast for a very short time (half a second or so) and then I get an error_overspeed as you can see in this screenshot :
I’m stuck with this bug for a few days now, any help would be greatly appreciated.
here’s one other exemple of the error_overspeed (this time on M1)
and here we have M1 not spinning without reporting any error (same curves as the previous plot):
what is your config for encoder.config.use_index? both behavior (not running / overspeed) seems like actual and tracked encoder count goes out of sync. To check this instead of shadow_count, can you try plotting
I’ve changed my configuration now so i can’t check but indeed these problems came when I changed
true. but I think it persisted even when I set it back to
false. I’ll try to reproduce the bug later today and plot
here it is :
use_index = true, and odrive is programmed to perform the index search on reboot.
when I don’t use the index I get no error and both motor spins :
There is probably false positive in the index signal that is triggering an interrupt when it isn’t supposed to… You should take a peek with an oscilloscope while motor is running. Also keep in mind polarity of index pulse matters.
My problem is due to noise and I don’t use index for this reason.
I did make a differential line driver/receiver board (with RS422 tranceivers) for the encoder hoping it will solve the problem. It only works for a few seconds when I start the motor and I am trying to figure out why. (maybe I’ll try this with an isolator+isolated prw between ODrive and the diff receiver)
Have you tried to use an absolute encoder beside your incremental encoder? (I’ve seen this in someone’s project but I don’t remember who it was). This would solved our problem and we could even skip the index search right?
Yes I am indeed using absolute encoders for my projects (CUI AMT203) and you can set it up to skip any calibration. I am using a modified firmware to do this. Checkout this comment from Wetmelon referring to the RazorsEdge branch for this feature.