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 :
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.