Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino-Based Health Monitoring System with OLED Display and MAX30102 Sensor

View and Edit Project In Cirkit DesignerImage of Arduino-Based Health Monitoring System with OLED Display and MAX30102 Sensor

Health Monitoring System (Wearable) Documentation

Summary

This document provides a detailed overview of a health monitoring system designed to measure heart rate and display the data on an OLED screen. The system uses an Arduino UNO microcontroller, a MAX30102 heart rate and oxygen sensor, and a 0.96" OLED display. The components are interconnected to facilitate data acquisition and display.

Component List

0.96" OLED

MAX30102 Heart Rate and Oxygen Sensor

Arduino UNO

Wiring Details

0.96" OLED

MAX30102 Heart Rate and Oxygen Sensor

Arduino UNO

Code Documentation

/*
 * Health Monitoring System (Wearable)
 * Objective: Create a basic health monitoring system that measures heart rate
 * and temperature.
 * Components: Arduino, heart rate sensor, temperature sensor, OLED display.
 * Description:
 * Use the heart rate sensor to measure the user's pulse and the temperature
 * sensor to record body temperature.
 * Display real-time health data on the OLED screen.
 */

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <SparkFun_MAX3010x.h>

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

MAX30105 particleSensor;

void setup() {
  Serial.begin(115200);
  Wire.begin();

  if (!display.begin(SSD1306_I2C_ADDRESS, OLED_RESET)) {
    Serial.println(F("SSD1306 allocation failed"));
    for (;;);
  }
  display.display();
  delay(2000);
  display.clearDisplay();

  if (!particleSensor.begin(Wire, I2C_SPEED_FAST)) {
    Serial.println(F("MAX30105 was not found. Please check wiring/power."));
    for (;;);
  }
  particleSensor.setup();
  particleSensor.setPulseAmplitudeRed(0x0A);
  particleSensor.setPulseAmplitudeGreen(0);
}

void loop() {
  long irValue = particleSensor.getIR();
  if (irValue > 50000) {
    display.clearDisplay();
    display.setTextSize(1);
    display.setTextColor(SSD1306_WHITE);
    display.setCursor(0, 0);
    display.print(F("Heart Rate: "));
    display.print(irValue);
    display.display();
  }
  delay(1000);
}

This code initializes the OLED display and the MAX30102 sensor, then continuously reads the heart rate data and displays it on the OLED screen. The system is designed to provide real-time health monitoring in a wearable format.