HDC2450 USB disconnects when sending motor commands with larger values

7 years 8 months ago #29531256 by pohetsn
I am trying to communicate with Roboteq from Raspberry Pi running Raspbian. I use python (pySerial) to write serial commands to HDC2450. However, recently, I found that if I send relatively large motor command values (e.g., !M 750 0), it is very likely, but not always, that USB will disconnect. Usually, after sending the motor commands, I will first observe the wheel turns, and then a serial write error as well as USB disconnects. This only happens when sending relatively large values of motor commands to the HDC2450. USB never disconnects when I query the encoder at 100Hz, or sending motor commands "!M 0 0". However, as the motor command value increases, the likelihood of USB disconnection also increased.

I've updated the fireware, tried open-loop control, and increased encoder pulse/rev (so that the same movement speed is achieve by sending smaller numbers). However, all these did not solve the problem. However, if I use Roborun+ to send large values of motor commands (!M 1000 0), such problem does not seem to happen (need more testing though). So, I'm really really confused. Any troubleshooting idea is very welcome. Thanks!

Please Log in or Create an account to join the conversation.

7 years 8 months ago #29531258 by TechSupport
The USB is not very robust communication and is known to drop communication when motor is used. RS232 should be used.

Please Log in or Create an account to join the conversation.

7 years 7 months ago #29531311 by pohetsn
i see. so, if I use a USB to RS232 cable to connect my laptop (usb) and HDC2450 (RS232), will that give me a reliable connection? thanks again.

Please Log in or Create an account to join the conversation.

7 years 7 months ago #29531316 by TechSupport
Yes. This is what we use and also the cheapest that is supported up to windows 8.1 without any issues.

www.serialcomm.com/USB_adapters/USB_conv...ct_general_info.aspx
The following user(s) said Thank You: pohetsn

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.066 seconds