Ushan Fernando

A fitness tracker built using an Arduino Nano 33 BLE Sense. Tracks the user’s step count, walking time, sitting time and standing time.

Technologies used

  • TensorFlow Lite for Microcontrollers
  • P5.js
  • p5.ble.js
  • Chart.js
  • HTML, CSS, JavaScript

Project Enclosure

Fitnetic board internals Fitnetic board enclosure

The above images show the enclosure for the project. A clip was attached to the back of the enclosure using epoxy. The Arduino board is powered by a rechargeable 9V battery.

User Interface

Fitnetic user interface

The user interface that shows the activity information.

Project Build Process

  • The main goal of the project was to build a prototype fitness tracker that used a machine learning model to classify between different activities- walking, sitting, standing.
  • The first step involved collecting data to train the model. For this I used the Tiny Motion Trainer by Google Creative Lab. Following the instructions given on their website, I connected to their online interface and used the following settings:
    • Capturing threshold: 0.08
    • Number of samples: 50
    • Delay between captures: 0.2s
  • I captured 30 data samples for each of walking, sitting, and standing. I then downloaded the csv files to use for training the model.
  • I trained my model on Google Colab using a Python script I wrote (Links to the code given at end of article).
  • Once the model was trained, I downloaded the model.h file and put it in the same folder as the Arduino sketch.
  • After the above steps, I was left with the final task of building the user interface. I decided to use standard web technologies and P5.js as I’m comfortable with using these technologies. The whole project took me a month to build and it was an amazing learning experience.

~ Ushan Fernando😀💻