Make: Electronics by Charles Platt (read me a book .TXT) ๐
Read free book ยซMake: Electronics by Charles Platt (read me a book .TXT) ๐ยป - read online or download for free at americanlibrarybooks.com
- Author: Charles Platt
Read book online ยซMake: Electronics by Charles Platt (read me a book .TXT) ๐ยป. Author - Charles Platt
The schematic in Figure 4-79 shows how the circuit should look in breadboard format. Figure 4-80 shows it in a simpler format.
Figure 4-80. The breadboard-format schematic in is simplified here to show more clearly the way in which a gate can latch itself after receiving an input pulse.
From this point on, I wonโt bother to show the power regulator and the capacitors associated with it. Just remember to include them every time you see the power supply labeled as โ5V DC Regulated.โ
When you switch on the power, the LED is dark, as before. The AND gate needs a positive voltage on both of its logical inputs, to create a positive output, but it now has positive voltage only on one of its inputs, while the other input is pulled down by the 10K resistor. Now touch the pushbutton, and the LED comes on. Let go of the pushbutton, and the LED stays on, because the positive output from the AND gate circulates back through the diode and is high enough to overcome the negative voltage coming through the pull-down resistor.
The output from the AND gate is powering its own input, so the LED will stay on until we disconnect it. This arrangement is a simple kind of โlatch,โ and can be very useful when we want an output that continues after the user presses and releases a button.
You canโt just connect the output from the gate to one of its inputs using an ordinary piece of wire, because this would allow positive voltage from the tactile switch to flow around and interfere with the output signal. Remember, you must never apply voltage to the output pin of a logic gate. The diode prevents this from happening.
If youโve grasped the basics of logic gates, youโre ready now to continue to our first real project, which will use all the information that Iโve set out so far.
Experiment 20: A Powerful Combination
Suppose you want to prevent other people from using your computer. I can think of two ways to do this: using software, or using hardware. The software would be some kind of startup program that intercepts the normal boot sequence and requests a password. You could certainly do it that way, but I think it would be more fun (and more relevant to this book) to do it with hardware. What Iโm imagining is a numeric keypad requiring the user to enter a secret combination before the computer can be switched on.
The Warranty Issue
If you follow this project all the way to its conclusion, youโll open your desktop computer, cut a wire, and saw a hole in the cabinet. Without a doubt, this will void your warranty. If this makes you nervous, here are three options:
1. Breadboard the circuit for fun, and leave it at that.
2. Use the numeric keypad on some other device.
3. Use it on an old computer.
You will need:
Numeric keypad. As specified in the shopping list at the beginning of this chapter, it must have a โcommon terminalโ or โcommon output.โ The schematic in Figure 4-82 shows what I mean. Inside the keypad, one conductor (which I have colored red to distinguish it from the others) connects with one side of every pushbutton. This conductor is โcommonโ to all of them. It emerges from the keypad on an edge connector or set of pins at the bottom, which Iโve colored yellow.
Figure 4-81. Caution: This just might void your warranty.
Figure 4-82. A keypad of the type required for Experiment 20 incorporates a common terminal connected to one side of each of the 12 pushbuttons. The wire from the common terminal is shown red, here, to make it more easily identifiable.
Keypads that use โmatrix encodingโ wonโt work with the circuit that Iโm going to describe. If the Velleman keypad, which I recommend, is unavailable, and you canโt find another like it, you can use 12 separate SPST pushbuttons. Of course, that will cost a little more.
74HC08 logic chip containing four AND gates. Quantity: 1.
74HC04 logic chip containing six inverters. Quantity: 1.
555 timer chip. Quantity: 1.
Latching relay, 5 volt, DPST or DPDT, โ2 form Cโ package, Panasonic DS2E-SL2-DC5V or similar. Must have two separate coils (one to latch, one to unlatch) with separate inputs. Quantity: 1.
LEDs, 5mm generic, your choice of colors. Quantity: 3.
Ribbon cable, with six conductors minimum, if you want to do a really neat job. You can use a cable of the type sold for hard drives, and split off the six conductors that you need, or shop around on eBay.
Tools to open your computer, drill four holes, and make saw cuts between the holes, to create a rectangular opening for the keypad (if you want to take this project to its conclusion). Also, four small bolts to attach the keypad to the computer cabinet after you create the opening for it.
The Schematic
This time Iโd like you to study the schematic before building anything. Letโs start with the simplified version, shown in Figure 4-83.
Figure 4-83. A simplified schematic showing the basic structure of the combination lock circuit.
I want this to be a battery-powered circuit, so that you donโt have to run a separate power supply to it or (worse) try to tap into your computerโs 5-volt bus. Battery power means that the circuit has to be โoffโ most of the time, to prevent the battery from running down. Because the keypad has two spare buttons (the asterisk and the pound sign), Iโm going to use the asterisk as the โpower onโ button. When you press it, the LED at the top of the schematic lights up to confirm that everythingโs working, and the button sends power to the two logic chips and the 555 timer. You have to hold down the asterisk button while you punch in a three-digit code to unlock the computer.
Arbitrarily, Iโve chosen 1-4-7 as the three-digit code. Letโs track
Comments (0)