You are here

Trampa VESC6 USB connectivity problem caused by usb hub?

5 posts / 0 new
Last post
hagoston
Offline
Last seen: 2 years 8 months ago
Joined: 2021-03-08 13:39
Posts: 7
Trampa VESC6 USB connectivity problem caused by usb hub?

Dear all,

I have 2 Trampa VESC6 MkVs, successfully configured each one separately with the vesc tool via usb cable.

Then I tried to use them at the same time through an usb hub, which didn't work. After that I am unable to connect to the boards separately (usb hub skipped). VESC tool always popup with the following error message: "Could not autoconnect. Make sure that the USB cable is plugged in and that the VESC is powered".

Also - under linux - serial port does not appear under /dev/ttyACM* as it did before.

I got this in dmesg log:

[ 3600.146233] usb 1-2: new full-speed USB device number 34 using xhci_hcd
[ 3600.274104] usb 1-2: device descriptor read/64, error -71
[ 3600.510186] usb 1-2: device descriptor read/64, error -71
[ 3600.750046] usb 1-2: new full-speed USB device number 35 using xhci_hcd
[ 3600.878025] usb 1-2: device descriptor read/64, error -71
[ 3601.114032] usb 1-2: device descriptor read/64, error -71
[ 3601.222282] usb usb1-port2: attempt power cycle
[ 3601.874005] usb 1-2: new full-speed USB device number 36 using xhci_hcd
[ 3601.874335] usb 1-2: Device not responding to setup address.
[ 3602.082587] usb 1-2: Device not responding to setup address.
[ 3602.289900] usb 1-2: device not accepting address 36, error -71
[ 3602.418095] usb 1-2: new full-speed USB device number 37 using xhci_hcd
[ 3602.418436] usb 1-2: Device not responding to setup address.
[ 3602.626283] usb 1-2: Device not responding to setup address.
[ 3602.833956] usb 1-2: device not accepting address 37, error -71
[ 3602.834124] usb usb1-port2: unable to enumerate USB device

 

Could you pleas help me to solve this problem? 

Thanks in advance

/Ágoston

 

frank
Offline
Last seen: 3 weeks 6 days ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 847

Plugging them both in via USB creates a GND loop in between the two separate motor controllers. You basically interconnect GND of both units. This is not a good idea, since it can damage the devices.

If you open VESC-Tool and go to the connection tab, you can click on the REFRESH SERIAL PORT LIST icon, next to the baude rate field. Then see if the serial port changes and if you can connect again.

Checking the hardware for damage: You can check if the 3.3V rail is still alive and stable on any of the units and if the blue light is still present.

hagoston
Offline
Last seen: 2 years 8 months ago
Joined: 2021-03-08 13:39
Posts: 7

Thanks for the reply.

Looks like there is no problem with the stable 5V and 3.3V measured in CAN, PPM, COMM, SWD, SENSE ports, blue light is also present. VESC-Tool however shows no available serial port on the list.

I was able to connect and reflash using this method from a different, working vesc through the SWD port (with CLK, GND, IO pins) with the vesc-tool / SWD Prog tab, but remains unreachable through USB cable. Is there anything I can try to fix this?

 

I didn't think using a USB hub could cause such a problem, as its main purpose is to let connect more devices than your existing USB ports allow. In my project I would like to use 4 vesc + motor to control a 4 wheel robot using ROS. Is there any preferred method to communicate with more vesc simultaneously? I found some code controlling the VESCs over UART, but an SPI / I2C bus whould be more advantageous. Is there any documentation / sample code available on those?

 

frank
Offline
Last seen: 3 weeks 6 days ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 847

Ideally you use CAN, since you will not face GND loop issues. If you use SPI or UART you have to be extra carful with GND loops and ideally you decouple the units from each other using galvanic decoupling methods. I can imagine that you damaged your VESC 6 MKV controllers via the GND loop you created via the USB port. Basically you had a straight GND connection in between both logic stages. One way to communicate with the VESCs right now would be the use of a NRF dongle and see if you can connect via UART to VESC-Tool. Sometimes the solution is as simple as using a better USB cable, since many USB cables are crap and do not even feature all wire connections (charge only USB cables) or they have thin and brittle wires, bad shielding etc.

hagoston
Offline
Last seen: 2 years 8 months ago
Joined: 2021-03-08 13:39
Posts: 7

I was able to access the VESC with the NRF dongle - thanks for the tip! Looks like everything works fine except the USB port.

Now, my plan is to use one vesc as master (which has working usb port) and connecting the other 3 on CAN bus. Is there any limitation on the maximum number of vescs on the CAN bus? Simply connecting the CL/CH ports should work? 

I'll try to use this COMM_FORWARD_CAN message type to access the devices on the bus through the master using UART.

Any tips and tricks would be greatly appreciated, thanks.