Make Electronics

(nextflipdebug2) #1

Experiment 20: A Powerful Combination


200 Chapter 4


Incorrect   Inputs
What happens if you enter the wrong code? If you press any button other than
1, 4, or 7, it sends positive voltage to the inverter near the top of the sche-
matic. The positive voltage overwhelms the negative voltage being applied to
the inverter through a pull-down resistor, and causes the inverter to output a
negative voltage, which it applies to one of the logical inputs of the first AND
gate. If the AND gate was locked on, the negative input will switch it off. If it
was supplying the second AND gate, it’ll switch that one off too.
Thus, any error when entering the first, second, or third digit of the secret code
will reset the AND gates, forcing you to begin the sequence all over again.
What if you enter 1, 4, and 7 out of their correct sequence? The circuit won’t
respond. The third AND gate needs a high input supplied by the second AND
gate, and the second AND gate needs a high input supplied by the first AND
gate. So you have to activate the AND gates in the correct sequence.

Questions
Why did I use a 555 timer to deliver the pulse to the relay? Because the logical
output from an AND gate cannot deliver sufficient power. I could have passed
it through a transistor, but I liked the idea of a pulse of a fixed length to flip the
relay and illuminate an LED for about 1 second, regardless of how briefly the user
presses the 7 button.
Why do I need three LEDs? Because when you’re punching buttons to un-
lock your computer, you need to know what’s going on. The Power On LED
reassures you that your battery isn’t dead. The Relay Active LED tells you that
the system is now unlocked, in case you are unable to hear the relay click. The
System Relocked LED reassures you that you have secured your computer.
Because all the LEDs are driven either directly from the 5-volt supply or from
the output of the 555 timer, they don’t have to be low-current LEDs and can be
used with 330Ω series resistors, so they’ll be nice and bright.
How do you connect the keypad with the circuit? That’s where your ribbon
cable comes in. You carefully strip insulation from each of the conductors,
and solder them to the contact strip or edge connector on your keypad. Push
the conductors on the other end of the cable into your breadboard (when
you’re test-building the circuit) or solder them into perforated board (when
you’re building it permanently). Find a convenient spot inside your computer
case where you can attach the perforated board, with double-sided adhesive
or small bolts or whatever is convenient. Include a 9-volt battery carrier, and
don’t forget your power regulator to step the voltage down to 5 volts.

Breadboarding
No doubt you have realized by now that breadboards are very convenient as a
quick way to push in some components and create connections, but the layout
of their conductors forces you to put components in unintuitive configurations.
Still, if you carefully compare the breadboard schematic in Figure 4-83 with the
simplified schematic in Figure 4-84, you’ll find that the connections are the same.
Free download pdf