You are on page 1of 29

PWM BASED DC MOTOR SPEED CONTROLLER USING 555

TIMER

This is a simple and useful circuit for controlling the speed of DC motor. This can be
used in different applications like robotics, automobiles etc.

The circuit comprises of 555 Timer IC operated in astable mode. It is called free-running
because it alternates between two different output voltage levels during the time it is on.
The output remains at each voltage level for a definite period of time. The speed of DC
motor can be varied by varying the ON and OFF times of the 555 Timer. The passive
components connected in the timer circuit decide the duty cycle of the input waveform.

The output of the timer IC is given to the motor driver L293D. Since the digital circuits
cannot drive the heavy loads like motors, this driver circuit is used. Thus the motor
rotates at a speed depending on the ON and OFF times of the 555 Timer IC.

SOFTWARE AND HARDWARE TOOLS:


Software Tools:
1. Orcad.

Hardware Tools:
1. 555 Timer
2. H-bridge
3. DC motor
BLOCK DIAGRAM:

BLOCK DESCRIPTION:
555 TIMER:

Fig: 555 timer

The 555 is an integrated circuit (chip) implementing a variety of timer and multivibrator
applications. The IC was designed and invented by Hans R. Camenzind. It was designed
in 1970 and introduced in 1971 by Signetics (later acquired by Philips). The original
name was the SE555/NE555 and was called "The IC Time Machine". The 555 gets its
name from the three 5-kOhm resistors used in typical early implementations. It is still in
wide use, thanks to its ease of use, low price and good stability.

Pin diagram of 555 Timer


The 555 timer is one of the most popular and versatile integrated circuits ever produced.
It includes 23 transistors, 2 diodes and 16 resistors on a silicon chip installed in an 8-pin
mini dual-in-line package (DIP-8). The 556 is a 14-pin DIP that combines two 555s on a
single chip. The 558 is a 16-pin DIP that combines four, slightly modified, 555s on a
single chip (DIS & THR are connected internally, TR is falling edge sensitive instead of
level sensitive). Also available are ultra-low power versions of the 555 such as the 7555
and TLC555. The 7555 requires slightly different wiring using fewer external
components and less power.

The 555 Timer IC is made to operate in astable mode in this project. In astable mode,
there is no need for an external trigger. The timer operates between two voltage levels
during the on time.

555 Packages:
The 555, in fig. 1 and fig. 2 above, come in two packages, either the round metal-can
called the 'T' package or the more familiar 8-pin DIP 'V' package. About 20-years ago the
metal-can type was pretty much the standard (SE/NE types). The 556 timer is a dual 555
version and comes in a 14-pin DIP package, the 558 is a quad version with four 555's
also in a 14 pin DIP case.

The supply current, when the output is 'high', is typically 1 milli-amp (mA) or less. The
initial monostable timing accuracy is typically within 1% of its calculated value, and
exhibits negligible (0.1%/V) drift with supply voltage. Thus long-term supply variations
can be ignored, and the temperature variation is only 50ppm/°C (0.005%/°C).

 All IC timers rely upon an external capacitor to determine the off-on time intervals of the
output pulses. As you recall from your study of basic electronics, it takes a finite period
of time for a capacitor (C) to charge or discharge through a resistor (R). Those times are
clearly defined and can be calculated given the values of resistance and capacitance.

The basic RC charging circuit is shown in fig. 4. Assume that the capacitor is initially
discharged. When the switch is closed, the capacitor begins to charge through the resistor.
The voltage across the capacitor rises from zero up to the value of the applied DC
voltage. The charge curve for the circuit is shown in fig. 6. The time that it takes for the
capacitor to charge to 63.7% of the applied voltage is known as the time constant (t). That
time can be calculated with the simple expression:
t=RXC
Fig 4: Basic RC charging circuit
Fig: Inside the 555 Timer
Fig: 555 Schematic
Specifications of 555 timer:

Supply voltage (VCC) 4.5 to 15 V

Supply current (VCC = +5 V) 3 to 6 mA

Supply current (VCC = +15 V) 10 to 15 mA

Output current (maximum) 200 mA

Power dissipation 600 mW

Operating temperature 0 to 70 °C

Pin description:

Nr Name Purpose
1 GND Ground, low level ( OV ) ZERO VOLTS.
2 TR A short pulse high → low on the trigger starts the timer.
3 Q During a timing interval, the output stays at +Vcc.
4 R A timing interval can be interrupted by applying a reset pulse to low (0V).
5 CV Control voltage allows access to the internal voltage divider (2/3 VCC).
6 THR The threshold at which the interval ends.
7 DIS Connected to a capacitor whose discharge time will influence the timing
interval.
8 V+, The positive supply voltage which must be between 3 and 15 V.
Vcc
Pin 1 (Ground):  The ground (or common) pin is the most-negative supply potential of
the device, which is normally connected to circuit common (ground) when operated from
positive supply voltages.
Pin 2 (Trigger):  This pin is the input to the lower comparator and is used to set the
latch, which in turn causes the output to go high. This is the beginning of the timing
sequence in monostable operation. Triggering is accomplished by taking the pin from
above to below a voltage level of 1/3 V+ (or, in general, one-half the voltage appearing at
pin 5). The action of the trigger input is level-sensitive, allowing slow rate-of-change
waveforms, as well as pulses, to be used as trigger sources. The trigger pulse must be of
shorter duration than the time interval determined by the external R and C. If this pin is
held low longer than that, the output will remain high until the trigger input is driven high
again. One precaution that should be observed with the trigger input signal is that it must
not remain lower than 1/3 V+ for a period of time longer than the timing cycle. If this is
allowed to happen, the timer will re-trigger itself upon termination of the first output
pulse. Thus, when the timer is driven in the monostable mode with input pulses longer
than the desired output pulse width, the input trigger should effectively be shortened by
differentiation. The minimum-allowable pulse width for triggering is somewhat
dependent upon pulse level, but in general if it is greater than the 1uS (micro-Second),
triggering will be reliable. A second precaution with respect to the trigger input concerns
storage time in the lower comparator. This portion of the circuit can exhibit normal turn-
off delays of several microseconds after triggering; that is, the latch can still have a
trigger input for this period of time after the trigger pulse. In practice, this means the
minimum monostable output pulse width should be in the order of 10uS to prevent
possible double triggering due to this effect. The voltage range that can safely be applied
to the trigger pin is between V+ and ground. A dc current, termed the trigger current,
must also flow from this terminal into the external circuit. This current is typically 500nA
(nano-amp) and will define the upper limit of resistance allowable from pin 2 to ground.
For an astable configuration operating at V+ = 5 volts, this resistance is 3 Mega-ohm; it
can be greater for higher V+ levels.
Pin 3 (Output):  The output of the 555 comes from a high-current totem-pole stage made
up of transistors Q20 - Q24. Transistors Q21 and Q22 provide drive for source-type
loads, and their Darlington connection provides a high-state output voltage about 1.7
volts less than the V+ supply level used. Transistor Q24 provides current-sinking
capability for low-state loads referred to V+ (such as typical TTL inputs). Transistor Q24
has a low saturation voltage, which allows it to interface directly, with good noise
margin, when driving current-sinking logic. Exact output saturation levels vary markedly
with supply voltage, however, for both high and low states. At a V+ of 5 volts, for
instance, the low state Vce(sat) is typically 0.25 volts at 5 mA. Operating at 15 volts,
however, it can sink 200mA if an output-low voltage level of 2 volts is allowable (power
dissipation should be considered in such a case, of course). High-state level is typically
3.3 volts at V+ = 5 volts; 13.3 volts at V+ = 15 volts. Both the rise and fall times of the
output waveform are quite fast, typical switching times being 100nS. The state of the
output pin will always reflect the inverse of the logic state of the latch. Since the latch
itself is not directly accessible, this relationship may be best explained in terms of latch-
input trigger conditions. To trigger the output to a high condition, the trigger input is
momentarily taken from a higher to a lower level. This causes the latch to be set and the
output to go high. Actuation of the lower comparator is the only manner in which the
output can be placed in the high state. The output can be returned to a low state by
causing the threshold to go from a lower to a higher level [see "Pin 6 - Threshold"],
which resets the latch. The output can also be made to go low by taking the reset to a low
state near ground [see "Pin 4 - Reset"]. The output voltage available at this pin is
approximately equal to the Vcc applied to pin 8 minus 1.7V.

Pin 4 (Reset):  This pin is also used to reset the latch and return the output to a low state.
The reset voltage threshold level is 0.7 volt, and a sink current of 0.1mA from this pin is
required to reset the device. These levels are relatively independent of operating V+
level; thus the reset input is TTL compatible for any supply voltage. The reset input is an
overriding function; that is, it will force the output to a low state regardless of the state of
either of the other inputs. It may thus be used to terminate an output pulse prematurely, to
gate oscillations from "on" to "off", etc. Delay time from reset to output is typically on
the order of 0.5 µS, and the minimum reset pulse width is 0.5 µS. Neither of these figures
is guaranteed, however, and may vary from one manufacturer to another. In short, the
reset pin is used to reset the flip-flop that controls the state of output pin 3. The pin is
activated when a voltage level anywhere between 0 and 0.4 volt is applied to the pin. The
reset pin will force the output to go low no matter what state the other inputs to the flip-
flop are in. When not used, it is recommended that the reset input be tied to V+ to avoid
any possibility of false resetting.

Pin 5 (Control Voltage):  This pin allows direct access to the 2/3 V+ voltage-divider
point, the reference level for the upper comparator. It also allows indirect access to the
lower comparator, as there is a 2:1 divider (R8 - R9) from this point to the lower-
comparator reference input, Q13. Use of this terminal is the option of the user, but it does
allow extreme flexibility by permitting modification of the timing period, resetting of the
comparator, etc. When the 555 timer is used in a voltage-controlled mode, its voltage-
controlled operation ranges from about 1 volt less than V+ down to within 2 volts of
ground (although this is not guaranteed). Voltages can be safely applied outside these
limits, but they should be confined within the limits of V+ and ground for reliability. By
applying a voltage to this pin, it is possible to vary the timing of the device independently
of the RC network. The control voltage may be varied from 45 to 90% of the Vcc in the
monostable mode, making it possible to control the width of the output pulse
independently of RC. When it is used in the astable mode, the control voltage can be
varied from 1.7V to the full Vcc. Varying the voltage in the astable mode will produce a
frequency modulated (FM) output. In the event the control-voltage pin is not used, it is
recommended that it be bypassed, to ground, with a capacitor of about 0.01uF (10nF) for
immunity to noise, since it is a comparator input. This fact is not obvious in many 555
circuits since I have seen many circuits with 'no-pin-5' connected to anything, but this is
the proper procedure. The small ceramic cap may eliminate false triggering.

Pin 6 (Threshold):  Pin 6 is one input to the upper comparator (the other being pin 5)
and is used to reset the latch, which causes the output to go low. Resetting via this
terminal is accomplished by taking the terminal from below to above a voltage level of
2/3 V+ (the normal voltage on pin 5). The action of the threshold pin is level sensitive,
allowing slow rate-of-change waveforms. The voltage range that can safely be applied to
the threshold pin is between V+ and ground. A dc current, termed the threshold current,
must also flow into this terminal from the external circuit. This current is typically 0.1µA,
and will define the upper limit of total resistance allowable from pin 6 to V+. For either
timing configuration operating at V+ = 5 volts, this resistance is 16 Mega-ohm. For 15
volt operation, the maximum value of resistance is 20 MegaOhms.

Pin 7 (Discharge):  This pin is connected to the open collector of a npn transistor (Q14),
the emitter of which goes to ground, so that when the transistor is turned "on", pin 7 is
effectively shorted to ground. Usually the timing capacitor is connected between pin 7
and ground and is discharged when the transistor turns "on". The conduction state of this
transistor is identical in timing to that of the output stage. It is "on" (low resistance to
ground) when the output is low and "off" (high resistance to ground) when the output is
high. In both the monostable and astable time modes, this transistor switch is used to
clamp the appropriate nodes of the timing network to ground. Saturation voltage is
typically below 100mV (milli-Volt) for currents of 5 mA or less, and off-state leakage is
about 20nA (these parameters are not specified by all manufacturers, however).
Maximum collector current is internally limited by design, thereby removing restrictions
on capacitor size due to peak pulse-current discharge. In certain applications, this open
collector output can be used as an auxiliary output terminal, with current-sinking
capability similar to the output (pin 3).

Pin 8 (V +):  The V+ pin (also referred to as Vcc) is the positive supply voltage terminal
of the 555 timer IC. Supply-voltage operating range for the 555 is +4.5 volts (minimum)
to +16 volts (maximum), and it is specified for operation between +5 volts and +15 volts.
The device will operate essentially the same over this range of voltages without change in
timing period. Actually, the most significant operational difference is the output drive
capability, which increases for both current and voltage range as the supply voltage is
increased. Sensitivity of time interval to supply voltage change is low, typically 0.1% per
volt. There are special and military devices available that operate at voltages as high as
18 volts.
Operating Modes:

The 555 timer has two basic operational modes: one shot and astable. In the one-shot
mode, the 555 acts like a monostable multivibrator. A monostable is said to have a single
stable state--that is the off state. Whenever it is triggered by an input pulse, the
monostable switches to its temporary state. It remains in that state for a period of time
determined by an RC network. It then returns to its stable state. In other words, the
monostable circuit generates a single pulse of a fixed time duration each time it receives
and input trigger pulse. Thus the name one-shot. One-shot multivibrators are used for
turning some circuit or external component on or off for a specific length of time. It is
also used to generate delays. When multiple one-shots are cascaded, a variety of
sequential timing pulses can be generated. Those pulses will allow you to time and
sequence a number of related operations.

The other basic operational mode of the 555 is as and astable multivibrator. An astable
multivibrator is simply and oscillator. The astable multivibrator generates a continuous
stream of rectangular off-on pulses that switch between two voltage levels. The
frequency of the pulses and their duty cycle are dependent upon the RC network values.

555 Timer as an Astable Multivibrator:


Astable multivibrator

In astable mode, both transistors are coupled to each other through capacitors. Whichever
transistor is off at any moment cannot remain off indefinitely and its base will become
forward biased as that capacitor charges towards +5 volts. Once that happens, that
transistor will turn on, thereby turning the other one off.
Astable multivibrator (Q1 saturated).

Let us assume that Q1 saturates and Q2 is in cutoff because the circuit is symmetrical
that is, R1 = R4, R2 = R3, C1 = C2, and Q1 = Q2. It is not possible to say which
transistor will actually conduct when the circuit is energized. For this reason, either of the
transistors may be assumed to conduct for circuit analysis purposes.

Essentially, all the current in the circuit flows through Q1. The transistor Q1 offers
almost no resistance to current flow. Notice that capacitor C1 is charging. Since Q1 offers
almost no resistance in its saturated state, the rate of charge of C1 depends only on the
time constant of R2 and C1. It can be noticed that the right-hand side of capacitor C1 is
connected to the base of transistor Q2, which is now at cutoff. The right-hand side of
capacitor C1 is becoming increasingly negative. If the base of Q2 becomes sufficiently
negative, Q2 will conduct. After a certain period of time, the base of Q2 will become
sufficiently negative to cause Q2 to change states from cutoff to conduction. The time
necessary for Q2 to become saturated is determined by the time constant R2C1.

The negative voltage accumulated on the right side on capacitor C1 has caused Q2 to
conduct. Now the following sequence of events takes place almost instantaneously. Q2
starts conducting and quickly saturates, and the voltage at output 2 changes from
approximately -VCC to approximately 0 volts. This change in voltage is coupled through
C2 to the base of Q1, forcing Q1 to cutoff. Now Q1 is in cutoff and Q2 is in saturation.

Astable multivibrator (Q2 saturated).

Rectangular waves.
The output from this 555 Timer IC is taken at pin 3. This output is connected to the
motor driver which is L293D.
The ON and OFF time of this timer in astable mode will be determined by the Resistor
and Capacitor components used in the circuit.

The ON time is given by the formula:

Ton= 0.69 (R1+R2) C


And the OFF time as:
Toff= 0.69 (R2) C.

Depending on these ON and OFF times, the speed of the motor can be varied. The ON
time can be varied when the value of resistor R1 is varied. To make the motor rotate at
maximum speed, the resistor R1 can be varied upto the maximum level.

L293D MOTOR DRIVER:

Pin diagram of L293D

Features:
 Featuring Unitrode L293 and L293D
 Products Now From Texas Instruments
 Wide Supply-Voltage Range: 4.5 V to 36 V
 Separate Input-Logic Supply
 Internal ESD Protection
 Thermal Shutdown
 High-Noise-Immunity Inputs
 Functionally Similar to SGS L293 and SGS L293D
 Output Current 1 A Per Channel (600 mA for L293D)
 Peak Output Current 2 A Per Channel (1.2 A for L293D)
 Output Clamp Diodes for Inductive Transient Suppression (L293D)
Figure 3. Two-Phase Motor Driver (L293D)
Block Diagram:

DESCRIPTION

On the L293, external high-speed output clamp diodes should be used for inductive
transient suppression. A VCC1 terminal, separate from VCC2, is provided for the logic
inputs to minimize device power dissipation. The L293and L293D are characterized for
operation from 0°C to 70°C.

The L293D is a monolithic integrated high voltage, high current four channel driver
designed to accept standard DTL or TTL logic levels and drive inductive loads (such as
relays solenoids, DC and stepping motors) and switching power transistors. To simplify
use as two bridges is pair of channels is equipped with an enable input. A separate supply
input is provided, allowing operation at a low voltage and internal clamp diodes are
included. This device is suitable for use in switching applications at frequencies up to 5
KHz.

The L293 and L293D are quadruple high-current half-H drivers. The L293 is designed to
provide bidirectional drive currents of up to 1 A at voltages from 4.5 V to 36 V. The
L293D is designed to provide bidirectional drive currents of up to 600-mA at voltages
from 4.5 V to 36 V. Both devices are designed to drive inductive loads such as relays,
solenoids, dc and bipolar stepping motors, as well as other high-current/high-voltage
loads in positive-supply applications. All inputs are TTL compatible. Each output is a
complete totem-pole drive circuit, with a Darlington transistor sink and a pseudo-
Darlington source. Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2EN
and drivers 3 and 4 enabled by 3,4EN. When an enable input is high, the associated
drivers are enabled, and their outputs are active and in phase with their inputs. When the
enable input is low, those drivers are disabled, and their outputs are off and in the high-
impedance state. With the proper data inputs, each pair of drivers forms a full-H (or
bridge) reversible drive suitable for solenoid or motor applications.

The output from the 555 Timer IC is connected to any one of the enable pins of L293D
driver. This driver contains two enable pins EN1 and EN2. Each enable pins has
internally two input pins. When any of the two enable pins is enabled, the inputs
associated to that enable pins will be enabled and the motor rotates. This enable pin will
be high during the ON time of the 555 Timer IC and will be low during the OFF time of
the IC. When the enable pin is high i.e., during the ON time of the timer, the motor
rotates at high speed and during the OFF time, since the motor cannot stop
instantaneously, the speed reduces gradually until the OFF time is completed.
DC MOTOR:

DC motors are fairly simple to understand.  They are also simple to make and only
require a battery or dc supply to make them run. 

Now a days DC motors plays a vital role in most of the industrial areas, it can be seen in
most of the electronic devices. They are mainly used for the mechanical movements of
physical applications such as rolling the bundle of sheets or CD drives, lifts etc.

Many methods evolved to control the revolution of a motor. DC motors can be controlled
either by software or directly by hardware. Software controlling needs computers which
are bulky and common man cannot afford for it, so hardware controls are in use. Even in
hardware if it is programmable device then it is preferred because it can be modeled
according to the requirements of the user.

There are two types of DC motors, unidirectional and bidirectional. Unidirectional rotates
in only one direction and it is specially meant for some specific applications while the
bidirectional can be rotated in the clock-wise or the anti-clockwise direction. This the
most widely used for industrial applications.  There are two parameters to be considered
in controlling the movements of a DC motor.

1. DIRECTION.

2. SPEED.
The first thing that can be controlled in a motor is its direction of rotation. Direction of
the motor can be controlled by controlling the polarity of the current flowing through it. 
Usually a DC motors are driven by famous H-Bridge circuits made up of either
transistors or the buffers or any other suitable methods.

Controlling the speed of the motor is another important area to be considered. The speed
of motor is directly proportional to the DC voltage applied across its terminals. Hence, if
we control the voltage applied across its terminal we actually control its speed.

A PWM (Pulse Width Modulation) wave can be used to control the speed of the motor.
Here the average voltage given or the average current flowing through the motor will
change depending on the ON and OFF time of the pulses controlling the speed of the
motor i.e.. The duty cycle of the wave controls its speed.

An electric motor uses electrical energy to produce mechanical energy. The reverse
process, i.e., using mechanical energy to produce electrical energy, is accomplished by a
generator or dynamo. Traction motors used on locomotives often perform both tasks if
the locomotive is equipped with dynamic brakes. Electric motors are found in household
appliances such as fans, refrigerators, washing machines, pool pumps, floor vacuums, and
fan-forced ovens.
In any electric motor, operation is based on simple electromagnetism. A current-carrying
conductor generates a magnetic field; when this is then placed in an external magnetic
field, it will experience a force proportional to the current in the conductor, and to the
strength of the external magnetic field.

The internal configuration of a DC motor is designed to harness the magnetic interaction


between a current-carrying conductor and an external magnetic field to generate
rotational motion.

Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator,
field magnet(s), and brushes. In most common DC motors, the external magnetic field is
produced by high-strength permanent magnets. The stator is the stationary part of the
motor -- this includes the motor casing, as well as two or more permanent magnet pole
pieces. The rotor (together with the axle and attached commutator) rotates with respect to
the stator. The rotor consists of windings (generally on a core), the windings being

electrically connected to the commutator.

A simple motor has six parts, as shown in the diagram below:


 Armature or rotor
 Commutator
 Brushes
 Axle
 Field magnet
 DC power supply of some sort
An electric motor is all about magnets and magnetism: A motor uses magnets to create
motion. If you have ever played with magnets you know about the fundamental law of all
magnets: Opposites attract and likes repel. So if you have two bar magnets with their
ends marked "north" and "south," then the north end of one magnet will attract the south
end of the other. On the other hand, the north end of one magnet will repel the north end
of the other (and similarly, south will repel south). Inside an electric motor, these
attracting and repelling forces create rotational motion.

Fig: Parts of an Electric motor


Principle:

It is based on the principle that when a current-carrying conductor is placed in a magnetic


field, it experiences a mechanical force whose direction is given by Fleming's Left-hand
rule and whose magnitude is given by

                   Force, F = B I l Newton     

     Where B is the magnetic field in weber/m2.

                                 I is the current in amperes and 

                                 l is the length of the coil in meter.             

The force, current and the magnetic field are all in different directions. 

If an Electric current flows through two copper wires that are between the poles of a
magnet, an upward force will move one wire up and a downward force will move the
other wire down.  
Fig: DC Motor

Fig: Force in DC motor

An electric motor is a machine which converts electrical energy into mechanical energy.
Fig: Magnetic field and Current flow in DC motor

Fig: Torque in DC motor

The loop can be made to spin by fixing a half circle of copper which is known as
commutator, to each end of the loop. Current is passed into and out of the loop by
brushes that press onto the strips. The brushes do not go round, so the wire does not get
twisted. This arrangement also makes sure that the current always passes down on the
right and back on the left so that the rotation continues. This is how a simple Electric
motor is made.

The two pins of DC motor are connected to the output pins of the L293D driver. Thus
depending the ON and OFF times of the 555 Timer IC, the speed of the DC motor can be
varied.

You might also like