Make Electronics

(nextflipdebug2) #1
Switching Basics and More 59

Experiment 7: Relay-Driven LEDs

Procedure


Turn the relay with its legs in the air and attach wires and LEDs as shown in
Figure 2-59, with a 680Ω resistor (a 1K resistor will be OK if you don’t have the
correct value). Also attach a pushbutton switch. (Your pushbutton switch may
look different from the one shown, but as long as it is a SPST pushbutton with
two contacts at the bottom, it will work the same way.) When you press the
pushbutton, the relay will make the first LED go out and the second LED light
up. When you release the pushbutton, the first LED lights up and the second
one goes out.


How It Works


Check the schematic in Figure 2-60 and compare it with Figure 2-59. Also see
Figure 2-62, which shows how the pins outside the relay make connections
inside the relay when its coil is energized, and when it is not energized.


This is a DPDT relay, but we are only using one pole and ignoring the other.
Why not buy a SPDT relay? Because I want the pins to be spaced the way they
are when you will upgrade this circuit by transferring it onto a breadboard,
which will happen very shortly.


On the schematic, I have shown the switch inside the relay in its relaxed
state. When the coil is energized, the switch flips upward, which seems
counterintuitive, but just happens to be the way that this particular relay is
made.


When you’re sure you understand how the circuit works, it’s time to move on
to the next step: making a small modification to get the relay to switch itself
on and off, as we’ll do in Experiment 8.


Figure 2-61. The layout of the
pins of the relay, superimposed
on a grid of 1/10-inch squares.
This is the type of relay that you
will need in Experiment 8.


Connected

Connected

Connected

Connected

Figure 2-62. How the relay connects the pins, when it is
not energized (left) and when it is energized (right).

12v DC from
AC adapter

Figure 2-59. As before, you can use patch
cords, if you have them, instead of some of
the wired connections shown here.

680

12v
DC

Figure 2-60. Same circuit, shown in sche-
matic form.

Larger versions of all schematics and
breadboard photos are available
online at this book's website: http://
oreilly.com/catalog/9780596153748.
Free download pdf