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.