Skip to main content
Version: ACS CC

GPS Fitness Tracker

A fitness tracking device that monitors physical activity by counting steps and recording GPS-based workouts, providing real-time statistics and storing workout data.

info

Description

This project implements a fitness tracking device using a microcontroller programmed in Rust. The system operates in two modes. In daily mode, it detects steps using accelerometer data, estimates distance and calories, and displays real-time information on a screen. In training mode, activated via a button, it uses GPS data to track position, compute distance and speed, and record the route. The recorded data is saved in GPX format for later analysis.

Motivation

I chose this project because it combines several important aspects of embedded systems, including sensor data processing, GPS-based measurements, and real-time data display. It provides a good balance between hardware interaction and software implementation, while also covering topics such as data acquisition, processing, and storage in a practical context.

Architecture

The system is centered around a processing module running on the STM32 microcontroller. It receives data from the sensor, GPS, and control modules, processes it, then sends the results to the display and storage modules.

Main architecture components:

  • Control Module – handles button input and mode switching
  • Sensor Module – provides motion data for step detection
  • GPS Module – provides position, speed, and time data
  • Processing Module – computes steps, distance, speed, calories, and workout state
  • Display Module – shows real-time activity information
  • Storage Module – saves workout data for later analysis

alt text

Log

Week 5 - 11 May

Ordered hardware components and finished documentation.

Week 12 - 18 May

Finished hardware assembly and created the KiCad schematic. Successfully tested LCD display output, GPS communication and verified MPU6050 sensor.

Week 19 - 25 May

Hardware

The system is built around an STM32 Nucleo development board, which interfaces with multiple peripherals for sensing, display, and storage.

An MPU6050 accelerometer module is used to detect motion and enable step counting. A NEO-6M GPS module provides location data for tracking distance, speed, and route information.

A 2.4" display is used to present real-time data to the user, including activity statistics and system status. User input is handled through push buttons, allowing mode switching and interaction.

Workout data is stored using a microSD card module, enabling later analysis. Additional components such as LEDs are used for status indication, while a breadboard, jumper wires, and resistors are used for prototyping and circuit connections.

Schematics

alt text

Bill of Materials

DeviceUsagePrice
STM32 Nucleo-U545RE-Q The microcontrollerprovided by university
ILI9341 2.4 inch display display for user interface and real-time data visualization80 RON
MPU6050 GY-521 accelerometer moduleMeasures motion and is used for step detection32 RON
MicroSD Card Module Reads and writes data to the microSD card for storing workout logs19 RON
GPS Module NEO6MV2 Provides location data for tracking distance, speed, and route30 RON
microSD Card 8GBStores workout data and GPS logs20 RON
Push buttonUser input for mode switching and interaction5 RON
LEDsStatus indication and debugging5 RON
Breadboard + Jumper Wiresprototyping and connecting components30 RON
ResistorsUsed for LEDs and buttons10 RON

Software

LibraryDescriptionUsage
embassy-rsAsync embedded framework for RustTask scheduling and async execution
embassy-stm32STM32 HAL for embassyUART, SPI, I2C, GPIO peripheral communication
defmtEmbedded logging frameworkDebug messages in terminal
panic-probePanic handler for embedded RustDebugging runtime crashes
embedded-graphics2D graphics libraryDrawing text and interface elements on LCD
  1. https://embedded-rust-101.wyliodrin.com/docs/acs_cc/category/lab
  2. https://docs.embassy.dev/
  3. https://docs.rs/embassy-stm32/latest/embassy_stm32/