Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Home appliance control using Android phone

By Deepesh Verma December 24, 2020

With enhancement in technology, automation has become a need whether it is home, office or some other place. At home we come across many appliances be it  fan, AC, TV,  lights, etc. What if you could operate all of them with the Android Phone you’re holding in your hand.

Prototype of Android Mobile controlled Home Automation System

Fig. 1: Prototype of Android Mobile controlled Home Automation System

This project aims to incorporate android phone control over electrical appliances. We use Bluetooth communication between Android phone and a Receiver (control unit) that is connected to the appliances.
Bluetooth is a wireless technology standard for exchanging data over short distances (using short-wavelength UHF radio waves in the ISM band from 2.4 to 2.485 GHz) from fixed and mobile devices and building personal area networks (PANs). Invented by telecom vendor Ericsson in 1994, it was originally conceived as a wireless alternative to RS-232 data cables. It can connect several devices, overcoming problems of synchronization.

HC-05 module is an easy to use Bluetooth SPP (Serial Port Protocol) module, designed for transparent wireless serial connection setup.  It contains 6 pins that are labelled on the back but most modules only have 4 of those populated with pogo pins.  KEY & STATE  are not required, as KEY is used for flashing the device and STATE simply indicates  whether the device is awake or not.  So that leaves only GND, VCC, TXD, RXD.

Typical image of HC-05 Bluetooth Module

Fig. 2: Typical image of HC-05 Bluetooth Module

For connecting the module with Arduino, we need to use the Serial (Tx and Rx) pins provided on the board.

Connections & Working

Making Connections with HC-05:

Some modules have VCC labelled for working voltages up to ~6 volts.  These modules DO NOT like anything except 3.3 volts on the VCC line. We should use a level converter to 3.3V on the RXD line.  Use two resistors, as a simple voltage divider to make the TTL level conversion.  Wire  one 2.2k ohm resistor to ground and another 1k ohm resistor to the TXD line on the MCU. Connect the RXD pin in between the two resistors for an output of approx 3.4 volts.
Connect RXD pin of module to TXD of Arduino (Digital Pin 1), through the voltage divider configuration shown below:

Image showing circuit connections of Arduino Uno and HC-05 Bluetooth Module

Fig. 3: Image showing circuit connections of Arduino Uno and HC-05 Bluetooth Module

Now connect TXD of module to RXD of Arduino (Digital Pin 0).
To operate the appliances, we can’t connect them directly to Arduino. We need something called RELAY which is driven with the help of Transistor based driver circuit.

Circuit Diagram of Transistor based Relay Driver

Fig. 4: Circuit Diagram of Transistor based Relay Driver

The ‘Input’ is from Arduino I/O pin. RB is the current limiting resistor at the base of the transistor. Its value is typically 10K Ohm. ‘VS’ is the supply voltage needed to trigger the Relay coil (It depends on the Relay rating). A diode is connected in Reverse in parallel to the relay. This is done to avoid the back e.m.f. generated by coil that can damage the transistor or the Arduino.

A simplified Block diagram of the complete system is shown below:

Block Diagram of Android Mobile controlled Home Automation System

Fig. 5: Block Diagram of Android Mobile controlled Home Automation System

After making above connections, you’ll see blinking led on the module. This just ensures your device is powered properly. After that pick your Android Phone, and get the App- “Arduino Bluetooth Terminal” from the Google Play Store. This app is available for free, and is easy to use.

Screenshot of Android App used to control Home Appliances

Fig. 6: Screenshot of Android App used to control Home Appliances

After installation, turn ON Bluetooth of phone. Now search for devices until you find HC-05 and then start pairing with it. Enter Password 1234, when asked.

If properly paired, the LED blinking on Bluetooth module will  stop.  If not check the connections again. Get back to the app you just downloaded. It’ll automatically find the device, match the key it displays, and start conversation. Make sure, the phone’s Bluetooth remains ON.

Prototype of Android Mobile controlled Home Automation System

Fig. 7: Image showing complete prototype of Arduino based Android phone controlled Home Automation System

 

System Operation:

When we send ‘1’ to the Arduino, the Appliance 1 connected to Arduino Turns ON and when ‘2’ is sent, Appliance 2 turns ON. The serial data is read by Arduino, through Serial.read () function and is stored in the integer type variable state declared in the program. After this in the loop(), we just compare state value with 1, 2, 3 and so on till 8 to check the ON condition of 8 Appliances. Then we compare state value with a, b, c and so on till h to check the OFF condition of appliances and perform respective operation.

In addition to this we can also monitor the physical state such as  temperature,  pressure, etc., through the android phone. Say, we need to monitor the temperature of the room. We connect the LM35 Temperature sensor to the Arduino. Now read the sensor value and send it to the phone via serial link established over Bluetooth between  the phone and Arduino.

 

You may also like:


  • What are the top development boards for AI and ML?

  • What is a Robot Operating System (ROS)?

  • What are the top open-source software systems for home automation?

  • What is TinyML?

  • Web Browsers : What is Web Browser

  • Introduction to Linux- Linux Part 1

Project Source Code

###



int led1 = 2;
int led2 = 3;
int led3 = 4;
int led4 = 5;
int led5 = 6;
int led6 = 7;
int led7 = 8;
int led8 = 9;
int state;
int flag=0;       
void setup()
{
    pinMode(led1, OUTPUT);
    pinMode(led2, OUTPUT);
    pinMode(led3, OUTPUT);
    pinMode(led4, OUTPUT);
    pinMode(led5, OUTPUT);
    pinMode(led6, OUTPUT);
    pinMode(led7, OUTPUT);
    pinMode(led8, OUTPUT);
Serial.begin(9600);
}
void loop() {
    if(Serial.available() > 0)
    {    
      state = Serial.read();  
      flag=0;
    }  
    if (state == '1')
    {
       digitalWrite(led1, HIGH);
       if(flag == 0){
        Serial.println("Appliance 1 is ON");
          flag=1;
        }
    }
  
   else if (state == '2')
    {
        digitalWrite(led2, HIGH);
        if(flag == 0){
        Serial.println("Appliance 2 is ON");
        flag=1;
        }
    }
    else if (state == '3')
    {
        digitalWrite(led3, HIGH);
        if(flag == 0){
        Serial.println("Appliance 3 is ON");
        flag=1;
        }
    }
    else if (state == '4')
    {
        digitalWrite(led4, HIGH);
        if(flag == 0){
        Serial.println("Appliance 4 is ON");
        flag=1;
        }
    }
    else if (state == '5')
    {
       digitalWrite(led5, HIGH);
        if(flag == 0){
          Serial.println("Appliance 5 is ON");
          flag=1;
        }
    }
  
   else if (state == '6')
    {

        digitalWrite(led6, HIGH);
        if(flag == 0){
          Serial.println("Appliance 6 is ON");
          flag=1;
        }
    }
    else if (state == '7')
    {
        digitalWrite(led7, HIGH);
        if(flag == 0){
         Serial.println("Appliance 7 is ON");
          flag=1;
        }
    }
    else if (state == '8')
    {
        digitalWrite(led8, HIGH);
        if(flag == 0){
        Serial.println("Appliance 8 is ON");
         flag=1;
        }
    }
    else if (state == 'a')
    {
        digitalWrite(led1, LOW);
        if(flag == 0){
         Serial.println("Appliance 1 is OFF");
         flag=1;
        }
    }
    else if (state == 'b')
    {
        digitalWrite(led2, LOW);
        if(flag == 0){
          Serial.println("Appliance 2 is OFF");
          flag=1;
        }
    }
   else if (state == 'c')
    {
        digitalWrite(led3, LOW);
        if(flag == 0){
          Serial.println("Appliance 3 is OFF");
          flag=1;
        }
    }
  else if (state == 'd')
    {
       digitalWrite(led4, LOW);
        if(flag == 0){
          Serial.println("Appliance 4 is OFF");
          flag=1;
        }
    }
   else if (state == 'e')
    {
         digitalWrite(led5, LOW);
        if(flag == 0){
          Serial.println("Appliance 5 is OFF");
          flag=1;
        }
    }
    else if (state == 'f')
    {
         digitalWrite(led6, LOW);
        if(flag == 0){
          Serial.println("Appliance 6 is OFF");
          flag=1;

        }
    }
    else if (state == 'g')
    {
         digitalWrite(led7, LOW);
        if(flag == 0){
          Serial.println("Appliance 7 is OFF");
          flag=1;
        }
    }
    else if (state == 'h')
   {
         digitalWrite(led8, LOW);
        if(flag == 0){
          Serial.println("Appliance 8 is OFF");
          flag=1;
        }
    }
}

###

 


Circuit Diagrams

Circuit-Diagram-Arduino-Based-Android-Controlled-Home-Automation-System

Project Video


Filed Under: Electronic Projects
Tagged With: ac, android, Arduino, bluetooth
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • No Output Voltage from Voltage Doubler Circuit in Ansys Nexxim (Harmonic Balance Simulation)
  • Discrete IrDA receiver circuit
  • How do loop recording and G-sensors work on front and rear dash cams?
  • Getting different output for op amp circuit
  • Resistor Selection for Amplifier Layout

RSS Electro-Tech-Online.com Discussions

  • Saga 1400sv vinyl cutter motherboard issue
  • PIC KIT 3 not able to program dsPIC
  • Wideband matching an electrically short bowtie antenna; 50 ohm, 434 MHz
  • using a RTC in SF basic
  • Relay buzzing after transformer change?

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • GigaDevice launches GD32C231 MCU series with 48MHz Cortex-M23 core and 64KB Flash
  • Advanced Energy releases 425 W CF-rated medical power supply in 3.5 x 6 x 1.5-inch format”
  • LEM combines shunt and Hall effect sensing in 2000 A current measurement unit
  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe