Hello everyone, I need your help! I’m trying to build a self-balancing robot and I ran into an issue. Here’s where I’m at.
I’m following the guide found here.
I’ve got Python installed, I’ve successfully connected to the odrive, and I can send it commands. I have successfully calibrated my motors (‘hoverboard’ motors) with the appropriate settings. There’s a calibration script in that repository which writes all the settings, which are in line with those given by odrive. When I calibrate the motors, I hear a beep. They spin one way, and then the other, and then the controller reboots.
I can talk to them using the odrivetool. If I type:
odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
followed by:
odrv0.axis0.controller.current_setpoint = 3
The motors spin (respectively, it works equally on both channels). So everything through the odrivetool command line interface works as expected.
When I connect my arduiono mega (with the full code found in the repo above) only one channel wants to work and it’s consistently axis0. Axis1 doesn’t seem to respond. I’ve swapped motors, swapped cables, swapped physical wiring positions, etc. It follows axis0. One motor at a time seems to work, but both of them will not work. One will just stutter a little bit. Once one starts to stutter, that channel seems to fail until I reboot the odrive (removing power and re-applying power). I’ve checked the cables and motors, I can get them both to work with either cable.
The battery is a 6S 6AH, and it’s at ~90% and is rated for like 100C, so current shouldn’t be an issue. I’ve used hoverboard motors before (with VESC controllers, so I’m familiar with how to wire them, etc).
Here’s a short video of what’s happening.