Professional Documents
Culture Documents
HEART BEAT MONITOR ECE3003 J-Component Final REPORT
HEART BEAT MONITOR ECE3003 J-Component Final REPORT
By
SCHOOL OF ELECTRONICS
ENGINEERING
in partial fulfilment of the requirements for the course of
Dr. G GUGAPRIYA
School of Electronics Engineering
(SENSE) VIT University, Chennai
Chennai - 600127
ABSTRACT
This project will discuss about the health services in the field of
diagnostic tools and life support systems in the form of
photoplethysmography. We designed a system capable of providing
heart pumping activity information through a phenomenon known as
photoplethysmography. We collect the data pulse using a heart rate
sensor (fingertip sensor). This system works to retrieve data from the
bloodstream on the index finger and for the simulation the data is
retrieved from the sensor through a test pin giving arbitrary values.
ACKNOWLEDGEMENT
1.1 OBJECTIVE
Ever since humans have existed, ‘health’ has undoubtedly been the single most
important factor in one’s life. Knowing how our body parts or internal organs are
functioning is vital to keep track of ourselves and remain healthy.
It is much easier and more convenient to check ourselves. Parameters like heart
rate, pulse rate, temperature, BMI, etc. can be conveniently calculated. This
becomes more relevant in this current scenario amidst the pandemic which we are
facing now. Although getting tested is the best way to know if one is infected or
not, testing our pulse and heart rate can give us hints of possible symptoms of the
virus.
1.2 PRINCIPLE
The device senses the heart rate from the fingertip using IR reflection method and
displays it on a three digit seven segment display in beats per minute. The circuit has
an accuracy of 4 beats per minute and it is very easy to use. In medical terms, the
technique used here for sensing heart rate is called photoplethysmography.
CHAPTER 2
CIRCUIT DESIGN
COMPONENTS:
● 8051 Microcontroller
● LTH 1550-01 photo interrupter
● Resistors
● Capacitors
● LCD Display
2.2 CIRCUIT DIAGRAM
Working of the heart rate monitor
When more light falls on the photo transistor it conducts more, its collector current
increases and so its collector voltage decreases. When less light falls on the photo
transistor it conducts less, its collector current decreases and so its collector voltage
decreases. This variation in the collector voltage will be proportional to the heart rate.
Anyway this voltage variation is so feeble and additional signal conditioning stages are
necessary to convert it into a microcontroller recognizable form.
The next part of the circuit consists of two active low pass filters using op amp
LM324. The LM324 is a quad op amp that can be operated from a single rail supply.
Resistor R23, R17 and capacitor C5 sets the gain and cut off frequency of the first
filter. With the given component values, gain will be 11 and cut off frequency will be
2.5Hz. The gain and cut off frequency are determined using the following equations.
Capacitor C15 is used to by-pass noise if any may cause false triggering of the
comparator.
The second low pass filter also has the same gain and cut off frequency. The two low
pass filters form a very critical part of the circuit as any noise or false signals passing
to the microcontroller stage will produce disastrous results. The output of the filter
stage will be a voltage level fluctuating between 0 and 0.35 volts and this fluctuation is
converted into a 0 to 5V swing using the comparator based on the third opamp (IC1c).
The reference voltage of the comparator is set to 0.3V. Whenever the output voltage of
the filter stage goes above 0.3V, the output of the comparator goes to zero and
whenever the output voltage of the filter stage goes below 0.3V, the output of the
comparator goes to positive saturation. The result will be a neat pulse fluctuating
between 0 and 5V at a rate equal to the heart rate. This pulse is fed to the
microcontroller for counting.
CHAPTER 3
SYSTEM IMPLEMENTATION AND ANALYSIS
This section describes system implementation and results with inferences.
CODE:
ORG 000H // origin
MOV DPTR,#LUT // moves starting address of LUT to
DPTR
MOV P1,#00000000B // sets P1 as output port
MOV P0,#00000000B // sets P0 as output port
MAIN: MOV R6,#230D // loads register R6 with 230D
SETB P3.5 // sets P3.5 as input port
MOV TMOD,#01100001B // Sets Timer1 as Mode2 counter &
Timer0 as Mode1 timer
MOV TL1,#00000000B // loads TL1 with initial value
MOV TH1,#00000000B // loads TH1 with initial value
SETB TR1 // starts timer(counter) 1
BACK: MOV TH0,#00000000B // loads initial value to TH0
MOV TL0,#00000000B // loads initial value to TL0
SETB TR0 // starts timer 0
HERE: JNB TF0,HERE // checks for Timer 0 roll over
CLR TR0 // stops Timer0
CLR TF0 // clears Timer Flag 0
DJNZ R6,BACK
CLR TR1 // stops Timer(counter)1
CLR TF0 // clears Timer Flag 0
CLR TF1 // clears Timer Flag 1
ACALL DLOOP // Calls subroutine DLOOP for
displaying the count
SJMP MAIN // jumps back to the main loop
DLOOP: MOV R5,#252D
BACK1: MOV A,TL1 // loads the current count to the
accumulator
MOV B,#4D // loads register B with 4D
MUL AB // Multiplies the TL1 count with 4
MOV B,#100D // loads register B with 100D
DIV AB // isolates first digit of the count
SETB P1.0 // display driver transistor Q1 ON
ACALL DISPLAY // converts 1st digit to 7seg
pattern
MOV P0,A // puts the pattern to port 0
ACALL DELAY
ACALL DELAY
MOV A,B
MOV B,#10D
DIV AB // isolates the second digit of the
count
CLR P1.0 // display driver transistor Q1 OFF
SETB P1.1 // display driver transistor Q2 ON
ACALL DISPLAY // converts the 2nd digit to 7seg
pattern
MOV P0,A
ACALL DELAY
ACALL DELAY
MOV A,B // moves the last digit of the count
to accumulator
CLR P1.1 // display driver transistor Q2 OFF
SETB P1.2 // display driver transistor Q3 ON
ACALL DISPLAY // converts 3rd digit to 7seg
pattern
MOV P0,A // puts the pattern to port 0
ACALL DELAY // calls 1ms delay
ACALL DELAY
CLR P1.2
DJNZ R5,BACK1 // repeats the subroutine DLOOP 100
times
MOV P0,#11111111B
RET
For the counting purpose both the timers of 8051 (Timer0 and Timer1) are used. Timer
1 is configured as an 8 bit auto reload counter for registering the number of incoming
zero going pulses and Timer0 is configured as a 16 bit timer which generate the
necessary 1 second time span for the Timer1 to count.For counting the number of beats
Timer0 and Timer1 are used. Timer1 is set as an 8 bit auto reload counter for counting
the the number of pulses (indicating the heart beat) and Timer0 is set as a 16 bit timer
which generates a 65536uS delay. When looped 230 times it will produce a 15 second
time span (230 x 65536uS =15S) for the Timer 1 to count. The number of counts
obtained in 15 seconds is multiplied by 4 to obtain the heart rate in beats per minute.
The Timer 0 which generates the 1 second time span is configured in Mode 1 (16 bit
timer). So the maximum it can count is 2^16 and it is 65536. In 8051 the crystal
frequency is divided by 12 using an internal frequency divider network before
applying it as a clock for the timer. That means the timer will increment by one for
every 1/12th of the crystal frequency. For an 8051 based system clocked by a 12MHz
crystal, the time taken for one timer increment will be 1µS (ie; 1/12MHz). So the
maximum time delay that can be obtained using one session of the timer will be
65536µS.
Setting up the circuit.
When power is switched ON, the indicator LED D4 will glow an continues
in that state. Now place your finger tip over the sensor and adjust preset
R14 so that the LED D4 starts blinking. After you got the LED blinking,
reset the power and wait for 15 seconds. The display will show your heart
rate in beats per minute.
NOTE:
Due to the pandemic situation and lockdown , the LTH 1550-01 photo
interrupter was not available.So we decided to make this project using an
arduino.
1. BLOCK DIAGRAM
COMPONENTS SPECIFICATIONS:
● Heartbeat / Pulse sensor: A simple Heartbeat Sensor consists of a
sensor and a control circuit. The sensor part of the Heartbeat
Sensor consists of an IR LED and a Photo Diode placed in a clip.
Every heartbeat will alter the amount of blood in the finger and the
light from the IR LED passing through the finger and thus
detected by the Photodiode will also vary.
● Arduino UNO: The Arduino Uno is a microcontroller board based
on a removable, dual-inline-package (DIP) ATmega328 AVR
microcontroller. It has 20 digital input/output pins (of which 6 can
be used as PWM outputs and 6 can be used as analog inputs). The
Arduino Uno is programmed using the Arduino Software (IDE),
our Integrated Development Environment common to all our
boards and running both online and offline.
● Virtual terminal: Virtual Terminal is a tool in Proteus, which is
used to view data coming from Serial Port (DB9) and also used to
send the data to Serial Port.
● Oscilloscope: It is the waveform analyzer.Oscilloscope is basically
used to monitor signals or waveforms.
CODE:
#define USE_ARDUINO_INTERRUPTS true
// Set-up low-level interrupts for most acurate BPM math.
#include <PulseSensorPlayground.h>
// Includes the PulseSensorPlayground Library.
// Variables
const int PulseWire = 0;
// PulseSensor PURPLE WIRE connected to ANALOG PIN 0
const int LED13 = 13;
void setup() {
Serial.begin(9600);
// For Serial Monitor
if (pulseSensor.begin()) {
Serial.println("We created a Heart/PulseSensor Object for our project !");
//This prints one time at Arduino power-up, or on Arduino reset.
}
}
void loop() {
if (pulseSensor.sawStartOfBeat()) {
// Constantly test to see if "a beat happened".
Serial.println("A HeartBeat Happened ! "); // If test is "true", print a
message "a heartbeat happened".
Serial.print("BPM: ");
// Print phrase "BPM: "
Serial.println(myBPM);
// Print the value inside of myBPM.
}
delay(20);
// considered best practice in a simple sketch.
}
WORKING:
APPLICATION:
A simple project involving Arduino UNO and Heartbeat Sensor
Module is designed here which can calculate the heart rate of a
person.
This project can be used as an inexpensive alternative to Smart
Watches and other expensive Heart Rate Monitors.
In this covid scenario outside, the physiological parameters
related to heart are important to ponder upon and they need to be
checked on an everyday basis. So, our project is easy to operate
by anyone and can give the readings of BPM and pulse of a
person.
REFERENCES:
https://www.electronicshub.org/heartbeat-sensor-using-
arduino-heart-rate-
monitor/#:~:text=First%2C%20in%20order%20to%20disp
lay,LCD%20(contrast%20adjust%20pin).
https://www.engineersgarage.com/electronic-
projects/arduino-based-heartbeat-and-body-temperature
- monitoring-iot-device/