Patient Health Monitoring Project - Complete DIY Tutorial & Code⭐ Featured
Both
Patient Health Monitoring Project - Complete DIY Tutorial & Code
Contact for pricing· Completed

Introduction & Project Overview Hospitals and home caregivers often need a way to continuously track a patient's vital signs without requiring constant manual checks by nursing staff. The Patient Health Monitoring Project addresses this by combining a heart rate sensor and a body temperature sensor into a single wearable-friendly device that displays live vitals locally and streams the same data to an IoT dashboard, allowing doctors or family members to check on a patient's condition remotely in real time. This project is an outstanding Final Year Project (FYP) or semester project for Biomedical, Electrical, and Computer Science students because it demonstrates a complete, socially impactful remote patient monitoring pipeline — from raw sensor signal to cloud-based visualization — which is exactly the kind of applied healthcare technology project that stands out at a thesis defense.

Contact Us About This Project

Working Process

Key Features & Functionality

Continuously measures patient heart rate (BPM) via a fingertip pulse sensor
Continuously measures patient body temperature using a contactless or contact temperature sensor
Displays both vitals simultaneously on a 16x2 LCD screen
Sends live vitals data to an IoT dashboard (Blynk/ThingSpeak) for remote doctor/caregiver access
Triggers a local buzzer alert if either vital signal moves outside a safe configured range
Maintains a historical log of readings for later medical review

Core Hardware Components Required

Arduino Uno R3: Main microcontroller that processes both sensor signals
Pulse Sensor Module: Measures the patient's heart rate via fingertip blood flow detection
DS18B20 Waterproof Temperature Sensor: Measures patient body temperature accurately
16x2 LCD Display with I2C Module: Displays live heart rate and temperature readings
Active Buzzer Module: Sounds an alarm if vitals move outside the safe range
ESP8266 Wi-Fi Module: Streams vitals data to the cloud dashboard
Breadboard and Jumper Wires: For assembling and testing the complete circuit

Circuit Design & Pin Connections

The pulse sensor connects to an analog input pin since it outputs a continuously varying voltage representing blood flow, while the DS18B20 temperature sensor uses the 1-Wire digital protocol and requires a pull-up resistor between its data line and VCC. The Arduino reads both signals, updates the LCD, and passes the combined vitals data to the ESP8266 over serial for cloud logging. All components must share a common ground for stable, accurate readings.

Complete Pin Connection Table

ComponentComponent PinMicrocontroller PinNotes / Description
Pulse SensorVCC (Red)5VPower Line
Pulse SensorGND (Black)GNDCommon Ground Line
Pulse SensorSignal (Purple)A0Analog Heartbeat Signal
DS18B20 Temp SensorVCC5VPower Line
DS18B20 Temp SensorGNDGNDCommon Ground Line
DS18B20 Temp SensorDataPin 4 (with 4.7kΩ pull-up to VCC)1-Wire Digital Temperature Signal
16x2 LCD (I2C)VCC5VPower Line
16x2 LCD (I2C)GNDGNDCommon Ground Line
16x2 LCD (I2C)SDA, SCLA4, A5I2C Data Lines
Buzzer ModuleVCC5VPower Line
Buzzer ModuleSignalPin 8Alarm Trigger Line
ESP8266VCC3.3VPower Line (Do not use 5V)
ESP8266TX, RXPin 10, Pin 11Serial Communication (SoftwareSerial)

Bill of Materials (BOM)

Product / ComponentQuantityLink
Arduino Uno R31
Pulse Sensor Module1
DS18B20 Waterproof Temperature Sensor1
16x2 LCD Display with I2C Module1
Active Buzzer Module1
ESP8266 Wi-Fi Module1
4.7kΩ Resistor (1-Wire pull-up)1
Breadboard and Jumper Wires1 set

Step-by-Step Assembly Tutorial

1.Step 1: Mount the Microcontroller Secure the Arduino Uno on a stable base plate positioned close to where the patient's finger and temperature probe will rest comfortably.
2.Step 2: Connect the Power Rails Wire the Arduino's 5V and GND pins out to the breadboard rails so the pulse sensor, temperature sensor, LCD, and buzzer all draw consistent shared power.
3.Step 3: Wire the Primary Sensor Connect the pulse sensor's signal wire to analog pin A0, ensuring the sensing surface will make gentle, stable contact with the patient's fingertip.
4.Step 4: Wire the Secondary Sensor (if applicable) Connect the DS18B20 temperature sensor's data pin to Pin 4, remembering to add the required 4.7kΩ pull-up resistor between the data line and 5V.
5.Step 5: Setup the Communication Module Wire the ESP8266 module using a SoftwareSerial connection on Pin 10 and Pin 11, powering it only from the 3.3V rail to prevent damage.
6.Step 6: Connect Output Displays Wire the 16x2 I2C LCD to A4 and A5 so both heart rate and temperature readings are clearly visible to the patient or attending caregiver.
7.Step 7: Wire up the Buzzers/Alarms Connect the buzzer's signal pin to Pin 8 so it can immediately alert caregivers nearby if either vital sign moves outside the safe configured range.
8.Step 8: Double-Check for Short Circuits Carefully verify the pull-up resistor on the temperature sensor's data line is correctly placed, and that the pulse sensor wiring matches the color-coded pins exactly.
9.Step 9: Connect the USB Cable and Power Up Connect the Arduino to your computer using a USB cable, confirm the board powers on properly, and open the Arduino IDE with the OneWire and DallasTemperature libraries installed.
  1. Step 10: Final Assembly Check and Testing Place a finger on the pulse sensor and hold the temperature probe, confirming the LCD displays realistic, stable BPM and temperature values before finalizing the wearable or bedside enclosure.

Arduino Source Code

// Patient Health Monitoring Project - Source Code
// Monitors heart rate and body temperature, alerting and logging to the cloud
 
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <SoftwareSerial.h>
 
// ----- Pin Definitions -----
#define pulsePin A0
#define tempPin 4
#define buzzerPin 8
 
OneWire oneWire(tempPin);
DallasTemperature tempSensor(&oneWire);
LiquidCrystal_I2C lcd(0x27, 16, 2);
SoftwareSerial espSerial(10, 11); // RX, TX for ESP8266
 
// ----- Safe Threshold Configuration -----
const int minSafeBPM = 60;
const int maxSafeBPM = 100;
const float minSafeTemp = 36.0;
const float maxSafeTemp = 37.8;
 
int bpm = 0;
int beatCount = 0;
unsigned long lastBeatTime = 0;
unsigned long windowStart = 0;
 
void setup() {
  pinMode(buzzerPin, OUTPUT);
 
  tempSensor.begin();
  lcd.init();
  lcd.backlight();
  lcd.print("Patient Monitor");
 
  espSerial.begin(9600);
  Serial.begin(9600);
 
  windowStart = millis();
  delay(1500);
  lcd.clear();
}
 
void loop() {
  int sensorValue = analogRead(pulsePin);
 
  // Basic threshold-based heartbeat detection
  if (sensorValue > 550 && (millis() - lastBeatTime) > 300) {
	beatCount++;
	lastBeatTime = millis();
  }
 
  // Calculate BPM every 10 seconds
  if (millis() - windowStart >= 10000) {
	bpm = beatCount * 6;
	beatCount = 0;
	windowStart = millis();
 
|  | tempSensor.requestTemperatures(); |
| --- | --- |
|  | float temperature = tempSensor.getTempCByIndex(0); |
 
|  | updateDisplay(bpm, temperature); |
| --- | --- |
|  | checkVitals(bpm, temperature); |
|  | sendToCloud(bpm, temperature); |
| } |  |
}
 
// Updates the LCD with both heart rate and temperature
void updateDisplay(int currentBPM, float temp) {
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("HR: " + String(currentBPM) + " BPM");
  lcd.setCursor(0, 1);
  lcd.print("Temp: " + String(temp) + " C");
}

Questions, Custom Pricing, or Requests

Want this project customized, a quote for your budget, help understanding a feature, or anything else related to it? Send us a message.

Prefer to talk? Call or WhatsApp us at +92 3176572690