Smart Home is a Major project of Mine for Partial fulfillment of B.Tech Degree in SRM Institute of Science and Technology. Here in this project, we aim to control home appliances using our Android App. In order to do so we have devised 3 modules which are to be implemented successfully. The three modules need to be set up successfully. Below is the Architecture of a part of the final year project.
Arduino is simplest to implement. For that just go to the Arduino Site and download suitable arduino IDE here. Then After installations, load up the SerialCom.ino File.
This is how it will look like. Note the COM port from Tools-> Port. Now connect Arduino mega with following connections.
- Pin 22 -> In of relay board connecting tubelight 1
- Pin 23 -> In of relay board connecting tubelight 2
- Pin 24 -> In of relay board connecting tubelight 3
- Pin 25 -> In of relay board connecting Fridge
- Pin 26 -> In of relay board connecting AC
Towards 220V side, connect one end to the central i.e. Common pin, and other end to right of it i.e. NO(Normal Open) Side
After connections are done, go to the code, press Ctrl + U. Code will be uploaded on the Arduino.
For this you will need some libraries for it to work. Below are the libraries required.
- python-firebase
- requests
- pyserial
Go to the cmd, and type the following commands
pip instal python-firebase
pip install pyserial
pip install requests
After that mention the COM port here as highlighted in the diagram
After that, run the Python Script.
This just requires you to install the apk kept here. After installing it, the Sign In page comes up which looks like this.
Now Sign Up in this app to get started.
When you log in, this page loads up
From here you can load tubelight, refrigerator and AC status. Images show the layout
Tubelight Page
Refrigerator Page
AC Page
It is very easy to operate the application. All we need to do is to toggle the switches and this way we can turn on the appliance.