Selecting a PowerSwitch Tail
PowerSwitch Tail has a built-in AC relay that is activated between 3-12 VDC. This is designed to easily integrate with many microcontroller platforms, such as Arduino, Raspberry Pi, BeagleBone, and so on. Usually, Arduino digital output provides 5VDC that allows it to activate the AC (Alternative Current) relay inside the PowerSwitch Tail. Using a PowerSwitch Tail with your microcontroller projects provides safety since it distinguishes between AC and DC circuitry by using an optocoupler which is an optically activated switch.
PowerSwitch Tail ships in several variants. At the time of writing this book, the product website lists various PowerSwitch Tails, assembled and in kit form, that can be used with this project.
To build this project, we will use a 240V AC PowerSwitch Tail that can be purchased as a kit and assembled.
PN PSSRKT-240
Refer to http://www.powerswitchtail.com/Pages/PowerSwitchTail240vackit.aspx.
Here, we will not cover the assembly instructions about the PN PSSRKT-240 kit. However, you can find the assembly instructions at http://www.powerswitchtail.com/Documents/PSSRTK%20Instructions.pdf.
The following image shows an assembled PN PSSRKT-240 kit:
If you are in a country that has a 120V AC connection, you can purchase an assembled version of the PowerSwitch Tail.
Wiring PowerSwitch Tail with Arduino Ethernet Shield
Wiring the PowerSwitch Tail with Arduino is very easy. Use any size of wire range between gauge #14-30 AWG to make the connection between Arduino and PowerSwitch Tail.
PowerSwitch Tail has a terminal block with three terminals. Use a small flat screwdriver and turn the screws CCW (Counter Clock Wise) to open the terminal contacts.
With the Arduino Ethernet Shield mounted on the Arduino UNO board, do the following:
- Use the red hookup wire to connect the positive terminal of the PowerSwitch Tail to digital pin 5 on your Arduino.
- Use the black hookup wire to connect the negative terminal of the PowerSwitch Tail to the GND pin on your Arduino.
- Connect the wall adapter power supply (9V DC 650mA) to the DC power jack on your Arduino board. The ground terminal is connected internally to the AC-side electrical safety ground (the green conductor) and can be used if needed.