Understanding the 555 Timer IC: Modes and Applications

The 555 timer integrated circuit (IC) is used in timing, pulse generation, and oscillator applications. It can be configured to generate digital pulses of fixed time lengths. It can also generate continuous pulse trains at given frequencies and duty cycles. In the first case, the 555 timer IC is configured in monostable mode. It creates pulses of defined time lengths determined by a resistor and a capacitor. Each pulse starts when the monostable mode circuit is triggered by a high to low pulse signal. In the second case, the 555 timer IC is configured in astable mode. It creates an oscillator toggling the output between high and low values. A network of resistors and capacitors determines its frequency and duty cycle. In this post we will describe the 555 timer IC. We will also show how to set up the 555 timer IC in monostable and astable modes. The featured image at the beginning of this blog post is from an original published by Swift.Hg – Own work, CC BY-SA 3.0, via Wikimedia Commons.

Inside the 555 IC

The 555 timer IC was designed in 1971 by Hans Camenzind under contract by Signetics. The 555 is probably the most popular timer integrated circuit that was ever designed. It is still in use today, including CMOS versions of the integrated circuit. The schematic on the left, below, depicts the internal block diagram of the 555 IC. The drawing on the right side depicts the pin-out of the 555 timer IC.

In the block diagram, we can recognize electronic symbols that have encountered in earlier posts. These include the resistor, the transistor, and the flip-flop. The resistor is an electronic device that restricts current flow. It is described in the Arduino’s Blink post. The transistor is a semiconductor device used to amplify or switch electronic signals and electrical power. It is described in the Transistor Driven Relay Switch post. The flip-flop acts as a single bit of memory. It can store a low value, 0. It can also store a high value, 1. It is described in the Using Shift Registers to Increase Digital Outputs post.

There are two symbols in the block diagram that we have not encountered before. Both are made up of a triangle. One or two lines touch the base of the triangle, and a line comes out of the triangle’s summit. In an electronic diagram, triangles represent components called amplifiers. The amplifier inputs are at the base of the triangle. The amplifier outputs are at the triangle’s summit. A small circle means voltage inversion. Voltage inversion can be applied on an amplifier’s inputs or outputs. As the name implies, amplifiers amplify signals. The two triangles at the left with the inverting and non-inverting inputs are called operational amplifiers, or simply, op-amps. The triangle at the right with the inverting output is called an inverter. Both op-amp and inverter components will be discussed in the next paragraph.

Inverters are components used in digital electronics that invert signals. When the input of the inverter is low, its output is high. When the input of the inverter is high, its output is low. Hence, a ‘0’ at the inverter’s input produces a ‘1’ at its output. Similarly, a ‘1’ at the inverter’s input produces a ‘0’ at its output. We do not need to fully describe op-amp operation to explain how the 555 works. Suffices to say that within the integrated circuit, op-amps are used as comparators. Comparators work as follows. When the non-inverting input’s voltage exceeds the inverting input’s voltage, the comparator’s output rises to the supply voltage. This represents a digital high or ‘1’. Otherwise, the output is set to ground. This represents a digital low or ‘0’.

The 555 timer IC block diagram can be broken down in four major stages. The diagram below shows the stages. Stage 1, in the green box, is the voltage divider stage. Three 5 KΩ resistors are connected in series between the integrated circuit’s supply voltage and ground. The voltage divider provides two output voltages to the comparator stage of the 555 timer IC. The first voltage sits at ⅓ the supply voltage, ⅓VCC. The second voltage sits at ⅔ the supply voltage, ⅔VCC. Stage 2, in the yellow box, is the comparator stage. It compares the voltages at the threshold and trigger pins of the NE555 with the voltages of the voltage divider. When the threshold pin’s voltage is larger than ⅔VCC, the flip-flop of stage 3 is reset. When the trigger pin’s voltage is lower than ⅓VCC, the flip-flop of stage 3 is set.

Stage 3, in the blue box, is the state stage. It uses a flip-flop to store the state of the NE555 integrated circuit timer. The inverted output of the flip-flop is low, ‘0’, when a timing cycle has been triggered. The inverted output of the flip-flop is high, ‘1’, when the threshold voltage has been reached. In this state, the timing cycle has completed. The flip-flop can be reset to the timing cycle completed state. The inverted output of the flip-flop drives the output stage. Stage 4, in the red box, is the output stage. The 555 output pin, is high, ‘1’, when a timing cycle is started. The output pin is low, ‘0’, when a timing cycle has completed. The discharge pin is connected to ground when a timing cycle has completed. The discharge pin is floating, as if unconnected, during a timing cycle. The 555 timer IC supply voltage can range between 4.5V and 16V.

Creating a Single Pulse Timer with the 555

A single pulse timer is a timer circuit that activates for a preset amount of time. A 555 timer IC in monostable mode acts as a single pulse timer. To set up the 555 in a monostable mode we need a resistor and capacitor in series. We first put the 555 in the timing cycle state. A capacitor charges through a resistor until the threshold voltage is reached. The 555 then enters the timing cycle completed state and discharges the capacitor. The electronic schematic below illustrates how to build a circuit with the 555 timer IC in monostable mode. The circuit lights an LED for approximately 5 seconds when a push button switch is depressed.

In the circuit above the 555 timer IC is configured in monostable mode. Resistor R and capacitor C form the timing circuit. Resistor R is connected to the supply on one side and to capacitor C on the other. The other end of capacitor C is connected to ground. The resistor-capacitor junction is connected to the 555 threshold and discharge pins. The output pin of the 555 is connected to an LED wit a current limiting resistor. The control pin of the 555 is connected to ground through a 10 nF capacitor. This capacitor is used to prevent external electrical noise from affecting the timing circuitry. The reset and VCC pins of the 555 are connected to the supply. The ground pin of the 555 is connected to ground. Finally, a switch connected to ground is connected to the trigger pin of the 555. The trigger pin is pulled up to the supply voltage by a 10 KΩ resistor connected to the supply. This ensures the the circuit is triggered only when the switch is depressed.

When powered up, the circuit is in timing cycle completed mode. The output is low, the LED is off, and the discharge pin connects the timing capacitor to ground. When the switch is depressed, it grounds the trigger pin. The 555 then enters a timing cycle because the trigger pin is less than ⅓VCC. The output pin becomes high, turning the LED on. The discharge pin becomes floating, allowing the capacitor to charge through the timing resistor. The capacitor charges until its voltage reaches ⅔VCC. As the threshold pin voltage reaches ⅔VCC, the 555 ends its timing cycle. The output pin becomes low and the discharge pin gets connected to ground. The LED turns off and the timing capacitor is discharged. The circuit is then ready for a new timing cycle.

The time it takes for the capacitor to charge depends on the value of the timing capacitor and resistor. In the Switch Debouncing post, we have seen that the voltage across the capacitor of a charging RC (resistor-capacitor) circuit is given by:

VC = VCC (1 − e-t/RC)

The 555 circuit starts in timing cycle mode with the capacitor fully discharged. It remains in this mode until the voltage across the capacitor reaches ⅔VCC. If we want a timing circuit to turn on the LED for t seconds, the equation becomes:

⅔VCC = VCC (1 − e-t/RC)

Solving for t, we get

t = -ln⅓ RC

or approximately

t = 1.1 RC

Note that timing is independent from the supply voltage. Let’s build a circuit that will light an LED for 5 seconds. The RC value that we want is 5 seconds divided by 1.1 yielding 4.55 seconds. If we use a 100 KΩ resistor, we need a 45.5 µF capacitor. A 47 µF capacitor is the nearest standard value. Using a 1 MΩ resistor with a 4.7 µF capacitor would work as well. Any combination of resistor and capacitor values that give 4.55 seconds when multiplied would work. The schematic below depicts a circuit featuring the 555 that turns an LED on for 5 seconds.

The next picture depicts how to connect the different parts using a solderless breadboard and jumper wires. The switch section uses a temporary contact button switch and a 10 KΩ resistor. The RC timing circuit uses a 47 µF electrolytic capacitor and a 100 KΩ resistors. The negative side of the capacitor is connected to ground. The output section uses an LED and a 330 Ω resistor. The anode of the LED is connected to the 555 pin 3. Finally, the board uses a 555 timer IC and a 10 nF ceramic capacitor. Connect the ground, black wires, and supply, red wires, to a suitable power source providing between 5V to 15V.

The LED will turn on for 5 seconds when the button switch is depressed. The 5 seconds start when the switch is first depressed, regardless of how long the button switch is depressed. If the button switch is depressed for more than 5 seconds, the LED will stay lit. It will stay lit until the button is released.

An Oscillator with the 555 Timer IC

In astable mode, the 555 timer IC becomes an oscillator that continuously toggles its output high and low. To set the 555 in astable mode, we need to find a way to re-trigger it automatically. One way to do this is to connect the trigger pin to the timing capacitor. At the end of a timing cycle, the discharge pin discharges the capacitor. The voltage across the capacitor drops below ⅓VCC and the timing cycle starts again. The next schematic shows this configuration.

Although this circuit works, the capacitor discharge time is so short that the LED appears on all the time. One way to slow down the capacitor discharge is to discharge the capacitor through a resistor. The next schematic shows how to do this.

In this new circuit, the timing capacitor is charged through resistors RC and RCD. While the capacitor is charging, the output is high and the LED is lit. When the voltage across the timing capacitor reaches ⅔VCC the threshold voltage is reached and the timing cycle ends. The output goes low, the LED turns off and the capacitor starts discharging through resistor RCD. When the voltage across the timing capacitor drops to ⅓VCC, the timing cycle starts again. While discussing the 555 astable operation we found the time it takes for a capacitor to charge to ⅔VCC. The time it takes a capacitor to charge from ⅓VCC to ⅔VCC through a resistor is

t = (-ln⅓) RC − (-ln⅔) RC

Simplifying the equation we get

t = (-ln½) RC

The equation for the voltage across a capacitor through time as it discharges is

VC = V0e-t/RC

To calculate the time it takes for a capacitor to discharge from ⅔VCC to ⅓VCC, we substitute ⅓VCC for VC and ⅔VCC for V0 in the equation

⅓VCC = ⅔VCCe-t/RC

Solving for t, we get

t = (-ln½) RC

Unsurprisingly, charging a capacitor through a resistor takes the same time as discharging it through the same resistor. The time it takes to charge or discharge a capacitor through a resistor between ⅓VCC and ⅔VCC is approximately

t = 0.69 RC

Hence, the time it takes to charge the timing capacitor C through resistors RC and RCD then discharge through RCD is

t = 0.69 (RC + RCD) C + 0.69 RCD C

or

t = 0.69 (RC +2 RCD) C

Let’s say that we want to create an oscillator flashing an LED at a frequency of 0.2 Hz. We also want the LED to be on 60% of the time. The full cycle time is thus 5 seconds. The LED is on for 3 seconds and off for 2 seconds. The first circuit used a 47 µF capacitor for an on time of 5 seconds. Let’s use a 22 µF capacitor for the new circuit for an on time of 3 seconds. We thus have to find a solution to the two equations

0.69 (RC + 2RCD) 22×10-6 = 5 s — Full cycle time

0.69 (RC + RCD) 22×10-6 = 3 s — Time to charge

Solving for RC and RCD we get RC = 66 KΩ and RCD = 132 KΩ. The closest standard 10% resistor values are RC = 68 KΩ and RCD = 120 KΩ. These values yield a frequency of 0.21 Hz and an LED on time of 2.9 seconds, quite close to the required values. Here is a circuit with a 555 timer IC oscillator. It continuously turns an LED on for 3 seconds and off for 2 seconds.

The next picture depicts how to connect the different parts using a solderless breadboard and jumper wires. .The RC timing circuit uses a 22 µF electrolytic capacitor a 68 KΩ resistor and a 120 KΩ resistor. The negative side of the capacitor is connected to ground. The output section uses an LED and a 330 Ω resistor. The anode of the LED is connected to the 555 pin 3. Finally, the board uses a 555 timer IC and a 10 nF ceramic capacitor. Connect the ground, black wires, and supply, red wires, to a suitable power source providing 5V to 15V.

As soon as the circuit is connected to power, the LED will turn on. It will then turn off for 2 seconds then on again for 3 seconds. The first time it is on, the LED remains lit for over 3 seconds. This happens as it starts charging from 0 volt instead of ⅓VCC.

What Next

We have seen how the 555 timer IC can be used as a delay and as an oscillator. You can start playing with the timing resistor and capacitor values to change the delay, frequency and duty cycle. Notice that in astable mode, the circuit shown can’t provide a 50% duty cycle. The time on is always greater than the time off. This is because of the resistor configuration. Try to find a solution to this limitation. The 555 timer IC can also be used in other applications. It can serve as a memory bit. It can act as a Schmitt trigger. It can function as a voltage-controlled oscillator. Additionally, it can be used as a pulse width modulator, among other uses.

Published by

Unknown's avatar

Michel Lagacé

More than 47 years working in the high technology sector, I now share tips and tricks on software and electronics. I also love to cook and to write in my spare time.

Leave a Reply