Additional Capacitors and Diodes
(or Handling the Gremlins)
The long run of wire needed to connect the sensors in
series tends to create a giant RF loop antenna. Fluorescent
lights, HVAC compressors, and
other large motors can
generate high voltage spikes
which are then picked up by
this antenna. These spikes will
destroy the input circuits of the
microprocessor. To prevent
this, a 1 µF bipolar electrolytic
capacitor is placed between
the reed switch input on the
processor and ground.
rectifiers are connected from
that input pin to both the
positive and negative rails in
reverse (see schematic) to keep
the voltage on that pin from
going above or below the
supply voltage by 0.3 volts.
Finally, a 0.047 µF memory
backup capacitor is added
across the positive and
negative rails of the MSP to
keep it powered during any
minor power glitches that
might otherwise cause the
processor to inadvertently reset.
Putting It All Together
The circuits I design are normally based
on whatever I have on hand. This allows for
a wide range of possible substitutions. The
only component that really isn't easily
substituted is the 74C922 matrix decoder,
and really the only thing preventing the use
of a different decoder IC is the software.
Even the uP is flexible. The 2553 version is
pin and code compatible with the 2452, and
is a perfect drop-in replacement if more
memory space is needed for future
The entire circuit itself is basic enough
that it can be built on a small 3" x 3"
perfboard with point-to-point wiring,
although an etched printed circuit board
(PCB) would be simple enough to lay out
(see Figure 4).
Any case (plastic or metal) that the
keypad will fit in will work. I formed my own
out of a sheet of light aluminum that I had
(again) just laying around; refer to Figure 5.
The datasheet for the keypad at Electronic
Goldmine has a full-size template that aids in
layout. The rest of it isn't critical.
44 September 2013
; FIGURE 5. The completed keypad interface.
; FIGURE 4.
circuit built on