are the power supply connections to the AC line (if you
opt for the internal supply method as I did) and the
connection from the light switch to the relay.
When making these connections, make SURE that the
circuit breaker feeding the light switch is turned off. The
safest way to do this is to turn the light switch on where
you want this installed, and flip the breakers one by one
until that light goes out. Place a piece of masking tape
across the breaker to prevent anyone from accidentally
resetting the breaker while you are working. If you have a
no-contact voltage detector, double-check that the line is
dead using that. It is always better to be safe than sorry —
especially when working with line voltage. Once the
circuit is fully enclosed, there is no danger of electric
shock. With all of that out of the way, let’s get back to the
installation.
All of this was mounted directly below the light switch
(the modem case conveniently provided two wall
mounting screw slots) and the AC lines were run through
the wall under the case. I tied my power supply directly to
the AC wiring since it was handy, but if you are using an
external supply, you can just plug it into an existing outlet.
The contacts of K1 are wired across the existing light
switch with a short length of standard lamp cord.
Wiring across the existing switch instead of replacing
the original switch with this circuit allows the system to be
overridden and allows the light to be kept on regardless of
the state of the circuit. Using screw terminals for the AC
connections makes wiring easy and safe. After the AC
lines are connected and the switch is mounted back in the
wall, you can turn the breaker back on in preparation for
the alignment procedure (Figure 7).
The Hard Part or
Lining Up the Sensors
The Optek sensors are designed to be snapped into
mounts facing each other, but since I am mounting them
to a wall, there really isn’t an easy way to attach them.
What I did (Figure 8) was to hot glue the sensor to a small
piece of perfboard with a hole drilled in the top. Screwed
into a sheetrock anchor, this allows stability as well as a
place to solder the current-limiting resistor (in the case of
the LED) and the
connector. Once you
have determined which
doors you’d like to
cover, mount the LEDs
on one side of each
door about waist high.
Now, it gets a little
more difficult.
JP1 allows the initial
alignment of the beams
without triggering the
circuit continuously,
causing the light to
flicker on and off. With
pins 1 and 2 jumpered,
the 555 trigger IC2 is
held high, and instead
LED1 lights when the
receiver and the emitter
are aligned and
extinguishes when there
is a misalignment.
Only connect one
receiver at a time across X5-1 and X5-2 while performing
the setup, otherwise you’ll never get the sensors aimed
properly. Both would have to be perfect for the LED to
light. To avoid any external light source from giving a false
positive, turn off all the lights while performing this step
and work by flashlight. Adjust R4 to about its middle
position. Now, hold the detector (mounted on its
perfboard) directly across from the LED and slowly move
it around until LED1 shines the brightest. Mark that spot,
secure the board to the wall, and repeat for the other
detector. This may take a little time and patience. I know it
did for me!
Once both receivers are correctly mounted (don’t do
what I did — align the sensors BEFORE mounting or you’ll
wind up with Figure 9!), connect both receivers in series
across X5-1 and X5-2 using a small wire nut to connect the
emitter of one to the collector of the other. With both
phototransistors connected in series, you may find that
LED1 no longer lights. You can adjust the sensitivity by
26 December 2015
■ FIGURE 7. Close-up of the terminal connections.
■ FIGURE 8. This is how the
emitter should be mounted.