Friday, March 6, 2015

Home automation system based on Raspberry pi

After building the Raspberry Pi tablet, i decided to do more, this time something for home automation, and what better thing to automate first than the light system.
For this project i ordered a Raspberry Pi model A. The main difference between model A and model B is that model A doesen't have an RJ45 port and 2 usb, also the ram have been lowered to 256 mb. Becase of this downgrades it is more cheaper, but for an automation project it is perfect.
The idea is to set some ports as output, connect those ports to some optocouplers that acts as a switch for the 12V adpter that power the 12V relays that turn on/off the lights.


In the above picture you can see the optocouplers and the relays soldered on an old pc power supply circuit board.
The relay board and the Raspberry board is fitted inside the power supply metal case for protection



I also wanted to have an touch pannel inside the wall, and for that i decided to use a simple android tablet.The andorid tablet is set to automatically connect to the raspberry via wifi, the light of the display  set to minimum and always on.
The interface that control the relays is called Webiopi which allow you to use HTML codes to create a nice interface for the output ports.



In this image you can see the web interface on the tablet mounted in the wall.
Becase i use webiopi i can switch the light both from any device that can connect to the internet.
I also let the analog switches of the light bulbs, in case something goes wrong with the raspberry board or the relays. Those switches are connected to the relays, so it is possible to turn on the light from the analog switch and turn it off from the touch panel (or any device) and vice versa.
Here is a video with the system in action:




Source code of the HTML file: index.html




10 comments:

  1. can you publish code of this ?

    ReplyDelete
  2. Hello, sorry for the delay, the link to the code is now in the description.

    ReplyDelete
  3. Hello , how do you control the light with both the wall switch and the relay , and how the system detect if it on or off , can you show me how you did the connections

    ReplyDelete
  4. hi the link for the code is not avaible
    thank you

    ReplyDelete
  5. Hi there. It is really interesting what r u doing. Would you share html code please? The link above doesn't work.
    Thank you

    ReplyDelete
  6. This may be my new favorite post. I absolutely love what you did here and if you don't mind, I may be stealing your idea and plans for my own house! I'll have to enlist the help of my brother though, since I don't have the technical prowess that he possesses. Please keep us up-to-date on all your fun experiments!

    Dwayne @ Elite System Design

    ReplyDelete
  7. The term “smart home” is used to describe a house, apartment or room, which contains a communication network that connects different devices and allows them to be controlled, monitored and accessed remotely through smartphones, voice aids, and others. Smart devices connect to the Internet, which allows them to be controlled remotely via Wi-Fi.

    Click here to know more information smart home devices

    ReplyDelete
  8. Great post. Very useful and informative post You have shared. Thank you for sharing. We are offering home automation tablet for tech enabled homes.

    ReplyDelete