Introduction: 555 Timer Basics
The 555 timer IC is without doubt one of the most important and widely used single ICs in history. The design has remained unchanged for over 40 years, which makes it one of the longest running IC designs. It's been used in everything from toys to spacecraft.
The 555 was originally designed in 1971 by Hans Camenzind, a Swiss electronics engineer employed by Signetics in California. Camenzind spent months working on the final design, building several different test iterations by hand on a breadboard with discrete components. When the design was finalized, Camenzind sat at a drafting table and used a razor to cut the circuit design into a sheet of plastic. In total 23 BJTs, 15 resistors, and 2 diodes were cut into the plastic. This was then reduced to produce the etching mask for etching onto the silicon wafers. That kind of beginning-to-end design work by one man is now done by large teams of engineers with complex design, simulation, routing, and etching software to handle the difficult task of modern IC design. (For a good read on how Camenzind designed the 555, check out an article at semiconductormuseum.com)
The 555 is ridiculously simple to use, dead reliable in an extremely wide array of applications, and remarkably robust in what it can handle and do. And in all of it's applications, everything comes down to one of it's three main operation modes: monostable or "one-shot", astable or oscillator, and bistable or flip-flop. EVERY circuit out there that uses a 555, and there are countless iterations, comes down to one of these three modes.
To be clear, I'm not going to go into lots of neat 555 circuits, though I will include a short list of references where I've found some pretty cool ideas. My goal is to only go over the basics and what the internals are doing in each mode, not show you how to flash an LED or build a siren synthesizer. With that knowledge, it then becomes easier to design your own 555 circuits to do what you want instead of having to scour Google search results and decipher somebody else's thoughts.
Step 1: You'll Need Some Parts...
As mentioned, the circuits won't be complex, but will require a number of various components, all of which are easily available.
There are a lot of companies making 555 ICs today, but the core design remains unchanged from Camnzind's original 40 years ago, so it's not like one 555 is significantly better than any other. (But everybody has their favorite. Frankly, I don't care. They will all work for what we are doing here.) Below is an image of the 8-pin DIP that is the most common package type for the 555, though others are available. Next to it is an image of the pin assignments and the internal blocks to which the pins are connected. For a good look at the full internal schematic, check out this image.
|8-pin DIP||Pin assignments and |
internal function blocks
Step 2: The One-Shot or Monostable Mode
The first mode is called the one-shot, or monostable, because pin 3 (the output) will go high for as long as you want, but only one time. When the timer runs out, the output resets to low and waits for another trigger event to start again, stabilizing in only one state (off). A good example of this concept is a motion sensing light.
First let's look at the circuit schematic below, and then we can decipher what is going on later.
Push SW1 and the LED lights for a short time, then goes off. The time it stays on is found by multiplying the values of R4 and C2 and is expressed in seconds. The time is not exact, and as either value gets very large or very small, the error increases. A potentiometer of a similar magnitude to but in place of R4 will give you better control over the time. In the end, the only way to know the exact time is to actually time it with a clock.
Larger values for R4 and C2 will increase the time the LED stays on. Why? Well let's take a closer look at what is going on. (Now would be a good time to review the function block diagram from the previous step). Before we press SW1, output pin 3 is low and R3 pulls the signal at pin 2 (trigger) high, so the LED is off and stays that way. We press SW1 and it shorts the signal from pin 2 to GND, which triggers the comparator inside. If the voltage at pin 2 is less than 1/3 of the source voltage, the comparator activates the flip-flop which drives output pin 3 high. Since our source is +9V, we only need pin 2 to sense less than +3V, so the 0V at GND is more than enough. So now our LED is lit. Now what?
Capacitor C2 is initially empty before we press SW1 because it is connected to the discharge pin 7, which essentially connects C2 directly to ground internally and drains it. When we press SW1 and the flip-flop is triggered, the internal connection to discharge pin 7 is cut and C2 is allowed to charge through R4. This is where we get our timer. If the container (large C2) is big or the flow we use to fill it is small (large R4), it takes longer to fill C2. When the voltage across C2 reaches 2/3 the source voltage (so +6V here), the second comparator connected to threshold pin 6 is triggered, switching the flip-flop back to the original state, shutting everything off. C2 is again connected internally to discharge pin 7 and drains back to 0V, ready for the next trigger.
At any time between pressing SW1 and C2 reaching 2/3 source voltage, if we press SW2, we short the connection to reset pin 4, which until now has been forced high because of R2. The reset pin does exactly that, effectively switching the flip-flop back to the original state, turning off the LED and draining C2.
Step 3: The Flip-Flop or Bistable Mode
A flip-flop is like a switch, holding it's state indefinitely until something forces it to change. This is critical in digital logic and computing, but here we'll keep it simple and just use it like a switch. We now have two completely stable states that will not change on their own, hence bistable mode.
Look at the schematic below and then we'll discuss what's going on.
Press SW1 and the LED lights up. R2 forces trigger pin 2 high until the button is pressed, preventing the circuit from activating. Once SW1 is pressed, the internal flip-flop turns on the output pin 3 and waits for the signal from the second comparator to say that threshold pin 6 has reached 2/3 the source voltage. But we connected pin 6 to GND, so the comparator will never trip, keeping the circuit on and stable indefinitely. The only way to stop it is to press SW2, which connects reset pin 4 to GND, which until now has been forced high because of R3. This forces the flip-flop to revert back to it's original state, turning off the LED. The circuit is once again stable in this state, waiting for the user to press SW1.
Step 4: The Oscillator or Astable Mode
We've seen the 555 have a single stable output state (monostable mode) and two stable outputs (bistable mode). The last option for this IC is to have neither state be stable, or astable mode. The output continually switches back and forth between the two states at constant rate, which is just an oscillator or frequency generator. This rate is fully adjustable, and is very reliable. Let's see what that looks like.
It's hard to tell exactly which state the 555 will start in, either high or low output, but let's assume the capacitor starts discharged and output pin 3 is high. Trigger pin 2 is tied directly to threshold pin 6, so we can already tell that the internal flip-flop will switch back and forth as the voltage on the capacitor rises and falls. The rate of that flipping and flopping is determined by both R1 and R2.
We started with threshold pin 6 low, so output pin 3 is high while C2 charges through both R1 and R2 until it reaches 2/3 source voltage. That triggers the internal flip-slop, driving output pin 3 low. Pin 3 is then low while C2 then discharges through R2 and discharge pin 7. Once C2 reaches 1/3 source voltage, the internal flip-flop drives output pin 3 high, and C2 charges through R1 and R2 again, starting all over. This constantly changing high/low state on output pin 3 can be heard as a tone on a small 8Ω speaker. You can also use the output as a pulse width modulated signal, driving small motors with variable speed control. Remember to use a transistor between the output pin 3 and the load if the load requires a larger current. The 555 is pretty robust, but the LM555 from TI can only output 200mA, so be sure to protect it.
Changing the value of R1 will adjust the recharge time of C2, but the discharge time will be the same, so the width as well as the frequency of the pulse will be affected. Changing R2 will affect both charge and discharge, so only the frequency changes. A couple of adjustable pots work very nicely here. Changing C2 will change the frequency as well.
Step 5: So Now What?
There is a plethora of 555 circuits out there. A simple unfiltered Google search can provide hours of fun. Hans Camenzind stated in an interview that he was still surprised, 40 years later, with the varied applications people had come up with to use the 555.
If you just want a reference to a great site, check out Colin Mitchell's website talkingelectronics.com. Start with this page if you want another (and probably better and more thorough) explanation of how the 555 works. Otherwise go here for a list of circuits. Truthfully, the entire site is a treasure trove of knowledge and just plain awesomeness. Be sure to come up for food, water, and/or air every now and then.
Charles Platt in Make: Electronics has a great reaction timer that uses all three 555 modes (pg 170). One 555 is set up with a start switch as a one-shot to provide a delay to start the circuit. (Looking back at the schematic for the one-shot, R4 charges C2, which is what gives us our delay. Replacing R4 with a potentiometer will allow for a variable delay.) That triggers the next 555, set up as a flip-flop, to output. The flip-flop flops high, enabling the 7-segment numeric display to start showing the count. Once the user sees the count start, a stop button is provided to flip the second 555 output back to low, disabling the count and allowing the user to see the number they landed on. A third 555 is set up in astable mode to continuously run a counter. That counter drives the numeric display and has a reset button to zero said display. If it sounds complicated, it is but to be fair, it's also a bit difficult to explain in words. But it's also a great circuit to see the 555 hard at work. It is also not the only circuit in which he utilizes the 555 in some way or another.
Forrest M. Mims III in his Basic Electronics I workbook has some really good basic 555 circuits, like a simple keyboard tone generator, a voltage controlled oscillator, a siren synthesizer, and a frequency meter.
Ultimately, the limits of the 555 are only matched by your imagination. There aren't many circuits where you can't use a 555 in some type of application.
Thanks for reading. Please don't hesitate to ask questions in the comments below. You never know when someone else has the same question and that way we can all learn and help each other get better. Have fun building!
Also, please check out the Digilent blog where I contribute from time to time.
We have a be nice policy.
Please be positive and constructive.