Fads to Obsessions and Beyond...




Free domain for life, exceptional technical support, website transfer

DC Motor PWM with 555 timer

DC motor speed control is demonstrated using pulse width modulation (PWM) based upon a 555 Timer IC.

Many potential projects involve the speed control of DC motors. For example, the control of drill-bit speed in the DIY drill press. There are a number of methods for speed control of a DC motor such as flux control, armature control or voltage control. Voltage control by using pulse width modulation (PWM) is perhaps the commonest method, particularly with small DC motors. While pulse width modulation can be produced a number of ways (dedicated IC's or via microcontrollers for example) the ubiquitous and inexpensive 555 Timer IC can provide a convenient PWM signal to control DC motors.

Pulse width modulation is explained on numerous sites (1) so I will not go into detail here. Suffice to say, PWM relies upon the fact that the average value of voltage (and hence current) fed to a load can be controlled by turning a switch between the supply and the load on and off at a fast rate. The longer the switch is on compared to the off periods, the higher the total power supplied to the load. Instead of having a physical switch, a transistor or similar is used with generally a fixed frequency signal, and varying the pulse width of this signal controls the on/off time of the transistor, and hence the effective average voltage feed to the load.

While a microcontroller can easily produce a PWM signal, unless digital control is required (e.g. feedback control via a sensor) enabling control of DC motor speed can be easily accomplished with a simple 555 Timer circuit producing pulses, the width of which (or more correctly the duty cycle) in turn being controlled by a simple potentiometer.

There are a large number of examples of such circuits on numerous sites (2), (3) and a typical circuit is used here. The Circuit Details and Schematic Diagram Sections below set out the specifics, while the Testing/Experimental Results Section demonstrates the use of the 555 timer circuit to control a small DC motor salvaged from a disused printer.


The basic operation of the circuit is an astable oscillator formed by the 555 timer (U1). Upon power-up of the circuit pin 2 of U1 is low and capacitor C2 is discharged. The 555 timer oscillator cycle begins and U1 pin 3 goes to the high state.

Capacitor C2 states to charge through potentiometer RV1 and diode D2. Once the voltage on capacitor C2 reachs two-thirds of the applied voltage to the 555, pin 6 becomes activated, and consequently pin 3 and pin 7 go to the low state.

With pin 3 now low, capacitor C2 starts to discharge through RV1 but with diode D1. As soon as the voltage is below one-third of the applied voltage to the 555, pin 3 and pin 7 go high again and the oscillator cycle begins again.

Pin 7 of U1 drives the IRF540A n-channel MOSFET (Q1), which has the gate pulled high by R1. Since Q1 is n-channel MOSFET, will conduct (i.e. the load operates) when the voltage is >~4V.

Diode D3 is a flyback diode to suppress voltage spikes due to the inductive load when current flow is interrupted.


Note: Image loading can be slow depending on server load.

  • DC Motor Speed ControlDC Motor Speed Control2

    Silver Membership registration gives access to full resolution schematic diagrams.

    DC Motor Speed Control

    DC Motor Speed Control

This project did not require a PCB.

The construction was done using a prototyping breadboard. See the photographs and schematic diagram sections.

 

Qty Schematic Part-Reference Value Notes
Resistors
1R110K1/4W, 10% 
1RV1100KPotentiometer
Capacitors
1C110nF 
1C20.1uF 
Diodes
2D1-D21N4002 
1D31N5819 
Transistors
1Q1IRF540AMOSFET n-channel 
Integrated Circuit
1U1555 Timer datasheet
Description Downloads
DC Motor PWM Control Bill of Materials Text File Download

The following video shows the completed circuit in operation.

A multimeter is connected to pin 7 of the 555 Timer (U1 in the schematic) and is set to display the duty cycle, which is changed by potentiometer RV1. A digital tachometer is also included that simultaneously measures the RPM of the DC motor (to which a small reflector has been attached).

From the Circuit Details Section, the n-channel MOSFET (Q1) conducts when the gate voltage rises above ~4V, and this occurs when pin 7 of the 555 timer is low (R1 pulls the gate high). This means when the duty cycle reported on the DMM is lower, the DC motor will run faster (the opposite to "normal" due to using the 555 discharge pin 7 as the Q1 driver pin, as the 555 output pin 3 can source and sink current, which is better for charging/discharge capacitor C2 to produce the astable oscillator, whereas as 555 pin 7 can only sink current).


The 555 timer IC itself is relatively 'forgiving' of mistakes, but double check polarity of power connections etc before powering up the IC.

A by-pass capacitor (0.1uF) could be added between ground and Vdd of the 555, although in such a simple circuit I found this not particularly needed.

The IRF540A MOSFET has a Vgs of ±20V and continuous drain current Id of 23A with Rds(on) of 0.04ohm. Check this against the voltage/current requirements of the DC motor (or other load) to be controlled. I only used this particular MOSFET as it was on-hand at the time. Note, the circuit is configured for n-channel MOSFET.

Again, depending upon load/switching frequency etc, a heat sink may be required on the MOSFET.

The PWM frequency can produce a "whine" from the DC motor. To change the PWM signal frequency, the following formula can be used:

f =
1.44/(R1 * C2)

where: (note the units)

  • f = frequency (hz)
  • R1 = potentiometer resistance (ohms)
  • C2 = capacitance (farads)

Comments/Questions

No comments yet.

Add Comment/Question

Only Logged-In Members can add comments

"If we could sell our experiences for what they cost us, we'd all be millionaires".

Please donate any amount to help with hosting this web site.

If you subscribe (only $2/annum) you can view the site without advertisements and get emails abouts updates etc.

X

Sorry!

Only logged-in users with Silver Membership and above can download.


Silver Membership is only $2, so join now!