Last monday afternoon, I tried to use commit 6e60ec4631bcb72d96124c52eaa0aa9a9a53262c in the hope to see those USB problems gone (i did reflash the board)
Using CONFIG_USB_PROTOCOL=native (and not native-stream! i forgot), i’m fairly confident that the usb problem is still there.
i used
root@MTBD00694:~/ODrive# cat Firmware/tup.config
# Copy this file to tup.config and adapt it to your needs
# make sure this fits your board
CONFIG_BOARD_VERSION=v3.2
CONFIG_USB_PROTOCOL=native
CONFIG_UART_PROTOCOL=ascii
CONFIG_STEP_DIR=n
root@MTBD00694:~/ODrive#
and re-run my previous experiment: sending back and forth commands to odrive under serious mecanical load to see what happens
using the following odrive configuration
## configuring odrive
self.my_odrive.config.brake_resistance = 0.47
self.my_odrive.motor0.config.vel_limit = 20000.0 * 10 # 10x the default 20000
self.my_odrive.motor1.config.vel_limit = 20000.0 * 10 # 10x the default 20000
self.my_odrive.motor0.current_control.config.current_lim = 50.0 # defaults to 10
self.my_odrive.motor1.current_control.config.current_lim = 50.0 # defaults to 10
(notice the foolish current_lim…)
Since I could already observe that the mecanical precision was satisfying (none axis move shift towards a given given direction over time), I used another power supply (24V/25A, configured on 18V) and used a maybe foolish current_lim at 50 instead of the default 10, because I wanted to have serious torque while the motor was not spinning.
I started the experiment at 19h39, after about 10 minutes running smoothly, I left the lab to head home.
I still had the mecanical load + I still had the 2m usb extension cable. (it was a pain to reduce the distance between the odrive and the PC)
When I got back in the morning, I had forgotten about the experiment running? I went to another location to focus instead on math and python code for trajectory planning. When I was finally happy with the code and unittests, I came back to the lab to experiment the new trajectory planner.
First of the all, the machine was no longer moving, I was disappointed of course. The belt where strangely very loose but where still in position everywhere. I also noticed a strange smell, as if somebody left a soldering iron turned on. On PC, I noticed that the previous evening the script had stopped at 20h23 with a USBError: [Errno 5] Input/Output Error (see details below)
But then, M0 was freely spinning (with resistance) but M1 was resisting. Then i realised the odrive was still under power. a funny faint vibration sound was emitted by M1, nothing from M0. when i touched M1, i got burnt. Was super hot, you could cook an egg on it.
I immediately turned the power off.
Turns out that the delrin motor socket partly melted under the heat and the 4 motor mounting screws basically penetrated the delrin and shifted the motors in the direction of tension for the belt (explaining why the belt where so loose). the white delrin was deformed and partly yellowish. I guess I’m lucky it didn’t catch fire at night…
My explanation is that the USB exception on the PC side made the script stopped. Then the odrive would no longer receive movement orders but would continue to operate. So it basically kept asking the motors to hold position, drawing current, increasing the heat… for about 24h
Now the two motors are burnt/dead for sure. Their labels are yellowish. there is a lot of friction/resistance internally, as if it was full of jam or caramel.
The funny thing is that this odrive 3.2 still replies to USB and accept commands.
I replaced my two dead motors and powered on the odrive. It makes zero beep, the motors initialization sequence does not happen (nothing moves). Besides, even without power at all, M0 physically resists at bit, while it does not it i electrically unplug it from my odrive 3.2 !!! (a behavior I never observed in the past that makes me think the board is likely dead)
Question is: did i just fry my second odrive 3.2?
Traceback (most recent call last):
File "/root/odrive_test/odrive/usbbulk_transport.py", line 77, in process_packet
ret = self.epw.write(usbBuffer, 0)
File "/usr/local/lib/python3.5/dist-packages/usb/core.py", line 387, in write
return self.device.write(self, data, timeout)
File "/usr/local/lib/python3.5/dist-packages/usb/core.py", line 948, in write
self.__get_timeout(timeout)
File "/usr/local/lib/python3.5/dist-packages/usb/backend/libusb1.py", line 824, in bulk_write
timeout)
File "/usr/local/lib/python3.5/dist-packages/usb/backend/libusb1.py", line 920, in __write
_check(retval)
File "/usr/local/lib/python3.5/dist-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 5] Input/Output Error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "corexy.py", line 444, in <module>
c.send_cmds("G0 X0 Y-550") ; time.sleep(d)
File "corexy.py", line 128, in send_cmds
res = self.__handle_cmd(cmd)
File "corexy.py", line 157, in __handle_cmd
return self.__parse_goto(cmd[2:])
File "corexy.py", line 179, in __parse_goto
return self.__goto(target_x, target_y)
File "corexy.py", line 215, in __goto
self.__move_motors(dA_steps, dB_steps)
File "corexy.py", line 300, in __move_motors
self.my_odrive.motor0.set_pos_setpoint(int(self.cur_a), 0.0, 0.0)
File "/root/odrive_test/odrive/core.py", line 61, in call_remote_function
arg_properties[i].fset(None, args[i])
File "/root/odrive_test/odrive/core.py", line 51, in fset
self._channel.remote_endpoint_operation(self._id, buffer, True, 0)
File "/root/odrive_test/odrive/protocol.py", line 245, in remote_endpoint_operation
self._output.process_packet(packet)
File "/root/odrive_test/odrive/usbbulk_transport.py", line 84, in process_packet
self.epw.clear_halt()
File "/usr/local/lib/python3.5/dist-packages/usb/core.py", line 406, in clear_halt
self.device.clear_halt(self.bEndpointAddress)
File "/usr/local/lib/python3.5/dist-packages/usb/core.py", line 909, in clear_halt
self._ctx.backend.clear_halt(self._ctx.handle, ep)
File "/usr/local/lib/python3.5/dist-packages/usb/backend/libusb1.py", line 889, in clear_halt
_check(self.lib.libusb_clear_halt(dev_handle.handle, ep))
File "/usr/local/lib/python3.5/dist-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno None] Other error