Tuesday, March 17, 2009

PWM Circuit using 555 Timer

A Simple PWM Circuit Based on the 555 Timer

One of the most fundamental problems in robotics is DC motor speed control. The most common method of speed control is PWM or pulse width modulation. Pulse width modulation is the process of switching the power to a device on and off at a given frequency, with varying on and off times. These on and off times are referred to as "duty cycle". The diagram below shows the waveforms of 10%, 50%, and 90% duty cycle signals.

As you can see from the diagram, a 10% duty cycle signal is on for 10% of the wavelength and off for 90%, while a 90% duty cycle signal is on for 90% and off for 10%. These signals are sent to the motor at a high enough frequency that the pulsing has no effect on the motor. The end result of the PWM process is that the overall power sent to the motor can be adjusted from off (0% duty cycle) to full on (100% duty cycle) with good efficiency and stable control.

While many robot builders use a microcontroller to generate the required PWM signals, the 555 PWM circuit explained here will give the novice robot builder an easy to construct circuit, and good understanding of pulse width modulation. It is also useful in a variety of other applications where the PWM setting need only be changed occasionally.

The 555 timer in the PWM circuit is configured as an astable oscillator. This means that once power is applied, the 555 will oscillate without any external trigger. Before the technical explanation of the circuit, let's look at the 555 timer IC itself.

The pinouts for the 8 pin DIP package are as follows:

A block diagram of the 555 timer:

Pin descriptions for the 555

PIN DESCRIPTION PURPOSE
1 Ground DC Ground
2 Trigger The trigger pin triggers the beginning of the timing sequence. When it goes LOW, it causes the output pin to go HIGH. The trigger is activated when the voltage falls below 1/3 of +V on pin 8.
3 Output The output pin is used to drive external circuitry. It has a "totem pole" configuration, which means that it can source or sink current. The HIGH output is usually about 1.7 volts lower than +V when sourcing current. The output pin can sink up to 200mA of current. The output pin is driven HIGH when the trigger pin is taken LOW. The output pin is driven LOW when the threshold pin is taken HIGH, or the reset pin is taken LOW.
4 Reset The reset pin is used to drive the output LOW, regardless of the state of the circuit. When not used, the reset pin should be tied to +V.
5 Control Voltage The control voltage pin allows the input of external voltages to affect the timing of the 555 chip. When not used, it should be bypassed to ground through an 0.01uF capacitor.
6 Threshold The threshold pin causes the output to be driven LOW when its voltage rises above 2/3 of +V.
7 Discharge The discharge pin shorts to ground when the output pin goes HIGH. This is normally used to discharge the timing capacitor during oscillation.
8 +V DC Power - Apply +3 to +18VDC here.


The schematic diagram for the 555 PWM Circuit:

The reset pin is connected to +V, so it has no effect on the circuit's operation.

When the circuit powers up, the trigger pin is LOW as capacitor C1 is discharged. This begins the oscillator cycle, causing the output to go HIGH.

When the output goes HIGH, capacitor C1 begins to charge through the right side of R1 and diode D2. When the voltage on C1 reaches 2/3 of +V, the threshold (pin 6) is activated, which in turn causes the output (pin 3), and discharge (pin 7) to go LOW.

When the output (pin 3) goes LOW, capacitor C1 starts to discharge through the left side of R1 and D1. When the voltage on C1 falls below 1/3 of +V, the output (pin 3) and discharge (pin 7) pins go HIGH, and the cycle repeats.

Pin 5 is not used for an external voltage input, so it is bypassed to ground with an 0.01uF capacitor.

Note the configuration of R1, D1, and D2. Capacitor C1 charges through one side of R1 and discharges through the other side. The sum of the charge and discharge resistance is always the same, therefore the wavelength of the output signal is constant. Only the duty cycle varies with R1.

The overall frequency of the PWM signal in this circuit is determined by the values of R1 and C1. In the schematic above, this has been set to 144 Hz.

To compute the component values for other frequencies, use the formula:

Frequency = 1.44 / (R1 * C1)

In this circuit, the output pin is used to charge and discharge C1, rather than the discharge pin. This is done because the output pin has a "totem pole" configuration. It can source and sink current, while the discharge pin only sinks current. Note that the output and discharge pins go HIGH and LOW at the same time in the oscillator cycle.

The discharge pin is used to drive the output. In this case, the output is a IRFZ46N MOSFET. The gate of the MOSFET must be pulled high as the discharge pin is open collector only. Being an N channel MOSFET, the IRFZ46N will conduct from drain to source when the gate pin rises above 4 volts or so. It will stop conducting when the gate voltage falls below this voltage. The configuration of the output also serves to invert the signal from the 555 circuit.

There you have it, a simple 555 PWM oscillator! I hope this is helpful and generates more interest in electronics and robotics.

Written by Rick Bickle

Source: EFY

3 comments:

akshay said...

I hope this would be a good one in controlling motor without much discrepancies...lemme try it and i will post my comment after completing the work...am doing a small project on dc motor control using signal automation and i hope this might provide me a gud ckt design!!!..thanks mr.richie and mr.aditya

Solar Power In India said...

we've always taken advantage of the sun. And now we're ready to use the sun yet another way: to create clean electricity.

magi said...

TUBELESS. Need a rim that can be set up with STANS or the "Ghetto-Tubeless" method. Polo players HATE bike flats.


Velocity Wheels Vw825