Book Read Free

Make: Electronics

Page 23

by Charles Platt


  Theory

  Inside the 555 timer: astable mode (continued)

  R1 now controls the charge time on its own, while R2 controls the discharge time. The formula for calculating the frequency is now:

  Frequency = 1.44 / ((R1 + R2) × C1) or Frequency = 1.4 / ((R1 + R2) × C1)

  If you set R1 = R2, you should get almost equal on/off cycles (“almost” because the diode itself imposes a small internal voltage drop of about 0.6V). The exact value depends primarily on the manufacturing process used to make the diode.

  Figure 4-24. In its usual astable configuration, the timer charges a capacitor through R1+R2 and discharges the capacitor through R2 only. Therefore its output on cycles are longer than its output off cycles.

  Figure 4-25. This is a modification of the schematic shown in Figure 4-22. By adding a diode to a 555 timer running in astable mode, we eliminate R2 from the charging cycle of capacitor C1. Now we can adjust the output on cycle with the value of R1, and the output off cycle with the value of R2, so that the on and off durations are independent of each other.

  Fundamentals

  The following table shows 555 timer frequency in astable mode:

  Frequency is in pulses per second, rounded to two figures.

  The horizontal scale shows common resistor values for R2.

  The vertical scale shows common capacitor values for C1. Resistor R1 is assumed to be 1K.

  Resistor R1 is assumed to be 1K.

  To calculate a different frequency: double R2, add the product to R1, multiply the sum by C1, and divide the result into 1440. Like this:

  Frequency = 1440 / ( (R1 + 2R2) × C1) cycles per second

  In this formula, R1 and R2 are in kilohms, C1 is in microfarads, and the frequency is in hertz (cycles per second). Note that the frequency is measured from the start of one pulse to the start of the next. The duration of each pulse is not the same as the length of time between each pulse. This issue is discussed in the previous section.

  47 µF

  10

  5.7

  3.0

  1.5

  0.7

  0.3

  0.2

  0.1

  22 µF

  22

  12.0

  6.3

  3.1

  1.5

  0.7

  0.3

  0.2

  0.1

  10 µF

  48

  27.0

  14.0

  6.9

  3.2

  1.5

  0.7

  0.3

  0.2

  0.1

  04.7 µF

  100

  57.0

  30.0

  15.0

  6.8

  3.2

  1.5

  0.7

  0.3

  0.2

  02.2 µF

  220

  120.0

  63.0

  31.0

  15.0

  6.9

  3.3

  1.5

  0.7

  0.3

  01.0 µF

  480

  270.0

  140.0

  69.0

  32.0

  15.0

  7.2

  3.3

  1.5

  0.7

  00.47 µF

  1,000

  570.0

  300.0

  150.0

  68.0

  32.0

  15.0

  7.0

  3.3

  1.5

  00.22 µF

  2,200

  1,200.0

  630.0

  310.0

  150.0

  69.0

  33.0

  15.0

  7.0

  3.3

  00.1 µF

  4,800

  2,700.0

  1,400.0

  690.0

  320.0

  150.0

  72.0

  33.0

  15.0

  7.2

  00.047 µF

  10,000

  5,700.0

  3,000.0

  1,500.0

  680.0

  320.0

  150.0

  70.0

  33.0

  15.0

  00.022 µF

  22,000

  12,000.0

  6,300.0

  3,100.0

  1,500.0

  690.0

  330.0

  150.0

  70.0

  33.0

  00.01 µF

  48,000

  27,000.0

  14,000.0

  6,900.0

  3,200.0

  1,500.0

  720.0

  330.0

  150.0

  72.0


  1K

  2K2

  4K7

  10K

  22K

  47K

  100K

  220K

  470K

  1M

  Astable Modifications

  In the circuits shown in Figures 4-22 or 4-25, if you substitute a 100K potentiometer for R2, you can adjust the frequency up and down by turning the shaft.

  Another option is to “tune” the timer by using pin 5, the control, as shown in the Figure 4-26. Disconnect the capacitor that was attached to that pin and substitute the series of resistors shown. R9 and R11 are both 1K resistors, either side of R10, which is a 100K potentiometer. They ensure that pin 5 always has at least 1K between it and the positive and negative sides of the power supply. Connecting it directly to the power supply won’t damage the timer, but will prevent it from generating audible tones. As you turn the potentiometer to and fro, the frequency will vary over a wide range. If you want to generate a very specific frequency, a trimmer potentiometer can be used instead.

  A primary advantage of using pin 5 to adjust frequency is that you can control it remotely. Take the output from pin 3 of another 555 timer running slowly in astable mode, and pipe it through a 2K2 resistor to pin 5. Now you get a two-tone siren effect, as one timer controls the other. If, in addition, you add a 100 µF capacitor between pin 5 and ground, the charging and discharging of the capacitor will make the tone slide up and down instead of switching abruptly. I’ll describe this in more detail shortly. This leads me to the whole topic of one chip controlling another chip, which will be our last variation on this experiment.

  Figure 4-26. The control (pin 5) is seldom used but can be useful. Varying the voltage on it will adjust the speed of the timer. This circuit enables you to test the behavior of it. Component values:

  R1: 1K

  R2: 10K

  R3: 100 ohms

  R9, R11: 1K

  R10: 100K linear potentiometer

  C1: 0.047 µF

  Chaining Chips

  Generally speaking, chips are designed so that they can talk to each other. The 555 couldn’t be easier in this respect:

  Pin 3, the output, from one 555 can be connected directly to pin 2, the trigger, of a second 555.

  Alternatively, the output can be sufficient to provide power to pin 8 of a second 555.

  The output is appropriate to control or power other types of chips too.

  Figure 4-27 shows these options.

  When the output from the first 555 goes high, it is about 70 to 80% of its supply voltage. In other words, when you’re using a 9V supply, the high output voltage is at least 6 volts. This is still above the minimum of 5V that the second chip needs to trigger its comparator, so there’s no problem.

  Figure 4-27. Three ways to chain 555 timers together. The output of IC1 can power a second timer, or adjust its control voltage, or activate its trigger pin.

  You can chain together the two 555 timers that you already have on your breadboard. Figure 4-28 shows how to connect the two circuits that were shown previously in Figures 4-15 and 4-22. Run a wire from pin 3 (the output) of the first chip to pin 8 (the positive power supply) of the second chip, and disconnect the existing wire connecting pin 8 to your power supply. The new wire is shown in red. Now when you press the button to activate the first chip, its output powers the second chip.

  Figure 4-28. You can combine the two circuits shown in Figures 4-15 and 4-22 simply by disconnecting the wire that provides power to pin 8 of the second timer, and running a substitute wire (shown in red).

  You can also use the output from one chip to trigger another (i.e., you can connect pin 3 from the first chip to pin 2 of the second). When the output from the first chip is low, it’s less than half a volt. This is well below the threshold that the second chip requires to be activated. Why would you want to do this? Well, you might want to have both timers running in monostable mode, so that the end of a high pulse from the first one triggers the start of a high pulse in the second one. In fact, you could chain together as many timers as you like in this way, with the last one feeding back and triggering the first one, and they could flash a series of LEDs in sequence, like Christmas lights. Figure 4-29 shows how four timers could be linked this way, in a configuration that would occupy minimal space (and would be wired point-to-point on perforated board, not on breadboard-format board). Each of the outputs numbered 1 through 4 would have about enough power to run maybe 10 LEDs, if you used relatively high load resistors to limit their current.

  Figure 4-29. Four 555 timers, chained together in a circle, can flash a series of four sets of LEDs in sequence, like Christmas lights or a movie marquee.

  Incidentally, you can reduce the chip count (the number of chips) by using two 556 timers instead of four 555 timers. The 556 contains a pair of 555 timers in one package. But because you have to make the same number of external connections (other than the power supply), I haven’t bothered to use this variant.

  You can even get a 558 timer that contains four 555 circuits, all preset to function in astable mode. I decided not to use this chip, because its output behaves differently from a normal 555 timer. But you can buy a 558 timer and play with it if you wish. It is ideal for doing the “chain of four timers” that I suggested previously. The data sheet even suggests this.

  Lastly, going back to the idea of modifying the frequency of a 555 timer in astable mode, you can chain two timers, as shown in Figure 4-30. The red wire shows the connection from the output of the first timer to the control pin of the second. The first timer has now been rewired in astable mode, so that it creates an oscillating on/off output around four times per second. This output flashes the LED (to give you a visual check of what’s going on) and feeds through R7 to the control pin of the second timer.

  But C2 is a large capacitor, which takes time to charge through R7. While this happens, the voltage detected by pin 5 slowly rises, so that the tone generated by IC2 gradually lowers in pitch. Then IC1 reaches the end of its on cycle and switches itself off, at which point C2 discharges and the pitch of the sound generated by IC2 falls again.

  You can tweak this circuit to create all kinds of sounds, much more controllably then when you were using PUT transistors to do the same kind of thing. Here are some options to try:

  Double or halve the value of C2.

  Omit C2 completely, and experiment with the value of R7.

  Substitute a 10K potentiometer for R7.

  Change C4 to increase or decrease the cycle time of IC1.

  Halve the value of R5 while doubling the value of C4, so that the cycle time of IC1 stays about the same, but the On time becomes significantly longer than the Off time.

  Change the supply voltage in the circuit from 9 volts to 6 volts or 12 volts.

  Remember, you can’t damage a 555 timer by making changes of this kind. Just make sure that the negative side of your power supply goes to pin 1 and the positive side to pin 8.

  Figure 4-30. When both timers are astable, but IC1 runs much more slowly than IC2, the output from IC1 can be used to modulate the tone generated by IC2. Note that as this is a substantial modification to the previous schematics, several components have been relabeled. To avoid errors, you may need to remove the old circuit from your breadboard and build this version from scratch. Try these values initially:

  R1, R4, R6, R7: 1K

  R2, R5: 10K

  R3: 100 ohms

  C1: 0.047 µF

  C2, C3: 100 µF

  C4: 68 µF

  C5: 0.1 µF

  Experiment 18: Reaction Timer

&n
bsp; Because the 555 can easily run at thousands of cycles per second, we can use it to measure human reactions. You can compete with friends to see who has the fastest response—and note how your response changes depending on your mood, the time of day, or how much sleep you got last night.

  Before going any further, I have to warn you that this circuit will have more connections than others you’ve tackled so far. It’s not conceptually difficult, but requires a lot of wiring, and will only just fit on a breadboard that has 63 rows of holes. Still, we can build it in a series of phases, which should help you to detect any wiring errors as you go.

  You will need:

  4026 chip. Quantity: 4 (really you need only 3, but get another one in case you damage the others).

  555 timers. Quantity: 3.

  Tactile switches (SPST momentary switches). Quantity: 3.

  Three numeric LEDs, or one 3-digit LED display (see the shopping list at the beginning of this chapter). Quantity: 1.

  Breadboard, resistors, capacitors, and meter, as usual.

  Step 1: Display

  You can use three separate LED numerals for this project, but I suggest that you buy the Kingbright BC56-11EWA on the shopping list at the beginning of this chapter. It contains three numerals in one big package.

  You should be able to plug it into your breadboard, straddling the center channel. Put it all the way down at the bottom of the breadboard, as shown in Figure 4-31. Don’t put any other components on the breadboard yet.

  Now set your power supply to 9 volts, and apply the negative side of it to the row of holes running up the breadboard on the righthand side. Insert a 1K resistor between that negative supply and each of pins 18, 19, and 26 of the Kingbright display, which are the “common cathode,” meaning the negative connection shared by each set of LED segments in the display. (The pin numbers of the chip are shown in Figure 4-33. If you’re using another model of display, you’ll have to consult a data sheet to find which pin(s) are designed to receive negative voltage.)

 

‹ Prev