Introduction: Heart Rate Monitor With PC Connectivity

A Heart rate monitor(HRM) is a personal monitoring device that allows one to measure one's heart rate in real time or record the heart rate for later study. It is largely used by performers of various types of physical exercise.This project demonstrates a technique to measure the heart rate by sensing the change in blood volume in a finger artery while the heart is pumping the blood. It consists of an infrared LED that transmits an IR signal through the fingertip of the subject, a part of which is reflected by the blood cells. The reflected signal is detected by a photo diode sensor. The changing blood volume with heartbeat results in a train of pulses at the output of the photo diode, the magnitude of which is too small to be detected directly by a microcontroller. Therefore, a two-stage high gain, active low pass filter is designed using two Operational Amplifiers (OpAmps) to filter and amplify the signal to appropriate voltage level so that the pulses can be counted by a microcontroller. The heart rate is displayed on a 3 digit seven segment display. The microcontroller used in this project is AT89S52 i.e. a 8051 series from Atmel.


A key benefit of a heart rate monitor is that it helps you maintain the optimal heart rate target zone for your specific goal. In effect, the HRM is your pacer, telling you when to speed up or slow down. Higher-end models inform you of this via a digital display and/or an audible tone.

Exercising in the right heart rate zone helps optimize your performance. A fat-burning goal may require 40 to 80 minutes in one zone, for example, while an aerobic conditioning workout might mean 10 to 40 minutes in another.

The target zone is a percentage range based on your maximum heart rate (HRmax). Various algorithms have been developed to calculate an HRmax estimate, but the simplest is:

HRmax = 220 – your age.

Plenty of noninvasive methods exist for electronically sensing the human heartbeat. The job can be done acoustically (stethoscope or Doppler), mechanically (sphygmomanometer), electrically (EKG), and optically. One handy optical technique presented here exploits the fact that tiny subcutaneous blood vessels (capillaries) in any patch of skin (fingertip, ear lobe, etc.) furnished with a good blood supply, alternately expand and contract in time with the heartbeat. An ordinary infrared LED/phototransistor pair can sense this rhythmic change as small but detectable variations in skin contrast.


Features of the project :
1.Non-invasive sensing

2.Instant results

3.Beep and vibrational alerts

4.Computer connectivity for logging and persistent storage

5.Report can be printed via a printer directly.

Step 1: Theory

Heart rate is the number of heartbeats per unit of time and is usually expressed in beats per minute (bpm). In adults, a normal heart beats about 60 to 100 times a minute during resting condition. The resting heart rate is directly related to the health and fitness of a person and hence is important to know. You can measure heart rate at any spot on the body where you can feel a pulse with your fingers. The most common places are wrist and neck. You can count the number of pulses within a certain interval (say 15 sec), and easily determine the heart rate in bpm.

This project describes a microcontroller based heart rate measuement system that uses optical sensors to measure the alteration in blood volume at fingertip with each heart beat. The sensor unit consists of an infrared light-emitting-diode (IR LED) and a photodiode, placed side by side as shown below. The IR diode transmits an infrared light into the fingertip (placed over the sensor unit), and the photodiode senses the portion of the light that is reflected back. The intensity of reflected light depends upon the blood volume inside the fingertip. So, each heart beat slightly alters the amount of reflected infrared light that can be detected by the photodiode. With a proper signal conditioning, this little change in the amplitude of the reflected light can be converted into a pulse. The pulses can be later counted by the microcontroller to determine the heart rate.

This project is based on the principle of photoplethysmography (PPG) which is a non-invasive method of measuring the variation in blood volume in tissues using a light source and a detector. Since the change in blood volume is synchronous to the heart beat, this technique can be used to calculate the heart rate. The PPG signal has two components, frequently referred to as AC and DC. The AC component is mainly caused by pulsatile changes in arterial blood volume, which is synchronous with the heart beat. So, the AC component can be used as a source of heart rate information. This AC component is superimposed onto a large DC component that relates to the tissues and to the average blood volume. The DC component must be removed to measure the AC waveform with a high signal-to-noise ratio. Since the useful AC signal is only a very small portion of the whole signal, an effective amplification circuit is also required to extract desired information from it.

Step 2: Circuit Discription

The signal conditioning circuit consists of two identical active low pass filters with a cut-off frequency of about 2.5 Hz. This means the maximum measurable heart rate is about 160 bpm. The operational amplifier IC used in this circuit is LM741(u can use LM339 also). It operates at a single power supply and provides rail-to-rail output swing. The filtering is necessary to block any higher frequency noises present in the signal. The gain of each filter stage is set to 101, giving the total amplification of about 10000. A 1 uF capacitor at the input of each stage is required to block the dc component in the signal. The two stage amplifier/filter provides sufficient gain to boost the weak signal coming from the photo sensor unit and convert it into a pulse. An LED connected at the output blinks every time a heart beat is detected. The output from the signal conditioner goes to the counter input of the microcontroller circuit.

The control and display part of the circuit is also shown above. The display unit comprises of a 3-digit, common anode, seven segment module that is driven using multiplexing technique. The segments a-g are driven through PORT0 pins respectively. The unit’s, ten’s and hundred’s digits are multiplexed with P2.0, P2.1, and P2.2 port pins. Two main tact switches inputs are connected to P3.3 and P1.0 pins for starting stopping the unit and also for selecting various modes. Once the start button is pressed, the microcontroller activates the IR transmission in the sensor unit for 15/30/60 sec(as selected during bootup). During this interval, the number of pulses arriving at the INT0 input is counted. The actual heart rate would be 4/2/1 times the count value, and the resolution of measurement would be 4/2/1. You can see the IR transmission is controlled through P1.2 pint of the microcontroller. The microcontroller runs at 3.579545 MHz using an external crystal. A regulated +5V power supply is derived from an external 9 V battery using an LM7805 regulator IC.

At the place of serial translator, either you can use any USB to serial converter or simple MAX232 based level converter circuit for DB9 port based serial connection.

Step 3: Microcontroller Code

The code for the AT89S52 microcontroller is written in basic language using BASCOM-805 compiler.

Step 4: PC Application and Source Code

The PC application is written in Visual Basic 6.0.

Features of the PC app:

1.Connectivity to the monitor via serial port.

2.Readings display and recording.

3.Readings recording capability in database along with patient info.

4.Direct report printing.

5.Various graphical view modes.

For operation of the software,refer to the video above.

Comments

author
barrel_shifter made it!(author)2015-09-30

I will try to make it!

But why did you use two amplifiers? One seems enough since we are working at low frequency.

author
abhishek7xavier made it!(author)2015-12-31

One is HPF and one is LPF.

author
araseb made it!(author)2015-01-24

sensor ic number

send me plz

author
abhishek7xavier made it!(author)2015-03-04

you can use any general purpose IR transmitter and receiver diodes for that!!

author
BilalM1 made it!(author)2014-12-30

What is the password of HRM system????????

author
abhishek7xavier made it!(author)2015-03-04

45206734

author
BilalM1 made it!(author)2014-12-30

What is the password of HRM system????????

author
BilalM1 made it!(author)2014-12-30

What is the password of HRM system????????

author
gada888 made it!(author)2014-09-21

I cannot run the analyzer.Run time error 339.

Component ‘VBUProgress.ocx’or one of its dependencies not correctly registered.

author
abhishek7xavier made it!(author)2014-09-21

Actually this software was designed on windows XP machine.May be the dependencies ar not available on new machines.
Try putting "VBUProgress.ocx" in C:/Windows/system32 folder and run the following commang in "Run" box = regsvr32 "VBUProgress.ocx"

and do it the same way for all dependencies which the software asks for!!
Then u have to make a MSAccess ODBC driver from the control panel administrative settings to let the software access the MSAccess database !!

author
gada888 made it!(author)2014-09-25

failed in loading module "VBUProgress.ocx",cannot find the designated module......................besides,i am using windows 7 64bit system.

author
abhishek7xavier made it!(author)2014-09-26

Although I would suggest you to use this software on Windows XP/98 only(and u r running Win7 and that too 64-bit...can't say it will work out there).Copy all ".ocx" and ".dll" files to Windows/system32 folder and then restart the system and try using that "regsvr32 command to register the files.

Still I would say that it will give errors on WIN7(64bit).
The software is fully tested and 100% working on windows XP.

author
laith+mohamed made it!(author)2014-09-23

Good work man >>>>

author
abhishek7xavier made it!(author)2014-09-23

Thanks a lot :)

author
Raphango made it!(author)2014-09-22

Great project! Congratulations!!

author
abhishek7xavier made it!(author)2014-09-22

Thanks a ton :)

author
gada888 made it!(author)2014-09-21

nice tutorial, but how to program an at89S52

author
abhishek7xavier made it!(author)2014-09-21

Thanks,Hey actually i used a universal programmer :

http://www.elnec.com/products/universal-programmer...
But this may cost u a lot.You may consider the following links to make ur own programmer :
http://www.kmitl.ac.th/~kswichit/USBEasy/USBEasy.h...
http://www.8051projects.info/resources/usb-8051-av...

author
gada888 made it!(author)2014-09-21

Thanks for your kind reply,your answer is very informative.as for 'usb 8051 avr programmer v1'.i can't figure out how atmega8 wired to at89s52.

author
abhishek7xavier made it!(author)2014-09-21

I think it same via the SPI lines bcoz he is using the serial way of programming.So Vcc,GND,MISO,MOSI,SCK and Reset pins will be used.

author
abhishek7xavier made it!(author)2014-09-21

I do have one more programmer link,it is even easy to build and use...give me some time.I have to search it!!

author
gada888 made it!(author)2014-09-21

Thanks,i'm expecting.

author
abhishek7xavier made it!(author)2014-09-22

Yes I got it,this is ASIM's programmer circuit.
The circuit is dirt cheap and easy and works super fine but the only limitation is it can program mcu running below 4.0 MHz clock.
http://chaokhun.kmitl.ac.th/~kswichit/cheapcable/

For the hardware u can also use AVR-PG2 programmer schematic :
https://www.olimex.com/Products/AVR/Programmers/AV...

https://www.olimex.com/Products/AVR/Programmers/AV...

Hope it helps!! :)

author
gada888 made it!(author)2014-09-21

I think the BIN and HEX are your codes.what about the other files say .BAS.NOI etc.doing?

author
abhishek7xavier made it!(author)2014-09-21

.bas = Main source code written in basic language
.bin and .hex = compiled machine code ready to be burned in mcu

About This Instructable

7,704views

28favorites

License:

Bio: Nothing special ^_^
More by abhishek7xavier:Heart rate monitor with PC connectivitySmart home energy monitoring & management systemDIY ClockBlock (a multipurpose rechargeable timepiece)
Add instructable to: