Skip to content

AyaSalahrekaby/CPR-feedback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

CPR feedback

Screenshot 2024-02-25 095224

This Arduino sketch provides real-time feedback for CPR training. It uses various sensors and an LCD display to guide the user on compression depth, rate, and release quality, and also monitors for signs of breathing.

Features

  • Compression Count: Tracks the number of chest compressions performed.
  • Compression Rate (BPM): Calculates and displays the beats per minute (BPM) for your compressions, ensuring you're within recommended guidelines.
  • Compression Depth Feedback: Utilizes an ultrasonic sensor to measure compression depth. An audible buzzer alert sounds if the depth isn't sufficient.
  • Compression Release Feedback: A pressure sensor helps assess if you're fully releasing after each compression, indicated by a white LED for "good" release and a red LED for "bad" (incomplete) release.
  • Pulse Detection: Includes a pulse sensor, though its primary use in CPR is typically post-resuscitation.
  • Breathing Detection: A DHT11 humidity sensor monitors for changes in humidity, suggesting the presence of breathing.
  • LCD Display: A 16x2 LCD screen provides real-time visual feedback on your compression count, rate, and the total time taken for a CPR cycle.

Things used in this project

Components Use no.
LCD display the cpr and any warnings 1
LEDS warning and to know if it was good or bad cpr 3
Buzzer warning 1
DHT measuring the humidity to know if the patient start breathung 1
Pulse sensor to observe the heartbeat 1
Ultrasonic sensor measuring the depth while doing CPR to protect the patient from breaking his chest 1
Pressure sensor to meassure the pressue of the hand 1
Push button to count the number of cpr 1

How It Works (Code Breakdown)

The sketch continuously reads sensor data and updates the LCD to provide immediate feedback:

Compression Counting and Rate

  • Pressing the button increments cprCount.
  • After 30 compressions, total time is recorded.
  • BPM (beats per minute) is calculated based on the compression count and elapsed time.
  • Between 5 and 30 compressions, the LCD shows if the compression rate is within the AHA recommended 100-120 CPM ("Good") or not ("----").

Compression Release Feedback

  • Reads the pressure sensor on A0.
  • If pressure reading < 500, white LED (pressGood) lights indicating good release.
  • If pressure reading > 501, red LED (pressBad) lights indicating incomplete release.

Compression Depth Feedback

  • Ultrasonic sensor measures distance to simulate chest compression depth.
  • If depth (distance) is less than 3 units (e.g., cm), buzzer sounds to indicate insufficient depth.

Breathing Detection

  • DHT11 measures humidity.
  • If humidity > 50 (threshold may need calibration), green LED (start_breath) lights up indicating possible breathing.

Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages