Back to Projects

Embedded Heart Rate Monitor

View Code

Real-time heart rate and skin temperature tracking system using Zephyr RTOS and BLE.

Zephyr RTOSCnRF52833BLEI2C
Embedded Heart Rate Monitor

Overview

Developed a wearable embedded system based on the Nordic nRF52833 DK. The device continuously monitors heart rate via differential ADC sampling and skin temperature using an MCP9808 I2C sensor, processing the data in real-time and transmitting it via Bluetooth Low Energy (BLE) to a connected central device.

Key Challenges & Solutions

Zephyr RTOS Stack Overflow

During development, I encountered stack overflow issues in the BLE notification thread due to the large memory footprint of the Bluetooth stack. I used Zephyr's thread analyzer to identify the bottleneck and increased the thread stack size in `prj.conf` to 2048 bytes, resolving the crash without compromising system stability.

BLE Service Architecture

Designed a custom GATT profile with separate characteristics for Heart Rate and Temperature. Implemented the notification mechanism to push updates to the client only when new data was available, optimizing power consumption.

Buffered Differential ADC & I2C Drivers

For heart rate monitoring, I configured the nRF52 SAADC for differential sampling with double-buffering to capture clean signal waveforms. For temperature, I wrote a custom Zephyr sensor driver for the MCP9808, implementing the I2C communication to read high-precision thermal data.

Outcome

Successfully demonstrated a functional prototype capable of streaming live vitals to the Nordic nRF Connect mobile app with <50ms latency.