Professional Documents
Culture Documents
CHAPTER-1 INTRODUCTION
BVCITS Page 1
1.1
AIM
The present invention relates to Heart Rate Measurement from finger tip of
a simple low cost heart measuring device with LCD output. Heart rate of the subjects measured from finger using optical sensors and the rate is then averaged and displayed on the LCD screen.
BVCITS Page 2
1.3 MOTIVATION
The aim of our experiment is to create an low cost heart rate measuring system. The resting heart rate is directly related to the health and fitness of the person and hence it is important to know. You can measure the heart rate at any spot on the body where you 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, and easily measure the heart rate in bpm.
BVCITS Page 3
BVCITS Page 5
BVCITS Page 6
IR Transmitter transmits the light, here ir receiver acts as the photo diode. photo diode mainly depends up on light intensity. If light intensity increases, the resistance of the photo diode also increases. When a finger is placed in between IR transmitter and IR receiver, depending upon the blood pressure the pulses are produced. Microcontroller fetches the instructions and compares the pulses. Driven ckt is used to drive the display. The output is displayed at CAD (Common Anode Display).
BVCITS Page 7
BVCITS Page 8
For heart beat detection, which can be seen on a cathode ray oscilloscope (CRO), insert your thumb with the nail facing the LDR inside the T tube Shaking the thumb will change the level of signal from the previous the levels of sensitivity, trigger and voltage reference for the comparator by using presets VR1, VR2 and VR3 respectively.
BVCITS Page 9
OPREATIONAL AMPILIFERS T1,T2,T3 LED1,LED2 DIODE D1 RESISTORS R1, R8, VR3 R2 BVCITS Page 10 - 10K - 47K - IN4007 - BC557
PHOTO DIODE
BVCITS Page 11
BVCITS Page 12
The LM2904, LM358/LM358A, LM258/LM258A consists of two independent, high gain; internally frequency compensated operational amplifiers which were designed specifically to operate from a single power supply over a wide range of voltage. Operation from split power supplies is also possible and the low power supply current drain is independent of the magnitude of the power supply voltage. Application areas include transducer amplifier, DC gain blocks and all the conventional OP-AMP circuits which now can be easily implemented in single power supply systems. BVCITS Page 13
PIN NUMBER 1 2 3 4 5 6 7 8
DESCRIPTION OUTPUT AT A INVERTING INPUT A NON-INVERTING INPUTA GROUND NON-INVERTING INPUT B INVERTING INPUTB OUTPUT B V+
BVCITS Page 14
2) IC AT89C2051
Pin Number
Description
1 2 3 4 5 6 7 8 9 10 11 BVCITS Page 15
RESET Reset P3.0 - Port 3 RXD P3.1 - Port 3 TXD XTAL2 Crystal XTAL1 Crystal P3.2 - Port 3 - INT0 P3.3 - Port 3 - INT1 P3.4 - Port 3 TO P3.5 - Port 3 - T1 GND Ground P3.7 - Port 3
The AT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer with 2K bytes of Flash programmable and erasable read-only memory (PEROM). The device is manufactured using ATMELs high-density nonvolatile memory technology and is compatible with the industry-standard MCS51 instruction set. By combining versatile 8-bit CPU with Flash on a monolithic chip, the ATMEL AT89C2051 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89C2051 provides the following standard features: 2K bytes of Flash, 128bytes of RAM, 15 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, a precision analog comparator, on-chip oscillator and clock circuitry. In addition, the AT89C2051 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The power-down mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.
Pin Description
VCC: Supply voltage. GND: Ground. BVCITS Page 16
3) IC ULN2003
The ULN2003 is very cost effective chip that act like a switch. The easiest way to explain its operation is it simply switches on the earth to form an external circuit and can with stand a continual 500mA current gain and maxi. Pin1to 7 are inputs while 10 to 16 are high current sink drivers ,between the inputs BVCITS Page 17
A diode is a two-terminal electronic component that conducts electric current in only one direction. The term usually refers to semiconductor diode, the most common type today. This is a crystalline piece of semi conductor material connected to two electrical terminals. A vacuum tube diode (now little used except in some high-power technologies) is a vacuum tube with two electrodes. The most common function of a diode is to allow an electric current to pass in one direction (called the diode's forward direction), while blocking current in the opposite direction (the reverse direction). Thus, the diode can be thought of as an electronic version of a check value. This unidirectional behavior is called rectification, and is used to convert alternating current to direct current, and to extract modulation from radio signals in radio receivers.
BVCITS Page 18
FEATURES: Low current (max of 100 mA) Low voltage (max of 65 V) APPLICATIONS: General purpose switching and amplification
Light-Emitting Diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for other lighting. Introduced as a practical electronic component in 1962, early LEDs emitted low-intensity red light, but modern versions are available across the visible, ultraviolet and infrared wavelengths, with very high brightness. BVCITS Page 19
4.5 RESISTOR
A resistor is a two-terminal electronic component that implements electrical resistance as a circuit element. When a voltage V is applied across the terminals of a resistor, a current I will flow through the resistor in direct proportional to that voltage. This constant of proportionality is called conductance G. The reciprocal of the conductance is known as the resistance R, since, with a given voltage V, a larger value of R further "resists" the flow of current I as given by ohms law
BVCITS Page 20
There are also many types of the resistors as 1) Variable resistor 2) Thermistor 3) Light dependent resistor
Resistor example:
A led is the small led light and require 2.0 volts and.0.02 amps to operate correctly, if we connect the led up to 12 volt battery the voltage would be too high and too much current would flow the led would be blow up we need a resistor to limit voltage and current But which value the resistor would have Using ohms law R=V/I (12.0-2.0/0.02)=500OHMS
4.6 CAPACITOR
Capacitors store energy as well as charge. These charges are generally stored in the conductive plates, the positive charge plate called anode and negative BVCITS Page 21
ELECTROLYTIC CAPACITOR
An electrolytic capacitor is a type of capacitor that uses an electrolyte, an ionic conducting liquid, as one of its plates, to achieve a larger capacitance per unit volume than other types. They are often referred to in electronics usage simply as "electrolytic". They are used in relatively high-current and low-frequency electrical circuits, particularly in power supply filters, where they store charge needed to moderate output voltage and current fluctuations in rectifier output. They are also widely used as coupling capacitors in circuits where AC should be conducted but DC should not. There are two types of electrolytic aluminum tantalium.
CERAMIC CAPACITOR
A ceramic capacitor is a two-terminal, non-polar device. The classical ceramic capacitor is the "disc capacitor". This device pre-dates the transistor and was used extensively in vacuum-tube equipment (E.g., radio receivers) from about 1930 through the 1950s, and in discrete transistor equipment from the 1950s through the 1980s. As of 2007, ceramic disc capacitors are in widespread use in electronic equipment, providing high capacity and small size at low price compared to other low value capacitor types. BVCITS Page 22
Disc, resin coated, with through-hole leads. Multi layer rectangular block, surface mount. Bare leadless disc, sits in a slot in the PCB and is soldered in place, used for UHF applications. Tube shape, not popular now
LDRs or Light Dependent Resistors are very useful especially in light/dark sensor circuits. Normally the resistance of an LDR is very high, sometimes as high as 1000 000 ohms, but when they are illuminated with light resistance drops dramatically. An LDR (Light dependent resistor), as its name suggests, offers resistance in response to the ambient light. The resistance decreases as the intensity of incident light increases, and vice versa. In the absence of light, LDR exhibits a resistance of the order of mega-ohms which decreases to few hundred ohms in the presence of light. It can act as a sensor, since a varying voltage drop can be obtained in accordance with the varying light. It is made up of cadmium sulphide (CdS).
BVCITS Page 23
Crystal Oscillator is an electronic resonator circuit that uses the mechanical resonance of a vibrating crystal of piezo electric material to create an electrical signal with a very precise frequency This frequency is commonly used to keep track of time (as in quartz wrist watches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers. The most piezoelectric resonator used is the quartz crystal, so oscillator circuits designed around them became known as "crystal oscillators."
BVCITS Page 24
4.9 IR DIODE
Common infrared LED that emits infrared rays has the same appearance with visible light LED. Its appropriate operating voltage is around 1.4v and the current is generally smaller than 20mA. Current limiting resistances are usually connected in series in the infrared LED circuits to adjust the voltages, helping the LEDs to be adapted to different operating voltages.
BVCITS Page 25
BVCITS Page 26
5.1GRAPHICAL REPRESENTATION
CONCULUSION:
$mod51 ORG 0H AJMP 30H ORG 0BH ;TIMER 0 INTERRUPT VECTOR AJMP TIM0ISR ;Timer 0 Interrupt service routine address ORG 30H MOV SP,#60H ;set stack pointer MOV P3,#0FFH ;set all port 3 bits high to enable inputs also MOV P1,#03 ;set port 1 to all zeros expect bits 0,1 MOV TMOD,#01100001B ;TIMER 1 - MODE 2 COUNTER,TIMR-0 TO MODE 1 BEG: MOV TH0,#0f0H ;TIMER REG.0 IS SET TO foo0, GIVES 4ms MOV TL0,#0 ; timer low reg. is also so mov r6,#255 clr 20h ; flag to know time between beats exceeded mov r2,#0 setb et0 setb ea PULSECHK: jb p3.6,$ ; look for pulse at lowlevel call delay2 jnb p3.6,$ ;look for pulse high setb tr0 ;yes, pulse gone up, start timer call delay2 back1: jb p3.6,$ ; let waveform go low call delay2 jnb p3.6,$ ; look for next pulse high clr tr0 ; stop timer mov a,r2 cjne r2,#0,brady ; too low rate! brady-cardia read_time: mov a,r6 cpl a mov dptr,#table ; table for rate calculated and kept ; read value in R6 which gives in steps of 4ms clr c subb a,#80 jc tachy ;rate too fast so tachy-cardia
BVCITS Page 28
MOV R4,#4 ; pin p3.2_ 0 made low one by one starts wth 18 ; mov r7,#2 ; decimal pt.on third digit from left (2 nd fromright) PQ2: CALL SEGDISP INC R0 clr c mov a,r4 rrc a mov r4,a jnc pq2 PV3: RET SEGDISP: mov dptr,#ledcode MOV A,@R0 ANL A,#0FH MOVC A,@A+dptr ; k: djnz r7,segcode ;yesDP: ; orl a,#01 ; add a dec. pt. where it should be segcode: MOV R5,A ORL A,#03H ; WE WANT TO USE PORT 1 BITS 0 AND 1 FOR INPUT ANLOG ; so retain them high S3: MOV P1,A ; SEGMENT_PORT S1: ; MOV A,R4 ; get digit code from r4 ; rrc a ; jc s6 mov a,r5 rrc a rrc a mov p3.7,c ; segment' a on p3.7 pin mov a,r4 ; mov r4,a cpl a
BVCITS Page 31
s6: ledcode: DB 7EH,0CH,0B6H,9EH,0CCH,0DAH,0FAH DB 0EH,0FEH,0CEH,0EEH,0F8H,72H,0BCH,0F6H,0E2H ;these are code for the numbers 0 to 9 and A to F DELAY2: mov 51h,#80 ;80ms delaywait: call till20ms djnz 51h,delaywait ret delay1: till20ms: MOV R1,#0ffH N: NOP nop nop DJNZ R1,N ret tim0isr: push psw push acc MOV TH0,#0f0H ;AUTO RELOAD VALUE mov tl0,0 DJNZ R6,K1A ;r6 WAS FFH, SO 256 TIMES 4 ms GIVES 1 s MOV R6,#255 ; 11.059 MHz 226 for it; use 244 for 12 MHz crystal MOV A,R2 ADD A,#1 ;ADD 1 TO SECONDS
BVCITS Page 32
; seconds over
table: db 255,255,255,255,255,255,255,255,255,255,255,255,255 ; db 255,255,255,255,255,255,255,255,255,255,255,255,255; db 255,255,255,255,255,255,255,255,255,255,255,255,255; db 255,255,255,255,255,255,255,255,255,255,255,255,255,255; db 251,246,242,237,233,229,226,222,218,215,211,208,205,202; db 199,196,193,190,188,185,180,178,176,173,171; db 169,167,165,163,161,159,157,155,154,152,150,149; db 147 , 145 , 144 , 142 , 141 , 139 , 138 , 136 , 135 , 134 , 132 , 131; db 130 , 129 , 127 , 126 , 125 , 124 , 123 , 122 , 121 , 120 , 118 , 117; db 116 , 115 , 114 , 113 , 113 , 112 , 111 , 110 , 109 , 108 , 107 , 106; db 105 , 105 , 104 , 103 , 102 , 101 , 101 , 100 , 99 , 98 , 98 , 97; db 96 , 96 , 95 , 94 , 94 , 93 , 92 , 92 , 91 , 91 , 90 , 89; db 89 , 88 , 88 , 87 , 86 , 86 , 85 ,85 , 84 , 84 , 83 , 83; db 82 , 82 , 81 , 81 , 80 , 80 , 79 , 79 , 78 , 78 , 77 , 77; db 77 , 76 , 76 , 75 , 75 , 74 , 74 , 74 , 73 , 73 , 72 , 72; db 72 ,71 , 71 , 70 , 70 , 70 , 69 , 69 , 69 , 68 , 68 , 68; db 67 , 67 , 67 , 66 , 66 , 66 , 65 , 65 , 65 , 64 , 64 , 64; db 63 , 63 , 63 , 63 , 62 , 62 , 62 ,61 , 61 , 61 , 61 , 60; db 60 , 60 , 60 , 59 , 59 , 59 , 58 , 58 , 58 , 58 , 57 , 57; db 57 , 57 , 56 , 56 , 56 , 56 , 56 , 55 , 55 , 55 , 55 , 54; db 54 , 54 , 54 , 54 , 53 , 53 , 53 , 53; END
BVCITS Page 33
5.4 RESULT
The mini project HEART RATE MEASUREMENT FROM FINGER TIP has been successfully designed and tested.
5.5 CONCLUSION
BVCITS Page 34
BVCITS Page 35
BOOKS: Electronics For You magazine (2008) REFERNCES: www.adfen.com www.efymag.com www.wikipedia.com BVCITS Page 36
BVCITS Page 37