Electronic Hobbyists Corner

Home
Site Information
Contact Details

Projects
Technical Articles
Reference Section
Component Tutorials

Site Map
Links
555 Timer
The 555 Timer
Basic Operation
Monostable Mode
Bistable Mode
Astable Mode
Part Numbers
Tips and Tricks



The 555 Timer:
Many an electronic designs require some sort of timing, for push-button debouncing, clocking of digital circuits or whatever. One of the simplest timing circuits, the resistor-capacitor network usually referred to as an RC circuit has a few serious limitations, particularly when it comes to temperature stability and the accuracy of capacitors. While there are many alternative solutions to RC timing there's one that many hobbyists take to (at least for a while), the 555 timer IC. The 8-pin DIP version is pictured below.


LM555 in DIP package

Designed in 1970 and still used today the 555 timer is one of the more longer lived integrated circuit designs around. It's quite simple to use and costs very little (a few NZ$) yet can deliver reasonably accurate and stable timing. The operating supply voltage is wide (4.5V to 15V) and the output can be used to directly drive reasonably heavy loads such as relays and small lamps. Some modern variants of the original design claim to be able to produce timing periods as long as a year or frequencies up to 2MHz.

Basic Operation:
The pinout of the 555 timer.

Pin Description
1 Negative supply
2 Trigger Input
3 Output Signal
4 Reset Input
5 Voltage Control
6 Threshold Input
7 Discharge Path
8 Positive Supply

The positive and negative supply pins are self-explanatory, although it's worth noting that some variants of the 555 won't function reliably or at all if there isn't a sizable decoupling cap nearby. It's a good idea to put 10µF across these pins in any design.

Pin 3 exposes the output signal, the timing signal generated by the IC. Most standard incarnations of the 555 can sink (connect to ground) and source (connect to the positive supply) loads up to 200mA. Some low power variants are limited to 20mA and some will have different capabilities when sinking or sourcing current, check the specific part's datasheet.

The reset input can be used to reset the output and prevent the 555 from operating. A falling edge on this pin forces the output signal low and the circuit remains disabled as long as the reset input is low. Many applications don't require this function and will just tie this pin directly to the positive supply. Occasionally a design will leave it floating (not connected to anything) which is not recommended even if it does work in some cases.

The trigger and threshold inputs are responsible for producing the timing. If the voltage level presented to the trigger input is less than 1/3 of the supply voltage then the output signal will be driven high, and if the voltage level on the threshold input exceeds 2/3 of the supply then the output is driven low again. Taken by itself this may not be overly useful, but if these pins are connected to a RC circuit then the exponential voltage curve of a charging capacitor will set the output signal high for a reasonably precise and repeatable period of time.

Pin 5 allows the threshold voltage (normally 2/3 of the positive supply) to be adjusted. This pin connects directly into the comparator, meaning the applied voltage directly effects the voltage level on the threshold input (pin 6) required to drive the output low and therefore also effects the period of the output signal. When this pin is not used it should be bypassed with a 10nF capacitor to avoid introducing unnecessary noise into the comparator circuit.

Finally, pin 7 is connected to ground whenever the output is low. Occasionally this may be used as a second output which is open-collector and inverted from pin 3, but the actual purpose of this pin is to provide a discharge path for an RC circuit attached to the trigger and threshold inputs.

There are three basic modes of operation. These are monostable, bistable and astable. The use of the 555 timer is obviously not restricted to these basic circuits but they are the focus of this introductory article. Some basic knowledge of RC timing is useful in order to understand the how the various 555 timer circuits work. This knowledge is not essential, but it is assumed by this article and will certainly be of use in understanding the formula used to calculate the output period.

Monostable Mode:
A monostable circuit has one stable state to which it will return, thus the term monostable. In the case of the 555 this stable state is usually with the output off. When triggered the output will be driven high for a precise period of time and then remain off until the circuit is triggered again. In the case of the circuit below, any trigger pulses received while the output is high are ignored.


Monostable 555 Circuit
Click to view image alone


As long as the trigger input remains high the circuit remains in the off state, with the output driven low. Pin 7 is connected to ground inside the IC which effectively shorts out C and draws some current through R. When the trigger input goes low, or more precisely when it drops below 1/3 of the positive supply voltage, the output is driven high. At the same time the connection to ground at pin 7 is removed and C begins to charge through R. The voltage across the capacitor rises predictably with time until it reaches the threshold point at pin 6, at which point the circuit resets. The output will be driven low and pin 7 will connect to ground again rapidly discharging C, ready for the next trigger pulse.

The period of time for which the output is high depends directly on the values of R and C, as shown in the formula for calculating this period. This formula is useful for getting some idea of the component values you need but component tolerances must be taken into account. Certain types of capacitors (such as electrolytics) can be as much as 10% or more off their marked value, which will obviously effect the timing period the circuit actually produces.


Formula for monostable period


This monostable circuit is often referred to as a "one shot" timer, as used in my Front Panel Serial Ports project.

Bistable Mode:
Bistable mode is a less common configuration in 555 timer designs where the circuit has two stable states but doesn't actually producing any timing signals. A bistable 555 circuit behaves like a flip-flop, effectively providing one bit of memory.


Bistable 555 Circuit
Click to view image alone


The "set" and "reset" inputs to this circuit are active low and must be held close to the positive supply voltage when not asserted, with pull-up resistors if necessary. A falling edge on the set input will cause the output signal to be driven high until another falling edge on the reset input returns the output low. The circuit will remain in either state indefinitely and is therefore bistable. The threshold input is connected to ground to ensure that it can never reset the circuit as it would in a normal timing application.

Electronic memory is obviously not a very good use of the 555 at several NZ$ per bit but there are numerous situations in which the set/reset flip-flop behaviour is very useful. It also goes to show that the 555 is quite a versatile device and not by any means restricted solely to timing circuits.

Astable Mode:
A more common usage is astable mode, where the circuit changes from one state to the other at a steady rate, or oscillates. The basic astable 555 circuit allows the output's high time and low time to be separately adjusted as well as the frequency of oscillation.


Astable 555 Circuit
Click to view image alone


This is much like monostable mode except that the trigger input is also connected to the RC circuit. When first powered on pin 7 will be connected to ground (output is low) which will bring the pin 2 below 1/3 of the supply voltage via RD and start the timing cycle. As C charges through both RC and RD the voltage on the threshold input (pin 6) will rise until it passes 2/3 of the supply voltage at which point the 555 will drive the output signal low. The discharge path is also grounded at this point causing the capacitor to discharge through RD and pin 7. As C is discharging, the voltage on the trigger input will eventually fall to 1/3 of the positive supply and re-trigger the circuit. Because the capacitor is charged through both RC and RD but discharged only through RD the output high and low times can be different. The formula for the time period spent in each state are below. TH is the period of time where the output pin is driven high and TL is the period where it is driven low.


Formula for astable periods


Often the quantity that we want to calculate is the frequency of oscillation for a given combination of RC, RD and C. Provided that the frequency is the reciprocal of the period (which it is) then this is relatively easy to work out. The period of a single oscillation will be the sum of TH and TL and the frequency will therefore be the reciprocal of this sum.

Frequency formula for astable circuit


The usual approach to choosing resistor and capacitor values is to fix C at some reasonable value (ie. something you have in your junk box) because capacitor values are generally less flexible than resistor values. With C known and some idea of the desired frequency or period then it's pretty straight forward to determine a value for RD, and subsequently RC. If the formula for frequency seems a complicated, try breaking it down into the separate calculations for TH and TL shown above.

If you can't recall any basic algebra or all this math is just making your head hurt then another approach is to just choose some arbitrary value for C and replace the resistors with adjustable trimpots. By trial and error and a bit of tweaking you should be able to obtain the timing required. Obviously, if you're trying to build an oscillator at more than a few cycles per second then you're probably going to need something like an oscilloscope to calibrate the circuit without using any math.

Part Numbers:
Since the original NE555 (and SE555) many variations and improvements have been made by various manufacturers, resulting in a myriad of different parts with identical function but different capabilities. The datasheet for the actual part you have is always the authoritative source of information on that part, but some generalisations can still be made.

Often the prefix to the part number denotes the manufacturer and is of little consequence. Parts like LM555, NE555 and SE555 are more or less the same. However, occasionally a different technology will be indicated by the prefix. For example, the TLC555 is a CMOS version which draws significantly less current than the TTL parts and is usually stable without large decoupling capacitors nearby but can only drive 20mA from the output rather than 200mA.

Almost all integrated circuits part numbers have a suffix which indicates the package type. Most hobbyists will only be interested in standard DIP packages which are usually denoted by a 'P' or an 'N'. Given that the package type is probably pretty obvious you can safely ignore these suffixes...

There are a few 555 timer based parts which stray from the standard part number. The 556 (prefixed LM, NE, SE, TLC or whatever) is a 14-pin part which contains two identical and independent 555 circuits with common power supply pins. The 7555 is another low power variant and the 558 is some bizarre combination of four 555 circuits in a 16-pin package which I've never used.

Tips and Tricks:
Using the 555 timer is really quite simple once you get the hang of it, but if you're just starting to play with this device then there's a few things worth keeping in mind:
  • Most non-CMOS variants won't perform reliably without a bulk decoupling capacitor nearby. Having 10µF or more near to the power pins is a good idea for any circuit.
  • The trigger and threshold inputs are analog comparator inputs. Although many monostable and bistable circuits treat them as digital inputs they will behave just fine with slowly changing analog signals.
  • The control voltage input can be used to directly control the frequency of an astable circuit (or the period of a monostable circuit). This is often more convenient than adjusting resistor values when trying to control one circuit with another circuit.
  • When not using the control voltage input make sure it's bypassed with a 10nF capacitor. Your circuit may test out fine without it but will be more susceptible to false triggering.
  • When directly driving a load from the 555 make sure you know the maximum current of the output for the part you are using as they're all different.
  • If driving inductive loads like relays, solenoids and motors it's a very good idea to protect the 555 from "back EMF" with a power diode.



If you have any comments or questions please don't hesitate to contact me.

Return To Top Last Updated: 27/03/2007 Home Page