Make: Electronics

Home > Other > Make: Electronics > Page 22
Make: Electronics Page 22

by Charles Platt

00.24

  00.52

  00.22 µF

  0.01

  0.02

  00.05

  00.11

  00.24

  00.1 µF

  0.01

  00.02

  00.05

  00.11

  00.047 µF

  00.01

  00.02

  00.05

  00.022 µF

  00.01

  00.02

  00.01 µF

  00.01

  1K

  2K2

  4K7

  10K

  22K

  47K

  100K

  220K

  470K

  1M

  Theory

  Inside the 555 timer: monostable mode

  The plastic body of the 555 timer contains a wafer of silicon on which are etched dozens of transistor junctions in a pattern that is far too complex to be explained here. However, I can summarize their function by dividing them into groups, as shown in Figure 4-18. An external resistor and two external capacitors are also shown, labeled the same way as in Figure 4-15.

  The negative and positive symbols inside the chip are power sources which actually come from pins 1 and 8, respectively. I omitted the internal connections to those pins for the sake of clarity.

  The two yellow triangles are “comparators.” Each comparator compares two inputs (at the base of the triangle) and delivers an output (from the apex of the triangle) depending on whether the inputs are similar or different. We’ll be using comparators for other purposes later in this book.

  Figure 4-18. Inside the 555 timer. White lines indicate connections inside the chip. A and B are comparators. FF is a flip-flop which can rest in one state or the other, like a double-throw switch. A drop in voltage on pin 2 is detected by comparator A, which triggers the flip-flop into its “down” position and sends a positive pulse out of pin 3. When C4 charges to 2/3 of supply voltage, this is detected by comparator B, which resets the flip-flop to its “up” position. This discharges C4 through pin 7.

  Theory

  Inside the 555 timer: monostable mode (continued)

  The green rectangle, identified as “FF,” is a “flip-flop.” I have depicted it as a DPDT switch, because that’s how it functions here, although of course it is really solid-state.

  Initially when you power up the chip, the flip-flop is in its “up” position which delivers low voltage through the output, pin 3. If the flip-flop receives a signal from comparator A, it flips to its “down” state, and flops there. When it receives a signal from comparator B, it flips back to its “up” state, and flops there. The “UP” and “DOWN” labels on the comparators will remind you what each one does when it is activated.

  Flip-flops are a fundamental concept in digital electronics. Computers couldn’t function without them.

  Notice the external wire that connects pin 7 with capacitor C4. As long as the flip-flop is “up,” it sinks the positive voltage coming through R4 and prevents the capacitor from charging positively.

  If the voltage on pin 2 drops to 1/3 of the supply, comparator A notices this, and flips the flip-flop. This sends a positive pulse out of pin 3, and also disconnects the negative power through pin 7. So now C4 can start charging through R4. While this is happening, the positive output from the timer continues.

  As the voltage increases on the capacitor, comparator B monitors it through pin 6, known as the threshold. When the capacitor accumulates 2/3 of the supply voltage, comparator B sends a pulse to the flip-flop, flipping it back into its original state. This discharges the capacitor through pin 7, appropriately known as the discharge pin. Also, the flip-flop ends the positive output through pin 3 and replaces it with a negative voltage. This way, the 555 returns to its original state.

  I’ll sum up this sequence of events very simply:

  1. Initially, the flip-flop grounds the capacitor and grounds the output (pin 3).

  2. A drop in voltage on pin 2 to 1/3 the supply voltage or less makes the output (pin 3) positive and allows capacitor C4 to start charging through R4.

  3. When the capacitor reaches 2/3 of supply voltage, the chip discharges the capacitor, and the output at pin 3 goes low again.

  In this mode, the 555 timer is “monostable,” meaning that it just gives one pulse, and you have to trigger it again to get another.

  You adjust the length of each pulse by changing the values of R4 and C4. How do you know which values to choose? Check the table on page 157, which gives an approximate idea and also includes a formula so that you can calculate values of your own.

  I didn’t bother to include pulses shorter than 0.01 second in the table, because a single pulse of this length is usually not very useful. Also I rounded the numbers in the table to 2 significant figures, because capacitor values are seldom more accurate than that.

  Background

  How the timer was born

  Back in 1970, when barely a half-dozen corporate seedlings had taken root in the fertile ground of Silicon Valley, a company named Signetics bought an idea from an engineer named Hans Camenzind. It wasn’t a huge breakthrough concept—just 23 transistors and a bunch of resistors that would function as a programmable timer. The timer would be versatile, stable, and simple, but these virtues paled in comparison to its primary selling point. Using the emerging technology of integrated circuits, Signetics could reproduce the whole thing on a silicon chip.

  Figure 4-19. Hans Camenzind, inventor and developer of the 555 timer chip for Signetics.

  This entailed some trial and error. Camenzind worked alone, building the whole thing initially on a large scale, using off-the-shelf transistors, resistors, and diodes on a breadboard. It worked, so then he started substituting slightly different values for the various components to see whether the circuit would tolerate variations during production and other factors such as changes in temperature when the chip was in use. He made at least 10 different versions of the circuit. It took months.

  Next came the crafts work. Camenzind sat at a drafting table and used a specially mounted X-Acto knife to scribe his circuit into a large sheet of plastic. Signetics then reduced this image photographically by a ratio of about 300:1. They etched it into tiny wafers, and embedded each of them in a half-inch rectangle of black plastic with the product number printed on top. Thus, the 555 timer was born.

  It turned out to be the most successful chip in history, both in the number of units sold (tens of billions and counting) and the longevity
of its design (unchanged in almost 40 years). The 555 has been used in everything from toys to spacecraft. It can make lights flash, activate alarm systems, put spaces between beeps, and create the beeps themselves.

  Today, chips are designed by large teams and tested by simulating their behavior using computer software. Thus, chips inside a computer enable the design of more chips. The heyday of solo designers such as Hans Camenzind is long gone, but his genius lives inside every 555 timer that emerges from a fabrication facility. (If you’d like to know more about chip history, see http://www.semiconductormuseum.com/Museum_Index.htm.)

  Fundamentals

  Why the 555 is useful

  In its monostable mode (which is what you just saw), the 555 will emit a single pulse of fixed (but programmable) length. Can you imagine some applications? Think in terms of the pulse from the 555 controlling some other component. A motion sensor on an outdoor light, perhaps. When an infra-red detector “sees” something moving, the light comes on for a specific period—which can be controlled by a 555.

  Another application could be a toaster. When someone lowers a slice of bread, a switch will close that triggers the toasting cycle. To change the length of the cycle, you could use a potentiometer instead of R4 and attach it to the external lever that determines how dark you want your toast. At the end of the toasting cycle, the output from the 555 would pass through a power transistor, to activate a solenoid (which is like a relay, except that it has no switch contacts) to release the toast.

  Intermittent windshield wipers could be controlled by a 555 timer—and on earlier models of cars, they actually were. And what about the burglar alarm that was described at the end of Chapter 3? One of the features that I listed, which has not been implemented yet, is that it should shut itself off after a fixed interval. We can use the change of output from a 555 timer to do that.

  The experiment that you just performed seemed trivial, but really it implies all kinds of possibilities.

  555 timer limits

  1. The timer can run from a stable voltage source ranging from 5 to 15 volts.

  2. Most manufacturers recommend a range from 1K to 1M for the resistor attached to pin 7.

  3. The capacitor value can go as high as you like, if you want to time really long intervals, but the accuracy of the timer will diminish.

  4. The output can deliver as much as 100mA at 9 volts. This is sufficient for a small relay or miniature loudspeaker, as you’ll see in the next experiment.

  Beware of Pin-Shuffling!

  In all of the schematics in this book, I’ll show chips as you’d see them from above, with pin 1 at top left. Other schematics that you may see, on websites or in other books, may do things differently. For convenience in drawing circuits, people shuffle the pin numbers on a chip so that pin 1 isn’t necessarily shown adjacent to pin 2.

  Look at the schematic in Figure 4-20 and compare it with the one in Figure 4-15. The connections are the same, but the one in Figure 4-20 groups pins to reduce the apparent complexity of the wiring.

  Figure 4-20. Many people draw schematics in which the pin numbers on a chip are shuffled around to make the schematic smaller or simpler. This is not helpful when you try to build the circuit. The schematic here is for the same circuit as in Figure 4-15. This version would be harder to recreate on a breadboard.

  “Pin shuffling” is common because circuit-drawing software tends to do it, and on larger chips, it is necessary for functional clarity of the schematic (i.e., logical groupings of pin names versus physical groupings on memory chips, for example). When you’re first learning to use chips, I think it’s easier to understand a schematic that shows the pins in their actual positions. So that’s the practice I will be using here.

  Experiment 17: Set Your Tone

  I’m going to show you two other ways in which the 555 timer can be used.

  You will need the same items as in Experiment 16, plus:

  Additional 555 timer chip. Quantity: 1.

  Miniature loudspeaker. Quantity: 1.

  100K linear potentiometer. Quantity: 1.

  Procedure

  Leave the components from Experiment 16 where they are on the breadboard, and add the next section below them, as shown in Figures 4-21 and 4-22. Resistor R2 is inserted between pins 6 and 7, instead of the jumper wire that shorted the pins together in the previous circuit, and there’s no external input to pin 2 anymore. Instead, pin 2 is connected via a jumper wire to pin 6. The easiest way to do this is by running the wire across the top of the chip.

  I have omitted the smoothing capacitor from the schematic in Figure 4-22, because I’m assuming that you’re running this circuit on the same breadboard as the first, where the previous smoothing capacitor is still active.

  A loudspeaker in series with a 100Ω resistor (R3) has been substituted for the LED to show the output from the chip. Pin 4, the reset, is disabled by connecting it to the positive voltage supply, as I’m not expecting to use the reset function in this circuit.

  Now what happens when you apply power? Immediately, you should hear noise through the loudspeaker. If you don’t hear anything, you almost certainly made a wiring error.

  Notice that you don’t have to trigger the chip with a pushbutton anymore. The reason is that when C1 charges and discharges, its fluctuating voltage is connected via a jumper wire across the top of the chip to pin 2, the trigger. In this way, the 555 timer now triggers itself. I’ll describe this in more detail in the next section “Theory: Inside the 555 timer: astable mode,” if you want to see exactly what is going on.

  In this mode, the chip is “astable,” meaning that it is not stable, because it flips to and fro endlessly, sending a stream of pulses for as long as the power is connected. The pulses are so rapid that the loudspeaker reproduces them as noise.

  In fact, with the component values that I specified for R1, R2, and C1, the 555 chip is emitting about 1,500 pulses per second. In other words, it creates a 1.5 KHz tone.

  Check the table on page 166 to see how different values for R2 and C1 can create different pulse frequencies with the chip in this astable mode. Note that the table assumes a fixed value of 1K for R1!

  Figure 4-21. These components should be added on the same breadboard below the components shown in Figure 4-14. Use the following values to test the 555 timer in its astable mode:

  R1: 1K

  R2: 10K

  R3: 100Ω

  C1: 0.047 µF ceramic or electrolytic

  C2: 0.1 µF ceramic

  IC2: 555 timer

  Figure 4-22. This is the schematic version of the circuit shown in Figure 4-21. The component values are the same.

  Theory

  Inside the 555 timer: astable mode

  Here’s what is happening now, illustrated in Figure 4-23. Initially, the flip-flop grounds C1 as before. But now the low voltage on the capacitor is connected from pin 7 to pin 2 through an external wire. The low voltage tells the chip to trigger itself. The flip-flop obediently flips to its “on” position and sends a positive pulse to the loudspeaker, while removing the negative voltage from pin 7.

  Figure 4-23. When the 555 timer is used in astable mode, resistor R2 is placed between pin 6 and pin 7, and pin 6 is connected via an external wire to pin 2, so that the timer triggers itself.

  Now C1 starts charging, as it did when the timer was in monostable mode, except that it is being charged through R1 + R2 in series. Because the resistors have low values, and C1 is also small, C1 charges quickly. When it reaches 2/3 full voltage, comparator B takes action as before, discharging the capacitor and ending the output pulse from pin 3.

  The capacitor takes longer to discharge than before, because R2 has been inserted between it and pin 7, the discharge pin. While the capacitor is dischargin
g, its voltage diminishes, and is still linked to pin 2. When the voltage drops to 1/3 of full power or less, comparator A kicks in and sends another pulse to the flip-flop, starting the process all over again.

  Summing up:

  1. In astable mode, as soon as power is connected, the flip-flop pulls down the voltage on pin 2, triggering comparator A, which flips the flip-flop to its “down” position.

  2. Pin 3, the output, goes high. The capacitor charges through R1 and R2 in series.

  3. When the capacitor reaches 2/3 of supply voltage, the flip-flop goes “up” and the output at pin 3 goes low. The capacitor starts to discharge through R2.

  4. When the charge on the capacitor diminishes to 1/3 of full voltage, the pull-down on pin 2 flips the flip-flop again and the cycle repeats.

  Unequal on/off cycles

  When the timer is running in astable mode, C1 charges through R1 and R2 in series. But when C1 discharges, it dumps its voltage through R2 only. This means that the capacitor charges more slowly than it discharges. While it is charging, the output on pin 3 is high; while it is discharging, the output on pin 3 is low. Consequently the “on” cycle is always longer than the “off” cycle. Figure 4-24 shows this as a simple graph.

  If you want the on and off cycles to be equal, or if you want to adjust the on and off cycles independently (for example, because you want to send a very brief pulse to another chip, followed by a longer gap until the next pulse), all you need to do is add a diode, as shown in Figure 4-25.

  Now when C1 charges, the electricity flows through R1 as before but takes a shortcut around R2, through diode D1. When C1 discharges, the diode blocks the flow of electricity in that direction, and so the discharge goes back through R2.

 

‹ Prev