Protecting Personal Electronics with a Virtual Tripwire

To help people protect their valuable electronic devices, Algobotics has created a small board that sends an alert if something is stolen.

Losing your phone

A person's smartphone tends to be one of the most valuable things they carry every single day, and losing it can be disastrous, as a phone can contain photos, banking details, location information, and much more. Overall, smartphone theft has costed nearly 14 billion dollars each year, which is why YouTuber Algobotics decided to make a project in hopes of counteracting this problem.

The plan

Similar to an Apple AirTag, Algobotics's design relies on Bluetooth connectivity with a known phone that is constantly being pinged and sending a response. If the device fails to receive a response in time, then it can assume the phone is now out of range, whether the loss is caused by theft or by simply being misplaced. Most importantly, the circuit will always be actively running in the background so that the loss can always be noticed.

Assembling the hardware

This project uses the XIAO board from Seeed Studio, which is based around the nRF52840 SoC and comes in a very small form factor for better portability. After soldering on a couple of female headers, Algobotics attached a single piezo buzzer module that emits a sound whenever power is applied. In total, these two parts only cost around $12, making them a very inexpensive option for ensuring one's phone never leaves their sight.

How it all works

Upon booting, the nRF52840 first initializes its onboard Bluetooth module and sets up a Bluetooth Low-Energy (BLE) GATT server running a custom service and characteristic. This characteristic can be written to by the phone, and is how the initial password can be sent to put the device into a monitoring mode. From here, it continually sends out periodic packets to the phone and waits for a response to signal that it's still connected. However, a disconnect will cause the buzzer to loudly beep a number of times before the XIAO board resets its internal state.

Testing the device

With the code now compiled and flashed to the board, Algobotics opened the nRF Connect app and selected his BLE device, along with the desired characteristic. He then entered the password and watched as the LED changed from blue to green, indicating a successful connection. But immediately after sensing the phone was out of range, it began to beep, just as intended. For more information, you can watch Algobotics's video here on YouTube.


gatoninja236

IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.

Latest Articles