0
\$\begingroup\$

This is part of a project where I wanted to bypass using a microcontroller and control motors directly with my laptop. I'm using a usb-to-serial cable and use the serial RTS and DTR to control a TA7291P motor bridge which powers two hobby motors. It has worked fine save for a yet untraceable, random bug where linux stops recognizing the USB port after a random time interval (1-20 minutes) for a brief moment, which is long enough to make the program (using pyserial) require a restart. To drive both the motors at the 'same' time, I alternate RTS/DTR in 5ms intervals.

My two questions are: Should I be attaching the serial ground to a communal ground(it is currently not connected to anything)? Might my abuse of the RTS/DTR functions be causing the bug?

I'm still assuming the bug must be some disagreement between pyserial and linux (and out of the scope of this post), but just in case I'd like to check if it's a hardware cause.

Circuit diagram http://www.e-alexander.net/img/scircuit1.png

\$\endgroup\$
0
\$\begingroup\$

Yes, of course the serial ground needs to be connected to the ground of the H-bridge. I don't know what you mean by "abuse" of RTS and DTR. What are the voltage levels of these signals? If they are true RS-232 signals rather than 5 volt logic signals then, yes, that could be a problem.

\$\endgroup\$
  • \$\begingroup\$ They are just the 5v logic signals. 'Abuse' meaning using them not for what they were designed for, but I figured flickering them on and off were well within their parameters. \$\endgroup\$ – Norbles Feb 3 '14 at 1:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.