Skip to content

jayashankar05/Bluetooth-Based-Smart-Home-Automation-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‘ Bluetooth Based Smart Home Automation System

A low-cost, wireless home automation system using Arduino UNO and HC-05 Bluetooth module to control household appliances via a smartphone.


Arduino Bluetooth Language License


πŸ“‹ Table of Contents


πŸ“Œ Project Overview

This mini project demonstrates wireless control of home appliances using the Bluetooth protocol. A smartphone communicates with an HC-05 Bluetooth module interfaced with an Arduino UNO microcontroller. Based on the received character commands, the Arduino toggles a 4-channel relay module that switches connected electrical appliances (bulbs, fans, etc.) ON or OFF.

This project is designed to be affordable, scalable, and easy to implement, making it an ideal starting point for home automation using embedded systems.

Parameter Details
Microcontroller Arduino UNO (ATmega328P)
Communication Bluetooth (HC-05 Module)
Control Unit 4-Channel Relay Module (5V)
Frequency 2.4 GHz ISM Band
Range Up to 10 metres (Class 2)
Power Supply 5V DC (via USB or adapter)
IDE Arduino IDE 2.x
Language C/C++ (Arduino Framework)

πŸ”· Block Diagram

+-------------+        Bluetooth         +------------------+
| Smartphone  |  ──────────────────────> |  HC-05 Module    |
| (Control    |       (2.4 GHz)          |  (Slave Mode)    |
|   App)      |                          +--------+---------+
+-------------+                                   |
                                              UART (RX/TX)
                                                   |
                                          +--------v---------+
                                          |   Arduino UNO    |
                                          |  (ATmega328P)    |
                                          +--------+---------+
                                                   |
                                          Digital Output Pins
                                    ______|_____|_____|______
                                   |      |     |     |      |
                                 Relay1 Relay2 Relay3 Relay4
                                   |      |     |     |      |
                                 Bulb1  Bulb2  Fan1  Fan2

πŸ”© Components Used

S.No Component Quantity Approximate Cost (INR)
1 Arduino UNO (ATmega328P) 1 β‚Ή450 – β‚Ή600
2 HC-05 Bluetooth Module 1 β‚Ή180 – β‚Ή250
3 4-Channel Relay Module (5V) 1 β‚Ή120 – β‚Ή180
4 Bulbs / CFLs / Fans 4 β‚Ή80 – β‚Ή150 each
5 Jumper Wires (M-M, M-F) 1 Set β‚Ή50 – β‚Ή80
6 Breadboard 1 β‚Ή60 – β‚Ή100
7 USB Cable (Type-B) 1 β‚Ή50 – β‚Ή80
8 5V Power Supply / Adapter 1 β‚Ή100 – β‚Ή200
Estimated Total β‚Ή1,090 – β‚Ή1,640

πŸ”Œ Circuit Connections

HC-05 to Arduino UNO

HC-05 Pin Arduino Pin
VCC 5V
GND GND
TXD Pin 10 (RX)
RXD Pin 11 (TX)

⚠️ Note: HC-05 RXD operates at 3.3V logic. Use a voltage divider (1kΞ© + 2kΞ©) on the Arduino TX β†’ HC-05 RX line to prevent module damage.

4-Channel Relay to Arduino UNO

Relay Pin Arduino Pin
IN1 Pin 2
IN2 Pin 3
IN3 Pin 4
IN4 Pin 5
VCC 5V
GND GND

The relay module is active-LOW. Sending LOW (0V) to an IN pin energises the relay and closes the circuit.


βš™οΈ Working Principle

  1. The smartphone runs a Bluetooth terminal application (e.g., Serial Bluetooth Terminal on Android).
  2. The app pairs with the HC-05 module (default PIN: 1234 or 0000).
  3. Single-character commands are sent from the app to the HC-05 module over the 2.4 GHz ISM band.
  4. HC-05 forwards these commands to the Arduino via the UART serial interface (SoftwareSerial on pins 10 & 11).
  5. The Arduino reads the incoming character and toggles the corresponding relay channel.
  6. The relay acts as an electrically controlled switch, connecting or disconnecting the AC supply to the appliance.

✨ Features

  • βœ… Wireless control up to 10 metres range
  • βœ… Controls up to 4 independent appliances
  • βœ… Works with any Android Bluetooth terminal app
  • βœ… No internet or Wi-Fi required
  • βœ… Low-cost implementation (~β‚Ή1,200)
  • βœ… Status feedback via Serial Monitor
  • βœ… Easy to extend to 8-channel or 16-channel relay boards
  • βœ… Safe for 220V AC mains appliances through relay isolation

πŸ’» Arduino Code

The main source code is located at code/smart_home_automation.ino.

Command mapping:

Command Sent Action
1 Appliance 1 ON
2 Appliance 2 ON
3 Appliance 3 ON
4 Appliance 4 ON
5 Appliance 1 OFF
6 Appliance 2 OFF
7 Appliance 3 OFF
8 Appliance 4 OFF
A ALL Appliances ON
Z ALL Appliances OFF

πŸ“± Bluetooth Commands

Full command reference is available in code/bluetooth_commands.md.


πŸš€ How to Use

Step 1 – Hardware Setup

  1. Assemble the circuit as per the wiring diagram in circuit-diagram/wiring_connections.md.
  2. Connect the relay module outputs to AC appliances through proper insulated wiring.

Step 2 – Upload the Code

  1. Install Arduino IDE.
  2. Open code/smart_home_automation.ino in Arduino IDE.
  3. Connect Arduino UNO to your PC via USB.
  4. Select Board: Arduino UNO and correct COM Port.
  5. Click Upload.

Step 3 – Pair the Bluetooth Module

  1. Power on the circuit.
  2. On your Android phone, go to Settings β†’ Bluetooth β†’ Scan.
  3. Pair with HC-05 (PIN: 1234).

Step 4 – Control Appliances

  1. Open Serial Bluetooth Terminal (or any Bluetooth terminal app).
  2. Connect to HC-05.
  3. Send commands (1–8, A, Z) to control appliances.

πŸ“ Project Structure

Bluetooth-Smart-Home-Automation/
β”‚
β”œβ”€β”€ README.md                        ← Project overview (this file)
β”œβ”€β”€ LICENSE                          ← MIT License
β”‚
β”œβ”€β”€ circuit-diagram/
β”‚   β”œβ”€β”€ circuit.png                  ← Schematic diagram
β”‚   β”œβ”€β”€ block_diagram.png            ← System block diagram
β”‚   └── wiring_connections.md        ← Detailed pin connections
β”‚
β”œβ”€β”€ code/
β”‚   β”œβ”€β”€ smart_home_automation.ino    ← Main Arduino source code
β”‚   β”œβ”€β”€ bluetooth_commands.md        ← Command reference sheet
β”‚   └── code_explanation.md         ← Line-by-line code walkthrough
β”‚
β”œβ”€β”€ images/
β”‚   β”œβ”€β”€ setup.jpg                    ← Hardware setup photo
β”‚   β”œβ”€β”€ working.jpg                  ← Live working photo
β”‚   β”œβ”€β”€ components.jpg               ← All components laid out
β”‚   └── output_demo.jpg              ← Output demonstration
β”‚
β”œβ”€β”€ report/
β”‚   └── mini_project_report.pdf      ← Full project report (B.Tech)
β”‚
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ abstract.md
β”‚   β”œβ”€β”€ introduction.md
β”‚   β”œβ”€β”€ objectives.md
β”‚   β”œβ”€β”€ methodology.md
β”‚   β”œβ”€β”€ working_principle.md
β”‚   β”œβ”€β”€ experimental_procedure.md
β”‚   β”œβ”€β”€ pin_configuration.md
β”‚   β”œβ”€β”€ components.md
β”‚   β”œβ”€β”€ advantages.md
β”‚   β”œβ”€β”€ applications.md
β”‚   β”œβ”€β”€ future_scope.md
β”‚   └── conclusion.md
β”‚
β”œβ”€β”€ videos/
β”‚   └── demo_link.txt                ← Link to demo video
β”‚
└── requirements/
    └── required_components.txt      ← Bill of Materials

πŸ”­ Future Scope

  • 🌐 Wi-Fi Integration – Replace HC-05 with ESP8266/ESP32 for internet-based control
  • πŸ—£οΈ Voice Control – Integrate Google Assistant or Amazon Alexa
  • πŸ“± Custom Android App – Build a dedicated MIT App Inventor / Flutter control app
  • πŸ“Š Energy Monitoring – Add ACS712 current sensor to track power consumption
  • πŸ” Security – Add PIN-based authentication for Bluetooth pairing
  • ⏰ Scheduling – Add RTC module (DS3231) to automate appliance timers
  • 🌑️ Smart Sensing – Integrate PIR / temperature sensors for automatic control

🏠 Applications

  • Residential home automation
  • Hostel and dormitory room control
  • Office lighting automation
  • Industrial equipment switching (low-voltage signalling)
  • Prototype for larger IoT-based smart systems

πŸ“„ Resume Summary

Bluetooth Based Smart Home Automation System | B.Tech Mini Project – ECE
Designed and implemented a wireless home automation system using Arduino UNO and HC-05 Bluetooth module. Interfaced a 4-channel relay module to control AC appliances via smartphone. Programmed in C/C++ using the Arduino framework with SoftwareSerial library. Demonstrated wireless communication over 2.4 GHz Bluetooth with a range of up to 10 metres.

Skills demonstrated: Embedded C, Arduino IDE, UART communication, relay interfacing, circuit design, hardware debugging


🏷️ GitHub Topics

arduino  bluetooth  hc-05  relay  home-automation  embedded-systems
arduino-uno  iot  smart-home  softwareserial  ece-project  btech-project
mini-project  wireless-control  uart  c-cpp  microcontroller

πŸ“œ License

This project is licensed under the MIT License – see the LICENSE file for details.


πŸ™‹ Author

B.Tech ECE Student
Department of Electronics and Communication Engineering


⭐ If this project helped you, please give it a star on GitHub!

About

Developed a system to control home appliances using a smartphone via Bluetooth Used Arduino Uno and HC-05 module for wireless communication Controlled multiple devices (bulbs, fans) using a 4-channel relay module Implemented command-based control without requiring internet connection

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages