Sunteți pe pagina 1din 23

VENKTESHWAR INSTITUTE OF TECHNOLOGY

HEART RATE MEASUREMENT


A Major Project submitted to RAJIV GANDHI PROUDYOGIKI VISHWAVIDHYALAYA, BHOPAL Towards partial fulfillment of the degree of BACHELOR OF ENGINEERING YEAR 2011-2012

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING

SUBMITTED BY: ANKIT MALVIYA (0838EC071008) ANUJ DUBEY (0838EC071013) AVESH KHAN (0838EC071019)

GUIDED BY: Mr. SANJAY VERMA SUBMITTED TO: Mr. VIKALP THAKUR

Venkteshwar Institute Of Technology Electronics & Communication

VENKTESHWAR INSTITUTE OF TECHNOLOGY

ACKNOWLEDGEMENT

Expressing gratitude is one of the most difficult tasks as words often fall short in reflecting any individuals feeling. It is our privilege to acknowledge those who helped and guided us throughout our journey of making this project and we undertake this task with utmost sincerity. We are thankful to Mr. Abhishek Rawat, H.O.D of Electronics & Communication department, without his guidance and generous support this project wouldnt have been possible. We are indebted to him for his helpful solutions and comments enriched by his useful tips which helped us in improving the project from time to time.
We are thankful to express deep sense of gratitude to Mr. for his able supervision, constructive criticism, affectionate treatment, encouragement and providing us adequate facilities for completion of the project.

Venkteshwar Institute Of Technology Electronics & Communication

VENKTESHWAR INSTITUTE OF TECHNOLOGY SANWER ROAD, INDORE

CERTIFICATE

This is to certify that Final year students of Bachelor of Engineering in Electronics and Communication Engineering at Venkteshwar Institute of Technology, have successfully completed their Major Project entitled HEART RATE MEASUREMENT for partial fulfillment of the degree of bachelor of engineering and given satisfactorily efforts in their project.

INTERNAL

EXTERNAL

Venkteshwar Institute Of Technology Electronics & Communication

VENKTESHWAR INSTITUTE OF TECHNOLOGY SANWER ROAD, INDORE

CERTIFICATE

This is to certify that Final year students of Bachelor of Engineering in Electronics and Communication Engineering at Venkteshwar Institute of Technology, have successfully completed their Major Project entitled HEART RATE MEASUREMENT for partial fulfillment of the degree of bachelor of engineering and given satisfactorily efforts in their project.

HEAD OF DEPARTMENT

PROJECT GUIDE

Venkteshwar Institute Of Technology Electronics & Communication

CONTENT

Venkteshwar Institute Of Technology Electronics & Communication

Heart Beat Sensor


Heart beat sensor is designed to give digital output of heart beat when a finger is placed on it. When the heart beat detector is working, the beat LED flashes in unison with each heartbeat. This digital output can be connected to microcontroller directly to measure the Beats per Minute (BPM) rate. It works on the principle of light modulation by blood flow through finger at each pulse.

Features
Heat beat indication by LED Instant output digital signal for directly connecting to Microcontroller Compact Size Working Voltage +5V D

Venkteshwar Institute Of Technology Electronics & Communication

Applications
Digital Heart Rate monitor Patient Monitoring System Bio-Feedback control of robotics and applications

Venkteshwar Institute Of Technology Electronics & Communication

Specification Parameter
Operating Voltage Operating Current Output Data Level Heart Beat Measurement Light source

Value
+5V DC regulated 100mA 5V TTL Level Indicated by LED Output high pulse 660nm super red LED

and

Pin Details
Board has 3-pin connector for using the sensor. Details are marked on PCB as below.

Pin
1 2 3

Name
+5V OUT GND

Details
Power supply Positive input Active High output Power supply Ground

Venkteshwar Institute Of Technology Electronics & Communication

Using the Sensor

Connect regulated DC power supply of 5 Volts. Black wire is Ground, Next middle wire is Brown which is output and Red wire is positive supply. These wires are also marked on PCB. To test sensor you only need power the sensor by connect two wires +5V and GND. You can leave the output wire as it is. When Beat LED is off the output is at 0V. Put finger on the marked position, and you can view the beat LED blinking on each heartbeat. The output is active high for each beat and can be given directly to microcontroller for interfacing applications.

Venkteshwar Institute Of Technology Electronics & Communication

Heart beat output signal

Venkteshwar Institute Of Technology Electronics & Communication

10

Working
The sensor consists of a super bright red LED and light detector. The LED needs to be super bright as the maximum light must pass spread in finger and detected by detector. Now, when the heart pumps a pulse of blood through the blood vessels, the finger becomes slightly more opaque and so less light reached the detector. With each heart pulse the detector signal varies. This variation is converted to electrical pulse. This signal is amplified and triggered through an amplifier which outputs +5V logic level signal. The output signal is also indicated by a LED which blinks on each heartbeat.

Venkteshwar Institute Of Technology Electronics & Communication

11

Following figure shows signal of heart beat and sensor signal output graph shows actual heart beat received by detector (Yellow) and the trigger point of sensor (Red)after which the sensor outputs digital signal (Blue) at 5V level.

Below figure shows target pulse rates for people aged between 20 and 70. The target range is the pulse rate needed in order to provide suitable exercise for the heart. For a 25-year old, this range is about 140-170beats per minute while for a 60-year old it is typically between 115 and 140 beats per minute.

Venkteshwar Institute Of Technology Electronics & Communication

12

Venkteshwar Institute Of Technology Electronics & Communication

13

Sample Application:
Sample code of this application is
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // -=-=-=-=- Hardware Defines -=-=-=-=-=-=-= // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= sbit SENSOR = P1^0; //sensor is connected to this pin unsigned int beatms; float bpm; char buf[20]; // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // -=-=-=-=- Main Program -=-=-=-=-=-=-= // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= void main() { // -=-=- Intialize variables -=-=-= lcdInit(); // -=-=- Welcome LCD Message -=-=-= lcdClear(); lcdGotoXY(0,0); // 1st Line of LCD // "xxxxxxxxxxxxxxxx" lcdPrint("DIGITAL HEART"); lcdGotoXY(0,1); // 2nd Line of LCD // "xxxxxxxxxxxxxxxx" lcdPrint("BEAT MONITOR"); beatms=0; // will store duration between two pulses

Venkteshwar Institute Of Technology Electronics & Communication

14

// -=-=- Program Loop -=-=-= while(1) { while(SENSOR==0);// wait for high pulse from sensor DelayNmS(10); // 10ms delay so that it does not listen to any noise beatms = 10; // start counting beatms from 10ms since we have delay after pulse while(SENSOR==1)// wait until signal is high { DelayNmS(1); //wait 1msec beatms++; //keep incrementing counter each 1ms } while(SENSOR==0) //keep looping till signal goes back high, wait for next { DelayNmS(1); //wait 1msec beatms++; //keep incrementing counter each 1ms } // beatms variable will now have time in ms between two high edge pulse lcdClear(); lcdGotoXY(0,0); lcdPrint("HEART RATE : "); bpm = (float)60000/beatms; // see document of #1157 for this calculation if(bpm > 200) { lcdGotoXY(0,1); sprintf (buf, "Processing......"); // Invalid, Wait for next cycle lcdPrint(buf);

Venkteshwar Institute Of Technology Electronics & Communication

15

} else { lcdGotoXY(0,1); sprintf (buf, "%0.0f BPM", bpm); // Display reading in BPM lcdPrint(buf); } } }

Venkteshwar Institute Of Technology Electronics & Communication

16

Board Dimensions (mm)

Board is provided with four PCB supports

Troubleshooting Notes
Getting false output all the time by LED blinking. o Note that the sensor works on principle of change of light, so if you have placed sensor in the light which changes rapidly like FAN just obstructing light source or place where direct light falls on it, It can have this problem. Relocate to a place where there is no direct light falling on it.

Venkteshwar Institute Of Technology Electronics & Communication

17

Getting false output randomly.

can happen due to power fluctuation. If you are using LM7805 based power supply, use at least 1000F filtering capacitor at 5V output of LM7805 as well as input of LM7805 power supply. Getting output when finger is near it. o Again same principle of light reflected by finger gets detected as change in light level and it blinks. But since we are using same code which ignores invalid values, this issue is taken care of. If you want to have more accuracy, you can sample the heart beat and do average of 5-10 sample readings in your MCU. After power on it takes 5-10 seconds to get detection of finger pulse.

o It

o This is normal, after power up the first time, it can take 5-10
seconds. After that, detection will be instant.

Not getting any LED blink at all.

o Make sure you have given regulated +5V to board. Check


with multimeter. Any more voltage can damage the board. Any less voltage and board will not work.

o Also check if the output pin of board is not being pulled to


GND or VCC in your application board. During testing you can leave the OUT pin floating as the OUT pin status is reflected by onboard LED.

Venkteshwar Institute Of Technology Electronics & Communication

18

LED
A light-emitting diode (LED) is an electronic light source. LEDs are used as indicator lamps in many kinds of electronics and increasingly for lighting. LEDs work by the effect of electroluminescence, discovered by accident in 1907. The LED was introduced as a practical electronic component in 1962. All early devices emitted low-intensity red light, but modern LEDs are available across the visible, ultraviolet and infra red wavelengths, with very high brightness. LEDs are based on the semiconductor diode. When the diode is forward biased (switched on), electrons are able to recombine with holes and energy is released in the form of light. This effect is called electroluminescence and the color of the light is determined by the energy gap of the semiconductor. The LED is usually small in area (less than 1 mm2) with integrated optical components to shape its radiation pattern and assist in reflection. LEDs present many advantages over traditional light sources including lower energy consumption, longer lifetime, improved robustness, smaller size and faster switching. However, they are relatively expensive and require more precise current and heat management than traditional light sources. Applications of LEDs are diverse. They are used as low-energy indicators but also for replacements for traditional light sources in general lighting, automotive lighting and traffic signals. The compact size of LEDs has allowed new text and video displays and sensors to be developed, while their high switching rates are useful in communications technology.

Venkteshwar Institute Of Technology Electronics & Communication

19

Venkteshwar Institute Of Technology Electronics & Communication

20

PRINTED CIRCUIT BOARD


A printed circuit board, or PCB, is used to mechanically support and electrically connect electronic components using conductive pathways, tracks, or traces, etched from copper sheets laminated onto a nonconductive substrate. It is also referred to as printed wiring board (PWB) or etched wiring board. A PCB populated with electronic components is a printed circuit assembly (PCA), also known as a printed circuit board assembly (PCBA). PCBs are inexpensive, and can be highly reliable. They require much more layout effort and higher initial cost than either wire-wrapped or point-to-point constructed circuits, but are much cheaper and faster for high-volume production. Much of the electronics industry's PCB design, assembly, and quality control needs are set by standards that are published by the IPC organization. Conducting layers are typically made of thin copper foil. Insulating layers dielectric are typically laminated together with epoxy resin prepreg. The board is typically coated with a solder mask that is green in color. Other colors that are normally available are blue and red. There are quite a few different dielectrics that can be chosen to provide different insulating values depending on the requirements of the circuit. Some of these dielectrics are polytetrafluoroethylene (Teflon), FR-4, FR-1, CEM-1 or CEM-3. Well known prepreg materials used in the PCB industry are FR-2 (Phenolic cotton paper), FR-3 (Cotton paper and epoxy), FR-4 (Woven glass and epoxy), FR-5 (Woven glass and epoxy), FR-6 (Matte glass and polyester), G-10 (Woven glass and epoxy), CEM1 (Cotton paper and epoxy), CEM-2 (Cotton paper and epoxy), CEM-3 (Woven glass and epoxy), CEM-4 (Woven glass and epoxy), CEM-5 (Woven glass and polyester). Thermal expansion is an important
Venkteshwar Institute Of Technology Electronics & Communication

21

consideration especially with BGA and naked die technologies, and glass fiber offers the best dimensional stability.

Venkteshwar Institute Of Technology Electronics & Communication

22

BIBLIOGRAPHY
Sunrom Technologies Google

Venkteshwar Institute Of Technology Electronics & Communication

23

S-ar putea să vă placă și