Integrated circuits sometimes remain on the market for years because they continue to be useful. The NE555 timer is a classic example. This inexpensive eight-pin chip is among the most versatile integrated circuits ever made and can serve in countless projects. It is easy to use and needs only a few external components for jobs ranging from timing to astable oscillators, ramp generators, and sequential timers. Despite its low price, it provides stable timing despite changes in supply voltage and temperature; its frequency stability is 0.005% per °C.
Nearly every IC manufacturer has its own version of the “555.” Depending on the maker, it may be called the TLC555, LMC555, uA555, NE555C, MC1455, NE555, or LM555, among other names. It is commonly known as the “555” or “NE555.” A 14-pin version, the NE556, contains two NE555 timers that share their two power-supply pins. Since many applications need more than one timer, this dual version is worth keeping in mind.
The NE555 operates from 4.5 to 18 volts, although less readily available versions can run on as little as 2 volts. With a 5.0-volt supply, its output signals are compatible with TTL logic. When power consumption is especially important, the ICM7555 is an option: it is fully compatible with the NE555, including the same pin arrangement, but its CMOS construction brings its consumption down to just 20 milliamps.
Whenever their outputs change state, the NE555 and NE556 can draw a significant surge from the supply. This usually causes no trouble, but it can create headaches in more complex circuits. A ceramic capacitor of about 100 µF placed between the IC’s supply pins, as close to the chip as possible, is enough to address the issue.
Let’s take a look inside and see how this versatile timer can be put to work.
Inside the NE555
You don’t need to understand the NE555’s internal circuit to assemble an occasional project, but knowing what is inside can help when designing your own. The pin names below are given in English or Spanish where appropriate.
The circuit consists mainly of two operational amplifiers configured as voltage comparators. Their inputs correspond to pin 5 (CONTROL), pin 6 (THRESHOLD), and pin 2 (TRIGGER). The comparator outputs connect internally to the R and S inputs of an RS bistable. Its inverted Q output drives a transistor and a NOT gate. The gate output connects to pin 3, OUTPUT, and can handle currents up to 200 mA—more than enough for most applications. The transistor’s collector is used to discharge the timing capacitor.
A network of three equal resistors at the comparator inputs sets reference levels of two-thirds and one-third of the supply voltage at the inverting input of the first comparator and the non-inverting input of the second, respectively.
When the voltage at THRESHOLD rises above two-thirds of the supply, the comparator output goes high and sets the bistable’s R input. The inverted output then goes high, saturating the transistor and discharging the capacitor; at the same time, the 555 output goes low. The THRESHOLD input impedance is at least 10 megohms. CONTROL can be adjusted to set the threshold level, but it is usually unused and left connected to 0 V. If electrical noise is a concern, it can be connected through a 0.01 µF capacitor, though this is generally unnecessary.
The other comparator monitors TRIGGER. If the voltage at its inverting input drops below one-third of the supply voltage, its output goes high and sets the RS bistable’s S input. The bistable output goes low, the discharge transistor stops conducting, and the 555 output goes high. The TRIGGER input impedance is greater than 2 megohms.
The bistable’s RESET input is brought out to pin 4. Pulling it to 0 volts activates it and forces the 555 output low regardless of the other inputs. If RESET is not used, connect the pin to +V. Pins 1 and 8 power the chip, with pin 8 connected to +V.
The NE556 duplicates the circuit, with an “A” or “B” suffix identifying the corresponding timer. Its power pins, 7 and 14, are the exception: they are shared rather than duplicated.
NE555 pinout.
The NE556: two NE555 timers in one package.
Internal diagram.
Astable operation
One of the NE555’s most common uses is as an astable oscillator. In this configuration, pin 3 produces a square wave whose amplitude equals the supply voltage. The high and low portions of the output can have different durations. “Astable” describes the fact that the output does not stay in either logic state: it keeps switching between them over a period we’ll call T.
The period T is the sum of the high-state time, Tm (from “mark time”), and the low-state time, Ts (from “space time”). In practice, it is often more useful to work with the output frequency F, which equals 1/T.
The first diagram shows the NE555 connected as an astable oscillator. Just three additional components set the period and the relationship between Tm and Ts. A fourth component, the 0.01 µF capacitor, is included only to reduce noise on the control pin.
R1, R2, and C1 determine the timing:
T = 0.7 × (R1 + 2R2) × C1
F = 1.4 / ((R1 + 2R2) × C1)
T is in seconds, F in hertz, R1 and R2 in ohms, and C1 in farads.
The mark-to-space relationship, also called the duty cycle, is useful for controlling DC motor speed, lamp brightness, and similar applications. Its timing values are:
T = Tm + Ts
Tm = 0.7 × (R1 + R2) × C1
Ts = 0.7 × R2 × C1
These equations show that if Tm and Ts need to be equal—a 50% duty cycle—R2 must be much larger than R1.
To design an astable oscillator, first choose C1, which determines the available frequency range. Then choose R2, using:
R2 = 0.7 / (F × C1)
Finally, choose R1. It is generally 10% of R2, unless very different Tm and Ts durations are required. To make the output frequency adjustable, replace R2 with a suitably rated potentiometer and a series resistor of at least 1,000 ohms. The resistor prevents R2 from reaching zero at one end of the potentiometer’s travel.
Astable configuration.
Typical R and C values.
Timing relationship.
Duty cycle and PWM
As an astable oscillator, the NE555 can control devices such as motors and lamps using PWM (pulse-width modulation). Because PWM is so widely used, it is worth looking at a few more details.
The signal at pin 3 repeats continuously unless RESET forces the output to 0 V by being connected to a voltage below 0.7 V. A low oscillation frequency can flash an LED. A somewhat higher frequency—above 20 Hz but below 20 kHz—can drive a speaker or buzzer connected to pin 3 to make a simple audible alarm.
The relationship between Tm and Ts is usually expressed as a percentage. For a duty cycle of 50% or more, use the circuit in Figure 1; the equations associated with Figure 2 calculate the percentage. For a duty cycle below 50%, add a 1N4148 diode in parallel with R2, as in Figure 3, to allow current to flow during Tm. In this arrangement, Tm and Ts depend only on R1, R2, and C1 as follows:
Tm = 0.7 × R1 × C1
Ts = 0.7 × R2 × C1
Duty cycle (with diode) = Tm / (Tm + Ts) = R1 / (R1 + R2)
Figure 1.
Figure 2.
Figure 3.
Monostable operation
A monostable circuit has one stable state: low. Wire the NE555 as shown in Figure 1, and its output stays low until a signal arrives at TRIGGER. The output then goes high for a duration T set by R1 and C1, according to the formula in Figure 2. T is measured in seconds, R1 in ohms, and C1 in farads.
Pressing the button marked “trigger” makes the output go high until the R1–C1 interval expires or the “reset” button is pressed, whichever happens first. Since interrupting the high period is generally undesirable, the RESET button may not be needed.
For high periods longer than 10 minutes, electrolytic capacitors are required. Their leakage can reduce reliability, so keep in mind that timing errors of up to 20% are possible with the selected R1 and C1 values. Once triggered, the monostable ignores any further activity at TRIGGER until time T has elapsed or the timer is reset. A trigger during the output’s high state is therefore ignored.
Sometimes a circuit should reset automatically when power is connected, or trigger itself at startup. The circuit in Figure 3 can be connected to RESET or TRIGGER as appropriate.
Figure 1.
Figure 2.
Figure 3.
Bistable operation
Another common NE555 configuration is the bistable circuit. Both the high and low states are stable, and the output remains in either one until TRIGGER or RESET changes it. Since neither state is associated with a timing interval, there are no timing formulas to apply.
Applying 0 V to TRIGGER sets the output high. It stays there until the power is disconnected or RESET is pulled to 0 V. The output then remains low until TRIGGER is again connected to 0 V. Figure 1 shows the circuit.
Figure 1.
Three practical NE555 projects
The first example, Figure 1, uses a 555 to generate a square wave that drives transistor TR1. The transistor is connected to a step-up transformer, which can light a small 4-watt fluorescent tube from just 12 V. This circuit is suitable for batteries or a car cigarette lighter, making it useful as an emergency light or for outdoor activities. Keep your hands well away from the transformer’s 230 V section to avoid unpleasant electric shocks.
The variable resistor between pins 6 and 7 adjusts the output frequency to obtain the desired brightness. A trimmer can be used because the circuit should not need adjustment once set; it can even be replaced with an equivalent fixed resistor afterward.
Figure 2 uses a 7555—the CMOS version of the NE555, which could also be used here—as a monostable. A switch selects one of six resistors connected in series, replacing the resistor that sets the output’s high time and providing intervals from 5 to 30 minutes. You can change these values to get shorter or longer intervals using the formulas above. A BC109C transistor or equivalent drives a relay, which can switch any electrical appliance you want to control.
The third example, Figure 3, is a flashing light made from 40 LEDs for a bicycle, beacon, or similar use. It runs on four 1.5 V batteries, and its two groups of 20 LEDs flash alternately. The NE555 is configured as an astable oscillator. The 100-ohm resistors limit current through the LEDs, and transistors handle the current required by each LED branch. If fewer LEDs are needed, the circuit can be built with as few as five: two in each branch and the LED between the 160-ohm resistor and the 2N2905 transistor.
Figure 1.
Figure 2.
Figure 3.
Experiment with the 555
This small IC has thousands of possible applications. With this guide as a starting point, you can create your own designs by adapting one of the circuits shown and changing component values according to the formulas.
It’s well worth buying a couple of NE555s, a handful of resistors and capacitors, and a potentiometer or two. Use a breadboard or a pre-perforated circuit board to experiment with component values and observe the results. You can connect an LED between the output (pin 3) and 0 V, with a series resistor of about 470 ohms, to see the output state. At high oscillation frequencies, the human eye may not be able to tell whether the LED is on or off; in that case, try a small speaker instead.
More information: NE555 datasheet.