Sunteți pe pagina 1din 5

Heart beat measurement and detection using

PIC18 microcontroller

Introduction:
In this PIC based microcontroller project, we are going to familiarize with the proper working of PIC18 by
using its different inbuilt functions such as Timers and counter. Our main objective is to detect and
measure the heart pulse signal by using microcontroller. We are also dealing with interfacing of LCD with
microcontroller in this project for better results. This project is actually consists of two parts, one is
getting the heart pulse through fingertip sensor which is then feed to signal conditioning unit and second
part is microcontroller programming in order to measure the heart beat . Our signal conditioning unit
basically is for noise filtration and signal amplification. Measurement of heart beat is done through
microcontroller by its inbuilt functions. A 4 bit LCD is used for the display of results.

Procedure:
a) Signal conditioning unit
1. Firstly by heart pulse is sensed through IR sensor and sensor transmit the pulse signal to photo-
diode. After this pulse is feeded to main unit.
2. Signal conditioning unit basically consists of active low pass filters and comparator for
amplification and filtration of pulse signal.
3. Active low pass filter contains operational amplifier and RC series network for signal
amplification i.e. by increasing the gain of signal and for removing the noise.
4. In order to provide fixed clock (square wave) signal to microcontroller comparator is feeded with
modified pulse signal.
5. Signal is applied to comparator non-inverting pin and comparator compare the analogue signal
with its threshold voltage and gives the fixed desired signal.

b) Microcontroller and LCD working


6. The modified and compared (5V) signal is given to the input pin of microcontroller. PortA of
PIC18F458 is taken as input port and Port C&D are taken as output port.
7. RA4 pin is given input signal. For the measuring of outside event (signal) microcontroller timer
works as counter. Also we have used internal oscillator (fosc/4.)
8. TMR0 gets activated when it’s loaded properly. After this it operates in counter mode.
9. It’s a 16 bit timer, with no prescaler. T0CON which is control register is loaded with specific value.
10. The counter counts the pulses per second and timer gives the delay of 60s to give pulse per
minute.
11. After this for the display of result microcontroller is linked with LCD.
12. Commands pins of LCD(Rs,RW,EN) are connected with RC0,RC1 and RC2 of PortC
13. Data pins from D0 to D7 are connected with PortD.
Results:
 We have observed modified, filtred and amplified signal through simulation from oscilloscope
which is our final signal
 We have observed the result of beat per second and beat per minute through LCD

C program:
Simulation:

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