Hardware Reference
In-Depth Information
Connect four differently colored male/female jumper wires from the following GPIO
to the level converter board's channels:
• Pin 23 to Channel 1
• Pin 22 to Channel 2
• Pin 27 to Channel 3
• Pin 17 to Channel 4
Next, connect the level converter to the relay board's signal pins on VCC (5 V), each
of the four channels, and ground (GND). (It may also have markings for voltage (V)
and ground (G).
Opto-isolated relay boards might work without the level converter board.
Now, you'll need to connect the relays to the outlets. Looking at the outlets, you will
see that the screws on one side are brass, and the screws on the other side are silver.
The brass side is the “hot” side that is controlled by the relay, while the silver side is
the return. Start by breaking the tabs that tie the top and bottom outlets together on
the brass side, so you can control the top and bottom outlets independently.
This is a potentially dangerous project! Keep the 120 V power at the relay far away
from all low-voltage wiring on the Raspberry Pi. You could be seriously electrocuted
by what otherwise seems like a simple short. Note that you might need to consult
local/regional building codes on construction and installation of your finished
project.
Next, connect a 16-gauge white copper wire to one of the silver screws (top or bottom,
it does not matter) on each of the two outlets, and connect these two white wires to
the white wire of a grounded power cord. You can purchase a three-wire grounded
power cord at your local home improvement store—we simply pilfered one from a
spare power strip.
Now it is time to run a wire to the relays. If you look carefully at the relays, you will see
either two connectors per relay or three connectors per relay, depending on your
specific version. If you have three wires, one is usually labeled NO (for Normally Open,
which means it is off when not energized), another is labeled NC (for Normally Closed,
which means it is on when not energized), and the third wire is the common.
You want to use the common wire and the Normally Open one. If you have only two
connectors for each relay, you don't need to worry about this. As long as you use the
common side, it really doesn't matter if you mix up the Normally Open and Normally
 
Search WWH ::




Custom Search