I have been working to get two odrives working together outside of odrive tool through a raspberry pi and I have run into a number of issues. For the third time (and a couple of odrives later ) I burnt out the encoder ports. (testing with a voltmeter reveals that ground, Z, B, and A are all connected) But this time there was massive amounts of smoke.
However, the cause of this smoke seems unexplainable. As I attempted to turn on the motor of one odrive, the OTHER one began smoking. Please help.
My code is as follows:
def __init__ ():
self.radius_SN = 35601883739976
self.theta_SN = 62161990005815
dev = usb.core.find(find_all=1, idVendor=0x1209, idProduct=0x0d32)
od = []
a = next(dev)
od.append(odrive.find_any('usb:%s:%s' % (a.bus, a.address)))
print('connected 1')
a = next(dev)
od.append(odrive.find_any('usb:%s:%s' % (a.bus, a.address)))
print('connected 2')
if od[0].serial_number == radius_SN:
self.radius_odrive = od[0]
self.theta_odrive = od[1]
else:
self.radius_odrive = od[1]
self.theta_odrive = od[0])
***once i initialized the motors, I calibrated the theta_odrive and set the vel_limit on its axis 0. Following, I:
self.theta_odrive.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
self.theta_odrive.controller.config.control_mode = CTRL_MODE_VELOCITY_CONTROL
self.theta_odrive.controller.vel_setpoint = 150000
Port 0 on the radius_odrive (other one) then proceeded to smoke and burn out.
Let me know if anyone has any insight. Iām thinking maybe there is an issue with grounding, but honestly, Iām very lost.