Make Electronics

(nextflipdebug2) #1
Chips, Ahoy! 199

Experiment 20: A Powerful Combination

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 but-
ton 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 what happens
when you enter this sequence. (Naturally, if you build the circuit, you can wire
it to choose any three digits you prefer.)


Pressing the 1 button sends positive power to one logical input of the first
AND gate. The other logical input of this gate is also positive, because an in-
verter is supplying it, and the input of the inverter is being held negative by
a pull-down resistor. When an inverter has a negative input, it gives a positive
output, so pressing the 1 button activates the AND gate, and makes its output
positive. The AND gate locks itself on, as its output cycles back to its switched
input via a diode. So the gate output remains high even after you let go of the
1 button.


The output from the first AND gate also supplies one logical input of the sec-
ond AND gate. When you press the 4 button, you send positive voltage to the
other logical input of this AND gate, so its output goes high, and it locks itself
on, just as the first gate did.


The second AND gate feeds the third AND gate, so when you press the 7
button, the third AND gate changes its output from low to high. This passes
through an inverter, so the output from the inverter goes from high to low.
This in turn goes to the trigger of a 555 timer wired in monostable mode.


When the trigger of a 555 timer goes from high to low, the timer emits a posi-
tive pulse through its output, pin 3. This runs down to the upper coil of the
latching relay, and also flashes an LED to confirm that the code has been ac-
cepted and the relay has been activated.


Two of the contacts in the relay are wired into the power-up button of your
computer. A little later in this description I’ll explain why this should be safe
with any modern computer.


Because we’re using a latching relay, it flips into its “on” state and remains there,
even when the power pulse from the timer ends. So now you can let go of the
asterisk button to disconnect the battery power to your combination lock, and
press the power-up button that switches on your computer.


At the end of your work session, you shut down your computer as usual, then
press the pound button on your keypad, which flips the relay into its other
position, reactivating the combination lock.

Free download pdf