Close
0%
0%

Tracer | A Wearable for Things!

The Tracer is an open-source ESP32-based Inertial Measurement Unit tracker

YJYJ
Similar projects worth following
Starting from
$39.00
basicbro has 3 orders / 0reviews
Ships from United Kingdom
Have you ever wanted to stick an IMU on a thing to trace its pose and motion? Tracer provides reliable, high-performance, and cost-efficient tracking of objects for various applications. Tracer can be easily mounted using a high-quality velcro strap, allowing it to be fastened on the bicycle's frame for lean and cadence tracking or even the neck of a tennis racquet to count the number of strokes and potentially differentiate between topspin and slice. Let your imagination run wild!

Leveraging on existing open-source projects, the Tracer fully supports integration with Phyphox and can be programmed using Micropython and Arduino. Power users can also use the ESP-IDF tool for maximum customization. Video of the demo here (https://www.youtube.com/watch?v=bZTHZ-QFxR4)

Introduction

Tracer is an open-source ESP-32-based embedded project that leverages the wide variety of software libraries written for the platform and allows tinkerers to gain insight into 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 while 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 compromising quality. All of the PCBAs related to this project were prototyped and assembled by them.  I highly recommend them for the high quality, cost, and time-efficient, if you 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 allows the unit to be mounted on various objects, from your bicycle to track lean angles to a tennis racquet for pose insights.
  • On-board Li-ion battery charging using the TP4065.
  • Battery Life - 2.5 hours of continuous streaming over BLE at 10Hz.
  • 15m BLE range (unobstructed) - tested on a tennis court

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 (Swappable to VL53L1X)
    • Range | Up to 2m
    • 1D Gesture Recognition
  • Li-ion Battery Management | TP4065
  • Power | 700mA 3.3V LDO
  • Mechanical
    • Weight | 20g, including velcro strap
    • Dimensions | 4.2 x 3.6 cm
    • 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 examples.

Real-time 3D Visualisation

This 3D visualization is by streaming data over UART to a simple script 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. This example shows the Tracer streaming the accelerometer data and no. of tennis ball strikes over Phyphox.

Real-time gesture recognition using Edge Impulse

This example illustrates the Tracer's ability to be highly customizable to suit a wide variety of applications and specifications. Using the Edge Impulse platform, I was able to train a neural network that would then run on the ESP32 natively to track a certain gesture or activity. More details on this here.


  • 1 × ESP32-PICO-D4 Microcontroller
  • 1 × LSM6DSLTR Inertial Measurement Unit
  • 1 × VL53L0X Time-of-Flight
  • 1 × TP4065 Battery Management IC
  • 1 × JLCPCB Custom PCB PCB

View all 7 components

  • Using Edge Impulse with Tracer to build your own custom gesture/activity tracker

    YJ3 days ago 0 comments

    I have been inspired over the last few weeks by Fabio's project with Edge Impulse and how the Tracer platform can be used to leverage the ESP32's processing power to run neural network classifiers of activities and gestures. In this example, I will go through the steps needed to train your own neural network and show it performing live classification with data streamed directly from the board. 

    I wrote an Arduino sketch that would spit out the 3-axis accelerometer and 3-axis gyrometer at a frequency of 100Hz. The experiment I had in mind was basically to use Tracer as a classifier that could tell if it was moving horizontally, vertically, "caterpillar" (move in a jagged way horizontally), and waving. A dataset of 10s was collected for each of the movements.

    Once I had an idea of what I wanted to build, I followed the steps shown in the video tutorial from Edge Impulse in getting a model trained up as well as a k-means-based anomaly detector.

    The initial model that was trained showed inaccuracies when it came to classifying a wave and that is due to several reasons but I think it was primarily due to not having enough data. The table below shows the confusion matrix for the first training cycle with the original dataset.

    Following that, I wanted to see if collecting more data would improve so I spent another 10 seconds collecting data for wave, and it improved slightly. I think more data in each category should improve the neural network's specificity and sensitivity. The accuracy improved across the board while the error rates also dropped.

    Here is a short video example of how the live classification tool is being used on the data that is streaming directly from Tracer over USB (UART). The next step for me is to deploy a real-time classifier for tennis shots that will run on the ESP32 and stream the results over BLE.

    And again as before, really happy to hear any feedback, ideas or suggestions!

  • Register your interest on Tindie

    YJ04/21/2022 at 17:28 0 comments

    Hi all,

    I am grateful for the warm reception, the development units I had sold out in less than 12 hours and I plan to place an order towards the end of the month. Please register your interest if you are keen on getting hold of this;
    It will ship with the board itself and a high-quality velcro strap that can quickly get you started gaining insights. Due to restrictions on Lithium-Ion batteries, you will have to source the LIR2450 on your own but that is quite commonly available and can be found on Amazon and RS for example. 

    Eager to get these boards out there to see what interesting applications can arise through the open-source community! Also, any feedback is greatly appreciated. 

    Best, 

    YJ

  • Smaller Tracer designed and manufactured

    YJ04/18/2022 at 21:17 0 comments

    Hi all,

    Just a small update with hopefully bigger ones imminent. I have received my new Tracer boards that are now smaller and have a better-suited LDO with a very low forward drop to increase the usable range of battery voltages from the coin cell battery.

    I am currently planning the following activities; 

    1. Testing it out for tennis stroke counting - Done
    2. Tracking bicycle cadence - Done
    3. Using it to synchronize blade strokes at my local rowing club 
    4. Power measurements and optimization - Done
    5. Syncing with camera footage to add data points and improve the usability 
    6. Create a Tracer "hub" to synchronize several modules. Still thinking about the best way to do this as BLE might be a little limiting. Feel free to suggest :) 
    7. Setting up a Crowdsupply campaign to get the hardware out to you! - On Tindie for now

    Thank you all for liking and following this project it means a lot to me and it helps me keep going! 
    Best,

    YJ

View all 3 project logs

Enjoy this project?

Share

Discussions

Alex Nesta, PhD wrote 05/01/2022 at 12:32 point

Hello, are you planning on making your app open source? I have a very similar project and would love to see how someone else implement the Bluetooth data stream.

  Are you sure? yes | no

Zeke Sarosi wrote 05/01/2022 at 08:20 point

Wondering if you have implemented any way to correct for the influence of gravity in terms of acceleration… let me know, working a similar project.

  Are you sure? yes | no

parkview78 wrote 04/18/2022 at 03:42 point

Yes, me too, I would love to see your ESP32 code using those sensors  :-)

  Are you sure? yes | no

Mirko wrote 04/06/2022 at 05:34 point

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.

  Are you sure? yes | no

YJ wrote 04/06/2022 at 08:01 point

Hi Mirko, your project looks really interesting!  Thank you for sharing.

  Are you sure? yes | no

Ross Reedstrom wrote 03/23/2022 at 15:26 point

To copy my comments over from reddit - would love to see an open alternative to the Moov Now (look there for additional interesting applications in fitness)

  Are you sure? yes | no

YJ wrote 03/23/2022 at 15:40 point

Thanks, Ross.

That's my motivation here as an avid cyclist and tennis player.

  Are you sure? yes | no

Ar wrote 03/22/2022 at 14:49 point

Are the files for this project open-source anywhere? ^__^

  Are you sure? yes | no

YJ wrote 03/24/2022 at 10:02 point

Hi, Thanks for your interest. I am in the midst of just compiling the files together and adding the necessary documentation — I will update here when it is done.

  Are you sure? yes | no

Ar wrote 03/24/2022 at 10:05 point

Oh thank you, will be waiting ^__^

  Are you sure? yes | no

Matias Piipari wrote 04/19/2022 at 07:00 point

I also would be interested of seeing the files, and would be happy to contribute to firmware (I have wanted to build basically exactly this).

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates