Noobie issues day 2

OK, on Friday afternoon we received our first board, got it to work with a 4 inch hover board hub-motor with inbuilt ab encoder (no index) FYI, We are running from a Lead acid battery and it’s sitting at 12.6V still

in 10 minutes we got it calibrating and then tuned the velocity loop, we then started tuning the position loop, got some error but decided to call it a day, didn’t note down the error. For a few minutes it worked better than 3 other commercial drivers we have been testing with, so we have ordered more and are updating a chassis design to incorporate this board.

So day 2, after a long weekend, we haven’t been able to get it to pass calibration…it beeps then drives in one direction for a half turn and never reverses, no motor error, and a axis errors of 0x41

We did an erase config
Set current limit 10A (was the default anyway)
set velocity limit 20,000 (was the default)
set the motor calibration current to 3A
Set brake resistance (default anyway)
Set Pole Pairs = 10
motor type to high current
Encoder cpr 4096
Then saved and ran Calibration sequence and still getting the same 0x41 axis error and no Motor errors

Do we need to change request current range, I remember reading about that last friday, might have changed it, what does it do, what is a good value, default is 70?

Any suggestions, we have gone backwards!

Just noticed the Odrv0.save.configeration() Does not seem to be saving some values if we reset the power. for example we set the calibration current to 10A but after restart it’s back to 3A

Hi Ben,
Thanks for your patience with ODrive, I hope it will work well for you eventually.
I think you are running into at least 2 known issues that I can highlight:

There is a bug that means when there is an encoder error, the axis error will say “motor failed” error but, it should be “encoder failed error”. This was fixed in commit 955aba1 and hence released in fw-v0.4.1. You can update the firmware, or you can read out the encoder error when you get error 0x40 or 0x41.

The known issue is:


Despite the title, I think maybe you only get 1 save per boot right now. Check my comment at the bottom of that issue. We will try to fix this as soon as we get the time.

Sorry about these issues, and let me know how it goes!

Thanks to madcowswe, we solved a few minor issues and found the major issue to be our encoder had stopped working, wiring was all good but our encoder was no longer able to pull the odrive inputs down hard, not sure if the pull up resistor on the Odrive is too low a resistance for our encoder or if we damaged the optical encoder at some point, we did command the motor to spin a bit fast at one point.
Swapping in a new motor (and hence new internal encoder) has solved the issue in the short term and perhaps in the long term if it doesn’t burn out the optos.

1 Like

Opened up the motor and found the Optical encoder had let out some smoke, leaving residue on the reflector disc.
Not sure why it failed, I checked the current sink limit of the optical sensor and the 3k3 pull ups on the Odrive are well sized, so that is not the issue. Might have been chance, we will see as we do further testing with a new complete motor in it’s place.

1 Like

Ok, New day, just finished wiring up the odrive, more neatly, now have two motors connected and have removed the brake resistor for testing, we are using a 12v Lead acid battery and want to test if they can absorb the regen, thinking the braking resistor might not be necessary, Guess I set the Resistor value to something high and it should be safe because my understanding the drive will free wheel if the bus voltage rises to high? Not sure yet how it knows what is too high, I’ll have a look in the code, unless somebody jumps in and tells me what to configure.

Ok just found I should set it to 0 ohms when not using any resistor

ddc_bus_overvoltage_trip_level = 14.8
ddc_bus_undervoltage_trip_level = 8.0