Arduino based Home Automation

4,500.00 Exc Tax

Nowadays, people have smartphones with them all the time. So it makes sense to use these to control home appliances. Presented here is a home automation system using a simple Android app, which you can use to control electrical appliances with clicks. Commands are sent via Bluetooth(HC05) to Arduino Uno, Which controls the relay operation( ON or OFF).

Shipping: 4 to 8 working days from the date of purchase

Package Includes:

  • Complete Hardware Kit

  • Demo Video-Embedded Below

  • Abstract

  • Reference Paper

  • PPT (20 Slides)

  • !!! Online Support !!!

100 in stock

SKU: arduino based home automation Category:

Description

Introduction

                                   Nowadays, people have smartphones with them all the time. So it makes sense to use these to control home appliances. Presented here is a home automation system using a simple Android app, which you can use to control electrical appliances with clicks. Commands are sent via Bluetooth(HC05) to Arduino Uno, Which controls the relay operation( ON or OFF). So you need not get up to switch on or switch off the device while watching a movie or doing some work.

Hardware Requirement

  • Arduino Uno
  • Bluetooth – HC05
  • Relay Board
  • Tungsten Bulb(2)
  • Connecting Wires
  • AC power supply(230v)

Software  Requirement

  • Arduino IDE

Circuit Diagram

arduino based home automation

Circuit Construction

                                  First make the circuit connection as shown in fig1.1. The 1st Pin(Vcc) of Bluetooth(HC05) is connect to +5v of Arduino Uno and 10th pin(GND) to Arduino Uno GND. The 2nd pin(Tx) and 3rd pin(Rx) of HC05 is connected to 4th  and 2nd  of Arduino Uno. Make sure that Rx pin of HC05 is connected to Arduino @nd pin through voltage divider contains 1k and 2k resistor, because Rx pin of HC05 is 3.3v compatible but Arduino GPIO output is 5v. So we decreasing the voltage from 5v to 3.3v using voltage divider to make  Arduino and Bluetooth compatible.

                                        Then 9th and 10th pin of Arduino uno is connected to R1 and R2 of relay board. Vcc and GND pin of relay board is connected to Vin(+9v) and GND pin of Arduino  Uno. Another side of relay board three pin connector available, named NO(Normally open), C (common) and NC(Normally closed). Each relay contains separate connector. Phase(P) of 230v AC is connected to C (common) and one end of bulb is connected to NO(normally open). Another end of bulb is connected to Neutral(N) of AC supply.    

Working

              After making circuit connection as per the fig 1.1 compile the arduino program given below in Arduino IDE and upload program to your Arduino Uno using USB B type data cable.  Power up your Arduino using 9v DC adapter. After power up your circuit the lrd on Bluetooth start to blink very fast, it means the Bluetooth device waiting to be pair. Now connect your mobile to HC05 using Bluetooth Controller app. After connecting your mobile to HC05 turn ON and OFF the lights using respective keys.

            Download Bluetooth Controller app from google play store.

  Once the Bluetooth in Android phone is turned ON and app is started, the following screen will be opened.   

android screen for arduino based home automation     

 

Here, we can set the data to be transmitted when a particular key is presswd byselecting “SET KEYS” option.

arduino based home automation -android

In order to connect Bluetooth module we need to press “SCAN”  and list of available Bluetooth device select your Bluetooth device. “Connected” is appeared on top left of screen

Once the setup is done, we are ready to transmit the data to arduino. When Light1 ON is press light1 will glow and if Light1 OFF is pressed Light1 will Off. Same to Light2. If we need turn OFF all lights we need no press All Loads OFF.

arduino based home automation

Arduino Code for Home automation using Bluetooth

#include <SoftwareSerial.h>
const int rxPin = 4;    // defining pin4 as a rx(receiver) pin
const int txPin = 2;    // defining pin2 as a tx(transmitter) pin           
SoftwareSerial mySerial(rxPin  , txPin);
const int Loads[] = {9, 10};
int state = 0;
int flag = 0;
void setup() 
{
   for (int i=0;i<2;i++)
    {
      pinMode(Loads[i], OUTPUT);  
    }
   mySerial.begin(38400);
   for (int i=0;i<2;i++)
    {
      digitalWrite(Loads[i], LOW);
    }
}
void loop() 
{  
    if(mySerial.available() > 0)
    {
      state = mySerial.read();  // Reading Input From "Bluetooth Controller" app
      flag=0;
    }
    
    switch(state)
    {
      case '0':digitalWrite(Loads[0], HIGH);  // turn ON light1 
               flag=1;
               break;
      case '1':digitalWrite(Loads[0], LOW);  // turn OFF light1
               flag=1;
               break;
      case '2':digitalWrite(Loads[1], HIGH);  // turn ON light2
               flag=1;
               break;
      case '3':digitalWrite(Loads[1], LOW);  // turn OFF light2
               flag=1;
               break;
         case '4':digitalWrite(Loads[0], LOW);  // turn OFF light1
               digitalWrite(Loads[1], LOW);  // turn OFF light      
               flag=1;
               break;
     }
}

Additional information

Weight 1.000000 kg

Reviews

There are no reviews yet.

Be the first to review “Arduino based Home Automation”

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.