The Powerswitch Tail 2 from Adafruit, looks like a 110V electrical lead with a box in the middle.

If you have 220V mains, this tutorial wont work for you - If we knew of an equivalent 220V controller like the PST we would have a link to it here

The box is actually an opto-isolated solid-state relay. The opto-ilsolation bit means that there is no actual electrical connection between the low voltage switching circuit and the 100V mains. This makes it extremely safe and removes any chance of accidentally frying your Pi.

What is more the control input consumes just 3 mA of current at 3.3V, which means we can control it directly from one of the Pi's output pins.

The PIR sensor is connected to a different pin from lesson 12, so be sure to move the yellow lead.

The Powerswitch Tail comes with a little indicator LED that shows when it is on, so you do not need to connect anything high voltage to it yet.

This guide was first published on Feb 18, 2013. It was last updated on Feb 18, 2013. This page (Hardware) was last updated on May 04, 2015.