13
Heart rate monitor using 8051 microcontroller and photo interrupter A simple 1

Heart rate monitering using 8051 and sensor

Embed Size (px)

DESCRIPTION

A simple heart rate monitor using 8051 microcontroller. The device senses the heart rate from the finger tip using IR reflection method and displays it on a three digit seven segment display in beats per minute The pulsating reflection is converted to a suitable current or voltage pulse by the sensor. The sensor output is processed by suitable electronic circuits to obtain a visible indication (digital display or graph).

Citation preview

Page 1: Heart rate monitering using 8051 and sensor

Heart rate monitor using 8051 microcontroller and photo

interrupter

A simple

1

Page 2: Heart rate monitering using 8051 and sensor

Overview

2

• A simple heart rate monitor using 8051 microcontroller. The device senses the heart rate from the finger tip 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.

Page 3: Heart rate monitering using 8051 and sensor

Photoplethysmography.Photoplethysmography is the process of optically estimating the volumetric measurement of an organ. Pulse oximetry , cardiovascular monitoring, respiration detection, heart rate monitoring etc are few common applications of photoplethysmography. Let us have a look at the application of photoplethysmography in heart rate monitoring from the finger tip. When the heart expands (diastole) the volume of blood inside the finger tip increases and when the heart contracts (systole) the volume of blood inside the finger tip decreases. The resultant pulsing of blood volume inside the finger tip is directly proportional to the heart rate and if you could some how count the number of pulses in one minute, that’s the heart rate in beats per minute . For this an IR transmitter /receiver pair is placed in close contact to the finger tip. When the heart beats, the volume of blood cells under the sensor increases and this reflects more IR waves to sensor and .When there is no beat the intensity of the reflected beam decreases. The pulsating reflection is converted to a suitable current or voltage pulse by the sensor. The sensor output is processed by suitable electronic circuits to obtain a visible indication (digital display or graph).

3

Page 4: Heart rate monitering using 8051 and sensor

LTH1550-01 photo interrupter forms the photoplethysmographic sensor here. LTH1550-01 is simply a IR diode – photo transistor pair in single package. The front side of the IR diode and photo transistor are exposed and the remaining parts are well isolated. When the finger tip is placed over the sensor the volumetric pulsing of the blood volume inside the finger tip due to heart beat varies the intensity of the reflected beam and this variation in intensity is according to the heart beat.

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 phototransistor 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. Any way 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 a two active low pass filters using opampLM324. The LM324 is a quad opamp 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 101 and cut off frequency will be 2.5Hz. The gain and cut off frequency are determined using the following equations.. 4

Page 5: Heart rate monitering using 8051 and sensor

• Voltage gain Av =1 + (R17 / R23)

• Cut off frequency Fc= 1/(2π *R17*C5)

• The second low pass filter also have the same parameters. 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. When ever 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.

5

Page 6: Heart rate monitering using 8051 and sensor

Components required

• LTH 1550-01 • IC AT89S51 • 2N2222 • LM324 • 7 SEGMENT DISPLAY / LCD • RESISTANCES• CAPACITORS• LOW POWER LED • CRYSTAL

6

Page 7: Heart rate monitering using 8051 and sensor

7

Page 8: Heart rate monitering using 8051 and sensor

8

Output over the bread board

Page 9: Heart rate monitering using 8051 and sensor

9

Observation and how program flow: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 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 (i.e.; 1/12MHz). So the maximum time delay that can be obtained using one session of the timer will be 65536µS.

Page 10: Heart rate monitering using 8051 and sensor

Implementation with Conclusion:

• When power is switched ON, the indicator LED D4 will glow 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. Average heart beat of a human being is 72 beat/minute.

10

Page 11: Heart rate monitering using 8051 and sensor

11

Data sheet:LM324-N

Page 12: Heart rate monitering using 8051 and sensor

12

Page 13: Heart rate monitering using 8051 and sensor

13