P. 1
Heart Beat Sensor

Heart Beat Sensor

|Views: 167|Likes:
Published by Ronak Doshi

More info:

Published by: Ronak Doshi on Jul 19, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

04/15/2014

pdf

text

original

Email: info@sunrom.com Visit us at http://www.sunrom.

com

Document: Datasheet

Date: 30-May-11

Model #: 1157

Product’s Page: www.sunrom.com/p-556.html

Heart Beat Sensor
Heart beat sensor is designed to give digital output of heat beat when a finger is placed on it. When the heart beat detector is working, the beat LED flashes in unison with each heart beat. 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 DC

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

Specification
Parameter Operating Voltage Operating Current Output Data Level Heart Beat detection Light source Value +5V DC regulated 100 mA 5V TTL level Indicated by LED and Output High Pulse 660nm Super Red LED

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

and you can view the beat LED blinking on each heart beat. To test sensor you only need power the sensor by connect two wires +5V and GND. With each heart pulse the detector signal varies. Next middle wire is Brown which is output and Red wire is positive supply. You can leave the output wire as it is. Black wire is Ground. when the heart pumps a pulse of blood through the blood vessels. These wires are also marked on PCB.sunrom. When Beat LED is off the output is at 0V. F IGURE 1 S ENSOR P RINCIPLE 2 Sunrom Technologies Your Source for Embedded Systems Visit us at www. the finger becomes slightly more opaque and so less light reached the detector. The output signal is also indicated by a LED which blinks on each heart beat. This signal is amplified and triggered through an amplifier which outputs +5V logic level signal.Using the Sensor • • • • Connect regulated DC power supply of 5 Volts. Put finger on the marked position. This variation is converted to electrical pulse. The LED needs to be super bright as the maximum light must pass spread in finger and detected by detector. Now. The output is active high for each beat and can be given directly to microcontroller for interfacing applications. Heart beat output signal 5V level 0V level LED ON each high level when finger is placed on sensor LED OFF when no beat detected when finger is not placed on sensor Working The sensor consists of a super bright red LED and light detector.com .

F IGURE 2 S IGNAL V IEW Fig.Following figure shows signal of heart beat and sensor signal output graph.com .sunrom. Fig. For a 25-year old.2 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. this range is about 140-170 beats per minute while for a 60-year old it is typically between 115 and 140 beats per minute.3 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. 3 Sunrom Technologies Your Source for Embedded Systems Visit us at www.

0/RXD P3.Sample Application: Digital Heart Beat Monitor Let’s use this heart beat sensor and build a digital heart beat monitor.0 input of U2 that is AT89S52 (Can be any 8051 type) which is monitored by the program whenever this input goes high.5/MOSI P1. Dividing 60.4/AD4 P0.6/MISO P1.sunrom.000 by 1000 will give the correct result of 60 which is shown on the display.7/AD7 P1.0592 The pulse signal is applied to the P1.3 P1.4/T0 P3. if the pulse rate is 60 BPM (beats per minute) there will be a pulse every second.3/AD3 P0.com . there is a counter which counts how many 1ms intervals there are between two high going heart beat pulses.2/AD2 P0.000 and the result is the pulse rate. This number is then divided by 60. Internally to U2. U1 LCD 16x2 LCD VCC U2 AT89S52 39 38 37 36 35 34 33 32 1 2 3 4 5 6 7 8 31 + XTAL1 C1 10uF 9 R1 10K RST P0.4/A12 P2. If there is invalid result (BPM>200) it is invalid and waits for next cycle.4/SS P1.1/A9 P2.0/T2 P1.7/RD 21 22 23 24 25 26 27 28 10 11 12 13 14 15 16 17 29 30 VCC PR1 50K PRESET 14 13 12 11 10 9 8 7 Enable R/W RS VL Gled Vled Vdd Vss D7 D6 D5 D4 D3 D2 D1 D0 Y1 18 C3 33p HEART BEAT SENSOR OUT +5V GND CN1 SUNROM #1157 VCC VCC 40 Display Contrast VCC 20 19 C2 33p 11.3/A11 P2.6/WR P3.2/INT0 P3. Sample code of this application is shown on next page.2 P1.7/SCK EA/VPP PSEN ALE/PROG XTAL2 GND 6 5 4 3 16 15 2 1 VCC P2.1/TXD P3.6/A14 P2. When a finger is put in the sensor.7/A15 P3.6/AD6 P0.2/A10 P2. it displays the beats per minute (BPM) rate.5/T1 P3. 4 Sunrom Technologies Your Source for Embedded Systems Visit us at www.3/INT1 P3.5/A13 P2.1/AD1 P0. The duration of one heart beat will be one seconds or 1000 x 1ms. For example.0/A8 P2.0/AD0 P0.1/T2EX P1.5/AD5 P0.

Welcome LCD Message -=-=-= lcdClear(). // see document of #1157 for this calculation if(bpm > 200) { lcdGotoXY(0.. // Display reading in BPM lcdPrint(buf). float bpm..Main Program -=-=-=-=-=-=-= // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= void main() { // -=-=.1). } } } 5 Sunrom Technologies Your Source for Embedded Systems Visit us at www. sprintf (buf. lcdPrint("HEART RATE : ").com . "%0. //sensor is connected to this pin unsigned int beatms. lcdGotoXY(0.Intialize variables -=-=-= lcdInit(). // 10ms delay so that it does not listen to any noise beatms = 10.. sprintf (buf.Program Loop -=-=-= while(1) { while(SENSOR==0). char buf[20]..Hardware Defines -=-=-=-=-=-=-= // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= sbit SENSOR = P1^0. wait for next { DelayNmS(1).0f BPM".1).0). } else { lcdGotoXY(0. // 2nd Line of LCD // "xxxxxxxxxxxxxxxx" lcdPrint("BEAT MONITOR").// wait for high pulse from sensor DelayNmS(10). //keep incrementing counter each 1ms } while(SENSOR==0) //keep looping till signal goes back high. //keep incrementing counter each 1ms } // beatms variable will now have time in ms between two high edge pulse lcdClear(). // start counting beatms from 10ms since we have delay after pulse while(SENSOR==1)// wait until signal is high { DelayNmS(1).0).sunrom. //wait 1msec beatms++. lcdGotoXY(0. // 1st Line of LCD // "xxxxxxxxxxxxxxxx" lcdPrint("DIGITAL HEART").// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // -=-=-=-=. lcdGotoXY(0. bpm). // Invalid. Wait for next cycle lcdPrint(buf). bpm = (float)60000/beatms. "Processing.. // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // -=-=-=-=. beatms=0."). // will store duration between two pulses // -=-=.1). // -=-=. //wait 1msec beatms++.

after power up the first time. But since we are using sample c code which ignores invalid values.com . Getting output when finger is near it. • • • • 6 Sunrom Technologies Your Source for Embedded Systems Visit us at www. it can take 5-10 seconds. use atleast 1000uF filtering capacito at 5V output of LM7805 as well as input capacitor of LM7805 power supply. 10 detection will be instant. seconds o This is normal. 10 After power on it takes 5-10 second to get detection of finger pulse. Getting false output randomly. Any more voltage can damage the boa Any less voltage.Board Dimensions (mm) Board is provided with four PCB supports Troubleshooting Notes • Getting false output all the time by LED blinking blinking. o Note that the sensor works on principle of change of light.sunrom. Check with multimeter. o Also check if the output pin of board is not being pulled to GND or VCC in your ing application board. o It can happen due to power supply fluctuation. so if you have p placed the sensor in light which changes rapidly like FAN just obstructing light source or place FAN where direct light source falls on it. Not getting any LED blink at all o Make sure you have given regulated +5V to board. and the board will not work. you can sample the heart beat and do average of 5-10 sample reading in your MCU. board. During testing you can leave the OUT pin floating as the OUT pin in status is reflected by onboard LED. Relocate to a place where there is no direct light fa falling on it. o Again same principle of light reflected by finger gets detected as change in light level and it blink. It can have this problem. If you are using LM7805 based power supply. After that. If you want to have more accuracy. this issue is taken care of.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->