VitalPi
Meet Your Personal Health Guardian - Real-time Vital Monitoring at Your Fingertips
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.
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.
Schematics
This is the KiCad Schematics of the project.
Bill of Materials
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico 2W | The microcontroller that processes all sensor data and manages wireless connectivity | 35 RON |
2.4" TFT LCD Touchscreen (240×320px) | User interface display for viewing health data and interacting with the system | 54 RON |
MLX90614ESF Infrared Temperature Sensor | Non-contact temperature measurement for body and ambient temperature monitoring | 60 RON |
AD8232 ECG Sensor Module | Single-lead electrocardiogram sensor for heart activity monitoring and analysis | 35 RON |
MQ135 Gas Sensor | Air quality detection for monitoring harmful gases and environmental conditions | 16 RON |
Breakout heart rate sensor GY-MAX30102 | Pulse oximetry sensor for monitoring blood oxygen levels and heart rate | 14 RON |
Passive Buzzer Module | Audio notification system for alerts and warnings | 2 RON |
RGB LED Common Cathode | Visual status indicator showing system and health conditions through color coding | 1 RON |
3 x 220Ω Resistors | Current-limiting components for the RGB LED | 0,30 RON |
1 kΩ Resistor | Component of voltage divider for MQ135 gas sensor | 0,10 RON |
2 kΩ Resistor | Component of voltage divider for MQ135 gas sensor | 0,10 RON |
Software
Library | Description | Usage |
---|---|---|
embassy-rp | Embassy support for Raspberry Pi RP2350 | Runs async embedded tasks on Raspberry Pi Pico 2W |
embassy-embedded-hal | Async implementation of embedded-hal traits | Interfaces with async-compatible embedded peripherals |
embassy-sync | Synchronization primitives for async embedded Rust | Used for mutexes, signals, and channels in concurrent tasks |
embassy-executor | Async task executor for bare-metal embedded systems | Manages scheduling and running async tasks on the device |
embassy-futures | Lightweight async utilities for embedded systems | Provides futures and combinators used in async workflows |
embassy-time | Timekeeping and delays for embedded systems | Used for timers, delays, and task timeouts |
embassy-net | Async TCP/IP networking stack | Handles communication between device and remote server |
cyw43 | Driver for the CYW43 Wi-Fi chip | Provides Wi-Fi connectivity to the Raspberry Pi Pico 2W |
cyw43-pio | PIO-based CYW43 driver implementation | Allows communication with CYW43 via the Pico’s PIO |
defmt | Logging framework optimized for embedded devices | Used for low-overhead logging during debugging |
defmt-rtt | Backend for defmt using RTT (Real-Time Transfer) | Backend for defmt using RTT (Real-Time Transfer) |
cortex-m-rt | Runtime for Cortex-M microcontrollers | Sets up interrupt vectors and program entry point |
panic-probe | Panic handler for defmt-enabled embedded apps | Captures and displays panics for debugging |
embedded-hal-async | Asynchronous embedded-hal traits | Defines async traits for interacting with hardware |
display-interface-spi | SPI interface for display drivers | Provides abstraction for SPI-based display communication |
ili9341 | Driver for ILI9341 LCD display controller | Enables graphics output to ILI9341-based displays |
heapless | Data structures that don’t require dynamic memory | Used for buffers and queues with guaranteed memory use |
xpt2046 | Touchscreen driver for XPT2046 | Reads user input from resistive touchscreen displays |
micromath | Lightweight math library for microcontrollers | Used for computations like ECG signal processing |
embedded-alloc | Minimal allocator for embedded environments | Enables dynamic memory allocation in no_std contexts |
embedded-canvas | Drawing primitives for embedded displays | Renders basic shapes and text to embedded screens |
mlx9061x | Driver for MLX90614 temperature sensor | Used for contactless infrared temperature measurement |
embedded-graphics | 2D graphics library | Used for drawing to the display |