{"id":28163743,"url":"https://github.com/parikshitsah/pulse_oximeter","last_synced_at":"2026-05-06T13:36:25.496Z","repository":{"id":289354832,"uuid":"968317370","full_name":"ParikshitSah/pulse_oximeter","owner":"ParikshitSah","description":"A pulse oximeter for Raspberry Pi Pico W using MAX30103 and BLE","archived":false,"fork":false,"pushed_at":"2025-05-12T16:04:32.000Z","size":251,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T17:25:27.381Z","etag":null,"topics":["ble","bluetooth-low-energy","micropython","micropython-rpi-pico","pico-w","raspberry-pi","raspberry-pi-pico","rp2040"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ParikshitSah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-17T21:50:23.000Z","updated_at":"2025-05-12T16:04:36.000Z","dependencies_parsed_at":"2025-05-12T17:35:05.554Z","dependency_job_id":null,"html_url":"https://github.com/ParikshitSah/pulse_oximeter","commit_stats":null,"previous_names":["parikshitsah/pulse_oximeter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ParikshitSah/pulse_oximeter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParikshitSah%2Fpulse_oximeter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParikshitSah%2Fpulse_oximeter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParikshitSah%2Fpulse_oximeter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParikshitSah%2Fpulse_oximeter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ParikshitSah","download_url":"https://codeload.github.com/ParikshitSah/pulse_oximeter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParikshitSah%2Fpulse_oximeter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262628262,"owners_count":23339763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ble","bluetooth-low-energy","micropython","micropython-rpi-pico","pico-w","raspberry-pi","raspberry-pi-pico","rp2040"],"created_at":"2025-05-15T11:14:22.558Z","updated_at":"2026-05-06T13:36:25.424Z","avatar_url":"https://github.com/ParikshitSah.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pulse Oximeter with BLE for Raspberry Pi Pico W\n\n**Author:** Parikshit Sah\n**Date:** May 5th, 2025\n\n---\n\n## Overview\n\nThis project implements a wireless pulse oximeter using the MAX30101 sensor and a Raspberry Pi Pico W. It reads SpO2 (blood oxygen saturation) and pulse data, processes the signals, and transmits the results over Bluetooth Low Energy (BLE) to a mobile device or computer.\n\n- **SpO2 and BPM Calculation:** Signal processing and peak detection are used to compute SpO2 and heart rate (BPM).\n- **BLE Transmission:** Results are sent wirelessly using a custom BLE health service.\n- **MicroPython:** All code is written for MicroPython running on the Pico W.\n\n### Developed Pulse Oximeter\n![IMG_9977](https://github.com/user-attachments/assets/34dceb07-63f0-4844-9037-b74eaf3de6dd)\n\n### Sample IR readings \n![[sample readings/Steph finger white.png](https://github.com/ParikshitSah/pulse_oximeter/blob/979a6c61def44bd23dcdfe8769e3357dd3f3bac2/sample%20readings/Steph%20finger%20white.png))](https://github.com/ParikshitSah/pulse_oximeter/blob/979a6c61def44bd23dcdfe8769e3357dd3f3bac2/sample%20readings/steph%20white%20finger.png)\n\n\n---\n\n## Directory Structure\n\n```\n├── ble_test.py\n├── lib\n│   ├── ble_advertising.py\n│   ├── ble_health.py\n│   └── oximeter.py\n├── main.py\n├── README.md\n├── Steph finger white.png\n└── steph white finger.png\n```\n\n---\n\n## File Descriptions\n\n### main.py\n\n- Runs the main oximeter routine.\n- Reads data from the MAX30101 sensor, processes it, and calculates SpO2 and BPM.\n- Sends average SpO2 and BPM over BLE after every 4 readings using the BLEHealthService.\n\n\u003e **Note: The program currently uses custom (non-standard) BLE Service and Characteristic UUIDs, not the official Bluetooth SIG Pulse Oximeter UUIDs.**\n\n### ble_test.py\n\n- Example script to demonstrate the BLE health service.\n- Sends random SpO2 and BPM values over BLE for testing.\n\n### lib/oximeter.py\n\n- Handles I2C communication with the MAX30101 sensor.\n- Implements signal processing: DC removal, moving average, peak detection, SpO2 and BPM calculation.\n\n### lib/ble_health.py\n\n- Implements a BLE service with custom characteristics for SpO2 and BPM.\n- Handles BLE advertising, connections, and notifications.\n\n### lib/ble_advertising.py\n\n- Helper functions for building BLE advertising payloads.\n\n---\n\n## Hardware Requirements\n\n- Raspberry Pi Pico W\n- MAX30101 Pulse Oximeter Sensor\n\n---\n\n## Usage\n\n1. **Flash MicroPython** onto your Pico W if not already done.\n2. **Copy the repository files** to your Pico W (using Thonny, rshell, or similar).\n3. **Connect the MAX30101 sensor** to the Pico W via I2C (default: SDA=16, SCL=17).\n4. **Run `main.py`** to start reading and broadcasting SpO2/BPM.\n5. **Use a BLE app** (e.g., nRF Connect) to scan and connect to the device. Look for `PicoW_Oximeter`.\n6. **Optionally, run `ble_test.py`** to test BLE functionality with random data.\n\n---\n\n## Signal Processing \u0026 Calculation\n\n- **Moving Average Filter:** Smooths the raw IR/RED signals.\n- **Peak Detection:** Identifies heartbeats in the filtered signal.\n- **SpO2 Calculation:** Uses the ratio of ratios method from [DOI 10.1088/0967-3334/27/1/R01](https://iopscience.iop.org/article/10.1088/0967-3334/27/1/R01)\n- **BPM Calculation:** Based on the average interval between detected peaks.\n\n---\n\n## Customization\n\n- Adjust sample window, filter size, and thresholds in `main.py` and `oximeter.py` for your use case.\n- BLE device name and advertising interval can be set in `main.py` and `ble_health.py`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparikshitsah%2Fpulse_oximeter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparikshitsah%2Fpulse_oximeter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparikshitsah%2Fpulse_oximeter/lists"}