Introduction
Tracer is an open-source ESP-32 based embedded project that leverages the wide variety of software libraries written for the platform as well as allows for tinkerers to gain insight on the necessary processing and algorithms required to develop their very own fitness tracker. This is a trimmed platform with a powerful IMU and ToF to sense your environment whilst also having WiFi and BLE connectivity.
Before diving further, I have to thank JLCPCB for sponsoring this project. They have been a crucial part of the process by enabling me rapid prototype without any compromises in quality. All of the PCBAs related to this project were prototyped and assembled by them. I highly recommend them as they a high quality, cost, and time-efficient, if you do intend to design and build any boards of your own.
Now back to the project, here are some of the key features;
- Leverage the LSM6DSL to track your objects in real-time.
- VL53L0X Time-of-Flight sensor for gesture control and ranging functions.
- Easy mounting using high-quality velcro straps that allow the unit to be mounted on a wide variety of objects from your bicycle to track lean angles to a tennis racquet for pose insights.
- On-board Li-ion battery charging using the TP4065.
- 5 hours battery life at a sample rate of 100 Hz.
- 30m BLE range (unobstructed)
Specification
- Microcontroller | ESP32-PICO-D4
- WiFi | 802.11b/g/n
- Bluetooth | BLE 4.2
- FLASH | 4MB
- Programming | USB over UART (CP2104)
- Inertial Measurement Unit (IMU) | LSM6DSLTR
- Accelerometer | ±2/±4/±8/±16 g at 1.6 Hz to 6.7KHz
- Gyroscope | ±125/±250/±500/±1000/±2000 DPS at 12.5 Hz to 6.7 kHz
- Time-of-Flight (TOF) | VL53L0X
- Range | Up to 2m
- 1D Gesture Recognition
- Li-ion Battery Management | TP4065
- Power | 700mA 3.3V LDO
- Mounting Options | Velcro Strap or 3x M.2.Screws
Use cases
The example code used to test this design involves close integration with the Madgwick Filter. Using that filter to perform sensor fusion and generate an estimate for heading, roll, and pitch, the data can then be relayed to a smartphone or PC for post-processing. See below for two example
Real-time 3D Visualisation
This 3D visualization is by streaming data over UART to a simple script that was written on [Processing](https://github.com/processing).
Stream real-time data to phyphox

The real-time plots from the IMU are streamed over BLE to the phone. Data can later be exported over CSV for further analysis if required.
Fun fact: I am building the exact same thing 🧐
https://www.homesmartmesh.com/docs/microcontrollers/nrf52/trick_tracker/
If you want we can have a chat and discuss use-cases and ideas, maybe we can merge our projects.