Bluetooth Controlled Home Automation System

Introduction:-

Nowadays peoples are using smart mobiles like android mobiles, IOS mobiles and so on.. Recently Huawei has introduced hormony OS on smart mobile. So smart mobile plays a vital role on every human life. So that I have planned to make a home automation using the smart mobile. Here I have controlled the home appliances using the Android application which installed on the smart mobile. Already the menus are available on the screen. With the simple touch, you can able to switch ON and OFF the load. This is done with the bluetooth technology integrated on the smart mobile. A simple comments are send via bluetooth (HC-05 which i used) to the arduino UNO to switch the loads. To switch the load, I used relays on the project. You can use optocoupler and triac for better efficiency and for a long life.

Materials Required:-

  1. Arduino uno
  2. 16×2 LCD display
  3. LCD breakout board
  4. HC05 Bluetooth module
  5. 4 Channel relay
  6. jumper wires

Materials which i used on this project:-

arduino uno

LCD

LCD Breakout board

HC05 Bluetooth

4 Channel Relay

Circuit Diagram:-

Circuit Diagram details:-

LCD connections:-

LCD – Arduino

RS – D7

E – D6

D4 – D5

D5 – D4

D6 – D3

D7 – D2

 

Note:- I suggest you to use LCD breakout board, so that the power supply connections and RW to GND are integrated on the PCB.

Relay connections:-

IN1 to IN4 should be given to A0 to A3 of the arduino uno

Bluetooth connections:-

TX of the bluetooth to the D0 (RX) of the arduino uno

RX of the bluetooth to the D1 (TX) of the arduino uno

Basic hardware construction:-

LCD connections using Breakout board with arduino

power supply connection for bluetooth from arduino

TX to D0 and RX to D1 of the arduino

Power supply connections for relay ( i used +5v relay) connection differs for +12v relay

(External +12 required if you used another model relay)

Jumper connections between IN1, IN2,IN3,IN4 to A0, A1, A2, A3

Final setup of the hardware

Code:-

#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
void setup()
{
Serial.begin(9600);
pinMode(A0,OUTPUT);
pinMode(A1,OUTPUT);
pinMode(A2,OUTPUT);
pinMode(A3,OUTPUT);
digitalWrite(A0,LOW);
digitalWrite(A1,LOW);
digitalWrite(A2,LOW);
digitalWrite(A3,LOW);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print(” AnDrOiD BaSeD “);
lcd.setCursor(0, 1);
lcd.print(“HoMe AuToMaTiOn “);
delay(2000);
lcd.clear();
lcd.print(“L1 L2 L3 L4”);
}

void loop()
{
char sw;
sw=check();
if(sw==’b’)
{
digitalWrite(A0,HIGH);
lcd.setCursor(0, 1);
lcd.print(“ON “);
}
if(sw==’a’)
{
digitalWrite(A0,LOW);
lcd.setCursor(0, 1);
lcd.print(“OFF “);
}
if(sw==’d’)
{
digitalWrite(A1,HIGH);
lcd.setCursor(4, 1);
lcd.print(“ON “);
}
if(sw==’c’)
{
digitalWrite(A1,LOW);
lcd.setCursor(4, 1);
lcd.print(“OFF “);
}
if(sw==’f’)
{
digitalWrite(A2,HIGH);
lcd.setCursor(8, 1);
lcd.print(“ON “);
}
if(sw==’e’)
{
digitalWrite(A2,LOW);
lcd.setCursor(8, 1);
lcd.print(“OFF “);
}
if(sw==’h’)
{
digitalWrite(A3,HIGH);
lcd.setCursor(12, 1);
lcd.print(“ON “);
}
if(sw==’g’)
{
digitalWrite(A3,LOW);
lcd.setCursor(12, 1);
lcd.print(“OFF “);
}
}

int check()
{
if(Serial.available()>0)//Checking is Serial data available
{
int input = Serial.read(); //Storing value of read data into variable assigned
return input;
}
}

Download the code without any edit. If you construct your own circuit, you can change the required edit.

Install the android app on your smart phone:-

link:- download the app from here. This will redirect to playstore.

Result and observation:-

1.Turn ON the hardware, Title card will appear at the LCD

2) Show the status of the load at the LCD

3) Open your android app

4) Scan the paired device

5) Select the paired device

6) After successful connection, goto ON/OFF menu

7) The Relay will be turned OFF as per the android app

8) Touch the menu screen on the android app, you can feel the change on the LCD

9)At the same time, you can see the relay will be turned ON

10) Check all the load weather all the relay is triggered to turn ON/OFF

If you have any doubts, you can feel free to comment below. your comments are valuable for us to grow. Thank you.

 

Leave a Reply

Your email address will not be published. Required fields are marked *