Tuesday, 31 October 2017

Simple Home Automation using Arduino Uno

Arduino Board is an interesting piece of hardware which can be used to prototype IOT application with minimally connected modules. The board comes as a part of open-source IOT prototyping platform which Arduino provides. This MCU can easily be connected to HT05 Bluetooth modules, relay boards, HC12 Transceiver module, DC motors, etc.

Arduino makes rapid prototyping so easy that automation becomes a child's play.
A simple example of one such prototyping would be home automation. 
Use case: An android app that controls your electrical devices at home. You connect the android app to Bluetooth module of the home automation system. Once connected, the user can control the high voltage electrical devices using the app.

In order to build this, all we need is Arduino UNO board, HC05 Bluetooth module, 3-channel relay and electrical devices like Bulb, tube light, etc. The number of channels in relay depends upon the no. of devices you need to connect.

We will connect Arduino board to 2 modules:
1. Bluetooth module: Used to connect our android app with Arduino board via serial communication offered by HC05 BT
2. Relay channel: Used to connect high voltage devices to Arduino board. As stated above, the number of channels in the relay to be used is the number of devices you need to control via Arduino board.

There are various detailed tutorials available to learn the above two connections.
This page explains the BT connection with Arduino in a simple and easy manner. Relay connection with Arduino is nicely explained here. Thanks to the author for wonderful tutorials 😊
Now that we essentially have pin related connections, we can go to the next step of setting up the board.

 Arduino UNO board is set up by uploading Arduino program which includes the declaration of variables and pins of the board at the start. In addition to the required declarations, we also need to fill its brain with the program which will control the connected modules, and thereby control the connected devices. Arduino provides software development environment which can be downloaded from https://www.arduino.cc/. It also provides Web IDE.  

Our Android app can either be created using a simple platform MIT App Inventor. Or  Android APIs can be used in traditional Eclipse IDE. The app has to connect with our BT module. BT will receive the data from the app and transmit the same to Arduino, which according to the program loaded in it, control the relay output.

Finally, detailed steps for this prototype can be found here. Just in case you are interested in digging deeper. There could be many such use cases possible with Arduino board. Home Automation System is what I could have a hands-on. Let me know if you have tried anything else.

Happy Prototyping 😃

2 comments:

  1. 👍Good article. Which version of arduino board did you try this with?

    ReplyDelete

The Well of Epiphany

“Go ahead, I’ll be right behind … ”   “Come fast, I’m waiting downstairs … ”   Being already cautious of my ever-increasing weight,...