and D1 (note polarity), and the rotary
switch (note pin 1). Solder the LED and
R9. Run the wires from the battery
holder through the strain relief hole and
solder red to + and black to -. If using
different sensors, solder them in at this
time. For the project shown here, we’re
also using the tilt switch. Locate the file
called “Templates” at the article link.
Download this file and cut out the
templates. Glue the transmitter template
to the top of the box using a glue stick.
Drill the two mounting holes and the
appropriate holes for the other sensors.
Drill the antenna hole.
Put two 6-32 3/8” screws in the
mounting holes from the front of the box.
Add two 3/8” spacers. Attach the screws
to the board. You will not need a nut
because the board will self-thread. Place
the antenna through its hole with the flat
facing the back of the box. It is mounted
to the top of the board; see Figure 5.
Secure it to the board with its mounting
for You Have Mail
Place the photodetector (D2), noting
its polarity in the pads labeled D2. The
anode (long pin) goes to the square pad.
When light strikes the photodiode, it pulls
the microprocessor pin to ground.
Photodiodes have a very high resistance
when no light strikes them. When
October 2013 31
■ FIGURE 5.
FUNCTIONS OF THE BCD SWITCH
0 Photo normally dark Light mode
1 Photo normally light Light mode
2 Proximity detects motion Light mode
3 Proximity detect no motion Light mode
4 Switch normally closed Tilt or switch
5 Switch normally open Tilt or switch
6 Switch change either NC or NO Tilt or switch
7 Water sensor, no water Water
8 Water sensor, water always present Water
9 Amplifier alarms if above Humidity, gasss, pressure, force
A Amplifier alarms if below Humidity, gases, pressure, force
B Temperature alarms if above Temperature
C Temperature alarms if below Temperature
D Photo IR interrupted Light mode
E Photo IR detected Light mode
F Voltage change Sound, vibration