micro controller based heart rate monitoring system
-
Upload
eldhose-george -
Category
Engineering
-
view
885 -
download
4
Transcript of micro controller based heart rate monitoring system
MICTROCONTROLLER BASED HEART RATE
MONITORING SYSTEM
MINI PROJECT REPORT
Submitted by
ARUN P. ARAVIND
NEHA MARY THOMAS
ELDHOSE GEORGE
HARIKRISHNAN
SAMAL N. P.
in partial fulfillment for the award of the degree
of
Bachelor of Technology
in
ELECTRONICS AND COMMUNICATION ENGINEERING
of
COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY
DEPARTMENT OF ELECTRONICS ENGINEERING
MODEL ENGINEERING COLLEGE
COCHIN 682 021
NOVEMBER 2015
MODEL ENGINEERING COLLEGE
THRIKKAKARA, KOCHI-21
DEPARTMENT OF ELECTRONICS ENGINEERING
COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY
BONAFIDE CERTIFICATE
This is to certify that the MINI PROJECT report entitled
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Submitted by
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
is a bonafide account of the work done by him/her under our supervision
Dr. Mini M G Ms. Sheeba Ms. Aparna Devi
Head of department Project coordinator Project guide
ACKNOWLEDGEMENT
We thank Lord Almighty for the blessing he has bestowed on us for
successfully completing the mini project.
We are grateful to Prof. (Dr.) V P Devassia, Principal of our college and
Dr. Laila D, Associate Professor and Head of Department of Electronics (UG).
We are also profoundly indebted to our project co-coordinator, Mrs. Sheeba,
Assistant Professor in Electronics, for her innumerable acts of timely advice,
encouragement and help. We wish to express our deep sense of gratitude to our
guide, Mrs. Aparna Devi, Assistant Professor in Electronics, for her able
guidance and useful suggestions. We are also greatly indebted to all project lab
staff, who helped us make this project a success.
Finally, yet importantly, we would like to express our heartfelt thanks to
our seniors and friends who were ready with a positive comment all the time,
whether it was an off-hand comment to encourage us or a constructive piece of
criticism.
ABSTRACT
The mini project is about a simple heart rate monitoring system 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.
Photoplethysmography is the process of optically estimating the
volumetric measurement of an organ. 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)
Chapter 1
INTRODUCTION
In this chapter, we give a brief introduction into our project, the objective we aim to
achieve and the features of the project.
1.1 Basic Heart Rate Monitor: A heart rate monitor is a personal monitoring device which allows one to measure
his or her heart rate in real time or record the heart rate for later study. It is largely used
by performers of various types of physical exercise. It is widely used in hospitals for
checking the health of patient(s). These monitors are very useful in realizing the health
conditions of the person according to the age group. The following table shows the
average heart rate of people from different age groups:
Table 1.1: Average Heart Rate according to age
There is no doubt about the usefulness of a heart rate monitor. Every time
someone visits a doctor, one of the first things the doctor checks is the patient’s heart rate
or say pulse rate. In medical terms the heart rate of a patient is useful in determining
many of his/her medical conditions.
1.2 Advantages of our product over other heart rate monitoring
systems: There many heart rate monitoring systems already present. But our monitoring
system has certain advantages over the already present systems. The stethoscope which
Average Heart Rate Age
140Newborn
85 – 907 years
80 – 8514 years
70 – 80Adult
is the most basic device used by doctors is not very accurate. Another way is to use
electrocardiogram, but it is supposed to be very costly and not user friendly. The heart
rate monitor that we have setup does not need any expert advice, since it directly shows
the value of heart rate on LCD. Also it is portable, so can be carried along to places that
one travels too. Its cost effectiveness is also an an advantage.
1.3 Photoplathesmography: This is the basic principle of our project. 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 somehow count the number of pulses in
one minute, that’s the heart rate in beats per minute (bpm). For this an IR
transmitter/receiver pair placed in close contact with 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).
Chapter 2
HARDWARE DETAILS
Chapter 2 details each block diagram section, its general working and use in our project.
The circuit diagram provided in this chapter is divided into the transmitter and receiver
section. The circuit description and design are also given for the same. Also components
and its specifications are also mentioned.
2.1. Block Diagram:
Fig. 2.1: Block Diagram
2.2. Main Hardware Sections:
2.2.1. IR diode- Photo Transistor pair:
LTH1550-01 photo interrupter forms the photoplethysmographic sensor here. LTH1550-
01 is simply an IR diode – photo transistor pair in single package. The front side of the
IR diode and photo transistor is 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
IR diode-IR Transistor
(used as sensor)
LM324 (transimpedence
amplifier)
LCD 16*2
AT89S51 (Microcontroller)
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.
Fig.: Symbol for LTH 1500-01
Fig.: LTH 1550-01
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 photo
transistor 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.
2.2.2. Transimpedence Amplifier:
The next part of the circuit consists of a two active low pass filters using opamp LM324.
The LM324 is a quad opamp that can be operated from a single rail supply. Resistor R4,
R5 and capacitor C5 sets the gain and cut off frequency of the first filter. With the given
component values, gain will be 11 and cut off frequency will be 2.5Hz. The gain and cut
off frequency are determined using the following equations.
Voltage gain Av =1 + (R5 / R4)
Cut off frequency Fc= 1/(2π *R5*C5)
The second low pass filter also has same gain and cut off frequency. 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. Whenever 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.
Fig. : Pin diagram of LM324
Fig.: LM324
2.2.3 Microcontroller:
The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K
bytes of In-System Programmable Flash memory. The device is manufactured using
Atmel’s high-density nonvolatile memory technology and is compatible with the
industry-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 programmer. By combining a versatile 8-bit CPU with In-System
Programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful
microcontroller which provides a highly-flexible and cost-effective solution to many
embedded control applications.
Fig.: Pin diagram of 8051 microcontroller.
The AT89S51 provides the following standard features: 4K bytes of Flash, 128 bytes of
RAM, 32 I/O lines, Watchdog timer, two data pointers, two 16-bit timer/counters, a five-
vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and
clock circuitry. In addition, the AT89S51 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 external interrupt or
hardware reset.
2.2.4. LCD Display:
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide
range of applications. A 16*2 LCD display is a very basic module and is very commonly
used in various devices and circuits. These modules are preferred over seven segment
and other multi-segment LEDs. The reasons being: LCDs are economical, easily
programmable, have no limitation of displaying special and even custom characters,
animations and so on. A 16*2 LCD means it can display 16 characters per line and there
are 2 such lines. The characters are displayed in a 5*7 matrix.
Fig.: LCD Pin diagram
LCD displays are very popular now a most of the embedded system designers prefer
them over multiplexed seven segment LED displays. Using LCD displays you can
display text, custom characters, graphics and a lot of other stuff and it is a great
advantage over the LED counterparts. JHD162 is the LCD display used here. It is a 16X2
LCD display based on the HD44780 driver IC.
2.3. Circuit Diagram:
2.3.1. Complete Circuit:
Fig. 2.2: Circuit of heart rate monitor using 8051
2.3.1. Power Supply:
Fig. 2.2: Power Supply
2.3.2. Transimpedence Amplifier:
Fig 2.3: Transimpedence Amplifier
2.3.3. IR diode-phototransistor pair:
Fig. 2.4: IR diode-phototransistor pair
Chapter 3
SOFTWARE DETAILS
This chapter initially gives a brief introduction into software used and its general
features.
3.1 Software used:
3.1.1. PCB Wizard:
Designing Circuit Boards: PCB Wizard 3 is both easy to learn and easy to use. To design
a circuit board, simply drag and drop components onto your document and connect them
together using the intelligent wiring tool. Then select the menu option 'Convert to PCB'
and leave PCB Wizard 3 to do the rest for you.
If you want to simulate your design before turning it into a circuit board,
PCB Wizard 3 offers tight integration with Control Studio 2, Bright Spark and Livewire.
It also supports Crocodile Clips software.
Component Placement & Automatic Routing: Strategic component placement is critical
to achieving successful routing and PCB Wizard 3 has been greatly enhanced in this
area. The process is now fully automated and PCB Wizard 3 is able to calculate an
optimum board size for you and intelligently position components in preparation for
automatic routing.
PCB Wizard 3 includes an advanced automatic router that is able to route single-layer
and double-layer boards. Available with a brand new 'rip-up and retry' algorithm rather
than the 'single-pass' method used in previous versions, PCB Wizard 3 achieves
extremely high completion rates by going back and re-routing nets to make space for
connections that could not be routed on a previous pass.
Designing Circuit Boards: PCB Wizard 3 is both easy to learn and easy to use. To design
a circuit board, simply drag and drop components onto your document and connect them
together using the intelligent wiring tool. Then select the menu option 'Convert to PCB'.
PCB Wizard 3 offers tight integration with Control Studio 2, Bright Spark and Livewire.
It also supports Crocodile Clips software.
Component Placement & Automatic Routing: Strategic component placement is critical
to achieving successful routing and PCB Wizard 3 has been greatly enhanced in this
area. The process is now fully automated and PCB Wizard 3 is able to calculate an
optimum board size for you and intelligently position components in preparation for
automatic routing.
PCB Wizard 3 includes an advanced automatic router that is able to route single-layer
and double-layer boards. Available with a brand new 'rip-up and retry' algorithm rather
than the 'single-pass' method used in previous versions, PCB Wizard 3 achieves
extremely high completion rates by going back and re-routing nets to make space for
connections that could not be routed on a previous pass.
3.1.2. Proteus:
Proteus 8 is a single application with many service modules offering different
functionality (schematic capture, PCB layout, etc.). The wrapper that enables all of the
various tools to communicate with each other consists of three main parts.
Application Framework:
Proteus 8 consists of a single application (PDS.EXE). This is the framework or container
which hosts all of the functionality of Proteus. ISIS, ARES, 3DV all open as tabbed
windows within this framework and therefore all have access to the common database.
Common Database:
The common database contains information about parts used in the project. A part can
contain both a schematic component and a PCB footprint as well both user and system
properties. Shared access to this database by all application modules makes possible a
huge number of new features, many of which will evolve over the course of the Version
8 lifecycle.
3.1.3. MCU8051IDE:
MCU 8051 IDE is an integrated development environment for microcontrollers based on
MCS-51 intended for Assembly language and C language.
This IDE is currently available on GNU/Linux and Microsoft Windows (since version
1.3.6). This program was originally intended for education purposes, but now the area of
potential usage is surely significantly wider.
This program was created to fill a gap in the open source software of this kind. User
interface, source codes, documentation, web pages, etc., are written in English in order to
make this software available to as many user as possible, but there is support for
internationalization using i18n since version 1.3.10. This documentation is written in
LATEX. It is very important to note that this software was not developed for any
company, person or something similar and it is completely noncommercial, open source
software distributed under GNU GPLv2 license intended for a group of people with
common interest, in this case 8051.
Chapter 4
PCB LAYOUT AND FABRICATION
Chapter 4 details the preparation of PCB layout and its subsequent fabrication
procedures. The materials required for PCB fabrication are copper clad, ferric chloride
solution, paint and drilling machine. The PCB fabrication includes the following steps:
4.1 Preparation of the PCB layout First the circuit is drawn using Proteus. The mirrored image of the layout of
bottom layer PAD 2 PAD software is printed on an A4 size translucent tracing sheet or
butter paper. Using this, a thin film can be made and it is exposed to UV.
4.2 Film preparation In this process, the negative of the plate is made into photography film. For this
the printed image of the layout in the butter paper is placed over the film and it is
exposed to UV rays in the region other than the layout. The developed solution, then the
reaction will take place, then the region not exposed by UV rays will become transparent
and the other regions are dark in color. Thus the negative is produced. Then the film is
washed in solutions. After that the solution is kept for drying.
4.3 Transferring the layout to copper clad sheet First the copper clad sheet of required dimension is cut by using a cutting
machine. Then the sheet is cleaned by using a metal scrubber. After a perfect cleaning
the board is dipped in photo resist solution. So that the film of photo resist is formed on
the board. Then the copper clad sheet is placed in an oven. For some time, so that the
photo resist will be used to the surface of the board. The next step is to form an image of
the layout on the copper clad sheet. Then it is placed in the UV exposure unit so that the
UV rays will fall on the photo resist over the layout for 1.15 minutes. After that, the
board is washed gently in water for about 1mnt so that the chemical actions take place in
the regions exposed by UV rays. Then the board is washed in a dye so that the dye will
be fixed onto the layout regions. Thus we get the visible image of the layout on the board
with actual circuit. If there is any correction, the above processes are repeated.
4.4 Etching of the board When the board is ready for etching, it is placed in the ferric chloride solution of
required concentration. It is checked in regular intervals to prevent over etching and
successive damage to the part. After etching is complete, the board is taken out of the
solution and is washed in water to remove the excess ferric chloride. The D13X NC
thinner is applied to remove any dew or paint material on copper tracks. Then the sheet is
cleaned by using steel scrubber and washed again in water. Now the copper lines are
exposed and the body is checked with the magnifying glass to see whether all the lines in
the layout are clearly formed. Now the board is ready for tinning.
4.5 Tinning For tinning, the PCB is cleaned well and flux is applied to surface. Then it is
passed through the tinning machine. In tinning, the copper lines are plotted with an alloy
of TIN and LEAD.
4.6 Drilling After tinning, the next process is drilling. In this the holes of required sizes are
drilled in the PCB wherever needed, using a PCB drilling machine.
4.7 Finishing In the process after drilling the holes on the PCB, the board is taken and a light
coat of air dyeing varnish insulating varnish is applied to the bottom side carefully
avoiding the PAD areas. The PCB is then left till the insulating varnish dry up.
4.8 PCB Layout:
4.8.1. Power Supply top view:
Fig 4.1:PCB Power Supply top view4.8.2 Power Supply Bottom view:
Fig. 4.8.2. PCB Power supply bottom view
4.8.3. Amplifier top view:
4.8.4. Amplifier bottom view:
4.8.5. Microcontroller portion top view:
4.8.6. Microcontroller portion bottom view:
Chapter 5
SOLDERING AND DESOLDERING
This chapter gives details about soldering and de-soldering. Some tips and
precautions to be taken are also mentioned.
5.1 Soldering Soldering is the process of joining two or more dissimilar metals by melting
another metal having low melting point.
5.1.1. Soldering Flux
In order to make the surface accept the solder readily, the component terminals
should be free from the oxides and other obstructing films. Soldering flux cleans the
oxides from the surface of the metal. The leads should be cleaned chemically or by
scrapping using blade or knife. Small amount of lead should be coated on the portion of
the leads and the bits of soldering. This process is called tinning. Zinc Chloride,
Aluminum Chloride and rosin are the most commonly used fluxes. These are available in
petroleum jelly as paste fluxes.
5.1.2. Solder
It is an alloy of tin and lead, typically 60% tin and 40% lead. It melts at a
temperature of about 473K. Coating a surface with solder is called tinning because of the
tin in the contents of the solder. Solder for electronics use contains tiny cores of flux, like
the wires inside the main flux. The flux is corrosive like an acid and it clears the metal
surfaces as the solder melts. This is why we melt solder on the joints, not on the iron tip.
5.1.3 Soldering Tips
It is the tool used to melt and apply at the joints in the circuit. It operates in 230V
mains supply the normal power ratings of the soldering iron are 10W, 25W, 35W, 65W,
125W.
5.1.4 Soldering Station
It consists of a hand held hot air blow gun and the base station comprising of air
flow and temperature controls to the hot air blow gun.
5.1.5 Preparing the Soldering Iron
Place the soldering iron in its stand and plug it in. The iron will take a few minutes to
reach its operating temperature of about 673K.
Dampen the sponge in the stand
Wait for a few minutes for the soldering iron to warm up
Wipe the tip of the iron on the damp sponge
Melt little solder on the tip of iron; the process is called tinning.
6.1.6. Making Soldering Joint
Hold the soldering like a pen, near the base of the handle. Remember to never touch the
hot element or tip.
Touch the soldering iron onto the joint to be made. Make sure touches both the
component lead and the track. Hold the tip there for a few seconds.
Feed a little solder on the joint. It should flow smoothly onto the lead and track to form a
volcano shape. Make sure you supply the solder to the joint, not to the iron remove the
solder, then the iron, while keeping the joint still. Allow the joint a few seconds to cool
before you move the circuit board.
Inspect the joint closely. It should look shiny and have a ‘volcano’ shape. If not, you
will need to reheat it and feed in a little more solder. This time ensure that both the lead
and track are heated fully before applying solder.
5.2 Desoldering It is the removal of the solder from previously soldered joint. There are two ways to
remove the solder.
5.2.1. Using a De-soldering Pump (Solder Sucker):
De-solder pump is a commonly used device for this purpose. When the solder melts by
the action of the soldering iron, the trigger on the de-solder pump should be activated to
create a vacuum. This vacuum pulls the solder into the tube.
Set the pump by pushing the spring loaded plunger down until it locks. Apply both pump
nozzle and the tip of your soldering iron to the joint.
Wait a second or two for the solder to melt. Then press the button on the pump to release
plunger and suck the molten solder into the tool.
Repeat if necessary to remove as much solder as possible. The pump will need emptying
occasionally by unscrewing the nozzle.
5.2.2. Using Solder Remover Wick (Copper Braid):
Both the end of the wick and the tip of your soldering iron to the joint. As the solder
melts most of it flow onto the wick, away from the joint. Remove the wick first, then the
soldering iron. Cut off and discard the end of the wick coated with solder. After
removing most of the solder from the joints you may be able to remove the wire or
component lead straight away. If the joint will not come apart easily apply your soldering
iron to melt the remaining traces of the solder at the same time as pulling the joint apart.
5.3 Safety Precautions:
Never touch the element or tip of the soldering iron. They are very hot (about 673K) and
will you a nasty burn.
Take great care to avoid touching the mains flex with the tip of the iron. The iron should
have a heatproof flex for extra protection. Ordinary plastic flex melts immediately if
touched by a hot iron and there is a risk of burns and electric shock.
Always return the soldering iron to its stand when it is not in use. Allow joints a minute
or so to cool down before you touch them. .
Work in a well-ventilated area. The smoke formed as you melt the solder is mostly from
the flux and quite irritating. Avoid breathing it by keeping your head to the side of, not,
above your work.
Wash your hands after using solder.