Академический Документы
Профессиональный Документы
Культура Документы
PROJECT REPORT
(07241A1112) (07241A1124)
(07241A1129)
Hyderabad
2010
Department of Bio-Medical Engineering
Gokaraju Rangaraju Institute of Engineering and
Technology
Hyderabad
CERTIFICATE
This is to certify that the project entitled “HEART RATE MONITOR WITH TEMPERATURE
SENSOR” has been submitted by
The results embodied in this project have not been submitted to any other University or
Institution for the award of any degree or diploma.
Mrs. T.Padma
Professor & HOD
DEPARTMNENT OF BIOMEDICAL
ENGINEERING
CERTIFICATE
There are many people who have helped us directly or indirectly in the successful
completion of our project. We would like to take this opportunity to thank one and all.
First of all we would like to express our deep sense of gratitude towards our project Guide Ms
Swathi.D Asst Professor Dept. of BME for always being available whenever we require her
guidance as well as for motivating us through out the project work.
We are also grateful to the Mrs T.Padma, (Head of Dept.of BME for her valuable guidance
during our project. We would like to express our deep gratitude towards our teaching and non-
teaching staff for giving their valuable suggestions and co operation sfor doing our project.
We would like to thank all our friends for their help and constructive
criticism during our project period. Finally, we are very much indebted to our
parents for their moral support and encouragement to achieve higher goals. we
have no words to express our gratitude and still we are very thankful to our
parents who have shown us this world and for every support they gave us.
CONTENTS
ABSTRACT
INTRODUCTION
CIRCUIT DIAGRAM
COMPONENTS DESCRIPTION
CIRCUIT EXPLANATION
APPLICATIONS
CONCLUSION
ABSTRACT
COMPONENTS DESCRIPTION
There are a number of components in this module and they are as follows:
1. Micro controller-AT89S52
2. A/D Converter-ADC0804
3. Temperature sensor-LM35A
4. LCD Display
5. Buzzer
6. Reset switch
7. LDR
8. LED
9. 10K SIP
10. Potentiometer-50K
11. Transistors-BC547
12. Capacitors-15pF,33pF,104pF,10uF,1000uF
13. Resistors-1K,8.2K,10K,330K
15. 5v DC supply
Micro controller-AT89S52:
Description: The AT89S52 is a low-power, high-performance CMOS 8-bit
microcontroller with 8K bytes of in-system programmable Flash memory. The
device is manufactured using Atmel’s high-density nonvolatile memory
technology and is compatible with the indus-try-standard 80C51 instruction
set and pinout. The on-chip Flash allows the program memory to be
reprogrammed in-system or by a conventional nonvolatile memory pro-
grammer. By combining a versatile 8-bit CPU with in-system programmable
Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller
which provides a highly-flexible and cost-effective solution to many
embedded control applications. The AT89S52 provides the following standard
features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer,
two data pointers, three 16-bit timer/counters, a six-vector two-level
interrupt architecture, a full duplex serial port, on-chip oscillator, and clock
circuitry. In addition, the AT89S52 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 con-tents but freezes the oscillator, disabling all other
chip functions until the next interrupt or hardware reset.
Pin Configurations:
PIN DESCRIPTION:
GND Ground.
Port 0 Port 0 is an 8-bit open drain bidirectional I/O port. As an output port,
each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the
pins can be used as high-impedance inputs. Port 0 can also be configured to
be the multiplexed low-order address/data bus during accesses to external
program and data memory. In this mode, P0 has internal pull-ups. Port 0 also
receives the code bytes during Flash programming and outputs the code
bytes dur-ing program verification. External pull-ups are required during
program verification.
Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port
1 output buffers can sink/source four TTL inputs. When 1s are written to Port
1 pins, they are pulled high by the inter-nal pull-ups and can be used as
inputs. As inputs, Port 1 pins that are externally being pulled low will source
current (IIL) because of the internal pull-ups. In addition, P1.0 and P1.1 can
be configured to be the timer/counter 2 external count input (P1.0/T2) and
the timer/counter 2 trigger input (P1.1/T2EX), respectively, as shown in the
follow-ing table. Port 1 also receives the low-order address bytes during
Flash programming and verification.
Port 2 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port
2 output buffers can sink/source four TTL inputs. When 1s are written to Port
2 pins, they are pulled high by the inter-nal pull-ups and can be used as
inputs. As inputs, Port 2 pins that are externally being pulled low will source
current (IIL) because of the internal pull-ups. Port 2 emits the high-order
address byte during fetches from external program memory and dur-ing
accesses to external data memory that use 16-bit addresses (MOVX @
DPTR). In this application, Port 2 uses strong internal pull-ups when emitting
1s. During accesses to external data memory that use 8-bit addresses
(MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register.
Port 2 also receives the high-order address bits and some control signals
during Flash program-ming and verification.
Port 3 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port
3 output buffers can sink/source four TTL inputs. When 1s are written to Port
3 pins, they are pulled high by the inter-nal pull-ups and can be used as
inputs. As inputs, Port 3 pins that are externally being pulled low will source
current (IIL) because of the pull-ups. Port 3 receives some control signals for
Flash programming and verification. Port 3 also serves the functions of
various special features of the AT89S52, as shown in the fol-lowing table.
RST Reset input. A high on this pin for two machine cycles while the
oscillator is running resets the device. This pin drives high for 98 oscillator
periods after the Watchdog times out. The DISRTO bit in SFR AUXR (address
8EH) can be used to disable this feature. In the default state of bit DISRTO,
the RESET HIGH out feature is enabled.
ALE/PROG Address Latch Enable (ALE) is an output pulse for latching the
low byte of the address during accesses to external memory. This pin is also
the program pulse input (PROG) during Flash programming. In normal
operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency
and may be used for external timing or clocking purposes. Note, however,
that one ALE pulse is skipped dur-ing each access to external data memory.
If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH.
With the bit set, ALE is active only during a MOVX or MOVC instruction.
Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no
effect if the microcontroller is in external execution mode.
PSEN Program Store Enable (PSEN) is the read strobe to external program
memory. When the AT89S52 is executing code from external program
memory, PSEN is activated twice each machine cycle, except that two PSEN
activations are skipped during each access to exter-nal data memory.
XTAL1 Input to the inverting oscillator amplifier and input to the internal
clock operating circuit.
REGISTERS:
Special Function Registers A map of the on-chip memory area called the
Special Function Register (SFR) space is shown . Note that not all of the
addresses are occupied, and unoccupied addresses may not be imple-
mented on the chip. Read accesses to these addresses will in general return
random data, and write accesses will have an indeterminate effect. User
software should not write 1s to these unlisted locations, since they may be
used in future products to invoke new features. In that case, the reset or
inactive values of the new bits will always be 0.
Power Off Flag: The Power Off Flag (POF) is located at bit 4 (PCON.4) in the
PCON SFR. POF is set to “1” during power up. It can be set and rest under
software control and is not affected by reset.
Memory Organization
MCS-51 devices have a separate address space for Program and Data
Memory. Up to 64K bytes each of external Program and Data Memory can be
addressed.
Data Memory The AT89S52 implements 256 bytes of on-chip RAM. The
upper 128 bytes occupy a parallel address space to the Special Function
Registers. This means that the upper 128 bytes have the same addresses as
the SFR space but are physically separate from SFR space. When an
instruction accesses an internal location above address 7FH, the address
mode used in the instruction specifies whether the CPU accesses the upper
128 bytes of RAM or the SFR space. Instructions which use direct addressing
access the SFR space. For example, the following direct addressing
instruction accesses the SFR at location 0A0H (which is P2). MOV 0A0H,
#data Instructions that use indirect addressing access the upper 128 bytes
of RAM. For example, the following indirect addressing instruction, where R0
contains 0A0H, accesses the data byte at address 0A0H, rather than P2
(whose address is 0A0H). MOV @R0, #data Note that stack operations are
examples of indirect addressing, so the upper 128 bytes of data RAM are
available as stack space.
A/D CONVERTER-ADC0804:
The ADC080X family are 8-Bits,successiveapproximation
A/D converters which use a modified potentiometric ladder and are designed to operate
with the 8080A control bus via three-state outputs. These convertersappear to the
processor as memory locations or I/O ports, and hence no interfacing logic is required.
The differential analog voltage input has good commonmode - rejection and permits
offsetting the analog zero-inputvoltage value. In addition, the voltage reference input
can be adjusted to allow encoding any smaller analog voltage span
to the full 8 bits of resolution.
PIN-DIAGRAM:
4. CLK IN - Clock IN
5. INTR - Interrupt (Active Low)
Operating Conditions
Temperature Range: 0 C to 70 C
Thermal Resistance (Typical, Note 1) JA (oC/W)
PDIP Package : 80
Maximum Junction Temperature Plastic Package :150oC
Maximum Storage Temperature Range: -65oC to 150oC
Maximum Lead Temperature (Soldering, 10s):300oC
TEMPERATURE SENSOR-LM35A:
The LM35 series are precision integrated-circuit temperature sensors, whose
output voltage is linearly proportional to the Celsius (Centigrade)
temperature. The LM35 thus has an advantage over linear temperature
sensors calibrated in ° Kelvin, as the user is not required to subtract a large
constant voltage from its output to obtain convenient Centigrade scaling.
The LM35 does not require any external calibration or trimming to provide
typical accuracies of ± 1/4°C at room temperature and ± 3/4°C over a full
-55 to +150°C temperature range.
Low cost is assured by trimming and calibration at the wafer level. The
LM35's low output impedance, linear output, and precise inherent calibration
make interfacing to readout or control circuitry especially easy. It can be
used with single power supplies, or with plus and minus supplies. As it draws
only 60 µA from its supply, it has very low self-heating, less than 0.1°C in still
air. The LM35 is rated to operate over a -55° to +150°C temperature range,
while the LM35C is rated for a -40° to +110°C range (-10° with improved
accuracy). The LM35 series is available packaged in hermetic TO-46
transistor packages, while the LM35C, LM35CA, and LM35D are also available
in the plastic TO-92 transistor package. The LM35D is also available in an 8-
lead surface mount small outline package and a plastic TO-220 package.
Features
Calibrated directly in ° Celsius (Centigrade) Linear + 10.0 mV/°C scale factor
0.5°C accuracy guaranteeable (at +25°C) Rated for full -55° to +150°C
range Suitable for remote applications Low cost due to wafer-level trimming
Operates from 4 to 30 volts Less than 60 µA current drain Low self-heating,
0.08°C in still air Nonlinearity only ± 1/4°C typical Low impedance output,
0.1 for 1 mA load
Typical Applications
DS005516-4 DS005516-3
FIGURE 1. Basic Centigrade Temperature Sensor (+2°C to +150°C)
Choose R1 = -VS/50 µA V OUT = +1,500 mV at +150°C = +250 mV at
+25°C = -550 mV at -55°C
FIGURE 2. Full-Range Centigrade Temperature Sensor
LCD DISPLAY:
A liquid crystal display (LCD) is a thin, flat electronic visual display that uses the light
modulating properties of liquid crystals (LCs). LCs do not emit light directly.
They are used in a wide range of applications including: computer monitors, television,
instrument panels, aircraft cockpit displays, signage, etc. They are common in
consumer devices such as video players, gaming devices, clocks, watches, calculators,
and telephones. LCDs have displaced cathode ray tube(CRT) displays in most
applications. They are usually more compact, lightweight, portable, less expensive,
more reliable, and easier on the eyes. They are available in a wider range of screen
sizes than CRT and plasma displays, and since they do not use phosphors, they cannot
suffer image burn-in.
LCDs are more energy efficient and offer safer disposal than CRTs. Its low electrical
power consumption enables it to be used in battery-powered electronic equipment. It is
an electronically-modulated optical device made up of any number of pixels filled with
liquid crystals and arrayed in front of a light source (backlight) or reflector to produce
images in colour or monochrome. The earliest discovery leading to the development of
LCD technology, the discovery of liquid crystals, dates from 1888.[1] By 2008,
worldwide sales of televisions with LCD screens had surpassed the sale of CRT units.
Each pixel of an LCD typically consists of a layer of molecules aligned between two
transparent electrodes, and two polarizing filters, the axes of transmission of which are
(in most of the cases) perpendicular to each other. With no actual liquid crystal between
the polarizing filters, light passing through the first filter would be blocked by the second
(crossed) polarizer. In most of the cases the liquid crystal has double refraction.[citation
needed]
The surface of the electrodes that are in contact with the liquid crystal material are
treated so as to align the liquid crystal molecules in a particular direction. This treatment
typically consists of a thin polymer layer that is unidirectionally rubbed using, for
example, a cloth. The direction of the liquid crystal alignment is then defined by the
direction of rubbing. Electrodes are made of a transparent conductor called Indium Tin
Oxide (ITO).
BUZZER:
A buzzer or beeper is an audio signaling device, which may be mechanical,
electromechanical, or electronic. Typical uses of buzzers and beepers include
alarms, timers and confirmation of user input such as a mouse click or
keystroke.
A piezoelectric element may be driven by an oscillating electronic circuit or
other audio signal source. Sounds commonly used to indicate that a button
has been pressed are a click, a ring or a beep. Electronic buzzers find many
applications in modern days.
RESET SWITCH:
It is used to reset the lcd display screen such that the new readings can be
taken.
Photoresistors come in many different types. Inexpensive cadmium sulfide cells can be
found in many consumer items such as camera light meters, street lights, clock radios,
alarms, and outdoor clocks.
They are also used in some dynamic compressors together with a small incandescent
lamp or light emitting diode to control gain reduction.
Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light dependent resistor) are
used for the mid infrared spectral region. Ge:Cu photoconductors are among the best
far-infrared detectors available, and are used for infrared astronomy and infrared
spectroscopy.
Transducers are used for changing energy types.
10K SIP:
POTENTIOMETER:
A potentiometer (colloquially known as a "pot") is a three-terminal resistor with a sliding
contact that forms an adjustable voltage divider.[1] If only two terminals are used (one
side and the wiper), it acts as a variable resistor or rheostat. Potentiometers are
commonly used to control electrical devices such as volume controls on audio
equipment. Potentiometers operated by a mechanism can be used as position
transducers, for example, in a joystick.
Potentiometers are rarely used to directly control significant power (more than a watt).
Instead they are used to adjust the level of analog signals (e.g. volume controls on
audio equipment), and as control inputs for electronic circuits. For example, a light
dimmer uses a potentiometer to control the switching of a TRIAC and so indirectly
control the brightness of lamps.
Construction of a wire-wound circular potentiometer. The resistive element (1) of the
shown device is trapezoidal, giving a non-linear relationship between resistance and
turn angle. The wiper (3) rotates with the axis (4), providing the changeable resistance
between the wiper contact (6) and the fixed contacts (5) and (9). The vertical position of
the axis is fixed in the body (2) with the ring (7) (below) and the bolt (8) (above).
A potentiometer is constructed with a resistive element formed into an arc of a circle,
and a sliding contact (wiper) travelling over that arc. The resistive element, with a
terminal at one or both ends, is flat or angled, and is commonly made of graphite,
although other materials may be used. The wiper is connected through another sliding
contact to another terminal. On panel pots, the wiper is usually the center terminal of
three. For single-turn pots, this wiper typically travels just under one revolution around
the contact. "Multiturn" potentiometers also exist, where the resistor element may be
helical and the wiper may move 10, 20, or more complete revolutions, though multiturn
pots are usually constructed of a conventional resistive element wiped via a worm gear.
Besides graphite, materials used to make the resistive element include resistance wire,
carbon particles in plastic, and a ceramic/metal mixture called cermet.
One form of rotary potentiometer is called a String potentiometer. It is a multi-turn
potentiometer operated by an attached reel of wire turning against a spring. It is used as
a position transducer.
In a linear slider pot, a sliding control is provided instead of a dial control. The resistive
element is a rectangular strip, not semi-circular as in a rotary potentiometer. Due to the
large opening slot or the wiper, this type of pot has a greater potential for getting
contaminated.
VOLTAGE REGULATOR-7805:
POWER SUPPLY:
5volts dc supply is taken from the 230volts a.c. mains by using a step down
transformer in which a voltage regulator 7805 is used.
rd=1;
intr=1;
adcdata=0xff;
while(1)
lcdcmd(0xc2);
//delay(500);
wr=0;
_nop_();
_nop_();
_nop_();
_nop_();
wr=1;
delay(50);
rd=0;
delay(10);
a=adcdata;
convert(a);
delay(500);
void main()
buz=0;
finger=1;
lcd_init();
lcdcmd(0x85);
msgdisplay("WELCOME");
lcdcmd(0x01);
msgdisplay("temp hbeat");
rd=1;
intr=1;
adcdata=0xff;
while(1)
lcdcmd(0xc2);
//delay(500);
wr=0;
_nop_();
_nop_();
_nop_();
_nop_();
wr=1;
delay(50);
rd=0;
delay(10);
a=adcdata;
convert(a);
delay(500);
for(i=0;i<100;i++)
count+=1;
if(finger==0)
delay(1000);
if(!finger)
buz=1;
delay(500);
pp=1;
buz=0;
break;
else
pp=0;
delay(500);
lcdcmd(0xca);
if(pp)
convert(count);
else
convert(0);
pp=0;
The above program asserts the input data.If the sensor senses the
subject’s finger,then the input of the buzzer is set to higher logic
state otherwise the input of the buzzer is set to 0. And finally the
lcd also shows the temperature readings based on the following
program instructions:
temp_value = temp_value;
value=temp_value/10;
d3=temp_value%10;
d1=value/10;
d2=value%10;
d1=d1+0x30;
lcddata(d1);
delay(10);
d2=d2+0x30;
MICROCONTROLLER PROGRAMMING:
#include<reg51.h>
#include"lcddisplay.h"
#include<intrins.h>
sbit rd = P2^0;
sbit wr = P2^1;
sbit intr = P2^2;
#define adcdata P3
lcdcmd(0x01);
msgdisplay("temp hbeat");
rd=1;
intr=1;
adcdata=0xff;
while(1)
{
lcdcmd(0xc2);
//delay(500);
wr=0;
_nop_();
_nop_();
_nop_();
_nop_();
wr=1;
delay(50);
rd=0;
delay(10);
a=adcdata;
convert(a);
delay(500);
for(i=0;i<100;i++)
{
count+=1;
if(finger==0)
{
delay(1000);
if(!finger)
{
buz=1;
delay(500);
pp=1;
buz=0;
break;
}
else
pp=0;
}
}
delay(500);
lcdcmd(0xca);
if(pp)
{
convert(count);
}
else
convert(0);
pp=0;
{
unsigned char value,d1,d2,d3;
temp_value = temp_value;
value=temp_value/10;
d3=temp_value%10;
d1=value/10;
d2=value%10;
d1=d1+0x30;
lcddata(d1);
delay(10);
d2=d2+0x30;
lcddata(d2);
delay(4);
// msgdisplay(".");
d3=d3+0x30;
lcddata(d3);
delay(10);
}
APPLICATIONS:
The instrument consists of the
circuits which measure both the heart rate and temperature has
various applications.
CONCLUSION: