Fitness tracker with breathing assistant
A heart rate based breathing guiding system to help regulate the heart beat through controlled breathing exercises with features for timing and hydration.
Author: Mihon Corina-Cristiana
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-Corina-Mihon
Description
This project is a fitness tracker with a guided breathing assistant. It measures heart rate through a pulse sensor, displays real-time data on a screen, and guides users with visual breathing exercises using an LED indicator. If the rate is too high, an LED pulses in a rhythm that guides the user to breath in and out slowly. The device also includes features for hydration tracking, workout timing, making it a compact welness tool.
Motivation
I chose this project because of the increasing importance of stress management and heart health. By combining heart rate monitoring with breathing exercises, users can make adjustments to improve their physical health. It is a way of integrating technology into wellness practices.
Architecture

The main controller reads physiological data from the pulse sensor and controls an LED for visual breathing guidance. A button connected to the microcontroller allows the user to scroll through the menus (pulse reading, timin, hydration) and a second button allows the users to chose the menu or other settings. The display, also connected to the microcontroller, shows the data. The second microcontroller handles debugging.
Log
Week 5 - 11 May
I connected the main Raspberry Pi Pico 2W with the second one that I use as a debbuger. I also connected the pulse sensor and implemented the basic pulse reading functionality and after that I displayed the measured BPM on the screen.
Week 12 - 18 May
I displayed on the screen the menu for the mode(either exercising or relaxing). I connected the LEd module and added LED feedback to guide breathing during abnormal BPM, implemented PWM for light transitions and added the button to select the mode.
Week 19 - 25 May
I worked at the way the project looks like and I have improved the pulse reading functionality with the logic given by an AI chat.
Hardware
Raspberry Pi Pico 2W: main controller for handling sensor data, controlling the LED
Raspberry Pi Pico 2W: used for debugging
XD-58C pulse sensor: measure the user's heart rate
RBG LED: used for the visual breathing feedback
Button(mode): allows the user to switch between menus
Button(action): allows the user to make choices
1.44'' LCD Display: Displays the heart rate
Schematics

Bill of Materials
| Device | Usage | Price |
|---|---|---|
| Raspberry Pi Pico 2W | The microcontroller | 39.66 RON x 2 |
| XD-58C pulse sensor | The pulse sensor | 15.17 RON |
| 1.44'' LCD Module | Display | 28 RON |
| Button | Press the button to select modes | 2 RON |
| Button | Press the button to scroll | 2 RON |
| RGB LED module | LED light | 5 RON |
Software
| Library | Description | Usage |
|---|---|---|
| embedded-graphics | 2D graphics library | Used for drawing text to the display |
| embassy_embedded_hal | Adapters between Embassy and the standard embedded-hal traits | With shared_bus::blocking::spi::SpiDevice safely shares SPI between display and other peripherals. |
| embassy_executor | The async runtime provided by Embassy for embedded systems | Runs async tasks such as #[embassy_executor::main] and the breathing LED task |
| embassy_time | Provides async-friendly time utilities like timers, delays, and durations | Used for Timer::after, Duration, Instant |
| defmt | Compact and efficient logging system for embedded devices | Used for logging/debugging with info! |
| panic_probe | Handles panics | Reports detailed panic messages during runtime |
| embassy_rp | The embassy hal | Used to access and control the Raspberry Pi Pico W hardware, including GPIOs, ADC, SPI, PWM, and system initialization via init |
| embassy_sync | Provides synchronization primitives for async and sync use | Used to run async code on embedded systems |
| mipidsi | Display driver for ST7735 TFT displays | Used to control SPI-based LCD displays like ST7735s |
Links
- Projects 2023
- link ...