Build Your Own BLE Beacon for Automatic Ride Tracking

Save money and customize your setup with a DIY motion-triggered BLE beacon. For under $3 in components, create an ultra-low-power beacon that lasts years on a single battery.

Automatic ride tracking is one of Rydful's most loved features. When you get on your motorcycle or car, your rides are logged automatically—no need to manually start tracking. But there's a catch: this feature requires a Bluetooth device in your vehicle.

Modern cars often have built-in Bluetooth, but many motorcycles, classic cars, and scooters don't. While you can buy commercial BLE beacons, they have significant drawbacks: quality beacons cost $15-30, and cheap ones often drain their batteries in 2-3 months because they advertise constantly.

For tech enthusiasts and makers, there's a better solution: build your own motion-triggered BLE beacon.

Why Build Your Own Beacon?

The Rydful Beacon project is an open-source, ultra-low-power BLE beacon specifically designed for automatic ride tracking. Unlike commercial beacons that advertise 24/7, this beacon uses motion detection to conserve battery.

Key Benefits

Years of battery life: Powered by a CR2032 coin cell, 2× AAA, or 2× AA batteries, the beacon can last 1.5-2 years (CR2032) or 5-7 years (AA/AAA) with typical commuter use.

Motion-triggered operation: The beacon sleeps at ~4 µA until motion is detected, then starts advertising. This dramatically extends battery life compared to always-on beacons.

Affordable: Total cost for PCB fabrication and components is around $3 per unit when ordering from platforms like JLCPCB.

Customizable: Full control over firmware, power settings, and hardware configuration.

How It Works

The beacon uses a Nordic nRF52832 microcontroller and an LIS3DHTR accelerometer to detect motion. Here's the clever part: the accelerometer monitors for movement at ultra-low power consumption (~2 µA), and when motion exceeds a configurable threshold, it wakes the nRF52 via hardware interrupt. The beacon then starts BLE advertising, allowing the Rydful app to detect your vehicle and automatically start tracking your ride.

After 30 seconds of no motion (configurable), advertising stops and the beacon returns to deep sleep. This state machine ensures minimal power consumption when parked while maintaining instant wake-up when you start riding.

State Current Draw Behavior
Sleep ~3.9 µA Accelerometer monitoring at 1Hz, MCU in deep sleep
Active ~55 µA BLE advertising every 250-400ms, motion resets timeout
Timeout 30 seconds Returns to sleep after no motion detected

Project Components

The Rydful Beacon GitHub repository includes everything you need:

Manufacturing Your PCB

The beacon's PCB can be manufactured on any PCB fabrication platform. JLCPCB is a popular choice due to their low-cost SMT assembly service. Here's what makes this project affordable:

The EasyEDA project files in the repository can be directly imported into JLCPCB's ordering system. You can choose to have the board fully assembled (all SMT components soldered) or do partial assembly if you prefer to hand-solder some components yourself.

Cost Breakdown (per beacon)

PCB + assembly: ~$2-3 (when ordering 5-10 units)

Components: ~$1-2 (nRF52832, LIS3DHTR, passives)

Battery holder + battery: ~$0.50-1.00

Total: ~$3 per beacon (excluding shipping)

Skills and Tools Required

This project is suitable for makers with intermediate electronics experience. Here's what you'll need:

Required Skills

Required Tools and Software

Optional Tools

Development Kit Requirement

The nRF52 Development Kit is essential for flashing firmware to your custom PCB. It connects via SWD (Serial Wire Debug) pins and acts as a programmer. While the initial investment is ~$40-50, the DK can be reused indefinitely for programming multiple beacons or other nRF52 projects.

The repository includes detailed instructions for connecting the DK to your custom PCB and flashing the firmware using the west flash command.

Building Your Beacon: Step-by-Step

1. Order the PCB

Download the EasyEDA project files from the hardware directory in the repository. Upload the Gerber files to JLCPCB (or your preferred PCB manufacturer) and select SMT assembly. Choose the components from JLCPCB's parts library based on the BOM provided.

2. Set Up the Development Environment

Install the nRF Connect SDK following Nordic's official documentation. This includes the Zephyr RTOS, toolchain, and West build system. Clone the Rydful Beacon repository to your local machine.

3. Build the Firmware

Navigate to the project directory and build the firmware for your target board:

west build -b rydful_custom -p -- -DBOARD_ROOT=.

This compiles the firmware into a .hex file ready for flashing.

4. Flash Your Beacon

Connect your nRF52 DK to your custom PCB via SWD pins (SWDIO, SWDCLK, GND, VTG). Power the custom PCB with a battery or external supply. Set the DK's power switch to "VDD" mode and connect the DK to your computer via USB. Flash the firmware:

west flash

The DK will program your beacon's nRF52832 chip. Detailed wiring diagrams are available in the repository's README.

5. Test and Deploy

Once flashed, the beacon will initialize and enter sleep mode. Shake or move the beacon to trigger motion detection—it should start advertising. Open the Rydful app and verify the beacon appears in the Bluetooth device list. Mount the beacon in your vehicle (under the seat, in the glovebox, etc.) and configure automatic ride tracking.

Battery Options and Lifespan

One of the beacon's standout features is its flexible power options. You can choose the battery that best fits your use case:

Battery Type Capacity Commuter Use (2h/day) Best For
CR2032 coin cell ~150 mAh* 1.5-2 years Compact installations
2× AAA alkaline ~1,000 mAh 5-7 years** Most motorcycles
2× AA alkaline ~2,400 mAh 5-7 years** Long-term installs
2× AA lithium ~3,000 mAh 10+ years** Extreme cold climates

*CR2032 capacity reduced due to pulse current during BLE transmission
**Limited by battery self-discharge, not device consumption

The battery life calculations account for real-world usage patterns. For a typical commuter who rides 2 hours per day (morning and evening commute), the beacon is active only during those periods and spends the remaining 22 hours in ultra-low-power sleep mode.

Why This Matters for Rydful Users

Automatic ride tracking transforms how you use Rydful. Instead of remembering to start tracking every time you ride, your trips are logged automatically as soon as you get on your motorcycle or in your car. This ensures accurate mileage records for fuel consumption tracking, maintenance scheduling, and expense logging.

By building your own beacon, you gain:

Ready to Track Your Rides Automatically?

Download Rydful to start tracking your motorcycle rides, fuel consumption, and maintenance—automatically or manually.

Get Rydful on Google Play

Getting Started

The complete source code, hardware files, and documentation are available on the Rydful Beacon GitHub repository. The project is open-source under the Apache 2.0 license, so you're free to modify, improve, and share your designs.

If you're new to embedded development, start by ordering an nRF52 DK and experimenting with the development board's built-in sensors. The repository includes a nrf52dk_nrf52832.overlay device tree file specifically for testing with the DK before building a custom PCB.

For questions, issues, or to share your build, visit the repository's Issues page or start a discussion. The embedded development community is collaborative and helpful—don't hesitate to ask for guidance.

Final Thoughts

Building your own BLE beacon is a rewarding project that combines practical utility with technical learning. Whether you're a motorcycle enthusiast looking to optimize your Rydful experience or a maker exploring ultra-low-power embedded systems, this project offers a perfect balance of challenge and payoff.

With a few dollars in components, a weekend of assembly and programming, and a dash of curiosity, you'll have a custom beacon that lasts for years and makes automatic ride tracking effortless.

Happy building—and safe riding!