Sunday, May 25, 2014

Raspberry Pi controlled power sockets - It's pretty easy

Ever since I started working on small projects with my raspberries I wanted to control something bigger than an LED. I played around with relays for some time but I always cut the cable (eg from a lamp) and connect the power line through the relay but for that I had to cut (and uglify) a stock cable.

A friend got me the idea of simply connecting a power socket to the relay so I can plug in what ever I want withoug having to modify it.

So I've built it and mounted everything on a piece of wood.

I used:

  • 3 Power sockets for 2€ each
  • a Power cable to power the sockets for 2€
  • an 8 port relay board for 6€
  • Since my female jumper cables I ordered a week ago didn't arrive yet I used some other wires
The base components screwed on a piece of wood

The power sockets are connected


All connected and ready to go.
This just just a proof of concept, if it works out I'll build it in a nicer (and safer) case

The last step was the software. I used the php-gpio library and built a simple webpage so I can control the sockets from my phone (or PC)


I connected my self made plant-shelf and a small fan to the sockets to the power sockets and gave it a try.


Here you can see it in action



No comments:

Post a Comment