This tutorial works with all versions of Raspberry Pi (rev 1, 2, A, B, B+ and Zero) except the compute module which has no headers.
The Powerswitch Tail 2 from Adafruit, looks like a 110V electrical lead with a box in the middle.
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 Controllable Four Outlet Power Relay Module Version 2 can be used as an alternative for this project.
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.
Text editor powered by tinymce.