SlideShare a Scribd company logo
1 of 44
Download to read offline
A PROJECT REPORT ON
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876
MICRO CONTROLLER
A Dissertation submitted in partial fulfillment of the requirement of the
Award of the Degree of
BACHELOR OF TECHNOLOGY in
ELECTRONICS & COMMUNICATION ENGINEERING
Submitted by:
M. NAGA KIRAN (12011M2501)
S. SHASHIDHAR (12011M2509)
R. V. SAI KALYAN (12011M2003)
R. UDAY KIRAN (12011M2502)
Under the Esteemed Supervision Of
Dr. L. Pratap Reddy,
Professor, Department of ECE
DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING
JNTUH College of Engineering Hyderabad (Autonomous)
Jawaharlal Nehru Technological University – 500085,2015
DEPARTMENT OF ELECTRONICS & COMMUNICATION
ENGINEERING
JNTUH College of Engineering Hyderabad (Autonomous),
Jawaharlal Nehru Technological University Hyderabad-85
CERTIFICATE BY THE SUPERVISOR
This is to certify that the Project Report entitled, “REAL TIME HEART BEAT
MONITERING SYSTEM USING PIC16F876 MICRO CONTROLLER”, being submitted
by M. NAGA KIRAN (12011M2501), S.SHASHIDHAR (12011M2509), R. V. SAI
KALYAN (12011M2003),R. UDAY KIRAN (12011M2502) in partial fulfillment of
the requirement for the award of the Degree of BACHELOR OF TECHNOLOGY in
Electronics & Communication Engineering during the academic year 2012-17 is a
record of bonafide work carried out by them under my supervision. The results
are verified and found satisfactory.
Dr. L. Pratap Reddy,
Professor of ECE,
JNTUH College of Engineering (Autonomous),
Hyderabad- 85.
DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING
JNTUH College of Engineering Hyderabad (Autonomous),
Jawaharlal Nehru Technological University Hyderabad-85
CERTIFICATE BY THE HEAD OF DEPARTMENT
This is to certify that the Project Report entitled, “REAL TIME HEART BEAT
MONITERING SYSTEM USING PIC16F876 MICRO CONTROLLER”, being submitted
by M. NAGA KIRAN (12011M2501), S.SHASHIDHAR (12011M2509), R. V. SAI
KALYAN (12011M2003),R. UDAY KIRAN (12011M2502) in partial fulfillment of
the requirement for the award of the Degree of BACHELOR OF TECHNOLOGY in
Electronics & Communication Engineering during the academic year 2012-17 is a
record of bonafide work carried out by them under my supervision. The results
are verified and found satisfactory.
Dr. M. Asha Rani,
Professor & Head of ECE,
JNTUH College of Engineering (Autonomous),
Hyderabad - 85.
DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING
JNTUH College of Engineering Hyderabad (Autonomous),
Jawaharlal Nehru Technological University Hyderabad-85
DECLARATION BY THE CANDIDATES
We, M. NAGA KIRAN (12011M2501),S.SHASHIDHAR (12011M2509), R. V. SAI
KALYAN (12011M2003),R. UDAY KIRAN (12011M2502) hereby declare that the
project dissertation entitled ― REAL TIME HEART BEAT MONITERING SYSTEM
USING PIC16F876 MICRO CONTROLLER, is a bonafide work done and submitted
under the guidance of Dr. L. Pratap Reddy, Professor, Department of ECE, JNTUH
College of Engineering - Hyderabad, in partial fulfillment of the requirements for
the award of the degree of Bachelor of Technology in Electronics &
Communication Engineering during the academic years 2012-17.
This record is a bonafide work carried out by us and the results embodied in this
project have not been reproduced or copied from any source. The results
embodied in this project have not been submitted to any other University or
Institute for the award of any degree or diploma.
M. NAGA KIRAN (12011M2501)
S. SHASHIDHAR (12011M2509)
R. V. SAI KALYAN (12011M2003)
R. UDAY KIRAN (12011M2502)
ACKNOWLEDGEMENTS
A goal begins with a teacher who believes in you, who tugs and
pushes and leads you to the next plateau, sometimes poking you with a sharp
stick called truth. The quote stands true for our guide Dr. L. Pratap Reddy.
His passion, dedication, and energy never cease to amaze us. His methods have
always been very innovative. We take this opportunity to thank him for his
esteemed guidance and motivation in helping us do this project.
We would also like to express our gratitude towards Dr. M. Asha Rani,
HOD of ECE, JNTUH College of Engineering Hyderabad whose cooperation
was vital during the course of our work.
We thank all the faculty and staff members for their cooperation and
encouragement. We would like to express our sincere gratitude towards
Mr. M. Rama Rao, Research Scholar, who has been a constant source of
guidance and inspiration. His innovative ideas have acted as stepping stones in
guiding us towards our goal. We would like to thank the Embedded Systems Lab
in-charge faculty for their support and help which they provided with
readiness even during the late hours we spent in the lab. Last but not the least,
we would like to thank our families for their constant support and our dear
friends for their words of affection in our darkest times.
ABSTRACT
The present work is aimed at measurement of heartbeat and display the
information on an alphanumeric (or Graphical) LCD display. The heartbeat
monitor uses LED and a LDR based sensor to determine the hearbeat.
This system detects the pulses person when the sensor is positioned on a
appropriate location of the user’s skin (eg: Fingertip or Ear lobe) and generates a
heartbeat signal associated with the pulsing condition.
The output of a heartbeat sensor gives a very low voltage signal. Hence this
needs to be amplified using an amplifier. The amplified signal is given to the
Microcontroller unit for actual measurement of heartrate. This processed
heartbeat information is sent to a LCD display.
This system also consists of an LED indicator or a Buzzer to indicate the
Visual or Audible indication of heartbeat.
1
CHAPTER 1: INTRODUCTION
1.1 INTRODUCTION TO THE PROJECT:
This project describes the design of a simple, low-cost microcontroller
based heart rate with LCD output. Heart rate of the subject is measured from the thumb finger
using IRD (Infrared Device sensors and the rate is then averaged and displayed on a text based
LCD.).The device LCD displaying the heart beat rat and counting values through sending pulses
from the sensor.
This instrument employs a simple Opto electronic sensor, conveniently strapped on the
finger, to give continuous indication of the pulse digits. The Pulse monitor works both on battery
or mains supply.
This project uses regulated 5V, 500mA power supply. 7805 three terminal voltage
regulator is used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac
output of secondary of 230/12V step down transformer.
1.2 PROJECT OVERVIEW:
An embedded system is a combination of software and hardware to perform a
dedicated task. Some of the main devices used in embedded products are Microprocessors and
Microcontrollers.
Microprocessors are commonly referred to as general purpose processors as
they simply accept the inputs, process it and give the output. In contrast, a microcontroller not
only accepts the data as inputs but also manipulates it, interfaces the data with various devices,
controls the data and thus finally gives the result.
The project “Real time Heart beat monitoring System using PIC16F876
Microcontroller” is an exclusive project which is used for automatic monitoring of heart beat
displays on LCD.
2
1.3 ORGANISATION OF THESIS:
The thesis explains the implementation of “Real time Heart beat monitoring System
using PIC16F876 Microcontroller”. The organization of the thesis is explained here with:
Chapter 1 Presents introduction to the overall thesis and the overview of the project. In the
project overview a brief introduction of Real time Heart beat monitoring System using
PIC16F876 Microcontroller and its applications are discussed.
Chapter 2 Presents the hardware description. It deals with the block diagram of the project and
explains the purpose of each block. In the same chapter the explanation of microcontroller,
heartbeat sensor, power supplies, buzzer and LCD are considered.
Chapter 3 Presents the software description. It explains the implementation of the project using
PIC C Compiler software and the proteus software
Chapter 4 Presents the project description along with heartbeat sensor module interfacing to
microcontroller.
Chapter 5 Presents the working procedure and steps involved in the project.
Chapter 6 Presents the results and discussion.
Chapter 7 presents the conclusion and the Future scope.
3
1.4 METHODS FOR SENSING HEART RATE:
 Using Body-Surface Bio potential Electrodes
 Using Finger Plethysmography
1.4.1 USING BODY-SURFACE BIO POTENTIAL ELECTRODES:
Electrodes that can be placed on the body surface for recording bioelectric signals. The integrity
of the skin is not compromised when these electrodes are applied, and they can be used for short-
term diagnostic recording such as taking a clinical electrocardiogram or long-term chronic
recording such as occurs in cardiac monitoring.
Limitations of this method:
 May cause skin irritation on contact with skin for long period of time.
 Not reliable if there are any electronic devices which may cause electrical interference.
 Storage problems, requires special storage environment.
 Mobility restricted due to wiredconnection between sensor and device.
1.4.2 FINGER PLETHYSMOGRAPHY:
This project is based on the principle of Photo Plethysmography (PPG) which is a non-invasive
method of measuring the variation in blood volume in tissues using an IR light source and a
detector. Since the change in blood volume is synchronous to the heart beat, this technique can
be used to calculate the heart rate.
Advantages of Finger Plethysmography over Body-Surface Bio potential Electrodes:
 Does not cause Skin irritation problem.
 No need to stick to the skin.
 Can be removed and reused many times.
 No Storage problems.
Limitations:
 Not reliable if there are any electronic devices which may cause IR interference.
 Mobility restricted due to wiredconnection between sensor and device.
4
CHAPTER 2: HARDWARE DESCRIPTION
2.1 INTRODUCTION WITH BLOCK DIAGRAM:
The block diagram of the project and the description of the blocks in the block diagram
are considered. Block diagram is shown below.
Fig 1: Block Diagram of Real time heart beat monitoring system
5
THE MAIN BLOCKS OF THIS HEART BEAT MONITORING ARE:
1. Micro controller (16F876)
2. Reset button
3. Crystal oscillator
4. Regulated power supply (RPS)
5. LED Indicator
6. Heartbeat sensor
7. GSM Modem
8. LCD
9. Buzzer
2.2 MICRO CONTROLLER:
A microcontroller is a small computer (SoC) on a single integrated circuit containing a processor
core, memory, and programmable input/output peripherals. Program memory in the form of
Ferroelectric RAM, NOR flash or OTP ROM is also often included on chip, as well as a
typically small amount of RAM. Microcontrollers are designed for embedded applications, in
contrast to the microprocessors used in personal computers or other general purpose applications.
Fig 2: Microcontroller
The microcontroller used in this project is a PIC Microcontroller.
6
2.2.1 INTRODUCTION TO PIC MICROCONTROLLER:
PIC stands for Peripheral Interface Controller given by Microchip Technology to identify its
single-chip microcontrollers. These devices have been very successful in 8-bit microcontrollers.
The main reason is that Microchip Technology has continuously upgraded the device
architecture and added needed peripherals to the microcontroller to suit customers' requirements.
Popularity of the PIC microcontrollers is due to the following factors.
1. Sped: Harvard Architecture, RISC architecture, 1 instruction cycle = 4 clock cycles.
2. Instruction set simplicity: The instruction set consists of just 35 instructions (as opposed
to 111 instructions for 8051).
3. Power-on-reset and brown-out reset. Brown-out-reset means when the power supply goes
below a specified voltage (say 4V), it causes PIC to reset; hence malfunction is avoided.
A watch dog timer (user programmable) resets the processor if the software/program ever
malfunctions and deviates from its normal operation.
4. PIC microcontroller has four optional clock sources.
 Low power crystal
 Mid-range crystal
 High range crystal
 RC oscillator (low cost).
5. Programmable timers and on-chip ADC.
6. Up to 12 independent interrupt sources.
7. Powerful output pin control (25 mA (max.) current sourcing capability per pin.)
8. EPROM/OTP/ROM/Flash memory option
9. Input output expansion capability
7
2.2.2 CPU ARCHITECTURE:
The CPU uses Harvard architecture with separate Program and Variable (data) memory
interface. This facilitates instruction fetch and the operation on data/accessing of variables
simultaneously. Architecture of PIC microcontroller
Fig 3: Architecture of PIC microcontroller
Basically, all PIC microcontrollers offer the following features:
 RISC instruction set with around 35 instructions _9 Digital I/O ports
 On-chip timer with 8-bit prescaler.
 Power-on reset
 Watchdog timer
 Power saving SLEEP mode
 Direct, indirect, and relative addressing modes
 External clock interface
 RAM data memory
 EPROM (or OTP) program memory
8
2.2.3 PIN DESCRIPTION:
Fig 4: PIC16F876 PINOUT DESCRIPTION
OSC1/CLKIN: Oscillator crystal input/external clock source input.
OSC2/CLKOUT: Oscillator crystal output. Connects to crystal or resonator in crystal oscillator
mode In RC mode, the OSC2 pin outputs CLKOUT which has 1/4 the frequency of OSC1, and
denotes the instruction cycle rate.
MCLR/VPP: Master Clear (Reset) input or programming voltage input. This pin is an active
low RESET to the device.
PORTA is a bi-directional I/O port.
RA0/AN0: RA0 can also be analog input0.
RA1/AN1:RA1 can also be analog input1.
RA2/AN2/VREF- :RA2 can also be analog input2 or negative analog reference voltage.
RA3/AN3/VREF+:RA3 can also be analog input3 or positive analog reference voltage.
RA4/T0CKI: RA4 can also be the clock input to the Timer0 module. Output is open drain type.
RA5/SS/AN4:RA5 can also be analog input4 or the slave select for the synchronous serial port.
9
PORTB is a bi-directional I/O port. PORTB can be software programmed for internal weak pull-
up on all inputs.
RB0/INT: RB0 can also be the external interrupt pin.
RB3/PGM: RB3 can also be the low voltage programming input.
RB4: Interrupt-on-change pin.
RB5: Interrupt-on-change pin.
RB6/PGC: Interrupt-on-change pin or In-Circuit Debugger pin, serial programming clock.
RB7/PGD: Interrupt-on-change pin or In-Circuit Debugger pin, serial programming data.
PORTC is a bi-directional I/O port.
RC0/T1OSO/T1CKI:RC0 can also be the Timer1 oscillator output or Timer1 clock input.
RC1/T1OSI/CCP2: RC1 can also be the Timer1 oscillator input or Capture2 input/Compare2
output/PWM2 output.
RC2/CCP1:RC2 can also be the Capture1 input/Compare1 output/PWM1 output.
RC3/SCK/SCL: RC3 can also be the synchronous serial clock input/output for both SPI and I2C
modes.
RC4/SDI/SDA: RC4 can also be the SPI Data In (SPI mode) or data I/O (I2C mode).
RC5/SDO: RC5 can also be the SPI Data Out (SPI mode).
RC6/TX/CK: RC6 can also be the USART Asynchronous Transmit or Synchronous Clock.
RC7/RX/DT: RC7 can also be the USART Asynchronous Receive or Synchronous Data.
VSS: Ground reference for logic and I/O pins.
VDD: Positive supply for logic and I/O pins.
10
2.3 REGULATED POWER SUPPLY:
Fig 5: Circuit diagram of Regulated Power Supply with Led connection
The components mainly used in above figure are
 230V AC MAINS
 TRANSFORMER
 BRIDGE RECTIFIER(DIODES)
 CAPACITOR
 VOLTAGE REGULATOR(IC 7805)
 RESISTOR
 LED(LIGHT EMITTING DIODE)
2.3.1 VOLTAGE REGULATOR:
A voltage regulator (also called a „regulator‟) with only three terminals appears to
be a simple device, but it is in fact a very complex integrated circuit. It converts a varying input
voltage into a constant „regulated‟ output voltage. Voltage Regulators are available in a variety
of outputs like 5V, 6V, 9V, 12V and 15V. The LM78XX series of voltage regulators are
designed for positive input. For applications requiring negative input, the LM79XX series is
used. Using a pair of „voltage-divider‟ resistors can increase the output voltage of a regulator
circuit. It is not possible to obtain a voltage lower than the stated rating. You cannot use a 12V
regulator to make a 5V power supply. Voltage regulators are very robust. These can withstand
11
over-current draw due to short circuits and also over-heating. In both cases, the regulator will cut
off before any damage occurs. The only way to destroy a regulator is to apply reverse voltage to
its input. Reverse polarity destroys the regulator almost instantly. Fig:6 shows voltage regulator.
Fig 6: LM7805 Voltage Regulator
2.4 HEART BEAT SENSOR:
This heart beat sensor is designed to give digital output of heat beat when a finger is placed
inside it. When the heart detector is working, the top-most LED flashes in unison with each
heartbeat. 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.
12
2.4.1 WORKING:
The sensor consists of a super bright red LED and light detector. The LED needs to be super
bright as the light must pass through finger and detected at other end. Now, when the heart
pumps a pulse of blood through the blood vessels, the finger becomes slightly more opaque and
so less light reached the detector. With each heart pulse the detector signal varies. This variation
is converted to electrical pulse. This signal is amplified and triggered through an amplifier which
outputs +5V logic level signal. The output signal is also indicated on top by a LED which blinon
each heartbeat.
Fig 7: Finger Clip with IR LED and Photo diode
2.4.2 AMPLIFIER CIRCUIT:
Fig 8: Amplifier circuit
13
For amplification, we use IC LM358. Pulse rate is sensed by using a high intensity type LED and
LDR. The finger is inserted in probe and red light from high intensity LED is allowed to fall on
the finger. The amount of red light absorbed by finger varies according to the pulsatile blood
flow in the finger. Therefore the amount of light transmitted varies according to the blood flow.
The LDR placed on opposite side of LED detects the transmitted light. With increase in
transmitted light its resistance decreases and vice-versa. A voltage divider circuit is employed to
get a voltage signal proportional to the resistance of the LDR.
This voltage signal consists of AC and DC components. Non-moving structures (veins, blood
capillaries, bones, soft tissues, non-pulsatile blood) absorb constant amount of light and hence
contribute to the DC component of voltage signal. As it provides no information about the blood
pulses, DC components are not needed. Pulsatile blood absorbs varying amount of light and
hence contributes to AC component of voltage signal. AC components are our required signal.
The magnitude of the DC components is almost 100-1000 times higher than the AC components.
Hence they need to be removed in order for the AC components to be conditioned properly
further on. Therefore, a high pass filter circuit is employed after the voltage divider network to
block the DC components of the signal.
The AC signal is now amplified from mV range to V range. The amplified signal is given to a
comparator where it is compared against a set threshold value. The comparator o/p consists of
positive pulses corresponding to blood pulses. The comparator output is given to the PIC.
The PIC calculates the time duration between 2 successive pulses and then computes the
instantaneous heart rate. The PIC then proceeds to display the calculated heart rate on the LCD
display.
14
Fig 9: Amplifier circuit used in Heart rate monitoring system
2.4.3 LM358 SENSOR:
The LM358 (Low Power Dual Operational Amplifiers) series 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 voltages. 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 amplifiers, dc gain blocks and all the conventional op amp
circuits which now can be more easily implemented in single power supply systems.
2.5 LCD DISPLAY:
One of the most common devices attached to a micro controller is an LCD display. Some of the
most common LCD‟s connected to the many microcontrollers are 16x2 and 20x2 displays. This
means 16 characters per line by 2 lines and 20 characters per line by 2 lines, respectively.
15
2.5.1 LCD PIN DIAGRAM:
Fig 10 (a): LCD Pin diagram
Fig 10 (b): LCD Display
16
2.5.2 PIN DESCRIPTION:
Table 1: Character LCD pins with Microcontroller
Pin No. Name Description
Pin no. 1 VSS Power supply (GND)
Pin no. 2 VCC Power supply (+5V)
Pin no. 3 VEE Contrast adjust
Pin no. 4 RS
0 = Instruction input
1 = Data input
Pin no. 5 R/W
0 = Write to LCD module
1 = Read from LCD module
Pin no. 6 EN Enable signal
Pin no. 7 D0 Data bus line 0 (LSB)
Pin no. 8 D1 Data bus line 1
Pin no. 9 D2 Data bus line 2
Pin no. 10 D3 Data bus line 3
Pin no. 11 D4 Data bus line 4
Pin no. 12 D5 Data bus line 5
Pin no. 13 D6 Data bus line 6
Pin no. 14 D7 Data bus line 7 (MSB)
The LCD requires 3 control lines as well as either 4 or 8 I/O lines for the data
bus. The user may select whether the LCD is to operate with a 4-bit data bus or an 8-bit data bus.
If a 4-bit data bus is used the LCD will require a total of 7 data lines (3 control lines plus the 4
lines for the data bus). If an 8-bit data bus is used the LCD will require a total of 11 data lines (3
control lines plus the 8 lines for the data bus).
17
2.6 BUZZER:
A Buzzer or Beeper is audio signaling device which may be mechanical, electro mechanical or
piezo electric. Typical uses of buzzer and beepers include alarm devices, timers and
conformation of user inputs such as mouse click or keystroke. A piezoelectric diaphragm
consists of a piezoelectric ceramic plate which has electrodes on both sides and a metal plate
(brass or stainless steel, etc.). A piezoelectric ceramic plate is attached to a metal plate with
adhesives. Applying D.C. voltage between electrodes of a piezoelectric diaphragm causes
mechanical distortion due to the piezoelectric effect. For a misshaped piezoelectric element, the
distortion of the piezoelectric element expands in a radial direction. And the piezoelectric
diaphragm bends toward the direction. The metal plate bonded to the piezoelectric element does
not expand. Conversely, when the piezoelectric element shrinks, the piezoelectric diaphragm
bends in the direction Thus, when AC voltage is applied across electrodes, the bending is
repeated, producing sound waves in the air.
Fig 11: Buzzer
18
CHAPTER 3: SOFTWARE DESCRIPTION
This project is implemented using following software‟s:
 PIC C compiler - for compilation part
 Proteus 7 (Embedded C) – for simulation part
3.1 PIC COMPILER:
 PIC compiler is software used where the machine language code is written and compiled.
After compilation, the machine source code is converted into hex code which is to be
dumped into the microcontroller for further processing. PIC compiler also supports C
language code.
 It‟s important that you know C language for microcontroller which is commonly known
as Embedded C. As we are going to use PIC Compiler, hence we also call it PIC C. The
PCB, PCM, and PCH are separate compilers. PCB is for 12-bit opcodes, PCM is for 14-
bitopcodes, and PCH is for 16-bit opcode PIC microcontrollers. Due to many similarities,
all three compilers are covered in this reference manual. Features and limitations that
apply to only specific microcontrollers are indicated within. These compilers are
specifically designed to meet the unique needs of the PIC microcontroller. This allows
developers to quickly design applications software in a more readable, high-level
language. When compared to a more traditional C compiler, PCB, PCM, and PCH have
some limitations. As an example of the limitations, function recursion is not allowed.
 This is due to the fact that the PIC has no stack to push variables onto, and also because
of the way the compilers optimize the code. The compilers can efficiently implement
normal C constructs, input/output operations, and bit twiddling operations. All normal C
data types are supported along with pointers to constant arrays, fixed point decimal, and
arrays of bits.
19
 PIC C is not much different from a normal C program. If you know assembly, writing a C
program is not a crisis. In PIC, we will have a main function, in which all your
application specific work will be defined. In case of embedded C, you do not have any
operating system running in there. So you have to make sure that your program or main
file should never exit. This can be done with the help of simple while (1) or for (;;) loop
as they are going to run infinitely.
 We have to add header file for controller you are using, otherwise you will not be able to
access registers related to peripherals.
 #include <16F876.h> // header file for PIC 16F876//
3.2 PROTEUS:
Proteus is software which accepts only hex files. Once the machine code is converted into
hex code, that hex code has to be dumped into the microcontroller and this is done by the
Proteus. Proteus is a programmer which itself contains a microcontroller in it other than
the one which is to be programmed. This microcontroller has a program in it written in
such a way that it accepts the hex file from the pic compiler and dumps this hex file into
the microcontroller which is to be programmed. As the Proteus programmer requires
power supply to be operated, this power supply is given from the power supply circuit
designed and connected to the microcontroller in proteus. The program which is to be
dumped in to the microcontroller is edited in proteus and is compiled and executed to
check any errors and hence after the successful compilation of the program the program
is dumped in to the microcontroller using a dumper.
20
3.3 PROCEDURAL STEPS FOR COMPILATION, SIMULATION AND DUMPING:
3.3.1 COMPILATION AND SIMULATION STEPS:
For PIC microcontroller, PIC C compiler is used for compilation. The compilation steps
are as follows:
 Open PIC C compiler.
 Choose a name for the new project, so create a separate folder where all the files of your
project will be stored, choose a name and click save.
Fig 12: Picture of opening a new file using PIC C compiler
 Click Project, New, and something the box named 'Text1' is where your code should be
written later.
 Now click 'File, Save as' and choose a file name for the source code ending with the
letter '.c'. name as 'project.c' for example and click save.
21
Fig 13: Picture of compiling a new file using PIC C compiler
Fig 14: Picture of compiling a project.c file using PIC C compiler
 Now start to write the source code in the window titled 'project.c' then before testing
your source code; you have to compile your source code, and correct eventual syntax
errors.
22
Fig 15: Picture of checking errors and warnings using PIC C compiler
 By clicking on compile option .hex file is generated automatically
After compilation, next step is simulation. Here first circuit is designed in Express PCB using
Proteus 7 software and then simulation takes place followed by dumping. The simulation steps
are as follows:
 Open Proteus 7 and click on IS1S6.
 Now it displays PCB where circuit is designed using microcontroller. To design circuit
components are required. So click on component option.
Now click on letter ‟p‟, then under that select PIC16F876 ,other components related to the
project and click OK. The PIC16F876 will be called your “'Target device”, which is the final
destination of your source code.
23
3.3.2 DUMPING STEPS:
The steps involved in dumping the program edited in Proteus 7 to microcontroller are shown
below:
1. Initially before connecting the program dumper to the microcontroller kit the window is
appeared as shown below.
Fig 16: Picture of program dumper window
24
2. Select Tools option and click on Check Communication for establishing a connection as
shown in below window
Fig 17: Picture of checking communications before dumping program into microcontroller
25
3. After connecting the dumper properly to the microcontroller kit the window is appeared as
shown below.
Fig 18: Picture after connecting the dumper to microcontroller
26
4.Import the program which is ‘.hex’ file from the saved location byselectingFile option and
clicking on ‘Import Hex’ as shown in below window.
Fig 19: Picture of program importing into the microcontroller
27
5. After clicking on „Import Hex‟ option we need to browse the location of our program and
click the „prog.hex‟ and click on „open‟ for dumping the program into the microcontroller.
6. After the successful dumping of program the window is as shown below.
Fig 20: Picture after program dumped into the microcontroller
28
CHAPTER 4: INTERFACING OF MICRO CONTROLLOR AND
SCHEMATIC DIAGRAM
In this chapter schematic diagrams and the interfacing of PIC16F876 microcontroller with the
modules shown in the below figure:
4.1 HEART BEAT SENSOR INTERFACING WITH MICRO CONTROLLER:
The LM358 series 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 voltages.
Fig 20 (a): Figure showing schematic diagram of heartbeat sensor and microcontroller
Fig 20 (b): Heartbeat sensor interfacing with PIC microcontroller in Proteus software
29
CHAPTER 5: WORKING PROCEDURE
The sensor unit consists of an infrared light emitting diode (IR LED) and a pin photo diode,
placed side by side, and the fingertip is placed over the sensor assembly, as shown below.
The IR LED transmits an infrared light into the fingertip, a part of which is reflected back from
the blood inside the finger arteries. The photo diode senses the portion of the light that is
reflected back. The intensity of reflected light depends upon the blood volume inside the
fingertip. So, every time the heart beats the amount of reflected infrared light changes, which can
be detected by the photo diode. With a high gain amplifier, this little alteration in the amplitude
of the reflected light can be converted into a pulse. For the amplification purpose IC LM358 is
used. The micro controller (PIC16F876) takes input from the amplification circuit and calculates
the heart rate value. The calculated value is sent to the LCD display for displaying calculated
heart rate value. The block diagram of the system is shown in the fig 21.
Fig 21: Block diagram of the system.
Tx
Finger
Amplification
Circuit
MCU LCD
Display
Rx
30
The step by step explanation of the system is shown below:
1. Circuit after connecting all the components.
Fig 22 (a): Figure showing all the components connections
2. Placing the finger in the sensor. The light form the IR led passes through the finger
which is detected by the Photo diode. The Herat rate is estimated using the change in
volume of the blood flow through the finger.
Fig 22 (b): Finger Clip with IR LED and Photo diode
31
3. The signal is amplified using the LM358 IC
Fig 22 (c): Amplifier circuit
4. The Micro controller processes the input from the Heart rate sensor and then displays the
result on the LCD display.
Fig 22 (d): LCD Display
32
CHAPTER 6: RESULTS AND DISCUSSION
6.1 RESULTS:
The tests are conducted on the 14 subjects. The results of heart beat for the 14 subjects are shown
in the below table:-
Table 2: Table showing the heart rate value of the subjects in different conditions
Test conducted to
subjects
Heart Rate Under Normal
Condition
Heart rate after walking Up &
Down the stairs
Shashidhar 78(Normal) 96(High)
Uday 84(Normal) 105(High)
Nikhil 72(Normal) 94(High)
Kalyan 82(Normal) 110(High)
Shashank 75(Normal) 112(High)
Naga kiran 74(Normal) 98(High)
Matheen 78(Normal) 92(High)
Meher 71(Normal) 97(High)
Adithya 70(Normal) 101(High)
Somaraju 55(Low) 120(High)
Lingaiah 57(Low) 118(High)
Sailaja 52(Low) 121(High)
Satyaraju 75(Normal) 115(High)
Shivaiah 60(Low) 113(High)
6.1.1 HEART RATE VALUE RANGE:
1. Normal heart rate value ranges between 60 and 90.
2. If the heart rate value is below 60 then it is considered as low heart rate.
3. If the heart rate value is above 90 then it is considered as high heart rate.
33
6.1.2 HEART RATE DISPLAY:
Fig 23 (a): High heart rate
Fig 23 (b): Normal heart rate
34
Fig 23 (c): Low heart rate
6.2 DISCUSSION:
Table 2 shown in the results section represents the heart rate values of the different subjects
under different conditions. The heart rate value varies for different age groups. The experiment
was conducted on the subjects at rest and heart rate value at rest is measured. After measuring
the heart rate at rest the subjects underwent running, exercise for some time and heart rate is
subsequently measured. The heart rate value at rest and after exercise is compared. As we can
see there is a change in the heart rate value. From the test results we came to know that activities
that cause change in the heart rate include physical exercise, sleep, anxiety, stress, illness.
The normal resting adult human heart rate ranges from 60–90 BPM. Tachycardia is a fast heart
rate, defined as above 100 BPM at rest. Bradycardia is a slow heart rate, defined as below 60
BPM at rest. During sleep a slow heartbeat with rates around 40–50 BPM is common and is
considered normal. When the heart is not beating in a regular pattern, this is referred to as an
Arrhythmia.
35
CHAPTER 7: CONCLUSIONS AND FUTURE SCOPE
7.1 CONCLUSIONS:
Heart beat monitoring system is designed using a PIC micro controller (PIC16F876).
The device is designed to provide continuous access to the patient‟s heart rate through the LCD
display. Functioning of this device is based on the blood circulation for every one heart beat
which can be sensed by using a circuit formed by the combination of a photodiode and IR LED.
Depending upon the rate of circulation of blood per second the heart beat rate per minute is
calculated. The prototype model is tested and verified for the basic functionality. Complete
evaluation on multiple targets is yet to be carried out..
7.2 FUTURE SCOPE:
Our project “REAL TIME HEART BEAT MONITORIG SYSTEM “is
mainly intended to design a system, which gives very accurate result than the existing devices in
the present day world. This system has heart beat sensor, and LCD interfaced to the micro
controller. The micro controller is programmed in such a way that it takes input from the heart
beat sensor when a finger is inserted into it and displays the value on the LCD continuously. The
system reads from the heart beat sensor which is interfaced with micro controller to display the
heart rate measured on LCD and alerts through buzzer alarm system when exceeds the set limits.
This project can be extended as follows:
1. A graphical LCD can be used to display a graph of the change of heart rate over time.
2. Serial output can be attached to the device so that the heart rates can be sent to a PC for
further online or offline analysis.
3. The whole health monitoring system, which we have proposed can be integrated into a
small compact unit as small as a cell phone or a wrist watch.
4. The project can be implemented as complete patient health monitoring system by
measuring B.P, Temperature etc., which can be done by connecting corresponding
sensors to the MCU.
5. An alphanumeric keypad can be included in order to store the phone number, name etc.
instantaneously.
6. GPS can be included in order to know the location of the user
36
REFERENCES:
[1] Hokanson, D.Eugene; Sumner, David S.; Strandness, D.Eugene, "An Electrically
Calibrated Plethysmograph for Direct Measurement of Limb Blood Flow," in Biomedical
Engineering, IEEE Transactions on , vol.BME-22, no.1, pp.25-29, Jan. 1975
[2] Deepak Verma, "Real Time Optical Heart Monitor", (IJCSIT) International Journal of
Computer Science and Information Technologies, Vol. 5 (6) , 2014
[3] The Microcontrollers, Architecture, Programming and Applications-K Uma Rao,
Andhe Pallavi, Pearson 2009
[4] Op-Amps & Linear ICs – Ramakanth A. Gayakwad, PHI, 2003.
[5] www.allaboutcircuits.com
[6] www.microchip.com
37
APPENDIX
PROGRAM CODE:
The program code is written in the embedded c language. The program code dumping procedure
is given in chapter 3.
#include <16F876.h>
#include <stdlib.h>
#include <string.h>
#include <lcd.c>
#use delay(oscillator=20M)
void main()
{
int i = 0;
int j = 0;
lcd_init();
lcd_putc('f'); // Clear LCD
lcd_gotoxy(1,1); // row-1, column-1
printf(lcd_putc,"Human body ");
lcd_gotoxy(1,2); // row-1, column-2
printf(lcd_putc,"heart rate monitorng");
delay_ms(1500);
lcd_putc('f'); // Clear LCD
lcd_gotoxy(1,1); // row-1, column-1
printf(lcd_putc," Please Insert");
lcd_gotoxy(1,2); // row-2, column-1
printf(lcd_putc," Your Finger");
38
while(1)
{
count = 0;
delay_ms(250);
output_high(PIN_C4);
output_high(PIN_C3);
delay_ms(50);
output_low(PIN_C4);
output_low(PIN_C3);
//Find Heart rate
if((hbeat > 0) && (hbeat < 250))
{
lcd_putc('f');
printf(lcd_putc,"Heart Rate = %Lu",hbeat);
lcd_gotoxy(1,2);
if(hbeat < 60)
{
printf(lcd_putc," Low HR");
}
else if(hbeat > 90)
{
printf(lcd_putc," High HR");
}
else
{
printf(lcd_putc," NORMAL HR");
}
}
}

More Related Content

What's hot

IRJET- IoT based Human Body Parameters Monitoring by using Wearable Wireless ...
IRJET- IoT based Human Body Parameters Monitoring by using Wearable Wireless ...IRJET- IoT based Human Body Parameters Monitoring by using Wearable Wireless ...
IRJET- IoT based Human Body Parameters Monitoring by using Wearable Wireless ...IRJET Journal
 
Real time health monitoring using gprs technology
Real time health monitoring using gprs technologyReal time health monitoring using gprs technology
Real time health monitoring using gprs technologyRahul Sharma
 
IRJET - Patient Health Monitoring System using IoT
IRJET - Patient Health Monitoring System using IoTIRJET - Patient Health Monitoring System using IoT
IRJET - Patient Health Monitoring System using IoTIRJET Journal
 
Implementation Of Real Time IoT Based Health monitoring system
Implementation Of Real Time IoT Based Health monitoring systemImplementation Of Real Time IoT Based Health monitoring system
Implementation Of Real Time IoT Based Health monitoring systemkchakrireddy
 
IRJET- Health Monitoring system using IoT
IRJET- Health Monitoring system using IoTIRJET- Health Monitoring system using IoT
IRJET- Health Monitoring system using IoTIRJET Journal
 
IRJET- Wireless Healthcare Monitoring using Android Phones
IRJET- Wireless Healthcare Monitoring using Android PhonesIRJET- Wireless Healthcare Monitoring using Android Phones
IRJET- Wireless Healthcare Monitoring using Android PhonesIRJET Journal
 
IRJET- Implementation of Continues Body Monitoring System with Wireless B...
IRJET-  	  Implementation of Continues Body Monitoring System with Wireless B...IRJET-  	  Implementation of Continues Body Monitoring System with Wireless B...
IRJET- Implementation of Continues Body Monitoring System with Wireless B...IRJET Journal
 
IRJET - IoT based Health Monitoring System and Telemedicine
IRJET - IoT based Health Monitoring System and TelemedicineIRJET - IoT based Health Monitoring System and Telemedicine
IRJET - IoT based Health Monitoring System and TelemedicineIRJET Journal
 
Survey of a Symptoms Monitoring System for Covid-19
Survey of a Symptoms Monitoring System for Covid-19Survey of a Symptoms Monitoring System for Covid-19
Survey of a Symptoms Monitoring System for Covid-19vivatechijri
 
An IoT Based Patient Health Monitoring System
An IoT Based Patient Health Monitoring SystemAn IoT Based Patient Health Monitoring System
An IoT Based Patient Health Monitoring Systemvishal dineshkumar soni
 
Implementation Of Real Time IoT Based Health monitoring system
Implementation Of Real Time IoT Based Health monitoring systemImplementation Of Real Time IoT Based Health monitoring system
Implementation Of Real Time IoT Based Health monitoring systemkchakrireddy
 
IRJET- A Study on Heart Attack Detection by Heartbeat Monitoring using IoT
IRJET- A Study on Heart Attack Detection by Heartbeat Monitoring using IoTIRJET- A Study on Heart Attack Detection by Heartbeat Monitoring using IoT
IRJET- A Study on Heart Attack Detection by Heartbeat Monitoring using IoTIRJET Journal
 
IRJET - Design and Implementation of IoT based Smart Health Care Monitoring S...
IRJET - Design and Implementation of IoT based Smart Health Care Monitoring S...IRJET - Design and Implementation of IoT based Smart Health Care Monitoring S...
IRJET - Design and Implementation of IoT based Smart Health Care Monitoring S...IRJET Journal
 
7e397c56 3d5b-4898-a4ea-96787699a447-150509181138-lva1-app6891
7e397c56 3d5b-4898-a4ea-96787699a447-150509181138-lva1-app68917e397c56 3d5b-4898-a4ea-96787699a447-150509181138-lva1-app6891
7e397c56 3d5b-4898-a4ea-96787699a447-150509181138-lva1-app6891Rajarshee Dhar
 
IRJET- Review Paper on Patient Health Monitoring System using Can Protocol
IRJET- Review Paper on Patient Health Monitoring System using Can ProtocolIRJET- Review Paper on Patient Health Monitoring System using Can Protocol
IRJET- Review Paper on Patient Health Monitoring System using Can ProtocolIRJET Journal
 
IRJET- Development of Portable Device for Measurement of Blood Glucose, T...
IRJET-  	  Development of Portable Device for Measurement of Blood Glucose, T...IRJET-  	  Development of Portable Device for Measurement of Blood Glucose, T...
IRJET- Development of Portable Device for Measurement of Blood Glucose, T...IRJET Journal
 
IRJET- Power Monitoring with Time Controlling & Data Logging
IRJET- Power Monitoring with Time Controlling & Data LoggingIRJET- Power Monitoring with Time Controlling & Data Logging
IRJET- Power Monitoring with Time Controlling & Data LoggingIRJET Journal
 
A Biomedical Smart Sensor for Visually impaired
A Biomedical Smart Sensor for Visually impairedA Biomedical Smart Sensor for Visually impaired
A Biomedical Smart Sensor for Visually impairedDinesh Mv
 
IOT POWERED WEARABLE HEALTH BAND
IOT POWERED WEARABLE HEALTH BANDIOT POWERED WEARABLE HEALTH BAND
IOT POWERED WEARABLE HEALTH BANDSIDDHARTHHATKAR
 
IRJET- IoT based Patient Health Monitoring System using Raspberry Pi-3
IRJET- IoT based Patient Health Monitoring System using Raspberry Pi-3IRJET- IoT based Patient Health Monitoring System using Raspberry Pi-3
IRJET- IoT based Patient Health Monitoring System using Raspberry Pi-3IRJET Journal
 

What's hot (20)

IRJET- IoT based Human Body Parameters Monitoring by using Wearable Wireless ...
IRJET- IoT based Human Body Parameters Monitoring by using Wearable Wireless ...IRJET- IoT based Human Body Parameters Monitoring by using Wearable Wireless ...
IRJET- IoT based Human Body Parameters Monitoring by using Wearable Wireless ...
 
Real time health monitoring using gprs technology
Real time health monitoring using gprs technologyReal time health monitoring using gprs technology
Real time health monitoring using gprs technology
 
IRJET - Patient Health Monitoring System using IoT
IRJET - Patient Health Monitoring System using IoTIRJET - Patient Health Monitoring System using IoT
IRJET - Patient Health Monitoring System using IoT
 
Implementation Of Real Time IoT Based Health monitoring system
Implementation Of Real Time IoT Based Health monitoring systemImplementation Of Real Time IoT Based Health monitoring system
Implementation Of Real Time IoT Based Health monitoring system
 
IRJET- Health Monitoring system using IoT
IRJET- Health Monitoring system using IoTIRJET- Health Monitoring system using IoT
IRJET- Health Monitoring system using IoT
 
IRJET- Wireless Healthcare Monitoring using Android Phones
IRJET- Wireless Healthcare Monitoring using Android PhonesIRJET- Wireless Healthcare Monitoring using Android Phones
IRJET- Wireless Healthcare Monitoring using Android Phones
 
IRJET- Implementation of Continues Body Monitoring System with Wireless B...
IRJET-  	  Implementation of Continues Body Monitoring System with Wireless B...IRJET-  	  Implementation of Continues Body Monitoring System with Wireless B...
IRJET- Implementation of Continues Body Monitoring System with Wireless B...
 
IRJET - IoT based Health Monitoring System and Telemedicine
IRJET - IoT based Health Monitoring System and TelemedicineIRJET - IoT based Health Monitoring System and Telemedicine
IRJET - IoT based Health Monitoring System and Telemedicine
 
Survey of a Symptoms Monitoring System for Covid-19
Survey of a Symptoms Monitoring System for Covid-19Survey of a Symptoms Monitoring System for Covid-19
Survey of a Symptoms Monitoring System for Covid-19
 
An IoT Based Patient Health Monitoring System
An IoT Based Patient Health Monitoring SystemAn IoT Based Patient Health Monitoring System
An IoT Based Patient Health Monitoring System
 
Implementation Of Real Time IoT Based Health monitoring system
Implementation Of Real Time IoT Based Health monitoring systemImplementation Of Real Time IoT Based Health monitoring system
Implementation Of Real Time IoT Based Health monitoring system
 
IRJET- A Study on Heart Attack Detection by Heartbeat Monitoring using IoT
IRJET- A Study on Heart Attack Detection by Heartbeat Monitoring using IoTIRJET- A Study on Heart Attack Detection by Heartbeat Monitoring using IoT
IRJET- A Study on Heart Attack Detection by Heartbeat Monitoring using IoT
 
IRJET - Design and Implementation of IoT based Smart Health Care Monitoring S...
IRJET - Design and Implementation of IoT based Smart Health Care Monitoring S...IRJET - Design and Implementation of IoT based Smart Health Care Monitoring S...
IRJET - Design and Implementation of IoT based Smart Health Care Monitoring S...
 
7e397c56 3d5b-4898-a4ea-96787699a447-150509181138-lva1-app6891
7e397c56 3d5b-4898-a4ea-96787699a447-150509181138-lva1-app68917e397c56 3d5b-4898-a4ea-96787699a447-150509181138-lva1-app6891
7e397c56 3d5b-4898-a4ea-96787699a447-150509181138-lva1-app6891
 
IRJET- Review Paper on Patient Health Monitoring System using Can Protocol
IRJET- Review Paper on Patient Health Monitoring System using Can ProtocolIRJET- Review Paper on Patient Health Monitoring System using Can Protocol
IRJET- Review Paper on Patient Health Monitoring System using Can Protocol
 
IRJET- Development of Portable Device for Measurement of Blood Glucose, T...
IRJET-  	  Development of Portable Device for Measurement of Blood Glucose, T...IRJET-  	  Development of Portable Device for Measurement of Blood Glucose, T...
IRJET- Development of Portable Device for Measurement of Blood Glucose, T...
 
IRJET- Power Monitoring with Time Controlling & Data Logging
IRJET- Power Monitoring with Time Controlling & Data LoggingIRJET- Power Monitoring with Time Controlling & Data Logging
IRJET- Power Monitoring with Time Controlling & Data Logging
 
A Biomedical Smart Sensor for Visually impaired
A Biomedical Smart Sensor for Visually impairedA Biomedical Smart Sensor for Visually impaired
A Biomedical Smart Sensor for Visually impaired
 
IOT POWERED WEARABLE HEALTH BAND
IOT POWERED WEARABLE HEALTH BANDIOT POWERED WEARABLE HEALTH BAND
IOT POWERED WEARABLE HEALTH BAND
 
IRJET- IoT based Patient Health Monitoring System using Raspberry Pi-3
IRJET- IoT based Patient Health Monitoring System using Raspberry Pi-3IRJET- IoT based Patient Health Monitoring System using Raspberry Pi-3
IRJET- IoT based Patient Health Monitoring System using Raspberry Pi-3
 

Viewers also liked

Accelerometer controlled robot
Accelerometer controlled robotAccelerometer controlled robot
Accelerometer controlled robotMohit Keshav
 
Design, development and testing of a wireless sensor network for medical appl...
Design, development and testing of a wireless sensor network for medical appl...Design, development and testing of a wireless sensor network for medical appl...
Design, development and testing of a wireless sensor network for medical appl...sudhakar5472
 
Accelerometer and gyroscope
Accelerometer and gyroscopeAccelerometer and gyroscope
Accelerometer and gyroscopestall14
 
PIC microcontroller review
PIC microcontroller reviewPIC microcontroller review
PIC microcontroller reviewMohsen Sarakbi
 
AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...
AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...
AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...kailashgavare
 
Wireless Weather Station monitoring System
Wireless Weather Station monitoring SystemWireless Weather Station monitoring System
Wireless Weather Station monitoring SystemAlameluPriyadharshini
 
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSPIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSVISHNU KP
 
Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)Muhammad Ahkam Khan
 
Wheelchair is guided by voice commands full documentation
Wheelchair is guided by voice commands full documentationWheelchair is guided by voice commands full documentation
Wheelchair is guided by voice commands full documentationMajd Khaleel
 
Gesture control robot using accelerometer documentation
Gesture control robot using accelerometer documentationGesture control robot using accelerometer documentation
Gesture control robot using accelerometer documentationRajendra Prasad
 
PIC 16F877A by PARTHIBAN. S.
PIC 16F877A   by PARTHIBAN. S.PIC 16F877A   by PARTHIBAN. S.
PIC 16F877A by PARTHIBAN. S.parthi_arjun
 

Viewers also liked (20)

M.tech project abstract
M.tech project abstractM.tech project abstract
M.tech project abstract
 
Accelerometer controlled robot
Accelerometer controlled robotAccelerometer controlled robot
Accelerometer controlled robot
 
Design, development and testing of a wireless sensor network for medical appl...
Design, development and testing of a wireless sensor network for medical appl...Design, development and testing of a wireless sensor network for medical appl...
Design, development and testing of a wireless sensor network for medical appl...
 
Pic Aid
Pic AidPic Aid
Pic Aid
 
CAN, BY MD.ABDULLAH
CAN, BY MD.ABDULLAHCAN, BY MD.ABDULLAH
CAN, BY MD.ABDULLAH
 
SAGE BOT
SAGE BOTSAGE BOT
SAGE BOT
 
Src 147
Src 147Src 147
Src 147
 
Accelerometer
AccelerometerAccelerometer
Accelerometer
 
Accelerometer and gyroscope
Accelerometer and gyroscopeAccelerometer and gyroscope
Accelerometer and gyroscope
 
PIC microcontroller review
PIC microcontroller reviewPIC microcontroller review
PIC microcontroller review
 
AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...
AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...
AUTOMATIC VEHICLE ACCIDENT INFORMATION BY SMS SYSTEM (AVAIS SYSTEM) Gps gsm a...
 
Wireless Weather Station monitoring System
Wireless Weather Station monitoring SystemWireless Weather Station monitoring System
Wireless Weather Station monitoring System
 
Accelerometer 1
Accelerometer 1Accelerometer 1
Accelerometer 1
 
Getting started with pic microcontrollers
Getting started with pic microcontrollersGetting started with pic microcontrollers
Getting started with pic microcontrollers
 
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSPIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
 
Accelerometer
Accelerometer Accelerometer
Accelerometer
 
Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)
 
Wheelchair is guided by voice commands full documentation
Wheelchair is guided by voice commands full documentationWheelchair is guided by voice commands full documentation
Wheelchair is guided by voice commands full documentation
 
Gesture control robot using accelerometer documentation
Gesture control robot using accelerometer documentationGesture control robot using accelerometer documentation
Gesture control robot using accelerometer documentation
 
PIC 16F877A by PARTHIBAN. S.
PIC 16F877A   by PARTHIBAN. S.PIC 16F877A   by PARTHIBAN. S.
PIC 16F877A by PARTHIBAN. S.
 

Similar to FINAL DOC

REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLERREAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLERVenkata Sai Kalyan Routhu
 
Heart rate monitoring system using arduino
Heart rate monitoring system using  arduinoHeart rate monitoring system using  arduino
Heart rate monitoring system using arduinosoundaryasheshachala
 
Design and Implementation of Real Time Remote Supervisory System
Design and Implementation of Real Time Remote Supervisory SystemDesign and Implementation of Real Time Remote Supervisory System
Design and Implementation of Real Time Remote Supervisory SystemIJERA Editor
 
Towards development of a low cost and
Towards development of a low cost andTowards development of a low cost and
Towards development of a low cost andArhamSheikh1
 
Patient Monitoring System
Patient Monitoring SystemPatient Monitoring System
Patient Monitoring SystemIJERA Editor
 
IRJET- Motion Based Message Conveyor for Physically Disabled People
IRJET-  	  Motion Based Message Conveyor for Physically Disabled PeopleIRJET-  	  Motion Based Message Conveyor for Physically Disabled People
IRJET- Motion Based Message Conveyor for Physically Disabled PeopleIRJET Journal
 
IRJET- Patient Monitoring System
IRJET- Patient Monitoring SystemIRJET- Patient Monitoring System
IRJET- Patient Monitoring SystemIRJET Journal
 
A low-cost electro-cardiograph machine equipped with sensitivity and paper sp...
A low-cost electro-cardiograph machine equipped with sensitivity and paper sp...A low-cost electro-cardiograph machine equipped with sensitivity and paper sp...
A low-cost electro-cardiograph machine equipped with sensitivity and paper sp...TELKOMNIKA JOURNAL
 
IRJET- Automatic Recognition using Heartbeat Authentication
IRJET- Automatic Recognition using Heartbeat AuthenticationIRJET- Automatic Recognition using Heartbeat Authentication
IRJET- Automatic Recognition using Heartbeat AuthenticationIRJET Journal
 
IOT BASED HEALTH MONITORING BY USING PULSE OXIMETER AND ECG
IOT BASED HEALTH MONITORING BY USING PULSE OXIMETER AND ECGIOT BASED HEALTH MONITORING BY USING PULSE OXIMETER AND ECG
IOT BASED HEALTH MONITORING BY USING PULSE OXIMETER AND ECGPonselvanV
 
IRJET - Medical Analysis using Virtual Reality
IRJET - Medical Analysis using Virtual RealityIRJET - Medical Analysis using Virtual Reality
IRJET - Medical Analysis using Virtual RealityIRJET Journal
 
Low-Cost Sensor Network for Contamination Detection in Drinking Water
Low-Cost Sensor Network for Contamination Detection in Drinking WaterLow-Cost Sensor Network for Contamination Detection in Drinking Water
Low-Cost Sensor Network for Contamination Detection in Drinking WaterIJERA Editor
 
The development of a wireless LCP-based intracranial pressure sensor for trau...
The development of a wireless LCP-based intracranial pressure sensor for trau...The development of a wireless LCP-based intracranial pressure sensor for trau...
The development of a wireless LCP-based intracranial pressure sensor for trau...IJECEIAES
 
IRJET - Fabricating Intelligent Ankle Boot for Dementia Patient
IRJET - Fabricating Intelligent Ankle Boot for Dementia PatientIRJET - Fabricating Intelligent Ankle Boot for Dementia Patient
IRJET - Fabricating Intelligent Ankle Boot for Dementia PatientIRJET Journal
 
IRJET- IoT Based Home Automation And Health Monitoring System for Physically ...
IRJET- IoT Based Home Automation And Health Monitoring System for Physically ...IRJET- IoT Based Home Automation And Health Monitoring System for Physically ...
IRJET- IoT Based Home Automation And Health Monitoring System for Physically ...IRJET Journal
 
Design and implementation of portable electrocardiogram recorder with field ...
Design and implementation of portable electrocardiogram  recorder with field ...Design and implementation of portable electrocardiogram  recorder with field ...
Design and implementation of portable electrocardiogram recorder with field ...IJECEIAES
 
Micro Electronic Pill Seminar Report
Micro Electronic Pill Seminar ReportMicro Electronic Pill Seminar Report
Micro Electronic Pill Seminar ReportSajan CK
 
A first response microcontroller based
A first response microcontroller basedA first response microcontroller based
A first response microcontroller basedIJCI JOURNAL
 

Similar to FINAL DOC (20)

REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLERREAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
 
Heart rate monitoring system using arduino
Heart rate monitoring system using  arduinoHeart rate monitoring system using  arduino
Heart rate monitoring system using arduino
 
Ijigsp v10-n5-3
Ijigsp v10-n5-3Ijigsp v10-n5-3
Ijigsp v10-n5-3
 
Design and Implementation of Real Time Remote Supervisory System
Design and Implementation of Real Time Remote Supervisory SystemDesign and Implementation of Real Time Remote Supervisory System
Design and Implementation of Real Time Remote Supervisory System
 
Towards development of a low cost and
Towards development of a low cost andTowards development of a low cost and
Towards development of a low cost and
 
PPT format 1.pptx
PPT format 1.pptxPPT format 1.pptx
PPT format 1.pptx
 
Patient Monitoring System
Patient Monitoring SystemPatient Monitoring System
Patient Monitoring System
 
IRJET- Motion Based Message Conveyor for Physically Disabled People
IRJET-  	  Motion Based Message Conveyor for Physically Disabled PeopleIRJET-  	  Motion Based Message Conveyor for Physically Disabled People
IRJET- Motion Based Message Conveyor for Physically Disabled People
 
IRJET- Patient Monitoring System
IRJET- Patient Monitoring SystemIRJET- Patient Monitoring System
IRJET- Patient Monitoring System
 
A low-cost electro-cardiograph machine equipped with sensitivity and paper sp...
A low-cost electro-cardiograph machine equipped with sensitivity and paper sp...A low-cost electro-cardiograph machine equipped with sensitivity and paper sp...
A low-cost electro-cardiograph machine equipped with sensitivity and paper sp...
 
IRJET- Automatic Recognition using Heartbeat Authentication
IRJET- Automatic Recognition using Heartbeat AuthenticationIRJET- Automatic Recognition using Heartbeat Authentication
IRJET- Automatic Recognition using Heartbeat Authentication
 
IOT BASED HEALTH MONITORING BY USING PULSE OXIMETER AND ECG
IOT BASED HEALTH MONITORING BY USING PULSE OXIMETER AND ECGIOT BASED HEALTH MONITORING BY USING PULSE OXIMETER AND ECG
IOT BASED HEALTH MONITORING BY USING PULSE OXIMETER AND ECG
 
IRJET - Medical Analysis using Virtual Reality
IRJET - Medical Analysis using Virtual RealityIRJET - Medical Analysis using Virtual Reality
IRJET - Medical Analysis using Virtual Reality
 
Low-Cost Sensor Network for Contamination Detection in Drinking Water
Low-Cost Sensor Network for Contamination Detection in Drinking WaterLow-Cost Sensor Network for Contamination Detection in Drinking Water
Low-Cost Sensor Network for Contamination Detection in Drinking Water
 
The development of a wireless LCP-based intracranial pressure sensor for trau...
The development of a wireless LCP-based intracranial pressure sensor for trau...The development of a wireless LCP-based intracranial pressure sensor for trau...
The development of a wireless LCP-based intracranial pressure sensor for trau...
 
IRJET - Fabricating Intelligent Ankle Boot for Dementia Patient
IRJET - Fabricating Intelligent Ankle Boot for Dementia PatientIRJET - Fabricating Intelligent Ankle Boot for Dementia Patient
IRJET - Fabricating Intelligent Ankle Boot for Dementia Patient
 
IRJET- IoT Based Home Automation And Health Monitoring System for Physically ...
IRJET- IoT Based Home Automation And Health Monitoring System for Physically ...IRJET- IoT Based Home Automation And Health Monitoring System for Physically ...
IRJET- IoT Based Home Automation And Health Monitoring System for Physically ...
 
Design and implementation of portable electrocardiogram recorder with field ...
Design and implementation of portable electrocardiogram  recorder with field ...Design and implementation of portable electrocardiogram  recorder with field ...
Design and implementation of portable electrocardiogram recorder with field ...
 
Micro Electronic Pill Seminar Report
Micro Electronic Pill Seminar ReportMicro Electronic Pill Seminar Report
Micro Electronic Pill Seminar Report
 
A first response microcontroller based
A first response microcontroller basedA first response microcontroller based
A first response microcontroller based
 

FINAL DOC

  • 1. A PROJECT REPORT ON REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICRO CONTROLLER A Dissertation submitted in partial fulfillment of the requirement of the Award of the Degree of BACHELOR OF TECHNOLOGY in ELECTRONICS & COMMUNICATION ENGINEERING Submitted by: M. NAGA KIRAN (12011M2501) S. SHASHIDHAR (12011M2509) R. V. SAI KALYAN (12011M2003) R. UDAY KIRAN (12011M2502) Under the Esteemed Supervision Of Dr. L. Pratap Reddy, Professor, Department of ECE DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING JNTUH College of Engineering Hyderabad (Autonomous) Jawaharlal Nehru Technological University – 500085,2015
  • 2. DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING JNTUH College of Engineering Hyderabad (Autonomous), Jawaharlal Nehru Technological University Hyderabad-85 CERTIFICATE BY THE SUPERVISOR This is to certify that the Project Report entitled, “REAL TIME HEART BEAT MONITERING SYSTEM USING PIC16F876 MICRO CONTROLLER”, being submitted by M. NAGA KIRAN (12011M2501), S.SHASHIDHAR (12011M2509), R. V. SAI KALYAN (12011M2003),R. UDAY KIRAN (12011M2502) in partial fulfillment of the requirement for the award of the Degree of BACHELOR OF TECHNOLOGY in Electronics & Communication Engineering during the academic year 2012-17 is a record of bonafide work carried out by them under my supervision. The results are verified and found satisfactory. Dr. L. Pratap Reddy, Professor of ECE, JNTUH College of Engineering (Autonomous), Hyderabad- 85.
  • 3. DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING JNTUH College of Engineering Hyderabad (Autonomous), Jawaharlal Nehru Technological University Hyderabad-85 CERTIFICATE BY THE HEAD OF DEPARTMENT This is to certify that the Project Report entitled, “REAL TIME HEART BEAT MONITERING SYSTEM USING PIC16F876 MICRO CONTROLLER”, being submitted by M. NAGA KIRAN (12011M2501), S.SHASHIDHAR (12011M2509), R. V. SAI KALYAN (12011M2003),R. UDAY KIRAN (12011M2502) in partial fulfillment of the requirement for the award of the Degree of BACHELOR OF TECHNOLOGY in Electronics & Communication Engineering during the academic year 2012-17 is a record of bonafide work carried out by them under my supervision. The results are verified and found satisfactory. Dr. M. Asha Rani, Professor & Head of ECE, JNTUH College of Engineering (Autonomous), Hyderabad - 85.
  • 4. DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING JNTUH College of Engineering Hyderabad (Autonomous), Jawaharlal Nehru Technological University Hyderabad-85 DECLARATION BY THE CANDIDATES We, M. NAGA KIRAN (12011M2501),S.SHASHIDHAR (12011M2509), R. V. SAI KALYAN (12011M2003),R. UDAY KIRAN (12011M2502) hereby declare that the project dissertation entitled ― REAL TIME HEART BEAT MONITERING SYSTEM USING PIC16F876 MICRO CONTROLLER, is a bonafide work done and submitted under the guidance of Dr. L. Pratap Reddy, Professor, Department of ECE, JNTUH College of Engineering - Hyderabad, in partial fulfillment of the requirements for the award of the degree of Bachelor of Technology in Electronics & Communication Engineering during the academic years 2012-17. This record is a bonafide work carried out by us and the results embodied in this project have not been reproduced or copied from any source. The results embodied in this project have not been submitted to any other University or Institute for the award of any degree or diploma. M. NAGA KIRAN (12011M2501) S. SHASHIDHAR (12011M2509) R. V. SAI KALYAN (12011M2003) R. UDAY KIRAN (12011M2502)
  • 5. ACKNOWLEDGEMENTS A goal begins with a teacher who believes in you, who tugs and pushes and leads you to the next plateau, sometimes poking you with a sharp stick called truth. The quote stands true for our guide Dr. L. Pratap Reddy. His passion, dedication, and energy never cease to amaze us. His methods have always been very innovative. We take this opportunity to thank him for his esteemed guidance and motivation in helping us do this project. We would also like to express our gratitude towards Dr. M. Asha Rani, HOD of ECE, JNTUH College of Engineering Hyderabad whose cooperation was vital during the course of our work. We thank all the faculty and staff members for their cooperation and encouragement. We would like to express our sincere gratitude towards Mr. M. Rama Rao, Research Scholar, who has been a constant source of guidance and inspiration. His innovative ideas have acted as stepping stones in guiding us towards our goal. We would like to thank the Embedded Systems Lab in-charge faculty for their support and help which they provided with readiness even during the late hours we spent in the lab. Last but not the least, we would like to thank our families for their constant support and our dear friends for their words of affection in our darkest times.
  • 6. ABSTRACT The present work is aimed at measurement of heartbeat and display the information on an alphanumeric (or Graphical) LCD display. The heartbeat monitor uses LED and a LDR based sensor to determine the hearbeat. This system detects the pulses person when the sensor is positioned on a appropriate location of the user’s skin (eg: Fingertip or Ear lobe) and generates a heartbeat signal associated with the pulsing condition. The output of a heartbeat sensor gives a very low voltage signal. Hence this needs to be amplified using an amplifier. The amplified signal is given to the Microcontroller unit for actual measurement of heartrate. This processed heartbeat information is sent to a LCD display. This system also consists of an LED indicator or a Buzzer to indicate the Visual or Audible indication of heartbeat.
  • 7. 1 CHAPTER 1: INTRODUCTION 1.1 INTRODUCTION TO THE PROJECT: This project describes the design of a simple, low-cost microcontroller based heart rate with LCD output. Heart rate of the subject is measured from the thumb finger using IRD (Infrared Device sensors and the rate is then averaged and displayed on a text based LCD.).The device LCD displaying the heart beat rat and counting values through sending pulses from the sensor. This instrument employs a simple Opto electronic sensor, conveniently strapped on the finger, to give continuous indication of the pulse digits. The Pulse monitor works both on battery or mains supply. This project uses regulated 5V, 500mA power supply. 7805 three terminal voltage regulator is used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac output of secondary of 230/12V step down transformer. 1.2 PROJECT OVERVIEW: An embedded system is a combination of software and hardware to perform a dedicated task. Some of the main devices used in embedded products are Microprocessors and Microcontrollers. Microprocessors are commonly referred to as general purpose processors as they simply accept the inputs, process it and give the output. In contrast, a microcontroller not only accepts the data as inputs but also manipulates it, interfaces the data with various devices, controls the data and thus finally gives the result. The project “Real time Heart beat monitoring System using PIC16F876 Microcontroller” is an exclusive project which is used for automatic monitoring of heart beat displays on LCD.
  • 8. 2 1.3 ORGANISATION OF THESIS: The thesis explains the implementation of “Real time Heart beat monitoring System using PIC16F876 Microcontroller”. The organization of the thesis is explained here with: Chapter 1 Presents introduction to the overall thesis and the overview of the project. In the project overview a brief introduction of Real time Heart beat monitoring System using PIC16F876 Microcontroller and its applications are discussed. Chapter 2 Presents the hardware description. It deals with the block diagram of the project and explains the purpose of each block. In the same chapter the explanation of microcontroller, heartbeat sensor, power supplies, buzzer and LCD are considered. Chapter 3 Presents the software description. It explains the implementation of the project using PIC C Compiler software and the proteus software Chapter 4 Presents the project description along with heartbeat sensor module interfacing to microcontroller. Chapter 5 Presents the working procedure and steps involved in the project. Chapter 6 Presents the results and discussion. Chapter 7 presents the conclusion and the Future scope.
  • 9. 3 1.4 METHODS FOR SENSING HEART RATE:  Using Body-Surface Bio potential Electrodes  Using Finger Plethysmography 1.4.1 USING BODY-SURFACE BIO POTENTIAL ELECTRODES: Electrodes that can be placed on the body surface for recording bioelectric signals. The integrity of the skin is not compromised when these electrodes are applied, and they can be used for short- term diagnostic recording such as taking a clinical electrocardiogram or long-term chronic recording such as occurs in cardiac monitoring. Limitations of this method:  May cause skin irritation on contact with skin for long period of time.  Not reliable if there are any electronic devices which may cause electrical interference.  Storage problems, requires special storage environment.  Mobility restricted due to wiredconnection between sensor and device. 1.4.2 FINGER PLETHYSMOGRAPHY: This project is based on the principle of Photo Plethysmography (PPG) which is a non-invasive method of measuring the variation in blood volume in tissues using an IR light source and a detector. Since the change in blood volume is synchronous to the heart beat, this technique can be used to calculate the heart rate. Advantages of Finger Plethysmography over Body-Surface Bio potential Electrodes:  Does not cause Skin irritation problem.  No need to stick to the skin.  Can be removed and reused many times.  No Storage problems. Limitations:  Not reliable if there are any electronic devices which may cause IR interference.  Mobility restricted due to wiredconnection between sensor and device.
  • 10. 4 CHAPTER 2: HARDWARE DESCRIPTION 2.1 INTRODUCTION WITH BLOCK DIAGRAM: The block diagram of the project and the description of the blocks in the block diagram are considered. Block diagram is shown below. Fig 1: Block Diagram of Real time heart beat monitoring system
  • 11. 5 THE MAIN BLOCKS OF THIS HEART BEAT MONITORING ARE: 1. Micro controller (16F876) 2. Reset button 3. Crystal oscillator 4. Regulated power supply (RPS) 5. LED Indicator 6. Heartbeat sensor 7. GSM Modem 8. LCD 9. Buzzer 2.2 MICRO CONTROLLER: A microcontroller is a small computer (SoC) on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of Ferroelectric RAM, NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications. Fig 2: Microcontroller The microcontroller used in this project is a PIC Microcontroller.
  • 12. 6 2.2.1 INTRODUCTION TO PIC MICROCONTROLLER: PIC stands for Peripheral Interface Controller given by Microchip Technology to identify its single-chip microcontrollers. These devices have been very successful in 8-bit microcontrollers. The main reason is that Microchip Technology has continuously upgraded the device architecture and added needed peripherals to the microcontroller to suit customers' requirements. Popularity of the PIC microcontrollers is due to the following factors. 1. Sped: Harvard Architecture, RISC architecture, 1 instruction cycle = 4 clock cycles. 2. Instruction set simplicity: The instruction set consists of just 35 instructions (as opposed to 111 instructions for 8051). 3. Power-on-reset and brown-out reset. Brown-out-reset means when the power supply goes below a specified voltage (say 4V), it causes PIC to reset; hence malfunction is avoided. A watch dog timer (user programmable) resets the processor if the software/program ever malfunctions and deviates from its normal operation. 4. PIC microcontroller has four optional clock sources.  Low power crystal  Mid-range crystal  High range crystal  RC oscillator (low cost). 5. Programmable timers and on-chip ADC. 6. Up to 12 independent interrupt sources. 7. Powerful output pin control (25 mA (max.) current sourcing capability per pin.) 8. EPROM/OTP/ROM/Flash memory option 9. Input output expansion capability
  • 13. 7 2.2.2 CPU ARCHITECTURE: The CPU uses Harvard architecture with separate Program and Variable (data) memory interface. This facilitates instruction fetch and the operation on data/accessing of variables simultaneously. Architecture of PIC microcontroller Fig 3: Architecture of PIC microcontroller Basically, all PIC microcontrollers offer the following features:  RISC instruction set with around 35 instructions _9 Digital I/O ports  On-chip timer with 8-bit prescaler.  Power-on reset  Watchdog timer  Power saving SLEEP mode  Direct, indirect, and relative addressing modes  External clock interface  RAM data memory  EPROM (or OTP) program memory
  • 14. 8 2.2.3 PIN DESCRIPTION: Fig 4: PIC16F876 PINOUT DESCRIPTION OSC1/CLKIN: Oscillator crystal input/external clock source input. OSC2/CLKOUT: Oscillator crystal output. Connects to crystal or resonator in crystal oscillator mode In RC mode, the OSC2 pin outputs CLKOUT which has 1/4 the frequency of OSC1, and denotes the instruction cycle rate. MCLR/VPP: Master Clear (Reset) input or programming voltage input. This pin is an active low RESET to the device. PORTA is a bi-directional I/O port. RA0/AN0: RA0 can also be analog input0. RA1/AN1:RA1 can also be analog input1. RA2/AN2/VREF- :RA2 can also be analog input2 or negative analog reference voltage. RA3/AN3/VREF+:RA3 can also be analog input3 or positive analog reference voltage. RA4/T0CKI: RA4 can also be the clock input to the Timer0 module. Output is open drain type. RA5/SS/AN4:RA5 can also be analog input4 or the slave select for the synchronous serial port.
  • 15. 9 PORTB is a bi-directional I/O port. PORTB can be software programmed for internal weak pull- up on all inputs. RB0/INT: RB0 can also be the external interrupt pin. RB3/PGM: RB3 can also be the low voltage programming input. RB4: Interrupt-on-change pin. RB5: Interrupt-on-change pin. RB6/PGC: Interrupt-on-change pin or In-Circuit Debugger pin, serial programming clock. RB7/PGD: Interrupt-on-change pin or In-Circuit Debugger pin, serial programming data. PORTC is a bi-directional I/O port. RC0/T1OSO/T1CKI:RC0 can also be the Timer1 oscillator output or Timer1 clock input. RC1/T1OSI/CCP2: RC1 can also be the Timer1 oscillator input or Capture2 input/Compare2 output/PWM2 output. RC2/CCP1:RC2 can also be the Capture1 input/Compare1 output/PWM1 output. RC3/SCK/SCL: RC3 can also be the synchronous serial clock input/output for both SPI and I2C modes. RC4/SDI/SDA: RC4 can also be the SPI Data In (SPI mode) or data I/O (I2C mode). RC5/SDO: RC5 can also be the SPI Data Out (SPI mode). RC6/TX/CK: RC6 can also be the USART Asynchronous Transmit or Synchronous Clock. RC7/RX/DT: RC7 can also be the USART Asynchronous Receive or Synchronous Data. VSS: Ground reference for logic and I/O pins. VDD: Positive supply for logic and I/O pins.
  • 16. 10 2.3 REGULATED POWER SUPPLY: Fig 5: Circuit diagram of Regulated Power Supply with Led connection The components mainly used in above figure are  230V AC MAINS  TRANSFORMER  BRIDGE RECTIFIER(DIODES)  CAPACITOR  VOLTAGE REGULATOR(IC 7805)  RESISTOR  LED(LIGHT EMITTING DIODE) 2.3.1 VOLTAGE REGULATOR: A voltage regulator (also called a „regulator‟) with only three terminals appears to be a simple device, but it is in fact a very complex integrated circuit. It converts a varying input voltage into a constant „regulated‟ output voltage. Voltage Regulators are available in a variety of outputs like 5V, 6V, 9V, 12V and 15V. The LM78XX series of voltage regulators are designed for positive input. For applications requiring negative input, the LM79XX series is used. Using a pair of „voltage-divider‟ resistors can increase the output voltage of a regulator circuit. It is not possible to obtain a voltage lower than the stated rating. You cannot use a 12V regulator to make a 5V power supply. Voltage regulators are very robust. These can withstand
  • 17. 11 over-current draw due to short circuits and also over-heating. In both cases, the regulator will cut off before any damage occurs. The only way to destroy a regulator is to apply reverse voltage to its input. Reverse polarity destroys the regulator almost instantly. Fig:6 shows voltage regulator. Fig 6: LM7805 Voltage Regulator 2.4 HEART BEAT SENSOR: This heart beat sensor is designed to give digital output of heat beat when a finger is placed inside it. When the heart detector is working, the top-most LED flashes in unison with each heartbeat. 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.
  • 18. 12 2.4.1 WORKING: The sensor consists of a super bright red LED and light detector. The LED needs to be super bright as the light must pass through finger and detected at other end. Now, when the heart pumps a pulse of blood through the blood vessels, the finger becomes slightly more opaque and so less light reached the detector. With each heart pulse the detector signal varies. This variation is converted to electrical pulse. This signal is amplified and triggered through an amplifier which outputs +5V logic level signal. The output signal is also indicated on top by a LED which blinon each heartbeat. Fig 7: Finger Clip with IR LED and Photo diode 2.4.2 AMPLIFIER CIRCUIT: Fig 8: Amplifier circuit
  • 19. 13 For amplification, we use IC LM358. Pulse rate is sensed by using a high intensity type LED and LDR. The finger is inserted in probe and red light from high intensity LED is allowed to fall on the finger. The amount of red light absorbed by finger varies according to the pulsatile blood flow in the finger. Therefore the amount of light transmitted varies according to the blood flow. The LDR placed on opposite side of LED detects the transmitted light. With increase in transmitted light its resistance decreases and vice-versa. A voltage divider circuit is employed to get a voltage signal proportional to the resistance of the LDR. This voltage signal consists of AC and DC components. Non-moving structures (veins, blood capillaries, bones, soft tissues, non-pulsatile blood) absorb constant amount of light and hence contribute to the DC component of voltage signal. As it provides no information about the blood pulses, DC components are not needed. Pulsatile blood absorbs varying amount of light and hence contributes to AC component of voltage signal. AC components are our required signal. The magnitude of the DC components is almost 100-1000 times higher than the AC components. Hence they need to be removed in order for the AC components to be conditioned properly further on. Therefore, a high pass filter circuit is employed after the voltage divider network to block the DC components of the signal. The AC signal is now amplified from mV range to V range. The amplified signal is given to a comparator where it is compared against a set threshold value. The comparator o/p consists of positive pulses corresponding to blood pulses. The comparator output is given to the PIC. The PIC calculates the time duration between 2 successive pulses and then computes the instantaneous heart rate. The PIC then proceeds to display the calculated heart rate on the LCD display.
  • 20. 14 Fig 9: Amplifier circuit used in Heart rate monitoring system 2.4.3 LM358 SENSOR: The LM358 (Low Power Dual Operational Amplifiers) series 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 voltages. 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 amplifiers, dc gain blocks and all the conventional op amp circuits which now can be more easily implemented in single power supply systems. 2.5 LCD DISPLAY: One of the most common devices attached to a micro controller is an LCD display. Some of the most common LCD‟s connected to the many microcontrollers are 16x2 and 20x2 displays. This means 16 characters per line by 2 lines and 20 characters per line by 2 lines, respectively.
  • 21. 15 2.5.1 LCD PIN DIAGRAM: Fig 10 (a): LCD Pin diagram Fig 10 (b): LCD Display
  • 22. 16 2.5.2 PIN DESCRIPTION: Table 1: Character LCD pins with Microcontroller Pin No. Name Description Pin no. 1 VSS Power supply (GND) Pin no. 2 VCC Power supply (+5V) Pin no. 3 VEE Contrast adjust Pin no. 4 RS 0 = Instruction input 1 = Data input Pin no. 5 R/W 0 = Write to LCD module 1 = Read from LCD module Pin no. 6 EN Enable signal Pin no. 7 D0 Data bus line 0 (LSB) Pin no. 8 D1 Data bus line 1 Pin no. 9 D2 Data bus line 2 Pin no. 10 D3 Data bus line 3 Pin no. 11 D4 Data bus line 4 Pin no. 12 D5 Data bus line 5 Pin no. 13 D6 Data bus line 6 Pin no. 14 D7 Data bus line 7 (MSB) The LCD requires 3 control lines as well as either 4 or 8 I/O lines for the data bus. The user may select whether the LCD is to operate with a 4-bit data bus or an 8-bit data bus. If a 4-bit data bus is used the LCD will require a total of 7 data lines (3 control lines plus the 4 lines for the data bus). If an 8-bit data bus is used the LCD will require a total of 11 data lines (3 control lines plus the 8 lines for the data bus).
  • 23. 17 2.6 BUZZER: A Buzzer or Beeper is audio signaling device which may be mechanical, electro mechanical or piezo electric. Typical uses of buzzer and beepers include alarm devices, timers and conformation of user inputs such as mouse click or keystroke. A piezoelectric diaphragm consists of a piezoelectric ceramic plate which has electrodes on both sides and a metal plate (brass or stainless steel, etc.). A piezoelectric ceramic plate is attached to a metal plate with adhesives. Applying D.C. voltage between electrodes of a piezoelectric diaphragm causes mechanical distortion due to the piezoelectric effect. For a misshaped piezoelectric element, the distortion of the piezoelectric element expands in a radial direction. And the piezoelectric diaphragm bends toward the direction. The metal plate bonded to the piezoelectric element does not expand. Conversely, when the piezoelectric element shrinks, the piezoelectric diaphragm bends in the direction Thus, when AC voltage is applied across electrodes, the bending is repeated, producing sound waves in the air. Fig 11: Buzzer
  • 24. 18 CHAPTER 3: SOFTWARE DESCRIPTION This project is implemented using following software‟s:  PIC C compiler - for compilation part  Proteus 7 (Embedded C) – for simulation part 3.1 PIC COMPILER:  PIC compiler is software used where the machine language code is written and compiled. After compilation, the machine source code is converted into hex code which is to be dumped into the microcontroller for further processing. PIC compiler also supports C language code.  It‟s important that you know C language for microcontroller which is commonly known as Embedded C. As we are going to use PIC Compiler, hence we also call it PIC C. The PCB, PCM, and PCH are separate compilers. PCB is for 12-bit opcodes, PCM is for 14- bitopcodes, and PCH is for 16-bit opcode PIC microcontrollers. Due to many similarities, all three compilers are covered in this reference manual. Features and limitations that apply to only specific microcontrollers are indicated within. These compilers are specifically designed to meet the unique needs of the PIC microcontroller. This allows developers to quickly design applications software in a more readable, high-level language. When compared to a more traditional C compiler, PCB, PCM, and PCH have some limitations. As an example of the limitations, function recursion is not allowed.  This is due to the fact that the PIC has no stack to push variables onto, and also because of the way the compilers optimize the code. The compilers can efficiently implement normal C constructs, input/output operations, and bit twiddling operations. All normal C data types are supported along with pointers to constant arrays, fixed point decimal, and arrays of bits.
  • 25. 19  PIC C is not much different from a normal C program. If you know assembly, writing a C program is not a crisis. In PIC, we will have a main function, in which all your application specific work will be defined. In case of embedded C, you do not have any operating system running in there. So you have to make sure that your program or main file should never exit. This can be done with the help of simple while (1) or for (;;) loop as they are going to run infinitely.  We have to add header file for controller you are using, otherwise you will not be able to access registers related to peripherals.  #include <16F876.h> // header file for PIC 16F876// 3.2 PROTEUS: Proteus is software which accepts only hex files. Once the machine code is converted into hex code, that hex code has to be dumped into the microcontroller and this is done by the Proteus. Proteus is a programmer which itself contains a microcontroller in it other than the one which is to be programmed. This microcontroller has a program in it written in such a way that it accepts the hex file from the pic compiler and dumps this hex file into the microcontroller which is to be programmed. As the Proteus programmer requires power supply to be operated, this power supply is given from the power supply circuit designed and connected to the microcontroller in proteus. The program which is to be dumped in to the microcontroller is edited in proteus and is compiled and executed to check any errors and hence after the successful compilation of the program the program is dumped in to the microcontroller using a dumper.
  • 26. 20 3.3 PROCEDURAL STEPS FOR COMPILATION, SIMULATION AND DUMPING: 3.3.1 COMPILATION AND SIMULATION STEPS: For PIC microcontroller, PIC C compiler is used for compilation. The compilation steps are as follows:  Open PIC C compiler.  Choose a name for the new project, so create a separate folder where all the files of your project will be stored, choose a name and click save. Fig 12: Picture of opening a new file using PIC C compiler  Click Project, New, and something the box named 'Text1' is where your code should be written later.  Now click 'File, Save as' and choose a file name for the source code ending with the letter '.c'. name as 'project.c' for example and click save.
  • 27. 21 Fig 13: Picture of compiling a new file using PIC C compiler Fig 14: Picture of compiling a project.c file using PIC C compiler  Now start to write the source code in the window titled 'project.c' then before testing your source code; you have to compile your source code, and correct eventual syntax errors.
  • 28. 22 Fig 15: Picture of checking errors and warnings using PIC C compiler  By clicking on compile option .hex file is generated automatically After compilation, next step is simulation. Here first circuit is designed in Express PCB using Proteus 7 software and then simulation takes place followed by dumping. The simulation steps are as follows:  Open Proteus 7 and click on IS1S6.  Now it displays PCB where circuit is designed using microcontroller. To design circuit components are required. So click on component option. Now click on letter ‟p‟, then under that select PIC16F876 ,other components related to the project and click OK. The PIC16F876 will be called your “'Target device”, which is the final destination of your source code.
  • 29. 23 3.3.2 DUMPING STEPS: The steps involved in dumping the program edited in Proteus 7 to microcontroller are shown below: 1. Initially before connecting the program dumper to the microcontroller kit the window is appeared as shown below. Fig 16: Picture of program dumper window
  • 30. 24 2. Select Tools option and click on Check Communication for establishing a connection as shown in below window Fig 17: Picture of checking communications before dumping program into microcontroller
  • 31. 25 3. After connecting the dumper properly to the microcontroller kit the window is appeared as shown below. Fig 18: Picture after connecting the dumper to microcontroller
  • 32. 26 4.Import the program which is ‘.hex’ file from the saved location byselectingFile option and clicking on ‘Import Hex’ as shown in below window. Fig 19: Picture of program importing into the microcontroller
  • 33. 27 5. After clicking on „Import Hex‟ option we need to browse the location of our program and click the „prog.hex‟ and click on „open‟ for dumping the program into the microcontroller. 6. After the successful dumping of program the window is as shown below. Fig 20: Picture after program dumped into the microcontroller
  • 34. 28 CHAPTER 4: INTERFACING OF MICRO CONTROLLOR AND SCHEMATIC DIAGRAM In this chapter schematic diagrams and the interfacing of PIC16F876 microcontroller with the modules shown in the below figure: 4.1 HEART BEAT SENSOR INTERFACING WITH MICRO CONTROLLER: The LM358 series 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 voltages. Fig 20 (a): Figure showing schematic diagram of heartbeat sensor and microcontroller Fig 20 (b): Heartbeat sensor interfacing with PIC microcontroller in Proteus software
  • 35. 29 CHAPTER 5: WORKING PROCEDURE The sensor unit consists of an infrared light emitting diode (IR LED) and a pin photo diode, placed side by side, and the fingertip is placed over the sensor assembly, as shown below. The IR LED transmits an infrared light into the fingertip, a part of which is reflected back from the blood inside the finger arteries. The photo diode senses the portion of the light that is reflected back. The intensity of reflected light depends upon the blood volume inside the fingertip. So, every time the heart beats the amount of reflected infrared light changes, which can be detected by the photo diode. With a high gain amplifier, this little alteration in the amplitude of the reflected light can be converted into a pulse. For the amplification purpose IC LM358 is used. The micro controller (PIC16F876) takes input from the amplification circuit and calculates the heart rate value. The calculated value is sent to the LCD display for displaying calculated heart rate value. The block diagram of the system is shown in the fig 21. Fig 21: Block diagram of the system. Tx Finger Amplification Circuit MCU LCD Display Rx
  • 36. 30 The step by step explanation of the system is shown below: 1. Circuit after connecting all the components. Fig 22 (a): Figure showing all the components connections 2. Placing the finger in the sensor. The light form the IR led passes through the finger which is detected by the Photo diode. The Herat rate is estimated using the change in volume of the blood flow through the finger. Fig 22 (b): Finger Clip with IR LED and Photo diode
  • 37. 31 3. The signal is amplified using the LM358 IC Fig 22 (c): Amplifier circuit 4. The Micro controller processes the input from the Heart rate sensor and then displays the result on the LCD display. Fig 22 (d): LCD Display
  • 38. 32 CHAPTER 6: RESULTS AND DISCUSSION 6.1 RESULTS: The tests are conducted on the 14 subjects. The results of heart beat for the 14 subjects are shown in the below table:- Table 2: Table showing the heart rate value of the subjects in different conditions Test conducted to subjects Heart Rate Under Normal Condition Heart rate after walking Up & Down the stairs Shashidhar 78(Normal) 96(High) Uday 84(Normal) 105(High) Nikhil 72(Normal) 94(High) Kalyan 82(Normal) 110(High) Shashank 75(Normal) 112(High) Naga kiran 74(Normal) 98(High) Matheen 78(Normal) 92(High) Meher 71(Normal) 97(High) Adithya 70(Normal) 101(High) Somaraju 55(Low) 120(High) Lingaiah 57(Low) 118(High) Sailaja 52(Low) 121(High) Satyaraju 75(Normal) 115(High) Shivaiah 60(Low) 113(High) 6.1.1 HEART RATE VALUE RANGE: 1. Normal heart rate value ranges between 60 and 90. 2. If the heart rate value is below 60 then it is considered as low heart rate. 3. If the heart rate value is above 90 then it is considered as high heart rate.
  • 39. 33 6.1.2 HEART RATE DISPLAY: Fig 23 (a): High heart rate Fig 23 (b): Normal heart rate
  • 40. 34 Fig 23 (c): Low heart rate 6.2 DISCUSSION: Table 2 shown in the results section represents the heart rate values of the different subjects under different conditions. The heart rate value varies for different age groups. The experiment was conducted on the subjects at rest and heart rate value at rest is measured. After measuring the heart rate at rest the subjects underwent running, exercise for some time and heart rate is subsequently measured. The heart rate value at rest and after exercise is compared. As we can see there is a change in the heart rate value. From the test results we came to know that activities that cause change in the heart rate include physical exercise, sleep, anxiety, stress, illness. The normal resting adult human heart rate ranges from 60–90 BPM. Tachycardia is a fast heart rate, defined as above 100 BPM at rest. Bradycardia is a slow heart rate, defined as below 60 BPM at rest. During sleep a slow heartbeat with rates around 40–50 BPM is common and is considered normal. When the heart is not beating in a regular pattern, this is referred to as an Arrhythmia.
  • 41. 35 CHAPTER 7: CONCLUSIONS AND FUTURE SCOPE 7.1 CONCLUSIONS: Heart beat monitoring system is designed using a PIC micro controller (PIC16F876). The device is designed to provide continuous access to the patient‟s heart rate through the LCD display. Functioning of this device is based on the blood circulation for every one heart beat which can be sensed by using a circuit formed by the combination of a photodiode and IR LED. Depending upon the rate of circulation of blood per second the heart beat rate per minute is calculated. The prototype model is tested and verified for the basic functionality. Complete evaluation on multiple targets is yet to be carried out.. 7.2 FUTURE SCOPE: Our project “REAL TIME HEART BEAT MONITORIG SYSTEM “is mainly intended to design a system, which gives very accurate result than the existing devices in the present day world. This system has heart beat sensor, and LCD interfaced to the micro controller. The micro controller is programmed in such a way that it takes input from the heart beat sensor when a finger is inserted into it and displays the value on the LCD continuously. The system reads from the heart beat sensor which is interfaced with micro controller to display the heart rate measured on LCD and alerts through buzzer alarm system when exceeds the set limits. This project can be extended as follows: 1. A graphical LCD can be used to display a graph of the change of heart rate over time. 2. Serial output can be attached to the device so that the heart rates can be sent to a PC for further online or offline analysis. 3. The whole health monitoring system, which we have proposed can be integrated into a small compact unit as small as a cell phone or a wrist watch. 4. The project can be implemented as complete patient health monitoring system by measuring B.P, Temperature etc., which can be done by connecting corresponding sensors to the MCU. 5. An alphanumeric keypad can be included in order to store the phone number, name etc. instantaneously. 6. GPS can be included in order to know the location of the user
  • 42. 36 REFERENCES: [1] Hokanson, D.Eugene; Sumner, David S.; Strandness, D.Eugene, "An Electrically Calibrated Plethysmograph for Direct Measurement of Limb Blood Flow," in Biomedical Engineering, IEEE Transactions on , vol.BME-22, no.1, pp.25-29, Jan. 1975 [2] Deepak Verma, "Real Time Optical Heart Monitor", (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 5 (6) , 2014 [3] The Microcontrollers, Architecture, Programming and Applications-K Uma Rao, Andhe Pallavi, Pearson 2009 [4] Op-Amps & Linear ICs – Ramakanth A. Gayakwad, PHI, 2003. [5] www.allaboutcircuits.com [6] www.microchip.com
  • 43. 37 APPENDIX PROGRAM CODE: The program code is written in the embedded c language. The program code dumping procedure is given in chapter 3. #include <16F876.h> #include <stdlib.h> #include <string.h> #include <lcd.c> #use delay(oscillator=20M) void main() { int i = 0; int j = 0; lcd_init(); lcd_putc('f'); // Clear LCD lcd_gotoxy(1,1); // row-1, column-1 printf(lcd_putc,"Human body "); lcd_gotoxy(1,2); // row-1, column-2 printf(lcd_putc,"heart rate monitorng"); delay_ms(1500); lcd_putc('f'); // Clear LCD lcd_gotoxy(1,1); // row-1, column-1 printf(lcd_putc," Please Insert"); lcd_gotoxy(1,2); // row-2, column-1 printf(lcd_putc," Your Finger");
  • 44. 38 while(1) { count = 0; delay_ms(250); output_high(PIN_C4); output_high(PIN_C3); delay_ms(50); output_low(PIN_C4); output_low(PIN_C3); //Find Heart rate if((hbeat > 0) && (hbeat < 250)) { lcd_putc('f'); printf(lcd_putc,"Heart Rate = %Lu",hbeat); lcd_gotoxy(1,2); if(hbeat < 60) { printf(lcd_putc," Low HR"); } else if(hbeat > 90) { printf(lcd_putc," High HR"); } else { printf(lcd_putc," NORMAL HR"); } } }