Computer Control

I would like to know how to control the speed of a small DC motor via serial or USB. I have general electrical and programming knowledge, but I have no idea how I would do this. I have found http://www.lvr.com/usb.htm..

Any help?

sort by: active | newest | oldest
hooloovoo339 years ago
any ideas on how to do this from a modem or Ethernet? I'd like to control a motor, but i dont have a serial port.....
westfw10 years ago
How's this?

It should work even through a USB->serial converter.
Crash2108 (author)  westfw10 years ago
That shall work.
Honus10 years ago
If you can use a stepper motor you can use something like this:

It looks like you could also use the MAKE controller in connected mode:

Either one of these would be a direct computer interface, but they're fairly expensive solutions. I know I've seen a less expensive animatronic controller that will do the job- I'll try to find it.
Crash2108 (author) 10 years ago
YES! People, I know these things, what I am asking is how to control these through the computer.
leevonk10 years ago
use an h-bridge if you want to control the direction of motor rotation. (see my furby hack instructable)
Crash2108 (author) 10 years ago
Yes, but,.. How would I do that? I mean, lots of searching only brings vague answers. Would it be too hard to control a serial motor with C++? My skills with that don't reach far beyond iostream.. Could game maker do it?
mikesty Crash210810 years ago
westfw10 years ago
In general, the easiest way to control the speed of a DC motor is via Pulse Width Modulation. That mean instead of giving the DC motor actural DC power, you give it pulses of power inbetween "off" periods. The length of the ON time can be changed from nothing (for off) to all the time (for full speed); the frequency of the pulses should be such that it's "high" compared to brush commutation and such. Usually, you'd use a small microcontroller to read commands from your serial port (easy) or USB (significantly more difficult), and then have the micro control the power pulses, which would be applied to the motor via a power transistor. It MIGHT be possible to have a serial port control the power transistor directly, sending streamed data with a varying number of one and zero bits to implement the varying pulse widths (100 0000 is '@', 110 0000 is a quote, 111 0000 is 'p', 111 1000 is 't', 111 1100 is 'w', and so on.) You could arrange for nearly any computer (even WXP or unix) to output the appropriate character continuously. You can experiment with different PWM frequencies by changing the port speed. There are extra start and stop bits in there, but I'm not sure they'll matter. It would be an interesting experiment...
mikesty westfw10 years ago
More on PWM's

I'd say you'd definitely have to go with serial port control. How? I don't have a clue.