Skip to main content
Version: FILS English

VitalPi

Meet Your Personal Health Guardian - Real-time Vital Monitoring at Your Fingertips

info

Author: Bachynskyi Roi
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-frihetselsker

Description

It is a stationary health station featuring body temperature, ECG, and air quality sensors allowing evaluate your wellness from home. The system provides immediate notifications and results on site, while transmitting health data wirelessly to the server for remote monitoring and better view.

Motivation

I chose VitalPi to democratize healthcare monitoring, making vital health data accessible to everyone regardless of location or resources. This solution brings decent health monitoring into homes and underserved communities potentially improving health outcomes for those with limited access to regular medical care.

Architecture

Schematics

This diagram reflects the concept of connections of every part in this project.

Architecture


Raspberry Pi Pico 2W

Role: Central controller for the entire health station system

Connections: GPIO pins for all sensors, display, LED, and buzzer

Function: Collects data from sensors, processes readings, manages notifications, and sends data to server


Touchscreen Display

Interface: SPI

Role: User interface for health monitoring station

Connections: GPIO10 - 13, GPIO16 - 22

Function: Displays real-time health metrics, allows user interaction with the system


Temperature Sensor

Interface: I2C

Role: Monitors body or ambient temperature

Connections: GPIO14 and GPIO15

Function: Provides temperature readings for health assessment


Air Quality Sensor

Interface: ADC

Role: Detects air pollutants, VOCs, or specific gases

Connections: GPIO27(ADC1)

Function: Monitors environmental air quality that could affect health


ECG Sensor

Interface: ADC

Role: Captures electrical signals from the heart

Connections: GPIO26(ADC0)

Function: Records cardiac activity for heart health monitoring


BPE-SpO2 Sensor:

Interface: I2C

Role: Measures blood oxygen saturation and pulse rate

Connections: GPIO8 and GPIO9

Function: Monitors oxygen levels in blood and heart rate, critical vital signs for overall health assessment


RGB LED

Interface: PWM

Role: Visual notification system

Connections: GPIO2, GPIO3, and GPIO4 with current-limiting resistors

Function: Color-coded alerts based on sensor readings


Passive Buzzer

Interface: PWM

Role: Audible notification system

Connections: GPIO5

Function: Sounds alerts


Web Application

Interface: Wi-Fi

Role: Data visualization and remote monitoring interface

Features: Displays historical data trends, allows data export for medical professionals

Function: Provides accessible interface for viewing health data

Log

Week 5 - 11 May

Week 12 - 18 May

Week 19 - 25 May

Hardware

VitalPi utilizes a Raspberry Pi Pico 2W microcontroller as its processing core and webbite communicator, paired with a TFT LCD touchscreen (240×320px) for user interaction. Health monitoring is provided through an AD8232 ECG sensor module for cardiac activity, an MLX90614ESF infrared temperature sensor for contactless temperature readings, and a GY-MAX30102 optical heart rate and blood oxygen sensor. Environmental monitoring comes from an MQ135 gas sensor configured with a 10kΩ/20kΩ resistor voltage divider. User notifications are delivered via an RGB LED (with 220Ω current-limiting resistors) for visual alerts and a passive buzzer for audible warnings.

Hardware

Schematics

This is the KiCad Schematics of the project.

KiCAD Schematics

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico 2WThe microcontroller that processes all sensor data and manages wireless connectivity35 RON
2.4" TFT LCD Touchscreen (240×320px)User interface display for viewing health data and interacting with the system54 RON
MLX90614ESF Infrared Temperature SensorNon-contact temperature measurement for body and ambient temperature monitoring60 RON
AD8232 ECG Sensor ModuleSingle-lead electrocardiogram sensor for heart activity monitoring and analysis35 RON
MQ135 Gas SensorAir quality detection for monitoring harmful gases and environmental conditions16 RON
Breakout heart rate sensor GY-MAX30102Pulse oximetry sensor for monitoring blood oxygen levels and heart rate14 RON
Passive Buzzer ModuleAudio notification system for alerts and warnings2 RON
RGB LED Common CathodeVisual status indicator showing system and health conditions through color coding1 RON
3 x 220Ω ResistorsCurrent-limiting components for the RGB LED0,30 RON
1 kΩ ResistorComponent of voltage divider for MQ135 gas sensor0,10 RON
2 kΩ ResistorComponent of voltage divider for MQ135 gas sensor0,10 RON

Software

LibraryDescriptionUsage
embassy-rpEmbassy support for Raspberry Pi RP2350Runs async embedded tasks on Raspberry Pi Pico 2W
embassy-embedded-halAsync implementation of embedded-hal traitsInterfaces with async-compatible embedded peripherals
embassy-syncSynchronization primitives for async embedded RustUsed for mutexes, signals, and channels in concurrent tasks
embassy-executorAsync task executor for bare-metal embedded systemsManages scheduling and running async tasks on the device
embassy-futuresLightweight async utilities for embedded systemsProvides futures and combinators used in async workflows
embassy-timeTimekeeping and delays for embedded systemsUsed for timers, delays, and task timeouts
embassy-netAsync TCP/IP networking stackHandles communication between device and remote server
cyw43Driver for the CYW43 Wi-Fi chipProvides Wi-Fi connectivity to the Raspberry Pi Pico 2W
cyw43-pioPIO-based CYW43 driver implementationAllows communication with CYW43 via the Pico’s PIO
defmtLogging framework optimized for embedded devicesUsed for low-overhead logging during debugging
defmt-rttBackend for defmt using RTT (Real-Time Transfer)Backend for defmt using RTT (Real-Time Transfer)
cortex-m-rtRuntime for Cortex-M microcontrollersSets up interrupt vectors and program entry point
panic-probePanic handler for defmt-enabled embedded appsCaptures and displays panics for debugging
embedded-hal-asyncAsynchronous embedded-hal traitsDefines async traits for interacting with hardware
display-interface-spiSPI interface for display driversProvides abstraction for SPI-based display communication
ili9341Driver for ILI9341 LCD display controllerEnables graphics output to ILI9341-based displays
heaplessData structures that don’t require dynamic memoryUsed for buffers and queues with guaranteed memory use
xpt2046Touchscreen driver for XPT2046Reads user input from resistive touchscreen displays
micromathLightweight math library for microcontrollersUsed for computations like ECG signal processing
embedded-allocMinimal allocator for embedded environmentsEnables dynamic memory allocation in no_std contexts
embedded-canvasDrawing primitives for embedded displaysRenders basic shapes and text to embedded screens
mlx9061xDriver for MLX90614 temperature sensorUsed for contactless infrared temperature measurement
embedded-graphics2D graphics libraryUsed for drawing to the display
  1. Datasheet for MAX30102
  2. Embedded-canvas for better update on the screen