Chapter 2

The Fabulous 555 Timer Chip

In This Chapter

arrow Discovering the 555 timer chip

arrow Configuring a 555 timer chip

arrow Putting the 556 dual-timer chip to work

arrow Building basic 555 timer chip circuits

The 555 timer chip, developed in 1970, is probably the most popular integrated circuit (IC) ever made. By some estimates, more than a billion are manufactured every year. Its popularity is well deserved.

The 555 is a single-chip version of a commonly used circuit called a multivibrator, which is useful in a wide variety of electronic circuits (see Book II, Chapter 6, for more). You can use the 555 chip for basic timing functions, such as turning a light on for a certain length of time, creating a warning light that flashes on and off, producing musical notes of a particular frequency or controlling the position of a servo device (read more about servos in Book VII, Chapter 4). The list goes on and on.

In this chapter, you find out how to use this versatile chip in a variety of circuits. We explain how the 555 works and what each of its pins does, and you also view and build a variety of common 555 circuits.

Examining how the 555 Works

Think of the 555 as a hybrid of an analogue and digital circuit. The output produced by a 555 is purely digital: it’s either off (0 V) or on (with positive voltage of at least 2.5 V). The timing mechanism within the 555 determines how long the output is on and how long it’s off.

The analogue part of the circuit lies in how you control the length of time that the output signal is on and off. You do that by creating an RC network using a resistor and a capacitor. The values you choose for the resistor and capacitor determine the timing interval. We give you all the information you need to choose the correct values for the resistor and capacitor later in this chapter in the ‘Understanding 555 Modes’ section, but to check how RC networks work, flip to Book II, Chapter 3.

You can also control whether the 555 does its timing job just once, like an egg timer, or whether it cycles the output on and off repeatedly, like a metronome that keeps ticking over and over again. You do so by connecting the pins of the 555 chip in various ways.

Figure 2-1 shows the arrangement of the eight pins in a standard 555 IC. As you can see, the 555 comes in an 8-pin DIP package.

9781118589717-fg030201.eps

Figure 2-1: Pinout diagram for a 555 timer IC.

The following list describes the function of each of the eight pins (not in numerical order):

check.png Ground: Pin 1 is connected to ground.

check.png VCC: Pin 8 is connected to the positive supply voltage. This voltage must be at least 4.5 V and no greater than 15 V. 555 circuits are commonly run using four AA or AAA batteries, providing 6 V, or a single 9 V battery.

check.png Output: Pin 3 is the output pin. The output is either low (very close to 0 V) or high (close to the supply voltage that’s placed on pin 8). (On some 555 models, the output voltage may be as much as 2 V below the supply voltage.) The exact shape of the output – that is, how long it’s high and how long it’s low – depends on the connections to the remaining five pins.

For more information about using the output from pin 3, see the ‘Working with the 555 Timer Output’ section later in this chapter.

check.png Trigger: Pin 2 is the trigger, which works like a starter’s pistol to get the 555 timer running. The trigger is an active low trigger, which means that the timer starts when voltage on pin 2 drops to below one-third of the supply voltage. When the 555 is triggered via pin 2, the output on pin 3 goes high.

For example, if you want to start the timer by pushing a button, you connect pin 2 to the supply voltage via a resistor. Then, to trigger the timer, you simply interrupt this supply voltage. You can do that in several ways, but the most common is to connect a normally open pushbutton between pin 2 and ground. When the button is pushed, the supply voltage is short-circuited to ground; the voltage at pin 2 drops to zero and the timer is triggered. You see an example of this type of triggering later in the section ‘Using the 555 in monostable (one-shot) mode’.

check.png Discharge: Pin 7 is called the discharge and is used to discharge an external capacitor that works in conjunction with a resistor to control the timing interval. In most circuits, pin 7 is connected to the supply voltage through a resistor and to ground through a capacitor.

check.png Threshold: Pin 6 is called the threshold. The purpose of this pin is to monitor the voltage across the capacitor that’s discharged by pin 7. When this voltage reaches two-thirds of the supply voltage (Vcc), the timing cycle ends, and the output on pin 3 goes low.

check.png Control: Pin 5 is the control pin. In most 555 circuits, this pin is simply connected to ground, usually through a small 0.01 μF capacitor. (The purpose of the capacitor is to level out any fluctuations in the supply voltage that may affect the operation of the timer.)

In some circuits, a resistor is used between the control pin and Vcc to apply a small voltage to pin 5. This voltage alters the threshold voltage, which in turn changes the timing interval. Most circuits don’t use this capability, however. In this chapter, all the 555 circuits simply connect pin 5 to ground through a 0.01 μF capacitor.

check.png Reset: Pin 4 is the reset pin, which can be used to restart the 555’s timing operation. Like the trigger input, reset is an active low input. Thus, pin 4 must be connected to the supply voltage for the 555 timer to operate. If pin 4 is momentarily grounded, the 555 timer’s operation is interrupted and won’t start again until it’s triggered again via pin 2.

tip.eps When used in a schematic diagram, the pins of a 555 timer chip are almost always shown in the arrangement depicted in Figure 2-2. As you can see, this arrangement follows the customary order of elements in a schematic diagram: supply voltage is at the top, ground is at the bottom, inputs are at the left and outputs are at the right. This arrangement makes determining the operation of the circuit from the schematic diagram easy.

9781118589717-fg030202.eps

Figure 2-2: How a 555 timer chip is usually shown in a schematic diagram.

Understanding 555 Modes

555 timer ICs can be wired up in three basic ways, called modes:

check.png Monostable mode: Works like an egg timer. When you start it, the timer turns on the output, waits for the time interval to elapse and then turns the output off and stops.

check.png Astable mode: Works like a metronome; it keeps running until you turn it off.

check.png Bistable mode: Isn’t really a timer mode. Instead, it uses the trigger input to turn the output alternately on and off. This type of circuit is often called a flip-flop and is very commonly used in digital electronics.

The following sections explain how each of these three operating modes work.

Using the 555 in monostable (one-shot) mode

Monostable mode lets you use the 555 timer chip as a single-event timer. This mode is called monostable because when wired this way, the 555 has just one stable mode, with the output at pin 3 off. When the 555 is sent a trigger pulse, this stable state is temporarily interrupted for an interval that’s determined by the value of a resistor and a capacitor. During this interval, the output at pin 3 goes high, but after the time interval has passed, the 555 returns to its stable state, with pin 3 going low.

tip.eps Monostable mode is sometimes called one-shot mode, which seems a little more descriptive to us. One-shot mode conveys the idea that when triggered, the 555 gives one and only one output pulse. When the time interval is reached, the output pulse stops and the circuit goes quiet until another trigger pulse is detected. Each trigger pulse results in a single output pulse.

Typical 555 monostable circuit

Figure 2-3 shows the typical wiring for a 555 timer used in monostable mode.

9781118589717-fg030203.eps

Figure 2-3: A 555 timer chip in monostable mode.

Look at the way the 10 kΩ resistor and the switch are wired to pin 2, the trigger input. The switch is a normally open pushbutton. When the button isn’t depressed, the 10 kΩ resistor provides a voltage input to pin 2, which keeps the trigger input high. With the trigger input high, the output voltage at pin 3 is near zero.

When the button is pressed, pin 2 is connected to ground. This causes the voltage at pin 2 to drop to zero, triggering the timer. When the timer is triggered, the output voltage at pin 3 goes high and the timing interval begins.

Resistor-capacitor circuit in a monostable timer

Now look at how the RC circuit (R1 and C1) functions. The resistor and capacitor work together to determine how long the output remains high. In a nutshell, when the circuit is triggered C1 begins to charge.

Pins 6 and 7 – the threshold and discharge pins – are tied together in a monostable 555 circuit. Pin 6 watches the voltage across the capacitor. As the capacitor charges, this voltage increases. When the capacitor voltage reaches two-thirds of the Vcc supply voltage, the timing cycle ends and the output at pin 3 goes low.

The discharge pin (pin 7), charges and discharges the capacitor. To understand how pin 7 works, visualise the internal workings of pin 7 using the model in Figure 2-4. Here, pin 7 is connected to an imaginary switch that’s controlled by the status of the output at pin 3. When the output is high, the switch is open; when the output is low, the switch is closed. When the switch is closed, a small 10 Ω resistor within the 555 connects pin 7 to ground. (Although a switch isn’t really inside the 555, the model helps you understand how pin 7 functions.)

When the output on pin 3 is low, the imaginary switch inside the 555 is closed and pin 7 is connected to ground through the 10 Ω resistor, which allows the voltage on C1 to discharge through the 555.

But when the output on pin 3 goes high, the imaginary switch inside the 555 is opened. This change forces the current flowing through R1 to go through C1, which in turn causes the capacitor to charge at a rate that depends on the values of R1 and the capacitor.

While the capacitor is charging, pin 6 monitors the voltage that builds up across the capacitor. When this voltage reaches two-thirds of the supply voltage, pin 6 signals the 555 that the timing interval is ended, and the output goes low. This action, in turn, closes the imaginary switch inside the 555, which allows the capacitor to discharge.

9781118589717-fg030204.eps

Figure 2-4: The imaginary switch inside the 555 that controls whether pin 7 charges or discharges the capacitor.

Time interval for a monostable circuit

The time interval for a 555 monostable circuit is a measure of how long the output stays high when it’s triggered. To calculate the time interval, use this formula:

T = 1.1 × R × C

Here, T is the time interval in seconds, R is the resistance of R1 in ohms and C is the capacitance of C1 in farads.

For example, suppose R1 is 500 kΩ, and C1 is 10 μF. Then, you calculate the time interval like this:

T = 1.1 × 500,000 Ω × 0.00001 F

T = 5.5 s

The circuit stays on for 5.5 seconds after it’s triggered.

remember.eps When you make this calculation, make sure that you use the correct number of zeros for the resistance and the capacitance. Use Table 2-1 as a guide.

Table 2-1 Conversion of Resistance and Capacitance Values

Resistance

Capacitance

1 kΩ = 1,000 Ω

0.01 μF = 0.00000001F

10 kΩ = 10,000 Ω

0.1 μF = 0.0000001F

100 kΩ = 100,000 Ω

1 μF = 0.000001F

1M Ω = 1,000,000 Ω

10 μF = 0.00001F

10M Ω = 10,000,000 Ω

100 μF = 0.0001F

100M Ω = 100,000,000 Ω

1,000 μF = 0.001F

tip.eps If you don’t want to do these calculations yourself, you can find 555 timer calculators on the Internet. Just go to any search engine and type in ‘555 timer calculator’.

Using the 555 in astable (oscillator) mode

A common way to use a 555 timer is in astable mode. The term astable simply means that the 555 has no stable state: just as it gets settled into one state (say, the output at pin 3 high), it switches to the opposite state (output low). Then it switches back to the first state, and so on, forever.

tip.eps This mode is also called oscillator mode, because it uses the 555 as an oscillator, which creates a square wave signal. (We discuss the different types of waveforms in Book I, Chapter 9.)

Typical astable circuit

Figure 2-5 shows the basic circuit for a 555 in astable mode.

Notice that the trigger pin (pin 2) is connected directly to C1. In a monostable circuit (see the earlier section ‘Typical 555 monostable circuit’), the timer is triggered by a switch that short-circuits the voltage applied to pin 2. In an astable circuit, however, the timer is triggered when the capacitor discharges – when the voltage across the capacitor drops to one-third of the supply voltage, pin 2 triggers the timer to start another cycle.

9781118589717-fg030205.eps

Figure 2-5: A 555 timer chip in astable mode.

Here we examine how this timing cycle works, step by step, starting with the output at pin 3 in the high condition:

1. With the output high, the discharge pin (pin 7) is open, forcing current through resistors R1 and R2 and capacitor C1. This causes the capacitor to charge at a rate that depends on the combined value of R1 and R2 and the value of C1.

2. As the capacitor charges, the voltage at pins 2 and 6 increases.

3. When the voltage at pin 6 (the threshold pin) reaches two-thirds of the supply voltage, the threshold circuitry within the 555 causes the output voltage at pin 3 to go low.

4. When the output at pin 3 goes low, the discharge pin (pin 7) is connected to ground within the 555, which allows C1 to discharge. This discharge occurs through R2, and so the value of R2 as well as the value of the capacitor determines the rate at which the capacitor discharges.

5. As the capacitor discharges, the voltage at pins 2 and 6 decreases.

6. When the voltage at pin 2 (the trigger pin) drops to one-third of the supply voltage, the trigger circuitry inside the 555 causes the output at pin 3 to go high.

7. When the output at pin 3 goes high, the discharge pin (pin 7) is opened, and the cycle starts over again.

Time intervals in an astable 555 circuit

The output of a 555 circuit in astable mode is a square wave, as depicted in Figure 2-6. Three important time measurements apply to a square wave:

check.png T: The total duration of the wave, measured from the start of one high pulse to the start of the next high pulse.

check.png Thigh: The length of the high portion of the cycle.

check.png Tlow: The length of the low portion of the cycle.

Naturally, the total time T is the sum of Thigh and Tlow.

9781118589717-fg030206.eps

Figure 2-6: Timing the output wave created by an astable 555 timer circuit.

The values of these time constants depend on the values for the two resistors (R1 and R2) and the C1.

Here are the formulas for calculating each of these time constants:

T = 0.7 × (R1 + 2R2) × C1

Thigh = 0.7 × (R1 + R2) × C1

Tlow = 0.7 × R2 × C1

remember.eps An interesting fact is buried in these calculations: C1 charges through both R1 and R2, but it discharges only through R2. That’s why you have to add the two resistor values for the Thigh calculation, but you use only R2 for the Tlow calculation. It’s also why you have to double R2 but not R1 for the total time (T) calculation.

Now, plug in some real numbers to see how the equations work out. Suppose both resistors are 100 kΩ and the capacitor is 10 μF. The total length of the cycle is calculated like this:

T = 0.7 × (100,000 Ω + (2 × 100,000 Ω)) × 0.00001 FT = 21 s

Thigh = 0.7 × (100,000 Ω + 100,000 Ω) × 0.00001 FThigh = 14 s

Tlow = 0.7 × 100,000 Ω – 0.00001 FTlow = 7 s

The total cycle time is 21 s, with the output high for 14 s and low for 7 s.

If you want, you can also calculate the frequency of the output signal by dividing the total cycle time into 1. So, for the above calculations, the frequency is 0.47619 Hz.

If you use smaller resistor and capacitor values, you get shorter pulses and higher output frequencies. For example, if you use 1 kΩ resistors and a 0.1 μF capacitor, the output signal is 4.8 kHz and each cycle lasts just a few millionths of a second.

tip.eps As you may have noticed, if the two resistors are the same value, the signal is high for twice as long as it’s off. By using different resistor values, you can vary the difference between the high and low portions of the signal.

Duty cycle

The duty cycle in a 555 circuit is the percentage of time that the output is high for each cycle of the square wave. For example, if the total cycle time is 1 s and the output is high for the first 0.4 s of each cycle, the duty cycle is 40%.

warning_bomb.eps With an astable circuit such as the one shown in the earlier Figure 2-5, the duty cycle must always be greater than 50%. In other words, the duration for which the output is high must always be more than the duration during which the output is low.

The explanation for this requirement is pretty simple. For the duty cycle to be 50%, the capacitor would have to charge and discharge through the same resistance. The only way to accomplish that would be to omit R1 altogether, so that the capacitor charged and discharged through R2 only. But then you’d end up connecting pin 7 directly to Vcc. With no resistance between pin 7 and the voltage source, the current flowing through pin 7 would exceed the maximum that the circuitry inside the 555 can handle, and the chip would be damaged.

tip.eps You can get around this limitation in a clever way: place a diode across R2, as shown in Figure 2-7. This diode bypasses R2 when the capacitor is charged. That way, the capacitor charges through R1 and discharges through R2.

When a diode is used in this way, you have complete control over the duration of the charge and discharge time. If R1 and R2 have the same value, the capacitor takes the same amount of time to charge as it does to discharge, and so the duty cycle is 50%. If R2 is smaller than R1, the duty cycle is less than 50%, because the capacitor discharges faster than it charges.

If you use the diode as depicted in Figure 2-7, you have to adjust the formulas for calculating the time intervals (from the preceding section) as follows:

T = 0.7 × (R1 + R2) × C1

Thigh = 0.7 × R1 × C1

Tlow = 0.7 × R2 × C1

9781118589717-fg030207.eps

Figure 2-7: Using a diode to control separately the high and low part of the output signal.

Using the 555 in bistable (flip-flop) mode

A flip-flop is a circuit that alternates between two output states. In a flip-flop, a short pulse on the trigger causes the output to go high and stay high, even after the trigger pulse ends. The output stays high until a reset pulse is received, at which time the output goes low.

This type of circuit is called bistable because the circuit has two stable states: high and low. The circuit stays low until it is triggered and then stays high until it’s reset. This type of circuit is used extensively in computers and other digital circuits.

tip.eps For computer applications, the 555 is a poor choice for use as a flip-flop. That’s because its output doesn’t change fast enough in response to trigger or reset pulses in computer circuits that are driven by high-speed clock pulses. For computer applications, better flip-flop chips are readily available (see Book VI, Chapter 5).

The 555 is often used in bistable mode, however, for noncomputer applications where high-speed response isn’t necessary. For example, imagine a simple robot that drives itself forward until it bumps into something in front of it, and then drives backward until it bumps into something behind it. You’d equip the robot with contact switches on the front and rear connected to the trigger and reset inputs of a 555 in bistable mode. You’d connect the robot’s drive motor to the output such that when the output is low, the motor runs forward, and when the output is high, the motor runs backward. The bistable 555 causes the robot to drive back and forth between two obstacles.

Figure 2-8 shows the schematic for a 555 used in bistable mode. As you can see, this circuit doesn’t require a capacitor, because in bistable mode the 555 isn’t used as a timer. The highs and lows of the output signal are controlled by the trigger and reset inputs, not by the charging and discharging of a capacitor.

Both the trigger (pin 2) and the reset (pin 4) inputs are connected to Vcc through a 10 kΩ resistor. When the set switch is depressed, pin 2 is shorted to ground. This causes the voltage to bypass pin 2, resulting in a momentary low pulse, which triggers the 555. When triggered, the output pin goes high.

In astable or monostable mode, the output pin would remain high until the voltage at the threshold pin (pin 6) reaches two-thirds of the supply voltage. However, because pin 6 isn’t connected to anything in this circuit, no voltage is ever present on pin 6. Thus, the threshold is never reached, and so the output remains high indefinitely until the 555 is reset by a low pulse on the reset pin (pin 4).

9781118589717-fg030208.eps

Figure 2-8: The schematic for a 555 timer circuit in bistable mode.

The reset input (pin 4) is connected to Vcc in the same manner as the trigger input. As a result, when the reset switch is pressed, pin 4 is short-circuited to ground, creating a low pulse, which resets the 555 and brings the output back to high.

Working with the 555 Timer Output

The output pin (pin 3) of a 555 can be in one of two states:

check.png High: The voltage at the pin is close to the supply voltage.

check.png Low: The voltage at the pin is 0 V.

You can connect output components to the output pin in two ways. Figure 2-9 illustrates these two configurations, using an LED as the output device. A resistor is also included in the circuit to limit the current flow.

warning_bomb.eps Without the resistor, current flows through the circuit unimpeded, which quickly burns out the LED and probably ruins the 555 as well.

9781118589717-fg030209.eps

Figure 2-9: Sourcing and sinking output current for a 555 timer.

In the circuit on the left of Figure 2-9, current flows through the LED circuit when the output is high. The current flows from the output pin through the LED and resistor to ground. This output configuration is called sourcing because the 555 is the source of the current that drives the output.

In the circuit on the right, current flows through the LED circuit when the output is low. The current flows from the Vcc supply, through the LED and resistor, and into the 555, where it’s internally routed to ground through pin 1. This output configuration is called sinking because the current is sent into the 555.

remember.eps Whether you source or sink your output circuit depends on whether you want your output circuit to turn on when the output is high or low.

Figure 2-10 shows that you can combine sourcing and sinking in a single circuit. Here, two LEDs are connected to the output pin. One is sourced; the other is sunk. In this circuit, the LEDs flash alternately as the output switches from high to low. LED1 lights when the output is low, LED 2 when the output is high.

9781118589717-fg030210.eps

Figure 2-10: You can combine sourcing and sinking current for the output of a 555 timer.

The output circuit of a 555 timer can handle as much as 200 mA of current, which is much more current than most ICs can source or sink. If you need to drive a device that requires more than 200 mA, you can isolate the output device from the 555 by using a transistor, as shown in Figure 2-11. For more information about working with transistors, please refer to Book II, Chapter 6.

9781118589717-fg030211.eps

Figure 2-11: Using a transistor to drive a higher-current device.

Doubling Up with the 556 Dual Timer

If one 555 timer chip is good, two are even better! In fact, two (or more) 555 timers in a single circuit have so many uses that you can get two 555 timers in a single chip, called the 556 dual-timer chip.

The 556 dual-timer chip comes in a 14-pin DIP package. The two 555 timers share a common supply and ground pin. The remaining 12 pins are allocated to the inputs and outputs of the individual 555 timers. Table 2-2 lists the pin connections for each of the 555 timers in a 556 dual-timer chip. As an added bonus (no charge!), we also list the pinouts for a standard 555 timer chip.

tb030202

One common way to use a 556 dual timer is to connect both 555 circuits in monostable (one-shot) mode, with the output pin from the first 555 timer connected to the trigger pin of the second 555 timer. Then, when the output of the first timer goes low, the second timer is triggered. You can connect as many 555 timers as you want in this way, with each timer’s output connected to the next timer’s trigger so that the timers work in sequence, one after the other.

For example, Figure 2-12 shows a cascaded timer circuit that uses two separate 555 timer chips. In this circuit, both the 555 timer chips are configured in monostable mode, much like the circuit in Figure 2-3. The time interval for the first 555 is controlled by R1 and C1. For the second 555, the interval is controlled by R2 and C2. You can choose whatever values you want for these components to achieve whatever time intervals suit your fancy.

The first 555 chip is triggered when SW1 is depressed, taking pin 2 to ground. This action takes the output on pin 3 to high, which lights LED1. Notice, however, that pin 3 of the first 555 is connected through a small capacitor to the trigger input of the second 555. As soon as the time interval expires on the first 555, its output goes low, which turns off LED1 and at the same time triggers the second 555, which in turn lights up LED2. LED2 stays lit until C2 charges, and then it goes out. The circuit then waits to be triggered again by a press of the switch.

9781118589717-fg030212.eps

Figure 2-12: You can cascade 555 timers.

Figure 2-13 shows how you can implement this same circuit using a single 556 dual-timer chip. This schematic is nearly identical to the schematic shown in Figure 2-13, but with a few important differences:

check.png The two 555 timer circuits are designated as 556 (1) and 556 (2) to indicate that these timer circuits are part of a single 556 dual-timer chip.

check.png The pin numbers indicate the pin assignments for the two timer circuits of a 556 instead of the pin assignments for a 555.

check.png The second timer circuit doesn’t show a supply or ground connection. That’s because the two timer circuits share a common supply and ground connection, which is shown connected to the first timer.

9781118589717-fg030213.eps

Figure 2-13: You can cascade the two halves of a 556 dual-timer circuit.

Although showing the two halves of a 556 dual timer as separate components in a schematic diagram is convenient, you can show the 556 as a single component if you prefer.

Figure 2-14 illustrates how you can draw the schematic for the cascaded timer circuit using a single component for the 556 dual timer. This circuit is nearly identical to the one shown in Figure 2-13; the only difference is the way the schematic depicts the two sections of the 556 dual-timer chip.

tip.eps When you draw a 556 as a single component, place the connections for the two timers on opposite sides of the component. In Figure 2-14, we draw the connections for the first timer on the left and the second timer on the right, with the exception of the trigger input for the second timer (pin 8). Drawing that connection on the right side of the component would complicate the diagram, and so we place it on the left side just beneath the output pin for the first timer.

9781118589717-fg030214.eps

Figure 2-14: The cascaded timer circuit with the 556 dual-timer chip drawn as a single component.

tip.eps Keeping track of which pin is which in a 556 is difficult, and so labelling the function of each pin helpful (as we do in Figure 2-14).

Constructing 555 Chip Projects

Now you get a chance to put this chapter’s information into practice with four projects.

Making a one-shot timer

In this section, you build a circuit that uses a 555 timer chip in monostable mode. When a trigger switch is pressed, an LED lights and stays lit for approximately five seconds. Then, the LED goes dark until the button is pressed again.

Project 2-1 provides all the information you need to assemble this circuit, which is based on the schematic for the monostable circuit in the earlier Figure 2-3. The only differences are that an LED is added to the output pin (pin 3) and the resistor, and capacitor values are included in the capacitor charging circuit.

tip.eps This project uses a pushbutton switch that isn’t designed to be inserted in a solderless breadboard. To make the pushbutton usable with the solderless breadboard, solder a small length of 18- or 20-guage solid wire to the end of each lead of the test strip. You can then insert these leads directly into holes on the breadboard.

When you’re finished, the circuit looks like Figure 2-15. To test the circuit, press the pushbutton. The LED should light, stay lit for just over five seconds and then go back off. It should light again only when you press the pushbutton again.

If the circuit doesn’t work, here are a few things to check:

check.png Make sure that the battery is good. (Test it with a voltmeter.)

check.png Double-check carefully all the jumper wires and other components to ensure that they’re connected properly.

check.png Make sure that the LED isn’t inserted backwards. As a test, pull it out and insert it with the leads reversed.

check.png Make sure that the electrolytic capacitor is inserted with the negative end on the ground side of the circuit.

check.png Make sure that the solder connections to the pushbutton are solid.

9781118589717-fg030215.tif

Figure 2-15: The finished one-shot timer project.

9781118589717-un030201a.eps

9781118589717-un030201b.eps

Brightening up with an LED flasher

Project 2-2 shows you how to build a LED flasher circuit. For this circuit, the 555 is configured in astable mode, and the resistor values are chosen so that they cause the high and low timings to be very close to one another, about one-tenth of a second each.

The schematic for this project is similar to the one in the earlier Figure 2-5, but adds a pair of LEDs to the output circuit. LED1 lights when the output is high and LED2 lights when the output is low. Note that this circuit uses both sinking and sourcing of the output current (which we describe earlier in the ‘Working with the 555 Timer Output’ section).

Figure 2-16 shows the completed project.

9781118589717-fg030216.tif

Figure 2-16: The finished LED flasher.

If the circuit doesn’t work, take a look at the following:

check.png Check the battery voltage.

check.png Double-check all the jumper wires and resistors to make sure that they’re inserted in the proper holes.

check.png Ensure that the diodes and the electrolytic capacitor are inserted correctly. For the LEDs, the anodes must be on the positive side of the circuit and the cathodes on the negative side. For the electrolytic capacitor, the negative side must be in the ground bus.

check.png For the duty cycle to be exactly 50-50, the circuit would need a diode added across the resistor R2 at the top end of C1, and R1 would need to have the same value as R2 (as in Figure 2-7, earlier in this chapter).

9781118589717-un030202a.eps

9781118589717-un030202b.eps

9781118589717-un030202c.eps

tip.eps After you finish playing with the completed project, you may want to leave it assembled. The next section (Project 2-3) adds a second 555 timer to this circuit to include additional functionality.

Employing a set/reset switch

In this section, you modify the circuit that you built in Project 2-2 so that the circuit is controlled by two pushbuttons that function as a set/reset switch. When you connect the power to this circuit, LED1 turns on and stays on. When you press the set pushbutton, the two LEDs start flashing alternately and continue to flash until you press the reset pushbutton.

The circuit for this project uses two 555 timer chips. The first is configured in bistable mode with two pushbuttons acting as set and reset switches. The second is configured in astable mode, almost identical to the 555 timer that you used in Project 2-2. The difference is that instead of connecting the astable 555 Timer chip’s supply voltage pin (pin 8) directly to the battery, you connect it to the output of the first 555. As a result, the first 555 controls the power to the second 555, and so the second 555 flashes the LEDs only when the output of the first 555 is high.

tip.eps This project requires that you use two pushbutton switches that are not designed to be inserted into a solderless breadboard. To make the switches easier to use with the breadboard, solder short lengths of 20-AWG solid wire to the switch terminals.

Project 2-3 shows you how to build this circuit, and the completed project is pictured in Figure 2-17.

9781118589717-fg030217.tif

Figure 2-17: The completed circuit for Project 2-3.

9781118589717-un030203a.eps

9781118589717-un030203b.eps

9781118589717-un030203c.eps

Building a beeper

In this section, you use two 555 timer chips to build an audible beeper, with both timers configured in astable mode. One timer generates an audible square-wave tone of approximately 476 Hz; the output of this 555 is sent to a speaker so that you can hear the tone. The other has a much lower frequency of about 1.5 Hz. You connect its output to the reset of the 476 Hz timer to turn the tone on and off, which creates the beeping effect.

Project 2-4 explains how to build this circuit. Before you start, have a look for a moment at the project’s schematic diagram. For the first timer chip – designated 555 (1) in the schematic – the RC network uses resistors of 1 kΩ and 470 kΩ along with a 1 μF capacitor to produce the 1.5 Hz output. The second timer – 555 (2) – uses two 100 kΩ resistors and a 0.01 μF capacitor to create the 476 Hz output. The output of the first timer is sent to the reset of the second timer, and the output of the second timer is sent through a 22 μF capacitor to an 8 Ω speaker.

tip.eps You can use any 8 Ω speaker in this circuit. If you have an old unamplified computer speaker, you can use that. We recommend you solder 5–8 cm lengths of 20-AWG solid wire to the speaker terminals so that you can connect the speaker easily to the breadboard.

Figure 2-18 shows the completed project.

9781118589717-fg030218.tif

Figure 2-18: The completed beeper project.

9781118589717-un030204a.eps

9781118589717-un030204b.eps

9781118589717-un030204c.eps

Here are some extra things to try with this project, in case you want to experiment with the circuit a bit:

check.png Build the circuit with a single 556 dual-timer chip instead of two 555 chips. Remember to adjust the pin designations on the schematic accordingly.

check.png Replace the 100 kΩ R3 with a 1 kΩ resistor, and then add a 1 MΩ potentiometer in series with the resistor. As you turn the potentiometer, the tone changes.

check.png Add a 1 MΩ potentiometer in series with R1. Then, as you turn the potentiometer, the beeping rate changes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset