Serial controlled variable speed motor

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 3K views
mooseboi
Messages
6
Reaction score
0
Hello all, I am trying to create a circuit that allows me to use serial data to control the speed of a 12v dc motor I removed from an electric drill. So far I have successfully made the circuit in diagram (a) using a 100k pot to alter the speed. So the next problem to solve is how I can instead use serial data as the controller.

Diagram (a)
speed controller circuit with pot.jpg


Diagram (b)
mosfet circuit.jpg


Now, the creator of the circuit depicted in diagram (b) stated "I suppose with really beefy motors and really beefy motor power supplies, there might be some danger of getting the backEMF spikes onto the motherboard, causing problems, so ... don't do that." However, someone suggested using diodes to solve this problem of backEMF to protect the computer from spikes. So with all this information considered, my question is now this: What modifications need to be made to the circuit in diagram (b) to make it safe to use so to avoid any nasty backEMF and other potential harm to my computer when using serial data to control the MOSFET?

Many thanks,
Sam.
 
Last edited:
Engineering news on Phys.org
You're not concerned about the low efficiency of the "series resistor" type of speed control? You could get considerably better efficiency were the MOSFET to be used as an on/off switch in a variable pulse-width switching controller. How many amps will the motor draw at full load?

You'll never want the controller to reverse the motor? If not, then a diode across the MOSFET and another across the motor terminals will catch inductive spikes and protect your MOSFET; the diodes oriented so as to be reverse-biased by the motor's power supply.

What exactly are you wanting your repurposed drill motor to do?
 
The proper solution is a uP receiving RS-232 commands and then sending PWM to a motor controller like the TB6612

This board is a proper example:
http://www.robotshop.com/en/pololu-qik-dual-serial-motor-controller.html

Here is a board you can connect to an arduino:
https://www.sparkfun.com/products/9457

What you have proposed is essentially creating PWM (ON-OFF-ON-OFF) signals via the TX pin of the serial port. There are two ways to do that (from a control perspective). Send serial data patterns to produce the PWM ratios you desire (pulse density modulation), or use the firmware to manually toggle the Tx signal.

IN either case, the control will be unreliable to the extent that the firmware might be usurped for another task. Also, the degree of speed control is limited.

But, what you have shown can cause the motor to turn on and turn off at some rate. It does need a protection diode.
 
Does it have to be RS232? The speed controllers used in model cars/planes use a simple pulse width scheme. Typically they need a 1-2mS long pulse repeated every 20mS. The duration of the pulse sets the speed so 1mS might be OFF and 2mS = Max speed.