KrïtikaDr. Umesh DuttaVikas SharmaVaishnavi
Published

Smart Home Automation with Bluetooth Control

Experience innovative home automation by wirelessly managing multiple appliances via Bluetooth, enhancing convenience and efficiency.

BeginnerFull instructions provided528
Smart Home Automation with Bluetooth Control

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
The microcontroller board that controls the system.
×1
4-CHANNEL RELAY CONTROLLER FOR I2C
ControlEverything.com 4-CHANNEL RELAY CONTROLLER FOR I2C
Controls up to four appliances by switching them on or off.
×1
Jumper wires (generic)
Jumper wires (generic)
Used for all electrical connections.
×1
Psd3304 Power
Provides power to the Arduino and relay module
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
Enables wireless communication with a smartphone.
×1
extension Board
Facilitates connections for multiple appliances.
×1
LED Light Bulb, Frosted GLS
LED Light Bulb, Frosted GLS
The load connected to one of the relays as an example.
×1

Software apps and online services

Arduino IDE
Arduino IDE
The Integrated Development Environment used for writing and uploading the Arduino code.
BlueApp.io
BlueApp.io
A mobile app (like Bluetooth Terminal) used to send commands to the HC-05 module. You may also create a custom app if desired.
Tinkercad
Autodesk Tinkercad
Online platform for designing and simulating circuits, allowing you to visualize and test your project virtually.

Story

Read more

Schematics

Wireless Control of Home Appliances via Bluetooth

The circuit diagram features an Arduino connected to a PSD3304 power source, with control pins linked to a 4-channel relay module that manages up to four appliances. Each relay activates or deactivates an appliance based on commands. An HC-05 Bluetooth module is integrated for wireless communication, enabling smartphone control of the appliances. All components share a common ground for stability.

Code

Arduino-Based Bluetooth Home Automation System

C/C++
Pin Definitions: Assigns pins for 4 appliances.
Setup Function: Initializes serial communication and configures pins as output.
Loop Function: Continuously checks for incoming data.
Command Handling: Turns appliances ON/OFF based on commands ('A' to 'H').
Real-time Control: Enables real-time control of appliances.
// Define pin numbers for the LEDs (or appliances)
int led1 = 12; // Pin for the first appliance
int led2 = 11; // Pin for the second appliance
int led3 = 10; // Pin for the third appliance
int led4 = 9;  // Pin for the fourth appliance (connected to the bulb)

// Setup function runs once when you power on or reset the Arduino
void setup() {
  Serial.begin(9600); // Start serial communication at 9600 baud rate
  // Set each LED pin as an OUTPUT
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
  pinMode(led4, OUTPUT);
}

// Loop function runs continuously
void loop() {
  char inbyte; // Variable to store incoming serial data
  // Check if there's data available to read
  if (Serial.available() > 0) {
    inbyte = Serial.read(); // Read the incoming byte
    Serial.print(inbyte); // Print the received byte to the Serial Monitor

    // Control LED1 (or appliance 1)
    if (inbyte == 'A') { // If 'A' is received, turn ON
      digitalWrite(led1, HIGH); // Turn on LED1
    }
    if (inbyte == 'B') { // If 'B' is received, turn OFF
      digitalWrite(led1, LOW); // Turn off LED1
    }

    // Control LED2 (or appliance 2)
    if (inbyte == 'C') { // If 'C' is received, turn ON
      digitalWrite(led2, HIGH); // Turn on LED2
    }
    if (inbyte == 'D') { // If 'D' is received, turn OFF
      digitalWrite(led2, LOW); // Turn off LED2
    }

    // Control LED3 (or appliance 3)
    if (inbyte == 'E') { // If 'E' is received, turn ON
      digitalWrite(led3, HIGH); // Turn on LED3
    }
    if (inbyte == 'F') { // If 'F' is received, turn OFF
      digitalWrite(led3, LOW); // Turn off LED3
    }

    // Control LED4 (or appliance 4)
    if (inbyte == 'G') { // If 'G' is received, turn ON
      digitalWrite(led4, HIGH); // Turn on LED4
    }
    if (inbyte == 'H') { // If 'H' is received, turn OFF
      digitalWrite(led4, LOW); // Turn off LED4
    }
  }
}

Credits

Krïtika

Krïtika

4 projects • 2 followers
:)
Dr. Umesh Dutta

Dr. Umesh Dutta

42 projects • 60 followers
Working as Director of Innovation Centre at Manav Rachna, India. I am into development for the last 12 years.
Vikas Sharma

Vikas Sharma

4 projects • 5 followers
Vaishnavi

Vaishnavi

3 projects • 1 follower
Beginner

Comments