Heart rhythm monitoring using Arduino in Proteus

 In this project, we will design a heart rhythm monitor using Arduino in Proteus ISIS. You should download the Heart Beat Sensor Library V2.0 app for Proteus because we will use that to detect the heartbeat in Proteus. I also used a 20 × 4 LCD display that will show our heart rate value. You should download Proteus's new LCD library. I calculated the heartbeat for ten seconds and then I hit it with 6 to get a heartbeat per minute which is shortened as bpm (pulse per minute). So, let's start with Heart Beat Monitor using Arduino in Proteus ISIS.


To monitor heart rhythm using Arduino in Proteus, you can follow the steps below:
1.    Build the circuit: Build the circuit for heart rhythm monitoring using the Arduino board and the necessary components. You will need a heartbeat sensor, a resistor, and a LED to indicate the heartbeat. Connect the components as shown in the circuit diagram.
2.    Connect the Arduino board to Proteus: Connect the Arduino board to Proteus using the virtual terminal. You can use the USB-to-Serial adapter to connect the Arduino board to Proteus.
3.    Write the code: Write the code for heart rhythm monitoring using the Arduino IDE. You can use the PulseSensor Library to read the heart rate from the sensor and display it on the virtual terminal.
4.    Simulate the circuit: Simulate the circuit in Proteus to test the heart rhythm monitoring system. Run the simulation and check the virtual terminal to see the heart rate displayed.

circuit:


arduino  code

#include <LiquidCrystal.h>
#include <TimerOne.h>
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

int HBSensor = 4;
int HBCount = 0;
int HBCheck = 0;
int TimeinSec = 0;
int HBperMin = 0;
int HBStart = 2;
int HBStartCheck = 0;

void setup() {
// put your setup code here, to run once:
lcd.begin(20, 4);
pinMode(HBSensor, INPUT);
pinMode(HBStart, INPUT_PULLUP);
Timer1.initialize(800000);
Timer1.attachInterrupt( timerIsr );
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Current HB : ");
lcd.setCursor(0,1);
lcd.print("Time in Sec : ");
lcd.setCursor(0,2);
lcd.print("HB per Min : 0.0");
}

void loop() {
if(digitalRead(HBStart) == LOW){lcd.setCursor(0,3);lcd.print("HB Counting ..");HBStartCheck = 1;}
if(HBStartCheck == 1)
{
if((digitalRead(HBSensor) == HIGH) && (HBCheck == 0))
{
HBCount = HBCount + 1;
HBCheck = 1;
lcd.setCursor(14,0);
lcd.print(HBCount);
lcd.print(" ");
}
if((digitalRead(HBSensor) == LOW) && (HBCheck == 1))
{
HBCheck = 0;
}
if(TimeinSec == 10)
{
HBperMin = HBCount * 6;
HBStartCheck = 0;
lcd.setCursor(14,2);
lcd.print(HBperMin);
lcd.print(" ");
lcd.setCursor(0,3);
lcd.print("Press Button again.");
HBCount = 0;
TimeinSec = 0;
}
}
}

void timerIsr()
{
if(HBStartCheck == 1)
{
TimeinSec = TimeinSec + 1;
lcd.setCursor(14,1);
lcd.print(TimeinSec);
lcd.print(" ");
}
}
 
 

 

Post a Comment

Previous Post Next Post