American library books » Other » Make: Electronics by Charles Platt (read me a book .TXT) 📕

Read book online «Make: Electronics by Charles Platt (read me a book .TXT) 📕».   Author   -   Charles Platt



1 ... 63 64 65 66 67 68 69 70 71 ... 122
Go to page:
you won’t be able to verify that your counters are counting properly.

Install IC5 and its associated components on your breadboard immediately above IC1. Don’t leave any gap between the chips. Disconnect S3 and R3 and connect a wire directly between pin 3 (output) of IC5 and pin 1 (clock) of IC1, the topmost counter. Power up again, and you should see the digits advancing rapidly in a smooth, regular fashion. Press S1, and while you hold it, the count should freeze. Release S1 and the count will resume. Press S2 and the counter should reset, even if you are pressing S1 at the same time.

Figure 4-38. A basic astable circuit to drive the decade counter in the previous schematic. Output is approximately 4 pulses per second.

R7: 1K

R8: 2K2

C2: 68 µF

C3: 0.1 µF

IC5: 555 timer

No Floating Pins!

A CMOS chip is hypersensitive. Any pin that is not wired either to the supply voltage or to ground is said to be “floating” and may act like an antenna, sensitive to the smallest fluctuations in the world around it.

The 4026 counter chip has a pin labeled “clock disable.” The manufacturer’s data sheet helpfully tells you that if you give this pin a positive voltage, the chip stops counting and freezes its display. As you don’t want to do that, you may just ignore that pin and leave it unconnected, at least while you test the chip. This is a very bad idea!

What the data sheet doesn’t bother to tell you (presumably because “everyone knows” such things) is that if you want the clock to run normally, the clock-disable feature itself has to be disabled, by wiring it to negative (ground) voltage. If you leave the pin floating (and I speak from experience), the chip will behave erratically and uselessly.

All input pins must be either positively or negatively wired, unless otherwise specified.

Refinements

Now it’s time to remember that what we really want this circuit to do is test a person’s reflexes. When the user starts it, we want an initial delay, followed by a signal—probably an LED that comes on. The user responds to the signal by pressing a button as quickly as possible. During the time it takes for the person to respond, the counter will count milliseconds. When the person presses the button, the counter will stop. The display then remains frozen indefinitely, displaying the number of pulses that were counted before the person was able to react.

How to arrange this? I think we need a flip-flop. When the flip-flop gets a signal, it starts the counter running—and keeps it running. When the flip-flop gets another signal (from the user pressing a button), it stops the counter running, and keeps it stopped.

How do we build this flip-flop? Believe it or not, we can use yet another 555 timer, in a new manner known as bistable mode.

Fundamentals

The bistable 555 timer

Figure 4-39 shows the internal layout of a 555 timer, as before, but the external components on the righthand side have been eliminated. Instead, I’m applying a constant negative voltage to pin 6. Can you see the consequences? Suppose you apply a negative pulse to the trigger (pin 2). Normally when you do this and the 555 starts running, it generates a positive output while charging a capacitor attached to pin 6. When the capacitor reaches 2/3 of the full supply voltage, this tells the 555 to ends its positive output, and it flips back to negative.

Well, if there’s no capacitor, there’s nothing to stop the timer. Its positive output will just continue indefinitely. However, pin 4 (the reset) can still override everything, so if you apply negative voltage to pin 4, it flips the output to negative. After that, the output will stay negative indefinitely, as it usually does, until you trigger the timer by dropping the voltage to pin 2 again. This will flip the timer back to generating its positive output.

Here’s a quick summary of the bistable configuration:

A negative pulse to pin 2 turns the output positive.

A negative pulse to pin 4 turns the output negative.

The timer is stable in each of these states. Its run-time has become infinite.

It’s OK to leave pins 5 and 7 of the timer unconnected, because we’re pushing it into extreme states where any random signals from those pins will be ignored.

Figure 4-39. In the bistable configuration, pin 6 of a 555 timer is perpetually negative, so the timer cycle never ends, unless you force it to do so by applying a negative pulse to pin 4 (the reset).

In bistable mode, the 555 has turned into one big flip-flop. To avoid any uncertainty, we keep pins 2 and 4 normally positive via pull-up resistors, but negative pulses on those pins can overwhelm them when we want to flip the 555 into its opposite state. The schematic for running a 555 timer in bistable mode, controlled by two pushbuttons, is shown in Figure 4-40. You can add this above your existing circuit. Because you’re going to attach the output from IC6 to pin 2 of IC1, the topmost counter, you can disconnect S1 and R1 from that pin. See Figure 4-41.

Now, power up the circuit again. You should find that it counts in the same way as before, but when you press S4, it freezes. This is because your bistable 555 timer is sending its positive output to the “clock disable” pin on the counter. The counter is still receiving a stream of pulses from the astable 555 timer, but as long as pin 2 is positive on the counter, the counter simply ignores the pulses.

Now press S5, which flips your bistable 555 back to delivering a negative output, at which point the count resumes.

We’re getting close to a final working circuit here. We can reset the count to zero (with S3), start the count (with S5), and wait for the user to stop the count (with S4). The only

1 ... 63 64 65 66 67 68 69 70 71 ... 122
Go to page:

Free e-book: «Make: Electronics by Charles Platt (read me a book .TXT) 📕»   -   read online now on website american library books (americanlibrarybooks.com)

Comments (0)

There are no comments yet. You can be the first!
Add a comment