Simple Home automation using Arduino

I decided to upgrade the previous circuit with additional capabilities and intelligence. Using IR remote controller, relay and clock module it can be transformed into simple home automation system. Whereas the previous Arduino chip was lacking required ram space and I/O pins there was a need to add another one to the circuit board and to establish the serial link with the previous one that is managing the LCD display.

First thing needed was to figure out what HEX values the remote in use is producing to communicate with the device. I am using a remote that was bundled with USB TV-tuner, which is mainly used in another room. My remote has a total of 29 buttons however I am only interested in the fraction of them, here are the HEX values in use obtained for my remote.

  • A05F807F – Power
  • A05F906F – Num 1
  • A05F50AF – Num 2
  • A05FD02F – Num 3
  • A05FB24D – Display
  • A05FE817 – REC
  • A05F18E7 – Stop
  • A05FB847 – Fwd
  • A05F38C7 – Back
  • A05F6897 – Play/Pause
Test setup for testing IR receiver with remote.

The next thing to figure out was how to control the 8-relay module. Every relay in this module has 3 screw-type pins to control the high voltage AC current named NO(normally closed), NC(normally open) and COM(common connection). The 220/110V AC input must be connected to COM. The switch inside the relay is moved by the electromagnet that is indirectly connected to one of the Arduino ports. When the relay is turned off the COM is connected to NC and when turned on connected to NO. I am using the relay with revered logic which means that the relay is turned on when port is set to LOW. For every relay there is an on board LED that shows if it is active. The module has additional safety factor as all the relays are optically insulated, this means that all Arduino really does is turn on an LED inside an optocoupler, and that turns the relay on. So far I am using the relay module for switching the lights in my room, further applications are on the way.

8 – Relay switch module with two of them active. Top utp connector cable leading to Arduino, bottom high voltage cables leading to light bulbs.

Another novelties on the board are DS1307 RT Clock and piezo buzzer. Clock and buzzer together, combined with way to turn on/off the light bulbs in the room can be used for a brutal alarm clock.

Updated circuit board, clock module in the top-left, IR receiver in the bottom-left, UTP connector cable to relay module in top-right, piezo buzzer in bottom-right corner and additional Arduino UNO chip in the middle.
Wiring diagram – click on the image for full resolution.

Further things to add:

  • Sunrise alarm using light dimmer
  • Motion detection

Useful links: