After running the setup commands listed under ODrive configuration and Hoverboard motor configuration, I am unable to get the motor to spin.
This is the output I get when I run dump_errors(odrv0):
In [24]: dump_errors(odrv0)
system: no error
axis0
axis: Error(s):
AXIS_ERROR_INVALID_STATE
motor: no error
sensorless_estimator: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: no error
sensorless_estimator: no error
encoder: no error
controller: no error
I noticed after running odrv0.axis0.motor that I get ‘error: 16777216 (uint64)’ but all else appears to be working.
After running ‘odrv0.axis0.encoder’:
Having personally used the hoverboard motors, definitely make sure you get the hall effect encoder with capacitors setup correctly. I’ll try and find a link to the individual post that helped guide my through it.
It may seem silly but did you enable closed loop before trying to command the hoverboard motor?
Awesome, thanks for this advice. Did you find that without the capacitors the motors didnt run, or was it just the encoders were more consistent with capacitors?
If I recall correctly, I could not get the motor to perform at all before I made the small board. The board really was needed in my case. Perhaps in yours as well.
If you get invalid state after this set of parameters, it’s because you need to do the encoder offset calibration. With that said, I don’t think you need to do it with HALL sensors. Have you tried odrv0.erase_configuration() and then these same commands again? Also, might want to set dc_max_negative to something like -1
I see, thanks for your response! I have tried erasing the configuration, but I keep running into the same issue. Would you mind telling me which specific commands to run for the encoder offset calibration?
I had a similar issue, and I not only could not get the motors working, but couldn’t get them working with 22nF caps either! It took 47nF caps before the encoders wouldn’t fault out. Don’t worry, it’s not you…the ODrive board is noisy as hell! Here’s a board we designed to make it easy to use caps, and just plug in…
I was actually able to get it working! I found that the power supply I was using was the issue. The supply I used had a knob/potentiometer to set the voltage, and for some reason if I turned it slowly to set the voltage, the device wouldn’t be recognized through USB.
To solve this issue, I made sure to turn the knob very quickly up to the desired voltage, which seemed to give it enough current to be recognized as a USB device. I’m not sure why this is an issue, but an easy way around solving it is to just turn the power supply on to the required voltage, and then use a relay to switch it on when you want to use the motor drives. This is what I ended up doing, and I haven’t had the problem since.