The project describes about how to control home appliances by easily sending data from Android smartphone to Arduino.

Summery

The project describes how to control home appliances by easily sending data from an Android smartphone to Arduino.

About the Project:

To start with smart home automation with a smartphone-controlled, we need to download the Bluetooth Terminal App and install it on the Android smartphone and then join it with the HC05 module. Just pair this as we generally paired two Bluetooth devices.

Now we can easily share data to the HC05 module through Android Phone. HC05 module is attached to Arduino Mega which will receive data that was sent by Terminal App via Smartphone. 

Here we have used LCD 16X2 to display the status (ON/OFF) of home appliances. The adapter is utilized to power the Arduino as well as the circuit. L293D IC is utilized to run two Relay which is directly attached to two Bulbs.

On each sending data by smartphone, Arduino verifies for the character sent and puts relevant pins high or low as per the Code. These pins handle the relays which in turn handle the home Appliances.

  • If we give ‘a’ via Bluetooth Terminal App then Bulb1 will be On and Bulb2 will be off.
  • If we give ‘b’ via Bluetooth Terminal App then Bulb2 will be On and Bulb1 will be off.

IoT Training will help to get a thorough view of various IoT Devices.

Smart home automation
        #include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

void setup() {
  pinMode(11, OUTPUT);
  pinMode(10, OUTPUT);
  Serial.begin(9600);
  lcd.begin(16, 2);
  lcd.print("**AUTOMATION**");
}

void loop() {
  if (Serial.available() > 0)
  { 
    char c = Serial.read();
    if (c == 'a')
    {
     Serial.print("in a code");
     digitalWrite(10,HIGH);
     digitalWrite(11,LOW);
     Serial.print("10 HIGH");
     lcd.clear();
     lcd.print("**BULB1 ON**");
    }
    
    if(c=='b')
    {
     digitalWrite(11,HIGH);
     digitalWrite(10,LOW);
     Serial.print("11 HIGH");
     lcd.clear();
     lcd.print("**BULB2 ON**");
    }
    
    if(c=='c')
    {
     digitalWrite(10,HIGH);
     digitalWrite(11,HIGH);
     lcd.clear();
     lcd.print("**BULB 1,2 ON**");
    }
    
    if(c=='d')
    {
     digitalWrite(10,LOW);
     digitalWrite(11,LOW);
     lcd.clear();
     lcd.print("**BULB 1,2 OFF**");
    }
  }
}
    
rasika Joshi
hIoTron offers an End-to-End IoT Training with live use cases using IoT hardware kit.