ESP32 Bluetooth Low Energy (BLE) – Connecting to Fitness Band to Trigger a Bulb
Project Hub/Basic Analog & Power Electronics/Discrete & Component Electronics/ESP32 Bluetooth Low Energy (BLE) – Connecting to Fitness Band to Trigger a Bulb
Intermediate
ESP32
₹500 – ₹1,500
3 – 6 Hours
ESP32 Bluetooth Low Energy (BLE) – Connecting to Fitness Band to Trigger a Bulb
Learn how to configure an ESP32 as a Bluetooth Low Energy (BLE) client to detect a nearby fitness band by its unique MAC address and automatically trigger a connected lamp via a relay module.
Originally published by Aswinth Raj on CircuitDigest
This project establishes an automated control system using an ESP32 microcontroller acting as a Bluetooth Low Energy (BLE) client. Programmed via the Arduino IDE, the ESP32 periodically scans its surroundings for specific BLE broadcast signals, looking for the unique MAC address of a target fitness band. When the fitness band comes within range, the ESP32 recognizes the designated hardware identifier and changes the state of one of its digital output pins. Because the ESP32 operates at 3.3V logic and cannot directly drive high-voltage alternating current appliances, this control signal is routed to a relay module. The relay uses an electromagnetic coil—potentially isolated or driven via a transistor circuit like a BC548 if needed—to physically actuate a heavy-duty switch. This mechanical switching action safely bridges or breaks the connection to the AC load, such as a lamp plugged into mains power, causing the light to turn on or off based on the proximity of your wearable device.
Why Build This
Design and implement a practical IoT context-aware home automation prototype using wireless proximity detection.
Gain hands-on experience bridging low-voltage microcontroller logic with high-voltage AC electrical loads safely.
Explore advanced microcontroller communication protocols by configuring the ESP32 as an active BLE client.
Real-World Application
Automated home lighting that turns on when you enter a room wearing a wearable device like a fitness band or smartwatch, and turns off when you leave.
Skills You'll Learn
BLE client scanning
MAC address filtering
GPIO digital output control
relay module interfacing
AC load switching
microcontroller firmware development
Safety Precautions
Warning: The circuit deals with direct 220V AC mains voltage. Exercise extreme caution with live wires and ensure no short circuits occur.
Technology Tags
ESP32
BLUETOOTH LOW ENERGY
BLE CLIENT
RELAY MODULE
SMART HOME AUTOMATION
ARDUINO IDE
C++
WIRELESS PROXIMITY
Ready to build this?
We stock the boards, sensors and modules this project needs. A full parts list is coming soon — for now, browse our DIY Kits & components or search for ESP32 parts.
How do I find the unique MAC address of my fitness band?
You can use the nRF Connect mobile application on your smartphone to scan for nearby Bluetooth Low Energy devices and read their hardware MAC addresses.
Can I connect the AC lamp directly to the ESP32 output pin?
No, absolutely not. The ESP32 outputs 3.3V DC signals which cannot handle AC mains voltage, and direct connection will destroy the board and pose a severe shock hazard. You must use a properly rated relay module to isolate the low-voltage control circuit from the high-voltage load.
Does this project require an active internet connection or router?
No, this system relies entirely on local Bluetooth Low Energy (BLE) communication between your fitness band and the ESP32, so an external Wi-Fi network or internet connection is not necessary.
Gallery
Kitkraft Project Hub — curated from the maker community, credited at the source.