Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw...

70
Personal Heart Rate Personal Heart Rate Monitor Device Monitor Device By By Anthony Shelton, Quintelle Griggs, Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Jonathan Killen, Chan Hauw Ki Faculty Advisors Faculty Advisors Dr. James Harden Dr. James Harden Dr. Lori Bruce Dr. Lori Bruce

Transcript of Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw...

Page 1: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Personal Heart Rate Personal Heart Rate Monitor DeviceMonitor Device

ByByAnthony Shelton, Quintelle Griggs, Anthony Shelton, Quintelle Griggs,

Jonathan Killen, Chan Hauw KiJonathan Killen, Chan Hauw Ki

Faculty AdvisorsFaculty Advisors

Dr. James HardenDr. James Harden

Dr. Lori BruceDr. Lori Bruce

Page 2: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

More than 2 million people in the U.S. More than 2 million people in the U.S. are at high risk of having heart attack. are at high risk of having heart attack.

It would be helpful if there was a way It would be helpful if there was a way for these people to monitor their heart.for these people to monitor their heart.

So we have a problem… That is the So we have a problem… That is the way our project focuses on how we can way our project focuses on how we can utilize this problem and find a solution. utilize this problem and find a solution.

Page 3: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

ScopeScope We know there is device out there We know there is device out there

that can monitor heart rate but:that can monitor heart rate but: either big, not portable, and expensive.either big, not portable, and expensive.

So we need to design a device that So we need to design a device that not only monitor the heart rate for not only monitor the heart rate for variations, but also small, portable, variations, but also small, portable, and inexpensive.and inexpensive.

Page 4: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

ObjectiveObjective

Portability:Portability: – To provide a simple device that is easy to carry.To provide a simple device that is easy to carry.

Weight:Weight: – To provide a device that weighs as little as possible.To provide a device that weighs as little as possible.

Size:Size: – To provide a device that is small enough to carry without To provide a device that is small enough to carry without

worrying the person that uses the device. worrying the person that uses the device. Cost:Cost:

– The device will cost less than $150 dollar, as it is cheap to The device will cost less than $150 dollar, as it is cheap to buy.buy.

PerformancePerformance– Is to maximize speed of detecting heart rate the device Is to maximize speed of detecting heart rate the device

have to be high speed.have to be high speed.

Page 5: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

SpecificationsSpecifications Input Voltage RangeInput Voltage Range Converter ResolutionsConverter Resolutions Common Mode Rejection Common Mode Rejection

Ratio CMRRRatio CMRR Battery lifeBattery life Amplifier GainAmplifier Gain SizeSize CostCost Frequency responseFrequency response High-Pass FilterHigh-Pass Filter Low-Pass FilterLow-Pass Filter Sampling RateSampling Rate Average LoadAverage Load

5V5V 10 bits10 bits

115dB115dB 500hrs500hrs 500500 3.5 x 5 inches3.5 x 5 inches < $150< $150 0.18Hz - 160Hz0.18Hz - 160Hz Cutoff frequency 0.18HzCutoff frequency 0.18Hz Cutoff frequency 160HzCutoff frequency 160Hz 500 per second500 per second 1.39mA @ 6% duty cycle1.39mA @ 6% duty cycle

Page 6: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Requirement for our Requirement for our project:project:

Includes:Includes: To amplify the To amplify the

signalsignal

To digitizeTo digitize

To analyzeTo analyze

Differential Differential amplifier amplifier

Analog/Digital Analog/Digital ConverterConverter

MicroprocessorMicroprocessor

Page 7: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

How to:How to:

From Op-Amp to A/D converter:From Op-Amp to A/D converter:– A Printed Circuit Board PCB’s needed to A Printed Circuit Board PCB’s needed to

layout the chips.layout the chips. Microprocessor: Microprocessor:

– Prefabricated bot-board is used rather than Prefabricated bot-board is used rather than start from scratch. start from scratch.

Page 8: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Instrumentation Amplifier Instrumentation Amplifier StageStage

Instrumentation Amplifier

A/D Converter Microprocessor

Page 9: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Where to start?Where to start?

What we have for input (ECG signal):What we have for input (ECG signal): 0 - 5 mV voltage range0 - 5 mV voltage range 0.01 - ~200 Hz frequency range0.01 - ~200 Hz frequency range

What we need for the A/D converter:What we need for the A/D converter: Voltage range from 0 - 2.5VVoltage range from 0 - 2.5V Frequency range from 0.18 Hz - 160 HzFrequency range from 0.18 Hz - 160 Hz Common-mode signals and noise rejectedCommon-mode signals and noise rejected

Page 10: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Complete DesignComplete Design

Instrumentation AmplifierInstrumentation Amplifier

Page 11: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Instrumentation AmplifierInstrumentation Amplifier

Common-mode rejection of 115dBCommon-mode rejection of 115dB– Isolates EKG differential signal that we wantIsolates EKG differential signal that we want– Prevents interference from radiated AC (such as the Prevents interference from radiated AC (such as the

lighting in a room)lighting in a room) Gain of 10 Gain of 10

MAX 4194MAX 4194

Page 12: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

What is Inside the What is Inside the Instrumentation Amplifier?Instrumentation Amplifier?

Two stages of Op-AmpsTwo stages of Op-Amps– All the same Resistor valuesAll the same Resistor values

Gain = 10 Gain = 1

Page 13: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Complete DesignComplete Design

Patient ReferencePatient Reference

Page 14: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Patient ReferencePatient Reference It is helpful to reference the signal with respect It is helpful to reference the signal with respect

to the patient’s potential (less variation)to the patient’s potential (less variation)– Used values recommended for feedbackUsed values recommended for feedback

Reference point between voltage sources

Forces the signal to centered

around patient’s potential

Creates stability

Page 15: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Complete DesignComplete Design

FiltersFilters

Page 16: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

FiltersFilters

High-Pass FilterHigh-Pass Filter– Cutoff frequency of 0.18 HzCutoff frequency of 0.18 Hz

Low-Pass FilterLow-Pass Filter– Cutoff frequency of 160 HzCutoff frequency of 160 Hz

Page 17: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Complete DesignComplete Design

5V Voltage Regulator5V Voltage Regulator

Page 18: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

5V Voltage Regulator5V Voltage Regulator

Regulate the voltage needed for the A/D Regulate the voltage needed for the A/D Converter and the Microprocessor to operateConverter and the Microprocessor to operate

Also, includes a Low Battery IndicatorAlso, includes a Low Battery Indicator

MAX 666MAX 666

Page 19: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Complete DesignComplete Design

Second Amplification StageSecond Amplification Stage

Page 20: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Amplify more for the A/DAmplify more for the A/D

A/D Converter needs A/D Converter needs the signal to have a the signal to have a voltage range of 2.5Vvoltage range of 2.5V

Need another Op-Amp with Need another Op-Amp with a gain of 50a gain of 50

Total gain of 10 X 50 = Total gain of 10 X 50 = 500500

Page 21: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Complete DesignComplete Design Stop InterruptStop Interrupt

Page 22: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Finally, Stop InterruptFinally, Stop Interrupt Used to turn on and off A/D and microPUsed to turn on and off A/D and microP

– Creates a digital signalCreates a digital signal Resistors set our SPS to 500Resistors set our SPS to 500

“Sleep” or Stop signal

helps conserve power

REF from the A/D= 2.5 V

Page 23: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Voltage over the CapacitorVoltage over the Capacitor

Voltage across the capacitor tries to push all the Voltage across the capacitor tries to push all the way to 5V and down to GND, but gets flipped.way to 5V and down to GND, but gets flipped.

3.75 V

1.25 V

5 V

0 V

2.5 V … …

This creates the digital signal at the This creates the digital signal at the output to turn the A/D and the microP output to turn the A/D and the microP on and offon and off

Charging

Discharging

Page 24: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Speaking of powerSpeaking of power

Power Budget Power Budget – microP : 15mA 100uAmicroP : 15mA 100uA– A/D: 4mA 10uAA/D: 4mA 10uA– 4 Op-Amps: 40uA4 Op-Amps: 40uA– Inst. Amp: 93uAInst. Amp: 93uA– Voltage Reg.: 12uAVoltage Reg.: 12uA

Average Load = about 1.39mA @ 6% Average Load = about 1.39mA @ 6% duty cycleduty cycle

Min Load = about 255uA

Max Load = about 19.1mA

Page 25: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Possible Battery to usePossible Battery to use

Sonnenschein-LithiumSonnenschein-Lithium SL-750SL-750 Max continuous discharge Max continuous discharge

current: 20mAcurrent: 20mA Small & little weight (9 grams)Small & little weight (9 grams) With our average load With our average load

(1.39mA) (1.39mA) battery life of battery life of ~500 hours (just under 21 ~500 hours (just under 21 days) days)

½ AA Lithium

Page 26: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

PC Board layoutPC Board layout

Because of MicroSim limitation (30 components Because of MicroSim limitation (30 components in layout), we had to split up our design.in layout), we had to split up our design.

Perfect place to split in the middle.Perfect place to split in the middle.

Page 27: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Test Plan Test Plan

AnalogAnalog– Function GeneratorFunction Generator

Three types of waveforms (square, saw-tooth, Three types of waveforms (square, saw-tooth, sine)sine)

– MIT wav filesMIT wav files

Now we are ready to create the PC Now we are ready to create the PC Board layout.Board layout.

Page 28: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Requirement for the PCBRequirement for the PCB

First Follow Rules:First Follow Rules: Includes:Includes:

– Determine the Width of the Traces:Determine the Width of the Traces: Traces between component (smaller)Traces between component (smaller)

– Why??? Low voltage and current.Why??? Low voltage and current.– Air gap also smaller, 12 mil (1 mil = 0.001 Air gap also smaller, 12 mil (1 mil = 0.001

inch)inch) Traces between the power source (larger)Traces between the power source (larger)

– Why ??? High voltage and currentWhy ??? High voltage and current– Air gap bigger, 25 mil Air gap bigger, 25 mil

Page 29: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Requirement Cont.Requirement Cont.

Includes:Includes: Traces that runs through a component.Traces that runs through a component.

– Must be 12 milMust be 12 mil WhyWhy

– To avoid high heat under the component that To avoid high heat under the component that cause defect. cause defect.

– Next determining PadsNext determining Pads– rnd-070-030 are usernd-070-030 are use– .070 = diameter of the pad, 70 mil.070 = diameter of the pad, 70 mil– .030 = diameter of the drill size, 30 mil .030 = diameter of the drill size, 30 mil

Page 30: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Why use rnd-070-030Why use rnd-070-030– This is confirm to the machine available.This is confirm to the machine available.– Drilling machine have 4 bit size available:Drilling machine have 4 bit size available:

– 30 mil 40 mil 60 mil 125 mil30 mil 40 mil 60 mil 125 mil– So since all our device are small, it we chose So since all our device are small, it we chose

the smallest available 30 mil the smallest available 30 mil

Next determine the footprint:Next determine the footprint:– Differential amplifier and A/D Converter are Differential amplifier and A/D Converter are

all 8-pin SOall 8-pin SO– But since we only had 14 SO pin available, But since we only had 14 SO pin available,

the 14-pin SO are utilize as shortcut only. the 14-pin SO are utilize as shortcut only.

Page 31: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

1 2 3 4

8 7 6 5

Some tricks to get around Some tricks to get around MicroSim limitationsMicroSim limitations

SO8 SO8 SO14 SO14– Only 2 SO footprints Only 2 SO footprints

allowed: SO14 and SO16allowed: SO14 and SO16– Assigned pins to use SO14 Assigned pins to use SO14

as SO8as SO8 Capacitors using Resistor Capacitors using Resistor

footprintfootprint– Only had surface mount (SMT) Only had surface mount (SMT)

footprints for resisters: R2012 and footprints for resisters: R2012 and R3216R3216

– Changed all Capacitors to have Changed all Capacitors to have Resister footprintsResister footprints

R2012

R3216

Page 32: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Next is to determine placement of Next is to determine placement of component:component:– Since this is important to achieve our Since this is important to achieve our

objectives, placement of the component are objectives, placement of the component are very important to:very important to:

– PerformancePerformance– CompactnessCompactness– Size Size

Page 33: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.
Page 34: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.
Page 35: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Creating the layoutCreating the layout

Layout Netlist created from each SchematicLayout Netlist created from each Schematic AutoRoute and Netlist Compare make it easyAutoRoute and Netlist Compare make it easy

More compact

Stop signal causes interference

Page 36: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

As for the Bot-boardAs for the Bot-board

Microprocessor have its own board, so Microprocessor have its own board, so there is no need to implement one.there is no need to implement one.

We decided to connect a wire from the We decided to connect a wire from the implemented PCB’s to the implemented PCB’s to the Microprocessor board.Microprocessor board.

This will solve the problem of having This will solve the problem of having two different boards.two different boards.

Page 37: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

MicroSim PCB ProgramMicroSim PCB Program

Netlist will be generated from the drawn Netlist will be generated from the drawn schematic fileschematic file

Three files will be generated:Three files will be generated:– Component layer (Red)Component layer (Red)

Top layerTop layer

– Solder layer (Blue)Solder layer (Blue) Bottom layerBottom layer

– Drill layer (Gray)Drill layer (Gray) Drill sizeDrill size

Page 38: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Prepare for the Milling Prepare for the Milling MachineMachine

Export DXF filesExport DXF files– 3 layers (Component, Solder, Drill) = 3 files3 layers (Component, Solder, Drill) = 3 files

Connects the pad and the trace

Page 39: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

MicroSim PCB ProgramMicroSim PCB Program

Why need three file for drilling:Why need three file for drilling:– Double-sided PCBDouble-sided PCB

Page 40: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Test planTest plan

My test plan mainly concentrate on the My test plan mainly concentrate on the defect related problem to the chips.defect related problem to the chips.

Major defect fall into three categories:Major defect fall into three categories:– Problem that related to soldering processes Problem that related to soldering processes

and equipment.and equipment.– Vender-related problemVender-related problem– Design-related problemDesign-related problem

Page 41: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

First test (Soldering and equipment-First test (Soldering and equipment-related problem):related problem):– The supply voltage oscilloscope are tested The supply voltage oscilloscope are tested

on another device.on another device.– NOTE: It also recommended that when NOTE: It also recommended that when

soldering the chips, 200 soldering the chips, 200 °°C and above will C and above will crack the chips if not careful.crack the chips if not careful.

– Various device are tested for interferencesVarious device are tested for interferences Result:Result:

– Device selected base on their low Device selected base on their low interference.interference.

– Conclude everything is in working condition.Conclude everything is in working condition.

Test planTest plan

Page 42: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Second is to test the chips (Vender-Second is to test the chips (Vender-related problem):related problem):– All the maxim chip are tested on a voltage All the maxim chip are tested on a voltage

supplier and the output will be measure.supplier and the output will be measure. Result:Result:

– All the maxim chips are working correctly. All the maxim chips are working correctly. Output are measured and there is indeed Output are measured and there is indeed output from the chip. output from the chip.

– Concluded that everything is in working Concluded that everything is in working condition.condition.

Page 43: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Third test the device (Design-related Third test the device (Design-related problem):problem):– The input of the PCB’s are tested with a The input of the PCB’s are tested with a

power input, and the output will be shown power input, and the output will be shown on a voltage measurement instrument.on a voltage measurement instrument.

Result:Result:– Problem soldering the component to the PC Problem soldering the component to the PC

BoardBoard..– Therefore, our test plan could not be carried Therefore, our test plan could not be carried

out.out.

Page 44: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

The Use of Maxim 1242 A/D ConverterThe Use of Maxim 1242 A/D Converter

Low Power Low Power

Serial Peripheral Interface (SPI)Serial Peripheral Interface (SPI)SCLKSCLKCSCSDOUTDOUT

Page 45: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Converter ContinuedConverter Continued

2.7V to 5.25V operation2.7V to 5.25V operation

Shutdown ModeShutdown Mode

10-bit output resolution10-bit output resolution Conversion time is 7.5 usConversion time is 7.5 us

Page 46: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Code for ConverterCode for Converter

Have offsets for Ports usedHave offsets for Ports used Data Direction Control Register Data Direction Control Register

(DDRD) set to $9(DDRD) set to $9 SPI Control Register(SPCR) set to $28SPI Control Register(SPCR) set to $28 Status Register set to $29Status Register set to $29 Data Shift Register set to $2AData Shift Register set to $2A

Page 47: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Code ContinuedCode Continued

Load and Store AccumulatorsLoad and Store Accumulators Load Double Accumulator to $1050Load Double Accumulator to $1050 Store Accumulator A to Data Store Accumulator A to Data

Direction Control Register (DDRD)Direction Control Register (DDRD) Store Accumulator B to SPI Control Store Accumulator B to SPI Control

Register (SPCR) Register (SPCR)

Page 48: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Code ContinuedCode Continued

SubroutineSubroutine Store Accumulator A to Data Shift Register to Store Accumulator A to Data Shift Register to

start transferstart transfer Test the MSB in Status RegisterTest the MSB in Status Register Branch to test the bitBranch to test the bit Load Accumulator A to Data Shift Load Accumulator A to Data Shift

Register(SPDR)Register(SPDR) Start second procedure for transferStart second procedure for transfer Use Logical Shift Right Double Use Logical Shift Right Double

Accumulator(LSRD) Command 5 timesAccumulator(LSRD) Command 5 times Return to SubroutineReturn to Subroutine

Page 49: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Test PlansTest Plans

Use function generator to display Use function generator to display waveforms: square and saw-tooth waveforms: square and saw-tooth waveswaves

Use MIT database to get QRS Use MIT database to get QRS waveform waveform

Page 50: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

5 major waves of 5 major waves of heartbeatheartbeat

Photo:http://home.earthlink.net/~avdoc/infocntr/htrythm/hrecg.htmPhoto:http://home.earthlink.net/~avdoc/infocntr/htrythm/hrecg.htm

Page 51: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Purpose of Detection Purpose of Detection AlgorithmAlgorithm

To detect QRS complexes basedTo detect QRS complexes based

on variations in the signalon variations in the signal

Page 52: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Requirements for Microcontroller Requirements for Microcontroller CodeCode

Averaging technique used for rate Averaging technique used for rate computationcomputation

User input minimum and maximum User input minimum and maximum heartbeat within 30 sec. intervalheartbeat within 30 sec. interval

Setting the alarmSetting the alarm

Page 53: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Requirements Cont’ed.Requirements Cont’ed. Method for setting detection thresholdMethod for setting detection threshold

- Detection is done on the - Detection is done on the differentiated EKG ( will monitor differentiated EKG ( will monitor

rate of change in each pair of rate of change in each pair of samples)samples)

- Threshold is set dynamically.- Threshold is set dynamically. At start up there is a 5 second interval At start up there is a 5 second interval which allows for threshold stabilization.which allows for threshold stabilization.- The sample to sample difference is used - The sample to sample difference is used

for QRS detection, and the absolute for QRS detection, and the absolute value of this difference is used to value of this difference is used to guarantee a positive value. guarantee a positive value.

Page 54: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Requirements Cont’ed.Requirements Cont’ed.

Starting and alert sequenceStarting and alert sequence

- Reset button ( initializes the - Reset button ( initializes the system)system)

- Putting the batteries in and putting - Putting the batteries in and putting

the device on the patient is the the device on the patient is the

start up sequence.start up sequence.

Page 55: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Variables used in CodeVariables used in Code AVGINT – avging. interval AVGINT – avging. interval

over which beats are countedover which beats are counted CLKCNT- count input samplesCLKCNT- count input samples CLKST – count at beginning of CLKST – count at beginning of

avging. intervalavging. interval DATA0 – most recent sampleDATA0 – most recent sample DATA1 – previous data DATA1 – previous data

samplesample DEL- difference in successive DEL- difference in successive

samplessamples STCNT – initialization countSTCNT – initialization count THRESH – value of thresholdTHRESH – value of threshold

QRSCNT- number of qrs QRSCNT- number of qrs complexes complexes

ALARM – set if qrs count is ALARM – set if qrs count is out of rangeout of range

QRSMSK – count used to QRSMSK – count used to mask qrs detectionmask qrs detection

AVGDEL- interval delay = AVGDEL- interval delay = 15,00015,000

INTDEL – initialization delay INTDEL – initialization delay = 2500= 2500

MINTHR- minimum thresholdMINTHR- minimum threshold MINCNT – minimum heart MINCNT – minimum heart

raterate MAXCNT – maximum heart MAXCNT – maximum heart

raterate

Page 56: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Detection PsuedocodeDetection Psuedocode Initialize MC68HC811 portsInitialize MC68HC811 ports Clear CLKCNT,CLKST,DATA0,THRESH,QRSCNT(8),ALARM(8),QRSMSK(8)Clear CLKCNT,CLKST,DATA0,THRESH,QRSCNT(8),ALARM(8),QRSMSK(8)

STCNT = INTDEL = 2500STCNT = INTDEL = 2500AVGINT = AVGDEL = 15000AVGINT = AVGDEL = 15000

getdatgetdat STOP STOP DATA1 = DATA0DATA1 = DATA0

Get NEW SAMPLE FROM A/D converterGet NEW SAMPLE FROM A/D converter DATA0 = SAMPLEDATA0 = SAMPLE Increment CLKCNTIncrement CLKCNT

If STCNT != 0, THEN decrement STCNTIf STCNT != 0, THEN decrement STCNT If AVGINT = (CLKCNT-CLKST)If AVGINT = (CLKCNT-CLKST)

THEN CLKST = CLKCNT and do ALMCHKTHEN CLKST = CLKCNT and do ALMCHK

If DATA1 < DATA0If DATA1 < DATA0 THEN DEL = DATA0-DATA1THEN DEL = DATA0-DATA1

ELSE DEL = DATA1-DATA0ELSE DEL = DATA1-DATA0

Page 57: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Psuedocode Cont’ed.Psuedocode Cont’ed.If DEL > THRESHIf DEL > THRESH

THEN THRESH = DEL -1THEN THRESH = DEL -1If THRESH > MINTHRIf THRESH > MINTHR THEN decay THRESH every 64THEN decay THRESH every 64thth sample sampleIf QRSMSK > 0If QRSMSK > 0 THEN decrement QRSMSK and go to THEN decrement QRSMSK and go to getdatgetdatIf DEL >= THRESHIf DEL >= THRESH THEN increment QRSCNT and initialize QRSMSK to THEN increment QRSCNT and initialize QRSMSK to

MSKDEL = MSKDEL = .25*500= 125.25*500= 125

Goto Goto getdatgetdat

ALMCHK If(QRSCNT<MINCNT OR QRSCNT > MAXCNT) AND STCNT=0ALMCHK If(QRSCNT<MINCNT OR QRSCNT > MAXCNT) AND STCNT=0THEN set ALARMTHEN set ALARM

clear QRSCNTclear QRSCNT RTSRTS

Page 58: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.
Page 59: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.
Page 60: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Calculation of a typical DEL caused Calculation of a typical DEL caused by a by a QRS QRS

QRS is 5-30mm highQRS is 5-30mm high Duration 0.06 to .10secDuration 0.06 to .10sec 5mm= 0.5mV5mm= 0.5mV 1mm = 0.1mV1mm = 0.1mV ½ of the QRS amplitude = ½ of the QRS amplitude =

13mm(1.3mV)13mm(1.3mV) ½ of the QRS duration = 25ms½ of the QRS duration = 25ms 1.3mV*500 = 650mV1.3mV*500 = 650mV 1.3/2.5 = 52%1.3/2.5 = 52% 52%/2 = 26%52%/2 = 26% 26%*1024 = 266 counts26%*1024 = 266 counts 25ms/2ms = 13 samples25ms/2ms = 13 samples MAX DEL = MAX DEL = 266/13=21266/13=21Photo:http://home.earthlink.net/~avdoc/Photo:http://home.earthlink.net/~avdoc/

infocntr/htrythm/hrecg.htminfocntr/htrythm/hrecg.htm

Page 61: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Test PlanTest Plan

Simulated WaveformSimulated Waveform- simulate the waveform by starting at a - simulate the waveform by starting at a

memory location and use the defined memory location and use the defined constants from the assembler’s pseudo constants from the assembler’s pseudo directives to define data one variable afterdirectives to define data one variable after the other. This allows each data sample to the other. This allows each data sample to be defined; that is, several for the P-wave, be defined; that is, several for the P-wave, T-wave, etc. Defining the samples this wayT-wave, etc. Defining the samples this way creates the samples for a single complex. There will be some register creates the samples for a single complex. There will be some register

or memory location to keep up with the current location as the data is or memory location to keep up with the current location as the data is being picked up. The subroutine will sequence through it. Once it getsbeing picked up. The subroutine will sequence through it. Once it gets

to the end, it will start over again. to the end, it will start over again. This requires a lot of memory.This requires a lot of memory.

Page 62: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

TEST PLANTEST PLAN

Use of the function generatorUse of the function generator

- The function generator will provide - The function generator will provide

the signal to the A/D converterthe signal to the A/D converter Download EKG Download EKG waveformswaveforms from MIT from MIT

databasedatabase

Page 63: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

SummarySummary Resistors Resistors => $0.01 * 18 = $ 0.18=> $0.01 * 18 = $ 0.18 Tantalum (Transistor)Tantalum (Transistor) => $1.09 * 5 = $ 5.45=> $1.09 * 5 = $ 5.45 Ceramic (Capacitor)Ceramic (Capacitor) => $0.19 * 10 = $1.90=> $0.19 * 10 = $1.90 Max 4194 Max 4194 => $ 2.88=> $ 2.88 Max 1242 Max 1242 => $ 10.92=> $ 10.92 Max 666 Max 666 => $ 6.83=> $ 6.83 Max 4244 Max 4244 => $ 4.20=> $ 4.20 Max 4240 Max 4240 => $ 0.83=> $ 0.83 MicroprocessorMicroprocessor => $ 79.00=> $ 79.00

TOTALTOTAL =>:$112.19=>:$112.19 Note: Our Objective to have less than 150.Note: Our Objective to have less than 150.

Page 64: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

SummarySummary

Future Implementation:Future Implementation:– Person having heart attack could be located Person having heart attack could be located

using GPS.using GPS.– Our device will able to send signal to alert Our device will able to send signal to alert

care giver using BlueTooth Technology.care giver using BlueTooth Technology. Build into any cellular-phone.Build into any cellular-phone.

– You can download your heart rate and actually You can download your heart rate and actually review your signal right on Personal Computer.review your signal right on Personal Computer.

Software could be come along with the device.Software could be come along with the device.

– Dip switchDip switch Allow users to enter their own Min and Max heart Allow users to enter their own Min and Max heart

raterate

Page 65: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Summary continueSummary continue Issues concerns:Issues concerns: Realistic ConstraintsRealistic Constraints

– The operating system of the assembler for the The operating system of the assembler for the compiler is only available for Windows 95/NT. We compiler is only available for Windows 95/NT. We will be using the ECE Department milling machine, will be using the ECE Department milling machine, which has certain specifications that must be met for which has certain specifications that must be met for PC Board construction. We will also be limited on the PC Board construction. We will also be limited on the life of our battery.life of our battery.

Engineering StandardsEngineering Standards– Our device will comply with the ANSI Medical Device Our device will comply with the ANSI Medical Device

Standards Board (MDSB) and the IEEE 1073 Medical Standards Board (MDSB) and the IEEE 1073 Medical Information Bus standards.Information Bus standards.

Page 66: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Summary ContinueSummary Continue

Environmental ImplicationsEnvironmental Implications – Our device will save battery power by using as many Our device will save battery power by using as many

low power components as possible and taking low power components as possible and taking advantage of shutdown modes of some components.advantage of shutdown modes of some components.

Sustainability Sustainability – Personal ECG devices will be sustainable because Personal ECG devices will be sustainable because

there will always be a need to monitor the heart rate there will always be a need to monitor the heart rate of people with heart conditions and are high-risk for of people with heart conditions and are high-risk for heart attacks.heart attacks.

EconomicsEconomics– Our device should be relatively inexpensive so that Our device should be relatively inexpensive so that

all hospitals will be able to buy it.all hospitals will be able to buy it.

Page 67: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Summary ContinueSummary Continue Ethical ConcernsEthical Concerns

– Our device will comply to the IEEE Ethical Standards Our device will comply to the IEEE Ethical Standards

Health and Safety Health and Safety – Product does not shock patient; product is Product does not shock patient; product is

comfortable to wearcomfortable to wear– Our device does not cause any harm to the patient Our device does not cause any harm to the patient

and it is comfortable to wear.and it is comfortable to wear.

Social Concerns Social Concerns – The device allows the patient more freedom by The device allows the patient more freedom by

allowing them to be monitored outside the hospital. allowing them to be monitored outside the hospital. Also, the product is small enough to be discretely Also, the product is small enough to be discretely worn.worn.

Page 68: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Summary ContinueSummary Continue

Political Political – There are no political concerns for our device.There are no political concerns for our device.

ManufacturityManufacturity– Since our device will be cheap to manufacture and Since our device will be cheap to manufacture and

all components are readily available, it will be very all components are readily available, it will be very easy to manufacture. easy to manufacture.

Page 69: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

August 24August 23

August 24

August 27

September 1

September 4

September 11

September 25

October 2

October 13

October 25

November 2

November 22

November 27

August 27

August 30

September 4

September 8

September 18

September 30

October 10

October 16

October 30

November 21

November 25

November 28

Deciding Scope for the projectDevelop idea.

Assign Individual PartJonathan: Differential AmplifierAnthony: A/D ConverterQuintelle: MicroprocessorKi: Printed Circuit Board

Scope and advice from Dr. Lori Bruce

CPE Design Worksheet andCharter document due.

Research prices andInformation on individual parts

Deciding parts, and ordering part

Research for simulator and Debugger for Microprocessor

Slide and prepare for Critical Design Review

Simulator found for Microprocessor(Showdow11), and begin flowchart

Layout for PCB developed, Flowchart developedRough draft due

PCB send to lab for developed,Preparing for final designreview, Slide developed

TimelineTimeline

Page 70: Personal Heart Rate Monitor Device By Anthony Shelton, Quintelle Griggs, Jonathan Killen, Chan Hauw Ki Faculty Advisors Dr. James Harden Dr. Lori Bruce.

Final productFinal productAnalog + Digital Microprocessor

Belt for the ECG