heart rate monitor - 8085 projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf ·...

18
1 | Page HEART RATE MONITOR EC-311 MICROPROCESSOR LAB PROJECT Submitted by: RICHA SHARMA 136/EC/13 SHAIFALI SAINI 160/EC/13

Upload: duongnga

Post on 17-Jun-2019

250 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

1 | P a g e

HEART RATE

MONITOR

EC­311 MICROPROCESSOR

LAB PROJECT

Submitted by:

RICHA SHARMA 136/EC/13

SHAIFALI SAINI 160/EC/13

Page 2: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

2 | P a g e

Index

S.NO. Content Page No.

1

Acknowledgement

3

2

Synopsis

4

3

Introduction

5

4

Project Description

6

5

Schematic Details

8

6

Board Layout:

11

7

Code

14

8

Tools & Component Used

16

9

Conclusion:

17

10

Bibliography

18

Page 3: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

3 | P a g e

ACKNOWLEDGEMENT

First things first! We would like to express our special thanks of gratitude to

Associate Prof. Dhananjay V. Gadre for this opportunity to work on this wonderful

project and, for his support and guidance throughout the course of this project. We

also thank all CEDT members for helping us with difficulties and errors along the way

and their patience as many know for us it was not an easy journey.

This project encouraged (and at times forced) us to learn about various aspects of

life. We along this journey realized how amateur we were in many aspects and how

direly we needed to change our perspective. It was a real eye opener and the one

we needed desperately at this point of life. And also it was pleasant to learn about

the different fields like medical testing, rather than just ECE engineering.

So without further adieu; here is the Heart rate Monitor that we poured our heart and

soul in building.

Page 4: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

4 | P a g e

Synopsis

We have designed a heart rate monitor based on the technique called Photo-

Plethosysmography. Accordingly, we have designed an Infrared sensor based on

detecting the intensity of light from the reflected light coming from finger on the

photodiode. Now the input from the sensor is fed into a(0804-TI) ADC which

converted analog pulses into samples of digital data (our PPG samples) that we

have used according to heart-beat counting algorithm to count the heart rate for one

minute. We have designed a simple hardware for main board for counting pulses in

project. Our hardware involves General 8085,latches, EEPROM,RAM and invertors

etc. and 8255 PPI, multiplexed seven segment display to represent the count and an

ADC to convert input pulses into the sampled digital PPG data.

There were some issues with the sampling of data with ADC and noise involved in it.

We faced problems at first with synchronizing our ADC with 8085 as the clock to be

provided should have been under 1.5MHz and more the 100KHz. So the RC clock

that we have designed was not able to compensate the range easily. To solve the

issue we placed a 744060 D-latch to divide 8085 clock to the desire 1.38 Mhz range.

Page 5: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

5 | P a g e

Introduction

The heart rate monitor is an embedded system based on 8085 intel microprocessor and an Infrared sensor designed with the help of the technique Photoplethosysmography. The person willing to test their heart rate will place their finger upon the sensor and their measured heart rate will display upon the 3 digit seven segment display. Photoplethosysmography is the process of optically estimating the volumetric measurement of an organ. Pulse oximetry, cardiovascular monitoring, respiration detection heart rate monitoring etc few common application of Photoplethosysmography When the heart expands (diastole) the volume of blood inside the finger tip increases and when the heart contracts (systole) the volume of blood inside the finger tip decreases. The resultant pulsing of blood volume inside the finger tip is directly proportional to the heart rate and if you could somehow count the number of pulses in one minute, that’s the heart rate in beats per minute (bpm). For this an IR transmitter/receiver pair placed in close contact with the finger tip. When the heart beats, the volume of blood cells under the sensor increases and this reflects more IR waves to sensor and when there is no beat the intensity of the reflected beam decreases. The pulsating reflection is converted to a suitable current or voltage pulse by the sensor. The front side of the IR diode and photo transistor are exposed and the remaining parts are well isolated. When the finger tip is placed over the sensor the volumetric pulsing of the blood volume inside the finger tip due to heart beat varies the intensity of the reflected beam and this variation in intensity is according to the heart beat. When more light falls on the photo transistor it conducts more, its collector current increases and so its collector voltage decreases. When less light falls on the photo transistor it conducts less, its collector current decreases and so its collector voltage decreases. This variation in the collector voltage will be proportional to the heart rate. The next part of the circuit consists of a two active low pass filters using opamp LM324. The LM324 is a quad opamp that can be operated from a single rail supply. Resistor R, R1 and capacitor C sets the gain and cut off frequency of the first filter. With the given component values, gain will be 11 and cut off frequency will be 2.5Hz. The gain and cut off frequency are determined using the following equations. Capacitor C1 is used to by-pass noise if any may cause false triggering of the comparator.

Page 6: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

6 | P a g e

Project Description

1. The Photoplethysmogram Waveform

Since its invention in the 1970s and commercial development in the 1980s, pulse oximetry has provided a non-invasive method of estimating functional oxygen satura tion of the blood in clinical settings. Oximetry is based on the fact that hemoglobin absorbs light in limited frequency ranges. Oxygen reversibly binds to hemoglobin in the blood in order to nourish tissues in the peripheral regions of the body. The oxygen is released from the blood and into the tissue at the capillary level of the cardiovascular system. When oxygen reversibly binds to hemoglobin, the resulting shift in the distribution of electrons in the hemoglobin molecule causes its optical properties to change.In particular oxygenated hemoglobin (O2Hb) absorbs visible light in the blue region, making blood appear red. Reduced or deoxygenated

Image:1. Finger-tip through which heart rate is to be calculated

2. Photoplethosysmography compared with other techniques.

Page 7: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

7 | P a g e

FIG: IR SENSOR BASED ON PHOTOPLETHOSYSMOGRAPHY

2. Embedded System based on 8085 Intel Microprocessor.

We have used 0804 TI ADC to sample analogous PPG signal into digital PPG samples and use these samples as our basis for the calculation of heart rate.

We have used Multiplexed seven segment display of 3-digits with PNP transistors as their switches. Multiplexing technique used and code mentioned is given further in the report.

We have used VISHAY Somc 8 isolated resistor network to save space and connect 7447 BCD IC with multiplexed 7-segment display.

We have 8255 PPI for the interfacing of ADC and Output display with Microprocessor.

The rest of the architechture is pretty comprehensible with invertors,latches and ofcourse memories RAM and EEPROM.(32 bit)

Decoupling and Bypass capacitors are used for their respective roles on our main board. Power and SOD Leds describe the working of Power supply and SOD pins respectively on the board. [We have also utilized SOD led in the testing of ADC as no other output led was available to us.]

Page 8: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

8 | P a g e

Schematic Details

The schematic contain following components:

1. 8085 microprocessor

The 8085 is a conventional von Neumann design based on the Intel 8080. Unlike the 8080 it does

not multiplex state signals onto the data bus, but the 8-bit data bus is instead multiplexed with the

lower 8-bits of the 16-bit address bus to limit the number of pins to 40. State signals are provided by

dedicated bus control signal pins and two dedicated bus state ID pins named S0 and S1. Pin 40 is used for the power supply (+5 V) and pin 20 for ground. Pin 39 is used as the Hold pin. Pins 15 to

8 are generally used for address buses. The processor was designed using nMOS circuitry, and the

later "H" versions were implemented in Intel's enhanced nMOS process called HMOS ("High-performance MOS"), originally developed for fast static RAM products. Only a single 5 volt power supply is needed, like competing processors and unlike the 8080. The 8085 uses approximately

6,500 transistors.

Page 9: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

9 | P a g e

2. 8255

8255 - The 8255 has 24 input/output pins in all.[5] These are divided into three 8-bit ports (Port A, Port B, Port C).[6] Port A and port B can be used as 8-bit input/output ports. Port C can be used as an 8-bit input/output port or as two 4-bit input/output ports or to produce handshake signals for ports A and B. The three ports are further grouped as follows: 1. Group A consisting of port A and upper part of port C. 2. Group B consisting of port B and lower part of port C. Eight data lines (D0 - D7) are available (with an 8-bit data buffer) to read/write data into the ports or control register under the status of the RD (pin 5) and WR (pin 36), which are active low signals for read and write operations respectively. The address lines A1 and A0 allow to successively access any one of the ports or the control register as listed below.

Page 10: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

10 | P a g e

3. Multiplexed display

Multiplexed displays are electronic display devices where the entire display is not driven at one

time. Instead, sub-units of the display (typically, rows or columns for a dot matrix display or

individual characters for a character oriented display, occasionally individual display elements)

are multiplexed, that is, driven one at a time, but the electronics and the persistence of

vision combine to make the viewer believe the entire display is continuously active.

A multiplexed display has several advantages compared to a non-multiplexed display:

fewer wires (often, far fewer wires) are needed

simpler driving electronics can be used

both lead to reduced cost

reduced power consumption

Multiplexed displays can be divided into two broad categories:

1. character-oriented displays

2. pixel-oriented displays

Page 11: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

11 | P a g e

Board Layout:

Page 12: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

12 | P a g e

Final Board:

Page 13: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

13 | P a g e

3. Algorithm to calculate heart rate and code for 8085.

First let me introduce a bit about: Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals. It is the standard form of digital audio in computers, Compact Discs, digital telephony and other digital audio applications. In a PCM stream, the amplitude of the analog signal is sampled regularly at uniform intervals, and each sample is quantized to the nearest value within a range of digital steps.

Our Algorithm:

Read 600 consecutive samples of ADC at 5 ms interval.

Remove DC component.

Check if ADC samples range is enough (i.e. >50) and if not input data above is invalid due to

noise repeat the above steps again. Compute heart rate based on 3 successive PPG sampled

data peaks.

Page 14: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

14 | P a g e

Code:

ORG 0000H

PORTA EQU 80H

PORTB EQU 01H

PORTC EQU 02H

CONTRL EQU 03H

Start:

LXI H,00FFH

LXI SP,0200H

CALL DELAY // 1 SEC

SID:

DCR H

RIM

ANI 080H

JNZ SID// WHEN SID PIN GOES HIGH,THEN IT EXITS

ORI 040H // SOD PIN GOES HIGH

SIM

MVI A,H

CPI 0F,H/// if H == 16 bytes then jump to the main program otherwise initialize ADC

JZ CONT

LOOP:

OUT H // Adress of ADC 0FH

EI

JMP LOOP // IOW (active)LOW AND CONVERSION STARTS, WHEN ENDS

INTERRUPT ISSUED

CONT:

MVI 89H // THROUGH PPI TO INPUT ADC ADDRESS TO 8085

OUT CONTRL

## TO CHECK CONVERSION EOC. CONDITIONS

IN PORTC// PORT C

STA 2050H // STORE DATA IN MICROPROCESSOR

MVI A,00H

CMP D

JNZ L1

L1:

Page 15: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

15 | P a g e

CPI 00H,E

JZ LOOP

MOV A,D

SUB E

STA 2050H

LXI B,2050H

INX B

JMP LOOP

JZ L2

L2:

LXI H,2050H

MOV B,M

MVI C,00H

XRA A

REPT:

INX H

ADD M

JNC AHEAD

INR C

AHEAD:

DCR B

JNZ REPT

MOV E,A

MOV A,C

MOV D,A

Page 16: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

16 | P a g e

Tools & Component Used

Various tools (Hardware and software) were used during the course of project

development and designing:-

Software tools:-

Eagle 7.3.0 for schematic and board layout

8085 simulator IDE by OshonSoft

EEPROM Programmer

Hardware tools:-

EEPROM Programmer board

Soldering Iron – Solder

Multimeter - +5V DC Supply Power

Cutter, tweezers, hand fil

Components:-

RAM 32k

EEPROM

8255

8085 Microprocessor

ADC

Mux Display

Resistors(10k(10),33ohm )

Capacitor

Transistor

Latch

Decoder

BCD

Sensor Components:-

IR Diode

Photo Diode

Registers(680k ohm, 6.8k ohm, 330 ohm, 100 ohm, 470 ohm)

Capacitor

Low Power LED

Page 17: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

17 | P a g e

Conclusion:

8085 project taught us a lot about hardware, software and debugging. It helped us

develop a deep understanding of 8085 microprocessor and introduced us to

understand various aspects of PCB fabrication.

On comparing between proposed and actual Gantt chart, making schematic file and

testing were not completed in the allotted time. The schematic file was modified

several times to meet our objective. we completed our project with some delay.

The whole endeavour has been a great and fun learning experience.It gives us a

better understanding to correlate theoretical concepts to real life implementation

using microprocessor.

Overall it was good learning experience and we thank D.V Gadre Sir for providing us

with this opportunity

Page 18: HEART RATE MONITOR - 8085 Projects8085projects.in/wp-content/uploads/2016/12/136_160_report.pdf · The heart rate monitor is an embedded system based on 8085 intel microprocessor

18 | P a g e

Bibliography:

Microprocessor architecture ,programming and applications with the 8085 by Ramesh gaonkar

The 8085 microprocessor: Architecture, programming and interfacing by k. udaya kumar, B.S Umashankar.

www.sparkfun.com

Guide by CEDT,NSIT for EEPROM PROGRAMMER.

. Microprocessor Architecture, Programming, and Applications with the 8085 Author: Ramesh Gaonkar Publisher: Penram International by Publishing (India) Pvt. Ltd Edition: 5th edition ISBN: 9788187972099

For datasheet: https://drive.google.com/folderview?id=0byFQcybodzN8LSIPRTli&usp sharing.