Smart Home Automation Using Arduino

Introduction: Smart Home Automation Using Arduino

About: hIOTron is an IoT Based company that offers IoT Platforms, IoT Solutions, IoT Training.

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

Supplies

Hardware Components

Arduino Mega

HC-05 Bluetooth Module

Two Relays 6V DC

L293D

2 Bulbs

LCD 16X2

Breadboard

Android phone

Software Components

Arduino IDE

Bluetooth terminal App

Step 1: About Project

To start with a smart home automation system 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 you to study all these IoT Devicespractically.

Step 2: Run a Code

#include 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**"); } } }

Be the First to Share

    Recommendations

    • Water Speed Challenge

      Water Speed Challenge
    • Fandom Contest

      Fandom Contest
    • Summer Fun: Student Design Challenge

      Summer Fun: Student Design Challenge

    Comments