Home Automation System Using Arduino and HC-05 Bluetooth Module


Full tutorial :





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, you need not get up to switch on or switch off the device while watching a movie or doing some work

Block diagram






Hardware Requirement
  • Arduino Uno
  • Bluetooth – HC05
  • Led
  • Jumping wire
  • BreadBoard
  • Android smartphone


Software  Requirement
  • Arduino IDE


Just Follow One By One Wire And You Will Do It Perfectly.
For Bluetooth Module:-
1)VCC => 3.3V
2)GND => GND
3)Rx => Tx
4)Tx => Rx


For LED :-
Positive terminal => to pin 13 of Arduino.

Negative terminal 
=> GND of Arduino.

Procedure :-

  1. Make the connections as shown in the above image. Don’t connect the RX & TX pins WHILE/BEFORE  uploading the code !
  2. Copy the code given below.
  3. Download the app called BlueControl (It’s free https://play.google.com/store/apps/details?id=com.giumig.apps.bluetoothserialmonitor click to download). 
  4. Open the app Blue control (It will automatically turn on the device’s Bluetooth). Go to options. Click on “Connect to Robot”. Choose the device – HC 05.
  5. When you are connecting to the Bluetooth module for the first time, it will ask you the password. Enter 0000 OR 1234.
  6.  When the device gets successfully paired with the sensor, the LED lights on sensor will start blinking at a slower rate than usual.
  7. DONE. Copy the code given below & test it out !
                       

Code:


void setup() {
Serial.begin(9600);
 pinMode(8, OUTPUT); // put your setup code here, to run once:
 }

void loop() {
  // put your main code here, to run repeatedly:
 if(Serial.available()>0)
   {     
      char data= Serial.read(); // reading the data received from the bluetooth module
      switch(data)
      {
        case 'a': digitalWrite(13, HIGH);break; // when a is pressed on the app on your smart phone
        case 'd': digitalWrite(13, LOW);break; // when d is pressed on the app on your smart phone
        default : break;
      }
      Serial.println(data);
   }
   delay(50);
}




Full tutorial :
You can see video



copyright@amitjlilhare

Comments