Smart Power Outlets
These are Raspberry Pi driven smart power outlets.
The two power outlets are controlled using a web browser or smart phone. It is
also possible to configure the outlets to turn on and off based on the time or
room temperature or combinations of time and temperature. I was also going to add in a light sensor, but never did get around to it. This was a fairly involved project, I wouldn’t attempt it unless you have some programming
and electronic skills plus a heap of time on your hands. It is too big a project to go into all the finer details so I will just provide an overview and let you work out the rest.
Step 1: Raspberry Pi Setup
I used a Raspberry Pi A+ because of the reduced cost and size but any model would be suitable.
For this you will need to get Raspbian, a web server and a PHP database up and running on your Pi.
Then get something working (probably easiest setting something simple up on a breadboard to start) – There are plenty of tutorials around on controlling the GPIO pins via a web server and there are several different ways to do it. It will likely take a bit of trial and error so look around and try stuff!
This instructable is a good place to start 🙂
Step 2: Customise the Code
Once you have a simple test system working expand on the code. Customise it!
Like I mentioned I added a timer and temp sensor to mine, but you could add sensors for light, motion, humidity just to name a few, the possibilities are endless. I also added a simple LCD display and made a slick looking control interface. Here are some screen shots. I even added a “smart plug” icon to my iPhone.
Step 3: Hardware Build
When you are happy with your test system time for your hardware build. I wired my Pis GPIO pins to a mains rated relay switching board that electronically isolates the outlets mains voltage from the Pi. The relay boards can be purchased for a few bucks online (even on eBay). I also wired in a mains to 5V adaptor to run the Pi and relay boards.
For more detail: Smart Power Outlets