Build a Bluetooth Relay Controller
A Bluetooth relay controller allows electrical devices to be switched ON and OFF wirelessly using a smartphone, tablet or computer. It is one of the simplest and most popular home automation projects and can control lights, fans, pumps, door locks and many other low-voltage or mains-powered devices when used with suitable relay modules. This project demonstrates how to build a Bluetooth-controlled relay system using an HC-05 Bluetooth module, an ESP32 or an Arduino microcontroller.
Project Overview
The Bluetooth module receives commands from a paired smartphone.
The microcontroller interprets these commands and energises or de-energises one or more relay outputs.
The relay contacts can then switch external loads while keeping the control electronics electrically isolated from the load circuit.
Project Difficulty
| Item | Value |
|---|---|
| Difficulty | ⭐⭐ Beginner–Intermediate |
| Build Time | 2–5 Hours |
| Supply Voltage | 5 V DC or 3.3 V (ESP32) |
| Communication | Bluetooth Classic or Bluetooth Low Energy |
| Outputs | 1–16 Relays |
Main Sections
| Section | Function |
|---|---|
| Bluetooth Module | Receives wireless commands. |
| Microcontroller | Processes incoming commands. |
| Relay Driver | Drives the relay coils. |
| Relay Module | Switches external loads. |
| Power Supply | Powers the controller. |
| Status LEDs | Indicate Bluetooth and relay status. |
Popular Bluetooth Modules
| Module | Features |
|---|---|
| HC-05 | Bluetooth Classic, Master/Slave mode. |
| HC-06 | Bluetooth Classic, Slave only. |
| ESP32 | Bluetooth + Wi-Fi built into one chip. |
| HM-10 | Bluetooth Low Energy (BLE). |
Typical Components
| Quantity | Component |
|---|---|
| 1 | Arduino Nano, ESP32 or ATmega328P |
| 1 | HC-05, HC-06 or ESP32 Bluetooth Module |
| 1–16 | Relay Module (5 V) |
| 1 | 5 V Regulated Power Supply |
| Several | LED Indicators |
| Several | Resistors and Connecting Wires |
| 1 | Project Enclosure |
How the Circuit Works
After pairing with a smartphone, the Bluetooth module establishes a serial communication link with the microcontroller.
When the user presses a button in the mobile application, a command is sent via Bluetooth.
The microcontroller decodes the command and activates the corresponding relay output.
The relay contacts switch the connected electrical device independently of the control electronics.
Applications
- Home automation.
- Wireless light switching.
- Garage door control.
- Water pump control.
- Garden irrigation.
- Security systems.
- Industrial automation.
- Remote laboratory equipment.
Testing
- Inspect all wiring connections.
- Verify the supply voltage.
- Pair the Bluetooth module with a smartphone.
- Open the Bluetooth control application.
- Send ON and OFF commands.
- Observe the relay LEDs.
- Verify the relay contacts switch correctly.
- Test the connected load.
Troubleshooting
| Problem | Possible Cause |
|---|---|
| Bluetooth not detected | No power or incorrect module wiring. |
| Cannot pair | Incorrect PIN or module already connected. |
| Relay does not operate | Driver transistor or relay wiring fault. |
| Random relay switching | Electrical noise or floating input pins. |
| Short Bluetooth range | Antenna obstruction or low supply voltage. |
Project Improvements
- Add Wi-Fi control using an ESP32.
- Create a custom Android application.
- Support voice commands.
- Add relay timers and scheduling.
- Store relay states after power failure.
- Include temperature and humidity monitoring.
- Add an OLED status display.
- Support MQTT and Home Assistant integration.
Skills Learned
- Bluetooth communication.
- Serial data transmission.
- Relay control.
- Microcontroller programming.
- Wireless home automation.
- Electrical isolation using relays.
Safety Notes
- Relays provide isolation, but mains wiring must still be handled safely.
- Always disconnect mains power before wiring loads.
- Use relays with voltage and current ratings suitable for the connected equipment.
- Install appropriate fuses where required.
- Keep low-voltage electronics physically separated from mains wiring.
Key Points
- Bluetooth relay controllers provide convenient wireless switching.
- Relays allow low-voltage electronics to control higher-voltage loads.
- HC-05 and ESP32 modules are popular choices for DIY projects.
- Smartphone applications make operation simple and flexible.
- Bluetooth relay controllers are an excellent introduction to home automation and IoT systems.