Bluetooth Control Home Automation Using Esp 32

Hello, Friends Welcome to my Channel "Electrify Circuit". This video is Bluetooth Control Home Automation Using Esp 32 (BLE).

projectImage

Things used in this project

 

Hardware components

HARDWARE LIST
1 DFRobot FireBeetle ESP32 IOT Microcontroller (Supports Wi-Fi & Bluetooth)
1 Relay Module (Generic)
1 Breadboard (generic)
1 Jumper wires (generic)
1 Wire, Wrapping Wire

Software apps and online services

 

Arduino IDE

 

MIT App Inventor

Story

 

Bluetooth Control Home Automation Using Esp 32 (BLE

projectImage

Hello, Friends Welcome to my Channel "Electrify Circuit". This video is Bluetooth Control Home Automation Using Esp 32 (BLE). Control Home Appliances Using Andriod Phone App it's very used for a handicapped person.

 

For the last few years, the wireless world has been bombarded daily with information about a new generation of radio frequency(RF) technologies that would profoundly impact. if not revolutionize.the way we bye and contact our businesses.

 

‘The wireless-networking standard technology called Bluetooth has quietly become a common way to replace the wires on short distances. With a gadget such as a smartphone (Android Phone) or a tablet featured with a Bluetooth module, a wireless connection is the easiest way to send and receive information, And because this technology spread in the prototyping circuit, it’s often used to control things wirelessly.

 

This project work explains how to control electrical appliances using an Android device. Operating conventional wall switches is difficult for physically handicapped or elder people. This project provides the solution to this problem by integrating all the electrical appliances into a control unit that can be operated by an Android application device (Android smartphone or Tablet). The proposed system controls the electrical loads based on the data transmitted by the Android device. An android application should be installed in the user's mobile or tablet to control the electrical loads, Using this android application user can send the commands to the Bluetooth module to control the electrical loads. The wireless technology used in this project is Bluetooth It can also be called an “Android-based Home AutomationSystem” or “Remote Password Operated Electronic Home Appliances Control System”.

 

Mager Components

 

Esp 32 (BLE):- ESP32 has a lot more features than ESP8266 and it is difficult to include all the specifications in this Getting Started with ESP32 guide. So, I made a list of some of the important specifications of ESP32 here. But for a complete set of specifications, I strongly suggest you refer to the Datasheet.

 

Specifications:-

 

-Single or Dual-Core 32-bit LX6 Microprocessor with clock frequency up to 240 MHz.

 

-520 KB of SRAM, 448 KB of ROM, and 16 KB of RTC SRAM.

 

-Supports 802.11 b/g/n Wi-Fi connectivity with speeds up to 150 Mbps.

 

-Support for both Classic Bluetooth v4.2 and BLE specifications.

 

-34 Programmable GPIOs.

 

-Up to 18 channels of 12-bit SAR ADC and 2 channels of 8-bit DAC

 

-Serial Connectivity include 4 x SPI, 2 x I2C, 2 x I2S, 3 x UART.

 

-Ethernet MAC for physical LAN Communication (requires external PHY).

 

-1 Host controller for SD/SDIO/MMC and 1 Slave controller for SDIO/SPI.

 

-Motor PWM and up to 16-channels of LED PWM.

 

-Secure Boot and Flash Encryption.

 

Relay:- Relays are the most commonly used switching device in electronics. Let us learn how to use one in our circuits based on the requirement of our project.

 

Features of 5-Pin 5Volt Relay

 

-Trigger Voltage (Voltage across coil) : 5V DC

 

-Trigger Current (Nominal current) : 70mA

 

-Maximum AC load current: 10A @ 250/125V AC

 

-Maximum DC load current: 10A @ 30/28V DC

 

-Compact 5-pin configuration with plastic moulding

 

-Operating time: 10msec Release time: 5msec

 

-Maximum switching: 300 operating/minute (mechanically)

projectImage

Relay Pin ConfigurationCoil 1:- Used to trigger(On/Off) the Relay, Normally one end is connected to 5V and the other end to the ground.

 

Coil 2:- Used to trigger(On/Off) the Relay, Normally one end is connected to 5V and the other end to the ground.

Common (COM):- Common is connected to one End of the Load that is to be controlled.

 

Normally Closed (NC):- The other end of the load is either connected to NO or NC. If connected to NC the load remains connected before the trigger.

 

Normally Open (NO):- The other end of the load is either connected to NO or NC. If connected to NO the load remains disconnected before the trigger.

 

Required Components:-

 

-Esp 32 (BLE)

 

-Breadboard

 

-5v Relay Module

 

-Jumper wire

 

-Bulb Holder

 

-1.00 sqmm Wire

 

Tutorial Video:

Circuit Diagram Relay Module:

projectImage
projectImage

Schematics

 

Circuit Diagram

projectImage

Code

 

CODE
//This Video Making by Electrify Circuit Subscribe this Channel
//https://www.youtube.com/channel/UCIr4PGxiEQWmYswJPueRlMQ
// Like this facebook Page: https://www.facebook.com/Electrify-Circuit-108154251467438
// Follow In Instagram: https://www.instagram.com/electric_circuit_099/
// View Blog: https://electriccircuitarduino.blogspot.com/
//--------------------Electrify Circuit--------------------------------
#include "BluetoothSerial.h" 

BluetoothSerial ESP_BT; 

int Room_Ligth_1 = 13;
int Room_Ligth_2 = 12;
int Room_Ligth_3 = 14; 
int TV = 27;
int Fan = 26;    

int incoming;

void setup() {
  Serial.begin(19200);
  ESP_BT.begin("Electrify Circuit"); 

  pinMode (Room_Ligth_1, OUTPUT);
  pinMode (Room_Ligth_2, OUTPUT);
  pinMode (Room_Ligth_3, OUTPUT);
  pinMode (TV, OUTPUT);
  pinMode (Fan, OUTPUT);
}

void loop() {
  
  
  if (ESP_BT.available()) 
  {
    incoming = ESP_BT.read(); 

    
    int button = floor(incoming / 10);
    int value = incoming % 10;
    
    switch (button) {
      case 1:  
        Serial.print("Button 1:"); Serial.println(value);
        digitalWrite(Room_Ligth_1, value);
        break;
      case 2:  
        Serial.print("Button 2:"); Serial.println(value);
        digitalWrite(Room_Ligth_2, value);
        break;
      case 3:  
        Serial.print("Button 3:"); Serial.println(value);
        digitalWrite(Room_Ligth_3, value);
        break;
      case 4:  
        Serial.print("Button 4:"); Serial.println(value);
        digitalWrite(TV, value);
        break;
      case 5:  
        Serial.print("Button 5:"); Serial.println(value);
        digitalWrite(Fan, value);
        break;
    }
  }
}

The article was first published in hackster, January 22, 2022

cr: https://www.hackster.io/electrify_circuit/bluetooth-control-home-automation-using-esp-32-ed87b5

author: electrify_circuit

License
All Rights
Reserved
licensBg
0