Bluetooth Relay & Silicon Labs
This project was inspired by a real-world business case that required a wireless-controlled relay used to control a vehicle’s fuel pump or starting mechanism in order to prevent vehicle theft.
In this scenario, the relay is installed inside the vehicle and acts as a Bluetooth Low Energy (BLE) slave. A separate specialized vehicle tracking device (GNSS tracker) acts as the BLE master and controls the relay wirelessly. To explore this concept in practice, I created a small Proof of Concept using the Silicon Labs xG24 Explorer Kit.
Technologies Used
IDE: Simplicity Studio
Platform: Silicon Labs xG24 Explorer Kit
SDK: Simplicity SDK
Project Overview
The goal of this PoC was to implement a simple BLE-controlled relay with predictable behavior on connection and disconnection events. The relay itself is represented by an LED, allowing the focus to remain on software architecture and logic rather than hardware complexity.
The relay behavior is straightforward:
When BLE is connected, the relay is kept OFF by default, and waits for BLE master signal
When BLE is disconnected, a timer starts
If the device remains disconnected for a defined timeout, the relay turns ON
If the connection is restored before the timeout expires, the relay remains OFF
Development Experience
My overall experience with Simplicity Studio was positive. The IDE allows for quick board bring-up and project configuration, which makes it easy to prototype ideas and test assumptions.
For this PoC, I started with the Blinky example and gradually adapted it to the project’s needs. I removed unused GPIO logic, explored timer usage, and modified BLE characteristics. The required documentation was easy to find directly within Simplicity Studio, which helped maintain development momentum.
I also found the Silicon Labs VS Code plugin particularly useful. It provides a clean and efficient workflow for common tasks such as building and flashing firmware, without constantly switching contexts.
Unit Testing
On top of the firmware implementation, I integrated the CppUTest framework to write unit tests for the relay logic. The core logic is intentionally decoupled from hardware and BLE stack details, making it possible to test it in isolation on a host machine.
This setup helps validate behavior such as disconnect timeouts and reconnection handling without relying on physical hardware during every change.
Source Code
If this project sounds interesting, the full source code and implementation details are available on GitHub:



