We bought an Odrive for UNI purposes, and set it up with an Arduino using the library from github.
Using the “b” option that return the vbus voltage shows a highly irregular behavior:
Measured 5 seconds between the pings. I shows either 0, 4, or 47.xx V. Its powered with 48V from a bench PSU.
the calibration works fine (I assume) but the motor dosents run. We’ve connected both the phases, the 5v, the GND and the encoders on A and B.
Hope something experienced a similar thing, and can help us out.
/usr/local/lib/python3.6/dist-packages/odrive/utils.py in dump_errors(odrv, clear)
81 (‘axis’, axis, {k: v for k, v in odrive.enums.dict .items() if k.startswith(“AXIS_ERROR_”)}),
82 (‘motor’, axis.motor, {k: v for k, v in odrive.enums.dict .items() if k.startswith(“MOTOR_ERROR_”)}),
—> 83 (‘fet_thermistor’, axis.fet_thermistor, {k: v for k, v in odrive.enums.dict .items() if k.startswith(“THERMISTOR_CURRENT_LIMITER_ERROR”)}),
84 (‘motor_thermistor’, axis.motor_thermistor, {k: v for k, v in odrive.enums.dict .items() if k.startswith(“THERMISTOR_CURRENT_LIMITER_ERROR”)}),
85 (‘encoder’, axis.encoder, {k: v for k, v in odrive.enums.dict .items() if k.startswith(“ENCODER_ERROR_”)}),
I tried replugging it into the arduino. First ran the calibration. then “s” but motor did not turn…
Then I ran the “b” command a couple of times, and once again, you can see the output varies:
Which type of arduino are you using? If it is an Uno, then the example code might behave strangely. The hardware serial of the Uno is used for the serial monitor, and software serial is not very performant.
Can you try going through the getting started guide, with a PC using odrivetool? What motor and encoder are you using?
Hi @Fredzibob I think I had similar issues with the test sketch also, where I re-wrote the arduino sketch for my Mega 2560 running ASCII protocol to talk to the ODrive over serial.
Feel free to look at my code Here and see how I communicate with it.