Sunteți pe pagina 1din 27

A

PROJECT REPORT ON

HEART RATE MEASUREMENT BY USING


MICROCONTROLLER
Submitted by
KETAN TAKALE (20120349)
NIKHIL KHAIR (20120350)

Under the Guidance of


DR. S. L. NALBALWAR
MR. KRISHNAT PAWAR

In the fulfillment of B. Tech. in Electronics & Telecommunication


Engineering course of Dr. Babasaheb Ambedkar Technological University,
Lonere (Dist. Raigad) in the academic year 2015-2016.

Department of Electronics & Telecommunication Engineering


Dr. Babasaheb Ambedkar Technological University, Lonere
Lonere-402103

2015-2016

A
PROJECT REPORT ON

HEART RATE MEASUREMENT BY USING


MICROCONTROLLER
Submitted by
KETAN TAKALE (20120349)
NIKHIL KHAIR (20120350)

Under the Guidance of


DR. S. L. NALBALWAR
MR. KRISHNAT PAWAR

Department of Electronics & Telecommunication Engineering


Dr. Babasaheb Ambedkar Technological University, Lonere
Lonere-402103

2015-2016

Dr. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY


VIDYAVIHAR, LONERE- 402103. Tal. Mangaon, Dist. Raigad. (Maharashtra State) INDIA

CERTIFICATE
This is to certify that the Project entitled HEART RATE MEASUREMENT
USING MICROCONTROLLER Submitted by KETAN TAKALE is record
of bonafide work carried out by him under my guidance in the partial fulfillment
the requirement for the award of Degree of B. Tech. in Electronics and
Telecommunication

Engineering

course of

Dr.

Babasaheb

Ambedkar

Technological University, Lonere (Dist. Raigad) in the Academic year20152016.

Dr. S. L. Nalbalwar

Dr. S. L. Nalbalwar

Project guide

Associate Professor and Head


Department of EXTC

Mr. Krishnat Pawar


Project Co-guide
EXAMINER
1)
2)

Date: 19 MAY, 2016 Place: Lonere (Raigad)

Dr. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY


VIDYAVIHAR, LONERE- 402103. Tal. Mangaon, Dist. Raigad. (Maharashtra State) INDIA
CERTIFICATE

CERTIFICATE
This is to certify that the Project entitled HEART RATE MEASUREMENT
USING MICROCONTROLLER Submitted by NIKHIL KHAIR is record of
bonafide work carried out by him under my guidance in the partial fulfillment the
requirement for the award of Degree of B. Tech. in Electronics and
Telecommunication

Engineering

course of

Dr.

Babasaheb

Ambedkar

Technological University, Lonere (Dist. Raigad) in the Academic year20152016.

Dr. S. L. Nalbalwar

Dr. S. L. Nalbalwar

Project guide

Associate Professor and Head


Department of EXTC

Mr. Krishnat Pawar


Project Co-guide
EXAMINER
1)
2)

Date: 19 MAY, 2016 Place: Lonere (Raigad)

ACKNOWLEDGEMENT
It gives us immense pleasure to present our report for project phase on HEART RATE

USING MICROCONTROLLER. The able guidance of all teaching staff of this


department made the study possible. They have been a constant source of encouragement
throughout the completion of this project phase.
We would like to express my grateful thanks to Dr. S. L. Nalbalwar sir who has motivated me
and who guided properly for this Project. We would also like to express my sincere thanks to
Electronics & Telecommunication Department for giving me an opportunity to explore the
subject by conducting this Project.

KETAN TAKALE (20120349)


NIKHIL KHAIR (20120350)
Department of Electronics and Telecommunication
Dr. Babasaheb Ambedkar Technological University,
Lonere-Raigad

PROJECT OVERVIEW
The heart rate is one of the significant physiological parameters of the human
cardiovascular system. Heart rate is the number of times the heart beats per
minute. Heart rate data reflects various physiological states such as biological
workload, stress at work and concentration on tasks, drowsiness and the active
state of the autonomic nervous system. Human cardiac dynamics are driven by
the complex nonlinear interactions of two competing forces: sympathetic
regulation increases and parasympathetic regulation decreases the heart rate.
Thus, monitoring of heart rate plays a significant role in providing the status of
cardiovascular system and clinically correlated information to medical
professionals. Heart rate measurement is also regarded as an essential parameter
in patient care monitoring system.

INDEX
SR. NO.

TITLE

PAGE NO.

01

INTRODUCTION

01

02

SYSTEM DESIGN

02

2.1

SYSTEM DESCRIPTION

02

2.2

CIRCUIT DESCRIPTION

03

2.3

DATA PROCESSING & ANALYSIS

03

2.4

DISPLAY

03

03

04

05

CIRCUITERY

05

3.1

RESISTORS

05

3.2

CAPACITORS

05

3.3

MISCELLANEOUS

06

3.4

CIRCUIT DIAGRAM

07

SYSTEM SPECIFICATION

08

4.1

MICROCONTROLLER ATMEGA328

08

4.1.1

DESCRIPTION & ARCHITECTURE

08

4.1.2

FEATURES

08

4.1.3

ARCHITECTURE

10

4.1.4

PIN DIAGRAM

11

4.2

OPERATIONAL AMPLIFIER

11

4.3

CRYSTAL OSCILLATOR

12

4.4

VOLTAGE REGULATOR

13

4.5

IR SENSOR

14

4.6

DISPLAY

14

ADVANTAGES & DIS- ADVANTAGES

16

5.1

ADVANTAGES

16

5.2

DIS- ADVANTAGES

16

5.3
06

PROBLEM FACED

16

CONCLUSION

17

REFERENCES

18

LIST OF FIGURES

SR

FIGURE NAMES

PAGE NO.

Block diagram of Heart rate counter

02

Circuit diagram of Heart rate counter

02

Circuit Diagram

07

Architecture of ATmega328

10

Pin Diagram Of ATmega-328

11

LM324 Amplifier

12

Miniature 4 MHz crystal

13

7805 Regulator and its connections

13

IR sensor

14

10

7 segment display

15

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

CHAPTER 01
INTRODUCTION

Heart rate measurement is one of the very important parameters of the human cardiovascular
system. The heart rate of a healthy adult at rest is around 72 beats per minute (bpm). Athletes
normally have lower heart rates than less active people. Babies have a much higher heart rate at
around 120 bpm, while older children have heart rates at around 90 bpm. The heart rate rises
gradually during exercises and returns slowly to the rest value after exercise. The rate when the
pulse returns to normal is an indication of the fitness of the person. Lower than normal heart rates
are usually an indication of a condition known as bradycardia, while higher than normal heart
rates are known as tachycardia. Heart rate is simply and traditionally measured by placing the
thumb over the subjects arterial pulsation, and feeling, timing and counting the pulses usually in
a 30 second period. Heart rate (bpm) of the subject is then found by multiplying the obtained
number by 2. This method although simple, is not accurate and can give errors when the rate is
high. This project describes a technique of measuring the heart rate through a fingertip using a
microcontroller. While the heart is beating, it is actually pumping blood throughout the body, and
that makes the blood volume inside the finger artery to change too. This fluctuation of blood can
be detected through an optical sensing mechanism placed around the fingertip. The signal can be
amplified further for the microcontroller to count the rate of fluctuation, which is actually the
heart rate. The device has the advantage that it is microcontroller based and thus can be
programmed to display various quantities, such as the average, maximum and minimum rates
over a period of time and so on. Another advantage of such a design is that it can be expanded
and can easily be connected to a recording device or a PC to collect and analyze the data for over
a period of time.

Department of Electronics And Telecommunication Engineering


Dr.BabasahebAmbedkar Technological University, Lonere

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

CHAPTER 02
SYSTEM DESIGN
2.1. SYSTEM DESCRIPTION
The sensing part of this project consists of an IR LED transmitter and an infrared sensor. The
LED transmits an IR signal through the fingertip of the subject, a part of which is reflected by
the blood cells. Obviously a less amount of light is reached to the detector and also the value
of detector signal varies with each signal. This signal, which is in the form of pulses is then
amplified and filtered suitably by op-amp LM324 before feeding to a low-cost microcontroller
for analysis. The microcontroller counts the number of pulses over a fixed time interval and
thus obtains the heart rate of the subject. Several such readings are obtained over a known
period of time and the results are averaged to give a more accurate reading of the heart rate.
The block diagram of the designed heart rate counter is shown in figure 2.1.

Fig1: Block diagram of the heart rate counter

Department of Electronics And Telecommunication Engineering


Dr.BabasahebAmbedkar Technological University, Lonere

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

2.2. CIRCUIT DESCRIPTION


The whole circuit diagram of the designed digital heart rate counter is shown in figure 2.2.

Fig2: Circuit diagram of the heart rate counter

2.3. DATA PROCESSING AND ANALYSIS


In the circuit, 1 F capacitors are used at the input of each stage to block the dc component in
the signal. The two stage amplification provides sufficient gain for a weak signal to be
converted into a pulse. An LED is connected in the circuit which blinks every time a
heartbeat is detected. The output from the signal conditioner goes to the T0CKI input that is
the pin no. 3 of the microcontroller.
2.4. DISPLAY
The display unit consists of a 3-digit, Common Anode, seven segment display which is driven
by the multiplexing technique. The segments a-g is connected with microcontroller through pin
no. 6 to 12 or RB0-RB6, respectively. The units, tens and hundreds digits are multiplexed
with RA2, RA1, and RA0 port pins. A tact switch input is connected to start the heart rate
measurement. After pressing this switch the microcontroller activates the IR LED to transmit
Department of Electronics And Telecommunication Engineering
Dr.BabasahebAmbedkar Technological University, Lonere

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

for 15 seconds. Within this interval, the numbers of pulses arriving at the T0CKI input are
counted. Then a result 4 times of the count value is shown in the display unit. The
microcontroller runs at 4.0 MHz using an external crystal and the total circuit runs with the
help of +5V power supply derived from USB port. The expected output of the LED is the heart
rate XXX with XXX being a number between 0 and 999, which will be the subjects BPM.
In the software part many algorithms had been investigated for the microcontroller and the best
fit programming is written in MikroC compiler.

Department of Electronics And Telecommunication Engineering


Dr.BabasahebAmbedkar Technological University, Lonere

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

CHAPTER 03
CIRCUITARY
3.1. RESISTORS
Specification (in ohm)

Quantity

100

12

33K

68K

680K

15K

2.2K

4.7K

8.2K

470 PRESET

3.2. CAPACITORS
Specification

Quantity

1 F

33Pf

10 F

0.1 F

Department of Electronics And Telecommunication Engineering


Dr.BabasahebAmbedkar Technological University, Lonere

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

3.3. MISCELLANEOUS
Miscellaneous

Specification

Quantity

Microcontroller

ATmega328

Transistor

2N222

Oscillator

4 MHz

Op-Amp

LM328

7 Segment Display

Common Anode

Sensor

LTH 1550-01

Department of Electronics And Telecommunication Engineering


Dr.BabasahebAmbedkar Technological University, Lonere

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

3.4. CIRCUIT DIAGRAM

Fig3: Circuit Diagram

Department of Electronics And Telecommunication Engineering


Dr.BabasahebAmbedkar Technological University, Lonere

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

CHAPTER 04
SYSTEM SPECIFICATIONS
4.1. MICROCONROLLER: ATMEGA328
4.1.1. DESCRIPTION AND ARCHITECTURE
There have been many advancement in the field of Electronics and many cutting edge
technologies are being developed every day, but still 8 bit microcontrollers have its own role
in the digital electronics market dominated by 16-32 & 64 bit digital devices. Although
powerful microcontrollers with higher processing capabilities exist in the market, 8bit
microcontrollers still hold its value because of their easy-to-understand-operation, very much
high popularity, ability to simplify a digital circuit, low cost compared to features offered,
addition of many new features in a single IC and interest of manufacturers and consumers.
Todays microcontrollers are much different from what it were in the initial stage, and the
number of manufacturers are much more in count than it was a decade or two ago. At present
some of the major manufacturers are Microchip (publication: PIC microcontrollers), Atmel
(publication: AVR microcontrollers), Hitachi, Phillips, Maxim, NXP, Intel etc. Our interest is
upon ATmega32 . It belongs to Atmels AVR series micro controller family.
4.1.2. FEATURES

PIN count: Atmega32 has got 40 pins. Two for Power (pin no.10: +5v, pin no. 11:
ground), two for oscillator (pin 12, 13), one for reset (pin 9), three for providing
necessary power and reference voltage to its internal ADC, and 32 (48) I/O pins.

About I/O pins: ATmega32 is capable of handling analogue inputs. Port A can be used
as either DIGITAL I/O Lines or each individual pin can be used as a single input
channel to the internal ADC of ATmega32, plus a pair of pins AREF, AVCC & GND
(refer to ATmega32 datasheet) together can make an ADC channel. No pins can
perform and serve for two purposes (for an example: Port A pins cannot work as a
Digital I/O pin while the Internal ADC is activated) at the same time. Its the
programmers responsibility to resolve the conflict in the circuitry and the program.

Department of Electronics And Telecommunication Engineering


Dr.BabasahebAmbedkar Technological University, Lonere

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

Programmers are advised to have a look to the priority tables and the internal
configuration from the datasheet.

Digital I/O pins: ATmega32 has 32 pins (4portsx8pins) configurable as Digital I/O
pins. Timers: 3 Inbuilt timer/counters, two 8 bit (timer0, timer2) and one 16 bit (timer1).

ADC: It has one successive approximation type ADC in which total 8 single channels
are selectable. They can also be used as 7 (for TQFP packages) or 2 (for DIP packages)
differential channels. Reference is selectable, either an external reference can be used
or the internal 2.56V reference can be brought into action. There external reference can
be connected to the AREF pin.

Communication Options: ATmega32 has three data transfer modules embedded in it.
They are Two Wire Interface USART Serial Peripheral Interface

Analog comparator: On-chip analog comparator is available. An interrupt is assigned


for different comparison result obtained from the inputs.

External Interrupt: 3External interrupt I accepted. Interrupt sense is configurable.

Memory: It has 32Kbytes of In-System Self-programmable Flash program memory,


1024 Bytes EEPROM, 2Kbytes Internal SRAM. Write/Erase Cycles: 10,000 Flash /
100,000 EEPROM.

Clock: It can run at a frequency from 1 to 16MHz. Frequency can be obtained from
external Quartz Crystal, Ceramic crystal or an R-C network. Internal calibrated RC
oscillator can also be used.

More Features: Up to 16 MIPS throughput at 16MHz. Most of the instruction executes


in a single cycle. Two cycle on-chip multiplication. 32 8 General Purpose Working
Registers

Debug: JTAG boundary scan facilitates on chip debug.

Programming: Atmega32 can be programmed either by In-System Programming via


Serial peripheral interface or by Parallel programming. Programming via JTAG
interface is also possible. Programmer must ensure that SPI programming and JTAG
are not be disabled using fuse bits; if the programming is supposed to be done using
SPI or JTAG.

4.1.3. ARCHITECTURE:
Department of Electronics And Telecommunication Engineering
Dr.BabasahebAmbedkar Technological University, Lonere

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

Fig4: Architecture of ATmega328

Department of Electronics And Telecommunication Engineering


Dr.BabasahebAmbedkar Technological University, Lonere

10

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

4.1.4. PIN DIAGRAM:

Fig5: Pin diagram of ATmega328

4.2. OPERATIONAL AMPLIFIER


The LM324 series are low -cost, quad op -amps with true differential inputs. They have several
distinct advantages over standard operational amplifier types in single supply applications. The
Department of Electronics And Telecommunication Engineering
Dr.BabasahebAmbedkar Technological University, Lonere

11

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

quad amplifier can operate at supply voltages as low as 3.0 V or as high as 32 V with quiescent
currents about one- fifth of those associated with the MC1741 (on a per amplifier basis). The
common mode input range includes the negative supply, thereby eliminating the necessity for
external biasing components in many applications. The output voltage range also includes the
negative power supply voltage.

Fig6: LM324 Amplifier

4.3 CRYSTAL OSCILLATOR


A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a
vibrating crystal of piezoelectric material to create an electrical signal with a very precise
frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches),
to provide a stable clock for digital integrated circuits, and to stabilize frequencies for radio
transmitters and receivers. The most common type of piezoelectric resonator used is the quartz
crystal, so oscillator circuits designed around them became known as "crystal oscillators.
Quartz crystals are manufactured for frequencies from a few tens of kilohertz to tens of
megahertz. More than two billion (2109) crystals are manufactured annually. Quartz crystals
Department of Electronics And Telecommunication Engineering
Dr.BabasahebAmbedkar Technological University, Lonere

12

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

are also found inside test and measurement equipment, such as counters, signal generators, and
oscilloscopes. It features High Accuracy, Wide Temperature Rang.

Fig7: A miniature 4 MHz crystal

4.4. VOLTAGE REGULATOR


A regulated +5V power supply is derived from an external 9V DC adapter using an LM7805
regulator IC.7805 gives fixed 5V DC voltage if input voltage is in (7.5V, 20V).

Fig8: 7805 Regulator IC and its Connection

The above diagram shows how to use 7805 voltage regulator. In this circuit coupling
capacitors are used for good regulation otherwise the noise in the output voltage will be high.

4.5. IR SENSOR
Department of Electronics And Telecommunication Engineering
Dr.BabasahebAmbedkar Technological University, Lonere

13

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

The LTH 1550-01 reflective object sensors consist of an infrared emitting diode and an npn
silicon phototransistor mounted side by side on converging optical axis in a black plastic
housing. The LTH 1550-01 is non-switching for direct PC board or dual-in-line socket
mounting. It has fast switching speed and it is reflective object sensor and reflective line
sensor.

Fig9: IR sensor

4.6. DISPLAY
The 7-segment display consists of seven LEDs arranged in a rectangular fashion as shown.
Each of the seven LEDs is called a segment because when illuminated the segment forms part
of a numerical digit (both Decimal and Hex) to be displayed. An additional 8th LED is
Department of Electronics And Telecommunication Engineering
Dr.BabasahebAmbedkar Technological University, Lonere

14

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

sometimes used within the same package thus allowing the indication of a decimal point,
(DP) when two or more 7-segment displays are connected together to display numbers
greater than ten. Each one of the seven LEDs in the display is given a positional segment with
one of its connection pins being brought straight out of the rectangular plastic package. These
individually LED pins are labelled from a through to g representing each individual LED.
The other LED pins are connected together and wired to form a common pin. So by forward
biasing the appropriate pins of the LED segments in a particular order, some segments will be
light and others will be dark allowing the desired character pattern of the number to be
generated on the display. This then allows us to display each of the ten decimal digits 0
through to 9 on the same 7-segment display.

Fig10: 7 Segment Display

Department of Electronics And Telecommunication Engineering


Dr.BabasahebAmbedkar Technological University, Lonere

15

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

CHAPTER 05
ADVANTAGES AND DISADVANTAGES
5.1. ADVANTANGES

Ergonomic.

Cost Effective.

Durable.

Portable.

Simple.

Can be used in clinical and non-clinical environments.

5.2. DISADVANTAGES

Noise may produce disturbance.

Resting heart rate is subject to high variability thus causing error.

Continuous monitoring is not possible.

5.3. PROBLEMS FACED


The major problem faced during the development of our project was the difficulty in
making up a pulse sensing circuit. The IR diode was sensing the object movement but not the
variation of blood flow. By adding a comparator unit and by proper designing of the whole
circuits leads to overcome the same. The interference of the visible light and surrounded
noise makes the development of the sensing unit to be the greatest challenge.

Department of Electronics And Telecommunication Engineering


Dr.BabasahebAmbedkar Technological University, Lonere

16

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

CHAPTER 06
CONCLUSION

In this project, the design and development of a heart rate measuring device is presented. It
measures the heart rate efficiently in a short time and with less expense without using time
consuming and expensive clinical pulse detection systems. Analog signal processing
techniques are used to keep the device simple and to efficiently suppress the disturbance in
signals. Experimental result showed that the heart rate can be filtered and digitized so that it
can be counted to calculate an accurate pulse rate. The device able to detect, filter, digitize and
display the heartbeat of a user ergonomically.
The device could be further developed into a continuously monitoring device that could be
used to detect the heart rete anomalies associated with certain heart conditions. The
maximum and minimum heart rate over a period of time and thus any abnormalities in the
pulse rate can also be detected.

Department of Electronics And Telecommunication Engineering


Dr.BabasahebAmbedkar Technological University, Lonere

17

A Project Report on HEART RATE MEASUREMENT BY USING MICROCONTROLLER

REFERENCES

J.B. Gupta: Electronic circuits and devices.


Ramakanth A. Gayakwad: Op-amps and linear integrated circuits.
K.R. Botkar: Integrated circuits.
Udayshankara: ATmega Microcontroller; Hardware, Software &
Application.

Department of Electronics And Telecommunication Engineering


Dr.BabasahebAmbedkar Technological University, Lonere

18

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