Skip to main content
Version: FILS English

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.

info

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

DiagramFinal

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

schemaFinalKicad PozaFinal

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico 2WThe microcontroller39.66 RON x 2
XD-58C pulse sensorThe pulse sensor15.17 RON
1.44'' LCD ModuleDisplay28 RON
ButtonPress the button to select modes2 RON
ButtonPress the button to scroll2 RON
RGB LED moduleLED light5 RON

Software

LibraryDescriptionUsage
embedded-graphics2D graphics libraryUsed for drawing text to the display
embassy_embedded_halAdapters between Embassy and the standard embedded-hal traitsWith shared_bus::blocking::spi::SpiDevice safely shares SPI between display and other peripherals.
embassy_executorThe async runtime provided by Embassy for embedded systemsRuns async tasks such as #[embassy_executor::main] and the breathing LED task
embassy_timeProvides async-friendly time utilities like timers, delays, and durationsUsed for Timer::after, Duration, Instant
defmtCompact and efficient logging system for embedded devicesUsed for logging/debugging with info!
panic_probeHandles panicsReports detailed panic messages during runtime
embassy_rpThe embassy halUsed to access and control the Raspberry Pi Pico W hardware, including GPIOs, ADC, SPI, PWM, and system initialization via init
embassy_syncProvides synchronization primitives for async and sync useUsed to run async code on embedded systems
mipidsiDisplay driver for ST7735 TFT displaysUsed to control SPI-based LCD displays like ST7735s
  1. Projects 2023
  2. link ...