Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

❀️ Heartbeat Monitor with Alert System

Embedded Systems | Arduino | Sensor Interfacing | Wokwi Simulation

Arduino Embedded C Wokwi OLED Python GitHub


πŸ‘¨β€πŸ’» Author

Vayunandan Mishra
Electronics and Communication Engineering (ECE) Student

Interests: Embedded Systems | IoT | Electronics | Automation | Python | Artificial Intelligence

GitHub: https://github.com/Vayu-143


πŸ“Œ Project Overview

The Heartbeat Monitor with Alert System is an educational embedded-systems prototype developed to demonstrate real-time heartbeat monitoring concepts using a microcontroller, analog input, OLED display, LEDs, and a buzzer.

The system acquires a pulse-related analog input, processes the signal, determines the corresponding Beats Per Minute (BPM), displays the BPM and system status on an I2C OLED, and generates visual and audible alerts when the BPM crosses configured demonstration thresholds.

For virtual testing, Wokwi is used to simulate the embedded hardware. A potentiometer is used to emulate the analog pulse-sensor input, allowing different BPM conditions to be tested without physical hardware.

⚠️ Educational Disclaimer: This project is intended for embedded-systems learning and demonstration only. It is not a medical device and must not be used for diagnosis or medical decision-making.


🎯 Objectives

  • Acquire pulse or simulated analog sensor data.
  • Process the input using an Arduino microcontroller.
  • Calculate or derive BPM values.
  • Display BPM and status on an I2C OLED.
  • Classify readings as LOW, NORMAL, or HIGH.
  • Generate LED and buzzer alerts.
  • Validate the embedded control logic using Wokwi simulation.
  • Practice embedded programming, sensor interfacing, debugging, testing, and Git-based project management.

βš™οΈ Key Features

  • ❀️ Heartbeat/BPM monitoring concept
  • πŸ“Š Analog sensor input acquisition
  • πŸ”’ BPM calculation and conversion
  • πŸ–₯️ Real-time OLED display
  • 🟒 Normal-condition indication
  • πŸ”΄ Low/high-condition alert
  • πŸ”Š Buzzer-based warning
  • πŸ“Ÿ Serial Monitor output
  • πŸ§ͺ Wokwi virtual hardware simulation
  • 🐍 Python-based simulation support
  • πŸ“ Structured project documentation
  • πŸ”§ Modular project structure
  • πŸ“ Test-case based validation

πŸ—οΈ System Architecture

Pulse Sensor / Wokwi Analog Input ↓ Arduino UNO ↓ Analog Input / ADC ↓ Signal Processing ↓ BPM Calculation ↓ Threshold Logic ↓ LOW / NORMAL / HIGH ↓ OLED + LEDs + Buzzer ↓ Serial Monitor


πŸ”„ Working Principle

Analog Input ↓ Signal Sampling ↓ Heartbeat / Simulated BPM ↓ BPM Processing ↓ Threshold Comparison ↓ Status Classification ↓ OLED Display ↓ LED + Buzzer Alert ↓ Serial Monitor

Operating Sequence

  1. The analog input is acquired through the Arduino ADC.
  2. The input is processed to obtain a BPM value.
  3. The calculated/simulated BPM is compared with predefined thresholds.
  4. The current BPM and status are displayed on the OLED.
  5. The appropriate LED is activated.
  6. The buzzer is activated during LOW or HIGH alert conditions.
  7. The result is printed to the Serial Monitor.
  8. The system can be tested repeatedly by changing the simulated input.

❀️ BPM Calculation

For a heartbeat interval-based implementation:

BPM = 60000 / Beat Interval (milliseconds)

Examples

Beat Interval Calculated BPM
1000 ms 60 BPM
750 ms 80 BPM
600 ms 100 BPM

For the Wokwi demonstration, the potentiometer is mapped to a simulated BPM range to validate the control and alert logic.


🚨 Alert Logic

The project uses the following educational demonstration thresholds:

BPM Range Status Green LED Red LED Buzzer
Below 60 BPM LOW OFF ON ON
60–100 BPM NORMAL ON OFF OFF
Above 100 BPM HIGH OFF ON ON

LOW Condition

BPM < 60 β†’ STATUS = LOW β†’ Red LED ON β†’ Buzzer ON β†’ Green LED OFF

NORMAL Condition

60 ≀ BPM ≀ 100 β†’ STATUS = NORMAL β†’ Green LED ON β†’ Buzzer OFF β†’ Red LED OFF

HIGH Condition

BPM > 100 β†’ STATUS = HIGH β†’ Red LED ON β†’ Buzzer ON β†’ Green LED OFF

Note: These values are demonstration thresholds for this educational prototype and are not clinical heart-rate limits.


πŸ”Œ Hardware Components

Component Purpose
Arduino UNO Main microcontroller
Pulse Sensor Real-world analog pulse input
Potentiometer Wokwi analog-input emulator
I2C OLED BPM and status display
Green LED Normal-status indication
Red LED Alert indication
Buzzer Audible alert
220Ξ© Resistors LED current limiting
Breadboard Circuit prototyping
Jumper Wires Electrical connections

πŸ“Œ Pin Configuration

Arduino Pin Function
A0 Pulse Sensor / Wokwi analog input
A4 OLED SDA
A5 OLED SCL
D6 Green LED
D7 Red LED
D8 Buzzer
5V Component power
GND Common ground

OLED I2C Connections

OLED VCC β†’ Arduino 5V
OLED GND β†’ Arduino GND
OLED SDA β†’ Arduino A4
OLED SCL β†’ Arduino A5


πŸ’» Technology Stack

Hardware

  • Arduino UNO
  • Analog sensor interface
  • ADC
  • GPIO
  • I2C communication
  • OLED display
  • LED and buzzer control

Programming

  • Embedded C/C++
  • Python

Simulation

  • Wokwi

Development Tools

  • Visual Studio Code
  • Arduino IDE
  • Git
  • GitHub

Libraries

  • Adafruit GFX
  • Adafruit SSD1306
  • Wire / I2C

πŸ§ͺ Wokwi Simulation

The embedded prototype is validated using Wokwi virtual hardware simulation.

The Wokwi implementation uses a potentiometer to emulate the analog pulse-sensor input. Changing the potentiometer changes the simulated BPM, allowing LOW, NORMAL, and HIGH operating conditions to be tested.

Simulation Flow

Potentiometer ↓ Analog A0 ↓ Arduino UNO ↓ BPM Mapping ↓ Threshold Logic ↓ OLED + LEDs + Buzzer ↓ Serial Monitor


πŸ“Έ Wokwi Simulation Results

1. Complete Wokwi Circuit Simulation

Wokwi Circuit Simulation

Complete virtual hardware setup showing the Arduino UNO, analog input, OLED display, LEDs, and buzzer.

2. High BPM Alert

Wokwi High BPM Alert

Demonstrates the HIGH BPM condition with visual and audible alert logic.

3. Low BPM Alert

Wokwi Low BPM Alert

Demonstrates the LOW BPM condition with alert indication.

4. Normal BPM

Wokwi Normal BPM Alert

Demonstrates the NORMAL operating condition with the green LED indication.


πŸ“Š Test Results

Test ID Test Condition Input Expected Result Status
T01 Normal BPM ~80 BPM NORMAL PASS
T02 Low BPM ~42 BPM LOW + Alert PASS
T03 High BPM ~120 BPM HIGH + Alert PASS
T04 OLED Display BPM input BPM displayed PASS
T05 Normal LED Normal BPM Green LED ON PASS
T06 Alert LED Low/High BPM Red LED ON PASS
T07 Buzzer Low/High BPM Buzzer ON PASS
T08 Serial Monitor Analog input BPM + Status displayed PASS

πŸ“ˆ Demonstrated Outputs

NORMAL β†’ ~80 BPM
LOW β†’ ~42 BPM
HIGH β†’ ~120 BPM

Normal

BPM: ~80
STATUS: NORMAL
Green LED: ON
Red LED: OFF
Buzzer: OFF

Low Alert

BPM: ~42
STATUS: LOW
Green LED: OFF
Red LED: ON
Buzzer: ON

High Alert

BPM: ~120
STATUS: HIGH
Green LED: OFF
Red LED: ON
Buzzer: ON


πŸ“ Project Structure

Heartbeat-Monitor-Alert-Embedded-System/

β”œβ”€β”€ arduino_code/
β”‚ └── heartbeat_monitor.ino
β”‚ β”œβ”€β”€ circuit_diagram/
β”‚ └── circuit_connections.txt
β”‚ β”œβ”€β”€ data/
β”‚ └── heartbeat_log.csv
β”‚ β”œβ”€β”€ docs/
β”‚ β”œβ”€β”€ Alert_Logic.md
β”‚ β”œβ”€β”€ BPM_Calculation.md
β”‚ β”œβ”€β”€ Hardware_Connections.md
β”‚ β”œβ”€β”€ Simulation_Guide.md
β”‚ β”œβ”€β”€ Testing_Strategy.md
β”‚ β”œβ”€β”€ Architecture_Diagram.png
β”‚ β”œβ”€β”€ Block_Diagram.png
β”‚ └── Circuit_Diagram.png
β”‚ β”œβ”€β”€ outputs/
β”‚ └── BPM_Test_Results.csv
β”‚ β”œβ”€β”€ reports/
β”‚ └── Heartbeat_Monitor_Project_Report.docx
β”‚ β”œβ”€β”€ screenshots/
β”‚ β”œβ”€β”€ Wokwi_Circuit_Simulation.png
β”‚ β”œβ”€β”€ Wokwi_High_BPM_Alert.png
β”‚ β”œβ”€β”€ Wokwi_Low_BPM_Alert.png
β”‚ β”œβ”€β”€ Wokwi_Normal_BPM_Alert.png
β”‚ └── Wokwi_Serial_Monitor.png
β”‚ β”œβ”€β”€ simulation/
β”‚ └── heartbeat_simulator.py
β”‚ β”œβ”€β”€ diagram.json
β”œβ”€β”€ README.md
└── .gitignore


πŸ“š Documentation

Detailed technical documentation is available in the docs/ directory.


πŸ“„ Project Report

The complete project report covers:

  • Abstract
  • Introduction
  • Problem Statement
  • Objectives
  • Industry Relevance
  • Hardware and Software Requirements
  • System Architecture
  • Circuit Design
  • Working Principle
  • BPM Calculation
  • Alert Logic
  • Software Implementation
  • Wokwi Simulation
  • Testing and Results
  • Limitations
  • Future Enhancements
  • Conclusion
  • Learning Outcomes
  • References
  • Appendix

⚠️ Limitations

  • The Wokwi implementation uses a potentiometer as an analog input emulator.
  • The prototype uses a basic signal-processing approach.
  • Demonstration thresholds are not medical standards.
  • The system has not undergone clinical validation.
  • Sensor noise and motion artifacts may affect real-world measurements.
  • The prototype is intended for educational and engineering demonstration purposes.

This project is not a medical diagnostic device and should not be used for clinical decision-making.


πŸš€ Future Enhancements

  • MAX30102 pulse and SpOβ‚‚ sensor
  • ESP32-based implementation
  • Bluetooth connectivity
  • Wi-Fi connectivity
  • IoT cloud integration
  • Mobile application
  • Real-time web dashboard
  • Advanced digital filtering
  • Moving-average and adaptive signal processing
  • Heartbeat data logging
  • Remote monitoring
  • Cloud-based historical analysis
  • Battery-powered wearable implementation

πŸŽ“ Learning Outcomes

This project strengthened practical understanding of:

  • Embedded C/C++ programming
  • Arduino microcontroller programming
  • Analog-to-Digital Conversion
  • GPIO interfacing
  • I2C communication
  • Sensor interfacing
  • Basic signal processing
  • BPM calculation
  • OLED interfacing
  • LED and buzzer control
  • Threshold-based control systems
  • Wokwi virtual hardware simulation
  • Python-based simulation
  • Debugging and testing
  • Git version control
  • GitHub project management
  • Technical documentation

πŸ’Ό Skills Demonstrated

Embedded Systems | Arduino | Embedded C/C++ | ADC | GPIO | I2C | Sensor Interfacing | OLED | Signal Processing | BPM Calculation | Wokwi | Python | Debugging | Testing | Git | GitHub


🌱 Industry Applications

The concepts demonstrated by this prototype are relevant to:

  • Wearable electronics
  • Fitness monitoring
  • Smart watches
  • Sports technology
  • Rehabilitation systems
  • IoT health-monitoring prototypes
  • Remote monitoring systems
  • Embedded healthcare research

πŸ”¬ Engineering Concepts Demonstrated

Sensor Interface

  • ADC
  • Embedded Processing
  • Signal Interpretation
  • Decision Logic
  • I2C Communication
  • Display Interface
  • GPIO Control
  • Audible/Visual Alerts
  • Simulation & Testing

πŸ‘¨β€πŸŽ“ About the Author

Vayunandan Mishra is an Electronics and Communication Engineering (ECE) student interested in developing practical engineering projects in Embedded Systems, IoT, Electronics, Automation, Python, Artificial Intelligence, and Hardware-Software Integration.

This project demonstrates practical experience in embedded-system design, sensor interfacing, real-time processing, virtual simulation, testing, debugging, technical documentation, and GitHub-based project management.


πŸ“Œ Project Status

Status: Completed Educational Prototype

  • Hardware Concept βœ…
  • Arduino Implementation βœ…
  • BPM Processing βœ…
  • OLED Interface βœ…
  • LED Alert System βœ…
  • Buzzer Alert βœ…
  • Wokwi Simulation βœ…
  • Python Simulation βœ…
  • Testing βœ…
  • Documentation βœ…
  • GitHub Repository βœ…

πŸ“œ License

This project is intended for educational and learning purposes.

You may study, modify, and extend the project for academic and personal learning applications.


⭐ Acknowledgement

This project provided practical experience in converting an embedded-system concept into a structured prototype through hardware interfacing, software implementation, virtual simulation, testing, documentation, and GitHub-based version control.


⭐ If you find this project useful, consider giving the repository a star.

About

Educational embedded systems-based heartbeat monitoring prototype with BPM calculation, OLED display, threshold-based alerts, and Wokwi simulation using Arduino.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages