Smart Home Automation System

by Voice Of Technology in Circuits > Arduino

489 Views, 3 Favorites, 0 Comments

Smart Home Automation System

SMART HOME AUTOMATION SYSTEM

A very common and interesting project is "Home Automation System", it is a very good project to increase the skills of Arduino and learn to use many components together ina project controlling by a microcontroller.

So basically we can control our home appliances by applications installed on our phone.

YES AM NOT JOKING!!!! It's POSSIBLE,

HOW?

Lets Start :

so in this device the microcontroller, Arduino Uno will make the pins of relay high and low when controlling alternating current devices otherwise the led light or direct current devices within 5 volts like a buzzer, dc fan, led, etc as per the impulses send by Bluetooth module to the Arduino via an application built by us in an open-source platform.

Just follow the steps below everyone can make the project within 5 to 10 minutes.


Components

4-channel-5v-relay-board-500x500.jpg
a1fe08c1-ace6-4c15-b13f-32847eced7bf.jpg
jumper-wires-3-types-set-dpelectronics-original-imaemh4hz6xpcwyt.jpg
9v-Battery-Hi-Watt-factoryforward-458x458.png
10pcs-colour-changing-blinking-3mm-flashing-led-diode-flash-rgb-original-imafexa24c8ezu6s.jpg
612hL4s+zxL._AC_SL1100_.jpg
untitled.png

1:-arduino uno(Generic Uno R3 ATmega328P with USB Cable length 1 feet, Compatible with ATMEGA16U2 Arduino (Color may vary))

2:-relay board(REES52 16220 Isolated Optocoupler Driver Expansion Board Relay Module 4CH 5Volt)

3:-bluetooth module hc-05(Bluetooth Transceiver Module with TTL Outputs-HC05)

4:-jumper wires(REES52 Jumper Wire - 10 Male to Male + 10 Female to Female + 10 Male to Female)and others needed components like CFL,light,fan..

Relay Connecting With Arduino

automation.png

It is a simple project and but its also very dangerous too if you do not take precautions and do not have an idea about ac current convention.

Because we are going to deal with high voltage 220v . Do not attempt if you are a amateur in dealing with high voltage.

Why use relay for controlling AC light,fan, and other appliances...

Alternate current devices can be controlled by a microcontroller so we use the relay as the intermediator so that we can control the relay pins to monitor the AC appliances as they run in 122volts as per Indian rule.

so we are usinga relay as switch to control high power devices.

What is NO NC and COM in the relay?

NO = Normally open COM- common

NC = Normally Closed Connection

Connect App With Bluetooth

27849422_799707723566508_1401066870_n.png

This the screenshot of the application used to control the project, you all can make this app online on MIT APP INVENTOR. You all can also get it in google play store means similar to this but to get our app please contact us.

UPLOADING THE CODE

Arduino-IDE-illustration.png

Compile it and the upload to your arduino board..

int L1=12;

int L2=11; int L3=10; int L4=9;

char receive=Serial.read;

int L1_state=0; int L2_state=0; int L3_state=0; int L4_state=0;

void setup() {

Serial.begin(9600);

pinMode(L1,OUTPUT); pinMode(L2,OUTPUT); pinMode(L3,OUTPUT); pinMode(L4,OUTPUT);

}

void loop() {

if(Serial.available()>0){receive = Serial.read();}

if(L1_state==0 && receive =='1') { digitalWrite(L1,HIGH); receive=0; L1_state=1;} if(L1_state==1 && receive =='1') { digitalWrite(L1,LOW); receive=0; L1_state=0;}

if(L2_state==0 && receive =='2') { digitalWrite(L2,HIGH); receive=0; L2_state=1;} if(L2_state==1 && receive =='2') { digitalWrite(L2,LOW); receive=0; L2_state=0;}

if(L3_state==0 && receive =='3') { digitalWrite(L3,HIGH); receive=0; L3_state=1;} if(L3_state==1 && receive =='3') { digitalWrite(L3,LOW); receive=0; L3_state=0;}

if(L4_state==0 && receive =='4') { digitalWrite(L4,HIGH); receive=0; L4_state=1;} if(L4_state==1 && receive =='4') { digitalWrite(L4,LOW); receive=0; L4_state=0;}

///////////////////////////////////////////////////////////voice //////////////////////////

if(L1_state==0 && receive =='') { digitalWrite(L1,HIGH); receive=0; L1_state=1;} if(L1_state==1 && receive =='1') { digitalWrite(L1,LOW); receive=0; L1_state=0;}

if(L2_state==0 && receive =='2') { digitalWrite(L2,HIGH); receive=0; L2_state=1;} if(L2_state==1 && receive =='2') { digitalWrite(L2,LOW); receive=0; L2_state=0;}

if(L3_state==0 && receive =='3') { digitalWrite(L3,HIGH); receive=0; L3_state=1;} if(L3_state==1 && receive =='3') { digitalWrite(L3,LOW); receive=0; L3_state=0;}

if(L4_state==0 && receive =='4') { digitalWrite(L4,HIGH); receive=0; L4_state=1;} if(L4_state==1 && receive =='4') { digitalWrite(L4,LOW); receive=0; L4_state=0;}

if( receive =='5') { digitalWrite(L1,LOW);digitalWrite(L2,LOW);digitalWrite(L3,LOW);digitalWrite(L4,LOW); receive=0; L1_state=0; L2_state=0; L3_state=0; L4_state=0;} }