DC Motor Controls


Thread Starter

Malau Monkee


I am currently working on a project for school. My project involves using a microcontroller to start and control 2 DC Motors. The 2 DC motors I am using are 24V DC motors from a wheel chair. What I wanted to know is how do I control the speed of the motor and do I need some kind of power amp for it also. The microcontroller I am using can only sink 5V and 25ma of current. I
know this won't be enough current to even turn on the the motors. What I wanted to know is how do I use a basic 555 timer to control the speed and
what type of motor controls would you recommend. Any help would be appreciated.

Thank You,

Welcome to the real world beyond computers! A microcontroller can send an analog command to a motor controller (power amp) which in turn controls the motor. Motor speed is adjustable by varying the motor voltage. Simplest type is open-loop, where the actual speed can vary if the motor load varies. Precise speed control requires the more complicated closed-loop method - where a speed sensor (tach, pulse device) sends a signal back to the motor controller. Two types of power amps are linear and PWM. Linear varies motor
voltage by varying the voltage drop in the amp. PWM varies motor voltage by pulse width modulation - varying voltage pulse on/off time ratio. Not many amp manufacturers make 24V amps. Try Dart Control Company. Many "battery voltage" type motor controls are custom cookbook circuit designs by specialists. You also need to know the motor's current draw under your loading condition. Check if motors have nameplate data. If running motors unloaded, current draw will be lower since current draw proportional to load.

Regarding 555 timer I haven't touched one in 15 yrs! Why 555 timer? Only thing I could think of is electronic circuit books (cookbooks)with motor
speed controllers using 555 timer. Is THAT what your looking for? If yes, hit the library, book stores...

Things you need to find out/decide:
- Open-loop or closed-loop speed control
- Nameplate data - motor current draw at load (use 15% if running no-load). Lack of motor data big problem - need rated speed or current to determine the other.
- Motors in parallel (double current) or series (double voltage); or separate controller for each?
- Purchase power amp (linear or pwm) or own circuit design/build. If purchased, make sure it can be used open-loop if chosen control mode.

Hope this helps.
For Malau Monkee (CB):

The circuit you desire appeared in Jan '98 issue of "Electronics Now" magazine. It is entitled "Speed Control".

It uses the 555 to generate a PWM signal and several MOSFET's in parallel to reach motor's current requirement. MOSFET's can be cross
connected for forward/reverse function.

If unable to obtain copy send me your Fax Number.

Phil Corso, PE
Trip-A-Larm Corp.

Daniel Boudreault

Hello Wayland,

You can go to your local radio shack store, and purchase a handbook on power supplies. They have some DC choppers that you can use to control the output voltage to the motors. You will have to use bigger FETs for the outputs though, since your motors are probably around 200 to 300 watts.

If you like, I can send you a scanned image from my copy.

Dan Boudreault

Johan Bengtsson P&L Automatik AB

First of all you have to find out the needed current. Just not the average but possibly the peaks too.

Second you have to put in some kind of high power transistor capable of handlign the necesary current and a suitable heatsink.

In order to not burn the transistor the best option is to use PWM to control the speed. PWM is short for Pulse Widht Modulation and basically mean turn on and off the transistor and change (modulate) the on time compared to the on-off period time. Normaly you keep the sum of on+off time constant (not entirely necesary). The idea is to control the average voltage and switch fast enough for the motor to not be able to follow the individual pulses. A switch frequency at least 100Hz preferably higher like 1-10kHz would be a nice choice in your case I think.

Some microcontrollers have the hardware necesary to create the PWM signal directly otherwise you have to make that a part of the program.

You won't need the 555 to do this.

If you for some reason have analog outputs from the microcontroller (i doubt it) you can use one of these and your 555 however to create the PWM signal.

The speed of the motor is relatively well following the average voltage. A small speed drop when it is heavily loaded but not very much.

If you measure the motor voltage during the "off" period you will actually get the speed. If you need to be able to elecrically break the motor you need a second transistor to short circuit the motor.

Don't forget free-wheel diode(s) or small parts of your transistor(s) might be found in most corners of the room you are in...

Also, don't accelerate the motors too fast, they use a lot of current if you do and your transistor won't like that idea.

/Johan Bengtsson

P&L, the Academy of Automation
Box 252, S-281 23 H{ssleholm SWEDEN
Tel: +46 451 49 460, Fax: +46 451 89 833
E-mail: [email protected]
Internet: http://www.pol.se/
Wayland, use your micro to vary the mark-space ratio of a 555 free running oscillator (freq can be anywhere from 1KHz to 10Khz) ..you can achieve this by varying the voltage on pin 5 of the 555. Feed pin 3 of the 555 via 1 47K into the gate of an N channel power FET and put your motor between the FET and +24. The resulting PWM will vary the motor speed.

Unfortunately the 555 is not an ideal choice for this because the PWM range is not very good. You would be better off writing some software (maybe your micro has a pwm output) or finding someone elses code to produce PWM from the micro. Use this to drive the FET directly. Sounds like you MAY be using the Basic Stamp..if so it does have a PWM command. This would work much better than the 555.
neil j
New Zealand

Marcello Savona


option A:
the simplest way of controlling motors with the type of control that you are mentioning (pulsing through a 555 timer or any other) is the control of a stepper motor. Using the chip SAA1027, you can effectively control the speed of the stepper motor by varying the frequency pulse. The SAA1027 can sink a total of 1A for all channels so small stepper motors can be driven directly from that. It also has a direction bit (logic). However if you are looking to amplify the output, there exist PWM amplifiers, the cheapest & best ones
developed by ST (Sgs Thompson), I forgot the number, but look them up under motor drivers. They can sink 1A per channel a total of 4Amps. If you want greater than that, you can use these power drivers in parallel, to the combination that you require.

The motor drivers referred to above can take up to a frequency of 100KHz (square wave) from 5 till 50V, which should be sufficient for you application.

Option 2:
If however you want to drive a DC motor instead of a steeper motor, you can again use the above amplifiers by ST. You can configure in such a way that it takes logic signals. This time you drive the DC motor using PWM (Pulse Width Modulation) where the speed & jolt of the motor, will be in relation to the frequency applied (dont go into the detail of it). Generally microcontrollers do output a PWM signal for
this pusrpose, or you can make it do. Use 2 channels (out) (A & B) of a microcontroller and
when you want to turn the DC motor in one direction, take Channel A low and pulse channel B. When you want to go in the other direction just take B low and pulse chan A.

I would suggest option 2, if you are OK with
microcontrollers & want low cost, and option 1 if you are ok with hardware.

Dont hesitate to contact me if you need help


Guy H. Looney

The micro controller is a digital I/O device. It would be used only to turn discrete devices on and off. You should not use it to turn motors on
& off by itelf. The motor is an inductive load. Even if you used fly-back diodes to handle the surges of turning it on & off, you probably
would get little or no motion out of the motor. Further still, you could short out the controller.

I would handle it in the following way for a "cheap & dirty solution": Get a 24VDC power supply to handle the motors (current depends on what the motors draw). Connect the DC common of the power supply to the DC common of the motor. Connect a potentiometer (sized appropriately) between the 24VDC of the power supply and the +24VDC connection on the motor. If the motor doesn't call out a polarity, then it really doesn't matter where you make your connections; one connection scheme equals forward, one scheme
equals reverse. Play around with the potentiometer & verify that you have speed control over the motors. Next, put a relay in the system for the micro controller to turn on and
off. The relay could be placed in the 24VDC circuit or the 110VAC which powers the 24VDC power supply. Make sure you choose the proper relay & use a fly-back diode. This scheme will allow you to use the potentiometer to set the speeds & the microcontroller to turn the motors on and off.

If you want the microcontroller to control the speeds, it gets a little more complicated. However, one way would be to have multiple relays that can only be operated one at a time. Each relay would apply different voltages to the motor (voltage dividers w/ resistors). Further, if you
needed to control direction, you'd have to be able to switch the polarity of the voltage to the motors.

This won't give you a state-of-the art system, but it should be functional & provide you with a usable system. Hope this helps. Remember, the
biggest issue is choosing the appropriate components to protect your motors & micro controller (relays & diodes are the most critical).


Guy H. Looney
Sales Engineer

Regan Controls, Inc.
475 Metroplex Dr.
Suite 212
Nashville, TN 37211
phone: (615) 333-1940, ext. 322
fax: (615) 333-1941
[email protected]

Tanweer Ahmed

One other way to control the direction as well as speed of a DC Motor using a μCont. is that you generate a pulse train of a frequency proportional to required speed. Use a standard signal convertor to convert the frequency into a 4-20mA of 0-10Vdc analog signal. The 24Vdc power supply should be a variable one capable of recieving an external input and you feed this analog signal to that input of the power supply. To change the direction you can use the same technique as described by Guy Looney. Hope this helps you. For any further details or clarification you may write me directly.

Tanweer Ahmed
[email protected]

Ray Esponilla

To: Mr. Phil Corso
I read your reply to Mr. Malau, and was wondering if - since I don't have my own fax machine and it will be hard to hire one here - will you be able to send me a scanned copy of that "speed control circuit" w/c appeared on the ELECTRONICS NOW Jan '98 issue? Thank you!

My email address is [email protected]
or [email protected]
> Hello Wayland,

You can go to your local radio shack store, and purchase a handbook on power supplies. They have some DC choppers that you can use to control the output voltage to the motors. You will have to use bigger FETs for the outputs though, since your motors are probably around 200 to 300 watts.

If you like, I can send you a scanned image from my copy.

Dan Boudreault