26
1 Inexpensive, Portable, Smartphone- Based 12-Lead Electrocardiogram By: ________________________________________ Jordon Friedman ________________________________________ Sean Murphy ________________________________________ Blaine Rieger Date: October 14, 2015 Major Qualifying Project Proposal submitted to the Faculty of WORCESTER POLYTECHNIC INSTITUTE In partial fulfillment of the requirements for the Degree in Bachelor of Science Date: 18 December, 2015 Approved: ____________________________ Professor Reinhold Ludwig, Advisor ____________________________ Professor John McNeill, Co-Advisor

Inexpensive, Portable, Smartphone- Based 12-Lead ... · In addition to creating the Wilson Central Terminal, Wilson added the six Precordial Leads in 1944, which added the final six

Embed Size (px)

Citation preview

1

Inexpensive, Portable, Smartphone-Based 12-Lead Electrocardiogram

By:

________________________________________

Jordon Friedman

________________________________________ Sean Murphy

________________________________________

Blaine Rieger

Date: October 14, 2015

Major Qualifying Project Proposal submitted to the Faculty of

WORCESTER POLYTECHNIC INSTITUTE

In partial fulfillment of the requirements for the

Degree in Bachelor of Science

Date: 18 December, 2015

Approved:

____________________________ Professor Reinhold Ludwig, Advisor

____________________________

Professor John McNeill, Co-Advisor

2

ContentsTableofFigures........................................................................................................................................3

Abstract....................................................................................................................................................4

Chapter1–Introduction..........................................................................................................................4

Chapter2–Background...........................................................................................................................5

2.1–DefinitionandHistoryofthe12ECGLeads.................................................................................5

2.2–ECGPhysiology............................................................................................................................9

2.3–CurrentECGTechnology............................................................................................................12

Chapter3-ProjectObjectives................................................................................................................12

High-LevelArchitecture......................................................................................................................12

ECGAnalogFrontEndBoard..............................................................................................................13

EmbeddedBoardandBluetoothConnectivity...................................................................................13

AndroidApplication............................................................................................................................14

Chapter4-Approach.............................................................................................................................14

Step1–BackgroundElectronicsResearch.........................................................................................14

Step2–ExpansionandVerificationoftheAnalogFrontEnd(AFE)..................................................15

Step4–EmbeddedSoftware.............................................................................................................20

Step5–AndroidDevelopment..........................................................................................................21

Step6–FunctionalityTest.................................................................................................................22

Chapter5-ProjectDeliverables.............................................................................................................23

Chapter7-Conclusion.......................................................................................................................23

Bibliography...............................................................................................................................................25

3

TableofFiguresFigure1-ECGBLOCKDIAGRAM...................................................................................................................5Figure2–10-leadsofwaller(A)andeinthovenlimbleads(B)....................................................................6Figure3-WILSONCENTRALTERMINAL.......................................................................................................7Figure4-GOLDBERGERAUGMENTEDLEADS(a),THEIRLOCATION(B),ANDPRECORDIALLEADPLACEMENT..................................................................................................................................................8Figure5-PROJECTIONSOTHE12LEADVECTORS.......................................................................................9Figure6-NORMALSINUSRHYTHMONANECG........................................................................................10Figure7-ELECTRICALCONDUCTIONSYSTEMOFTHEHEART...................................................................11Figure8-HIGHLEVELARCHITECTURE.......................................................................................................13Figure9-TYPICALOUTPUTOFA12-LEADECG..........................................................................................14Figure10-SINGLE-SUPPLY,VERYLOWPOWER,ECGCIRCUIT...................................................................15Figure11–INPUTBUFFERSANDWILSONCENTRALTERMINAL................................................................17Figure12-INPUTBUFFERFREQUENCYRESPONSE....................................................................................17Figure13–OUTPUTSTAGEWITHACTIVEFILTERING................................................................................18Figure14-SIMULATEDOUTPUTWAVEFORM@100Hz.............................................................................18Figure15-OUTPUTSTAGEFREQUENCYRESPONSE..................................................................................19Figure16–RIGHT-LEGDRIVECIRCUIT(RLD).............................................................................................19Figure17-RIGHTLEGDRIVEFREQUENCYRESPONSE................................................................................20Figure18-EMBEDDEDSOFTWAREDIAGRAM...........................................................................................20Figure19-ANDROIDSOFTWAREFLOWCHART..........................................................................................21Figure20-SAMPLE12-LEADECGOUTPUT................................................................................................22

4

AbstractTheelectronicsindustryisconstantlyfocusingoncreatingcheaper,moreportableelectronicsthatintegratewithsmartphonetechnologyandtheincreasingdemandforaffordableandeffectivemedicalinstrumentation.Furthermore,thehealthcareindustryisbeginningtofollowsuit,withmanymedicaldevicesmovingtomobile-basedplatformsandhardware.ThisMajorQualifyingProjectaimstocompletepreliminarydevelopmentofaninexpensive,accurate,portable,Bluetooth12-leadelectrocardiogram(ECG)thatinterfaceswithanyAndroidsmartphone.ThecurrentmarketlacksinmobileECGsforportabledevicestouseclinicallyandotherportableECGsareextremelyexpensive.Thisprojectaimstouseacompactanalogfront-endboard,anembeddedprocessorwithBluetoothadapter,andgenericAndroidsmartphonetorevolutionizethewaythehealthcareindustryenvisionsportable12-leadECGs.

Chapter1–IntroductionWeliveatanexcitingtimeinthetechnologyindustry.Despitethefactthatmoderntechnologicaldevicessuchasphones,computers,andvariousperipheralsaregettingcheaperandsmaller,theycontinuetobecomemorepowerful,moreaccurate,andmoreportable.Combiningtheseobservationswiththefactthatscienceiscontinuallydiscoveringnewmethodsforacquiringandprocessingdata,wefindthatindividualsareusingtoday’ssmartphonetechnologytocreateinnovativesolutionstoissuesthatwouldnothavebeensolvableotherwise.

Oneofthemostprominentissuesinmedicaltechnologytodayisthecostofmedicaldevicesand,morespecifically,howmuchindividualsareabletospendonaveragetopurchaselife-savingdiagnosticequipment.AccordingtotheWorldHealthOrganization(WHO),developedcountriessuchastheUnitedStatesspend$290percapitaonmedicalequipment,whereasdevelopingcountriessuchasIndiaonlyspendaminiscule$6percapitaonmedicalequipment.1Devicessuchaselectrocardiograms(ECG/EKG)areusedtomeasuretheelectricalactivityoftheheartanddiagnoselife-threateningconditionssuchasmyocardialinfarctions(MI),orheartattacks.Thecostofsuchdevicescurrentlyrangefromabout$2,000and$8,000forsimpleunitstoover$13,000forportableunitsthatcontaindefibrillators.23Giventhesehugecosts,itisapparentthatthereneedstobemoreaffordablealternativescreatedforthehealthcaremarketsincountriesthatsimplycannotspendthatmuchonmedicaldevices.

Giventhecurrentenvironmentofbothconsumerelectronicsandmedicaldevices,itwasinevitablethatanincreasingnumberofcorporationsandstartupswouldworktowarddevelopinglow-cost,smartphone-basedmedicaldevices.FromBluetoothbloodpressurecuffs4towatchesthatmeasureyourblood-oxygensaturation5toglucometersthatreportyourbloodglucosetoyourphone6,therearenew

1(Nimunkar,DavidVanSickle,VanSickle,&Webster,2009)2(Johnson,2011)3(DXEMedical,2015)4(Withings,2015)5(Withings,2015)6(iHealth,2015)

5

devicespracticallyeverydaythattrytoblendtherealmofconsumerelectronicsandmedicinetoimprovemodernhealthcarebothinandoutoftheclinicalsetting.

FIGURE1-ECGBLOCKDIAGRAM7

Inthisproject,weaimedtocombineourskillsinelectricalengineeringandsoftwareengineeringwithourclinicalknowledgeofthehumancardiovascularsystemtodevelopalow-cost,smartphone-basedECG.Figure1outlinesthebasicblockdiagramofanECG.TheECGiscapableofpairingtoanyAndroidsmartphoneusingBluetoothtoallowphysiciansandotherhealthcareprovidersinpracticallyanysettingatpracticallyanysocio-economicpositiontogatherextremelyimportantclinicalinformationandtransmititanywhereintheworldovertheinternet.Thiswillallowhealthcareproviderstoolstobetterdiagnosethechiefcomplaintsofpatientsandachieveanimproveddifferentialdiagnosisusingessentialdatathattheymostlikelywouldnothavehadaccesstopreviously.

Chapter2–Background2.1–DefinitionandHistoryofthe12ECGLeadsTheECGishardlyanewpieceoftechnology.AugustusDésiréWaller,aBritishphysiologistfromthelate19thcentury,experimentedwithbio-electromagnetism,whichleadhimtodevelopthefirstelectrocardiogramin1887.UnlikemodernECGs,whichusetherightarm,leftarm,andleftlegtogetsignals,Wallerusedthesethreepositions,aswellastherightlegandmouth,togetECGsignals.AnECGultimatelydisplayswhatarereferredtoasleads.Leadsaredifferentialsignals,whichcomparethedifferenceinpotential(voltage)betweendifferentpointsonthebody.Waller’ssystemultimatelycreated10leadsbetweeneachofhis10bodypositions.8

Itwasnotuntil1908whenWillemEinthoven,aDutchdoctorandphysiologist,publishedapaperdescribingtheelectrodepositionsthatweusetodaytoacquiredataforthelimbleadsonanECG.These

7(Chen,etal.,2013)8(Malmivuo&Plonsey,1995)

6

threeleadsareappropriatelynamedtheEinthovenLeadSystem.ThegraphicbelowoutlinesWaller’sleadsystem(A)aswellasthemodernEinthoven(B).9

FIGURE2–10-LEADSOFWALLER(A)ANDEINTHOVENLIMBLEADS(B)10

Ascanbeseenintheabovegraphic,Einthoven’selectrodeplacementdefinesthefirstthreeofourtwelve-leadECGsystem.Thosefirstthreeleads,referredtoasthelimbleads,areLeadI,LeadII,andLeadIII.Thelimbleadsaredefinedasfollows11:

LeadI: VI=ΦL-ΦR (1)

LeadII: VII=ΦF-ΦR (2)

LeadIII: VIII=ΦF-ΦL (3)

Intheseequations,𝑉3,wherenisthenumberofeachrespectivelead,representsthedifferentialvoltageofleadnand𝜙3representsthepotential(voltage)attheelectrodelocationontheskin.Wecanthereforededucethat,accordingtoKirchhoff'sVoltageLaw,𝑉5+𝑉555 =𝑉55.Therefore,thismeansthatonlytwoofthethreeleadsareindependent.Toformtheremainingnineleadsofthetwelve-leadECG,wehavetousetheaverageofthethreelimbelectrodestocreatetheWilsonCentralTerminal(CT).

FrankNormanWilson,aprofessorofinternalmedicineattheUniversityofMichigan,investigatedhowtodefineunipolarpotentialsontheECG,sincethelimbleadsareallbipolar.Althoughhisworkdidnot9ibid10ibid11ibid

7

allowhimtogatheranyinformationfromanypurelyunipolarpotentials,heultimatelydevelopedtheWilsonCentralTerminalasawaytocreatepseudo-unipolarleads.Inordertodothis,threeequal-sizeresistorsareplacedbetweeneachofthethreelimbelectrodesandthecentraljunction.AsisshowninFigure3,thisterminalaveragestoapotentialthat,whenconsideringthebodyasaplane,createsatriangulatedpointovertheheart.ThisresistornetworkisoutlinedinFigure3awherearbitraryresistorvaluesshown.

FIGURE3-WILSONCENTRALTERMINAL12

Usingthiscentralpointofpotential,weareabletoacquireboththethreeso-calledGoldbergerAugmentedLeadsandthesixPrecordialLeads.Withtheseremainingnineleads,wehavealltwelveoftheleadsforourECG.TheGoldbergerAugmentedLeadsarenamedinhonorofDr.EmanuelGoldberger,aManhattancardiologistandresearcher,whodiscoveredin1942that,byomittingoneofthethreeresistorsintheWilsonCentralTerminal,onecancreatethreeadditionalleadswhich,duetothenatureoftheirorientation,areconsideredunipolaraugmentedleads.13Theseadditionalthreeleadsusetheexistingthreelimbleadstogainthreeadditionalperspectivesontheheart’selectricalactivity,asnotedinthefirstimagebelow.InadditiontocreatingtheWilsonCentralTerminal,WilsonaddedthesixPrecordialLeadsin1944,whichaddedthefinalsixperspectivesprovidedbythemoderntwelve-leadECG.Theseleads,namedV1,V2,V3,V4,V5,andV6,aresimplydefinedasthevoltagedifferentialbetweentheWilsonCentralTerminalandtherespectivePrecordialLead.Thesesixleads,whichareplacedinorderstartingatbothsidesofthesternumandcontinuingtoapositionjustbetweenthemid-clavicular

12ibid13(EmanuelGoldberger,Cardiologist,Diesat81,1993)

8

andmid-axillarylines,allowtheECGtoseetheelectricalactivityontheanteriorandleft-inferiorsidesoftheheart.

FIGURE4-GOLDBERGERAUGMENTEDLEADS(A),THEIRLOCATION(B),ANDPRECORDIALLEADPLACEMENT14

ThetwelveleadsoftheECGultimatelygranttheusertheabilitytoobtainathree-dimensionalelectrostaticrepresentationoftheheart,whichisillustratedinFigure5.Thefollowinggraphichelpstodescribetheperspectiveofferedbyalltwelveleads.Ifweweretoimagineaplanethatwascreatedalongthevectorofeachleadandthenweretofollowanelectricalimpulsefromtheheart’sSinoatrialNodetotheAtrioventricularNodethroughtheBundleofHistothePurkinjeFibers,theECGwouldcreateatracefollowingthiselectricalimpulsealongthatplane.

14(Malmivuo&Plonsey,1995)

9

FIGURE5-PROJECTIONSOTHE12LEADVECTORS15

2.2–ECGPhysiologyAswasdescribedattheendoftheprevioussection,theECGfollowstheelectricalactivityintheheart.Figure6outlineswhatweobserveonanECGforanormalsinusrhythm,thenormalelectricalactivityinaproperlyfunctioningheart.Thenormalsinusrhythmisbrokenupintoanumberofwaves,themostprominentaretheP,Q,R,S,andTwaves.UwavesaretypicallynotseenontheECG.Pwavessignifyatrialdepolarization,theQRScomplexsignifiesventriculardepolarization,andtheTwavessignifyventricularrepolarization.AtrialdepolarizationishiddenbehindtheQRScomplex.Ascanbeseeninthegraphicbelow,inordertogetallofthenecessarydetailforanECG,theanalogsystemhastobeabletodetectvoltagechangesassmallasapproximately0.1mVintheQwave.EachwaveontheECGcorrespondstoacrucialphaseofaheartbeat.

15ibid

10

FIGURE6-NORMALSINUSRHYTHMONANECG16

Whenaheartbeats,itisbrokenintoanumberofspecificactionsandphases.Theactionofthemyocardium(cardiacmuscle)contraction,andsubsequentlypumpingbloodoutofthecontractingchamber,isreferredtoasdepolarization.ThePwaveistheresultofthedepolarizationoftheheart’satria.TheQ,R,andSwavestogetherarereferredtoastheQRScomplex.TheQRScomplexsignifiesthedepolarizationoftheheart’sventricles.Therepolarization(orreturntorest)oftheheart’satriaishiddenbehindtheelectricalactivityfromtheQRScomplex.TheTwaveistherepolarizationoftheventricles.Ascanbeseenintheimageabove,thereareanumberofdifferenttimesegments,whichcanbeusedbymedicalprofessionalstodiagnosedifferentconditionsoftheheart.

Inordertogeneratethesepotentialsthroughtheheart,whichleadtotheheart’sdepolarizationandsubsequentrepolarization,thehearthasanelectricalsystemthatisshownindetailinFigure7.Thepacemakeroftheheart,theSinoatrialNode(SAnode),createsthefirstelectricalstimulusoftheheart.Thisimpulsetravelsthroughtheatria,causingatrialdepolarization,ultimatelygatheringagainattheAtrioventricularNode(AVnode).Fromhere,theimpulsegetssentdowntheBundleofHisanddowntheleftandrightbundlebranches.Atthebottomofthebranches,theimpulseissenttotheleftandrightventricles.Astheimpulsepassesthroughtheconductivepathways,itcausesthedepolarizationoftheventricles.Meanwhile,astheventriclesarecontracting,theatriaarerepolarizing.Aftertheventriclescontract,theyslowlyrepolarizebacktothestateofrest.

16ibid

11

FIGURE7-ELECTRICALCONDUCTIONSYSTEMOFTHEHEART17

AlthoughtheactionsofthemyocardiumtissuedescribedabovearewhatweseeinanECG,thereisasignificantlygreateramountofactionoccurringatthecellularlevelthatleadstotheECGoutput.AstheelectricalimpulsefromtheSAnodetravelsthroughtheheart,itisstimulatingthemyocardialcells.Whatactuallyhappensduringthisstimulationistheactivationofasodium-potassiumpumpinthecells.Asthemyocardialcellsconductandthenpassthesignalalongtoadjacentcells,electricallystimulatedsodiumchannelsarebeingopenedup.Thesefastsodiumchannelstakeinpositivesodiumions(Na+),whichsurroundthecellsatrest.Eventually,thisrapidinfluxofpositivesodiumionscausesthedepolarizationofthecelltoreachathreshold,causingthecellularactionandcontraction.Thecellachievesdepolarizationbecausethepotassiumchannels,whichexpelpositivepotassiumions(K+)fromthecell,aremuchslowerthanthesodiumchannels.Thiscausesthedepolarizationtobedrasticallypositiveuntilthepotassiumionsareexpelled.ThisrapidandlargechangeincellularchargeiswhatcreatesthechangeinelectricalpotentialontheECGoutput.

17(UniversityofRochesterMedicalCenter,2015)

12

2.3–CurrentECGTechnologyECGtechnology,althoughalldesignedtoaccomplishthesameobjective,variesgreatlybetweenthehospitalenvironment,thepre-hospitalenvironment,andthehomeenvironment.Inthehospitalenvironment,therearelarge,expensive,powerfuldevicesthatcanbeusedtogetrestingmeasurementsandothersthataredesignedforactivesmeasurements,suchasthosedoneduringastresstest.OneexampleofthesemodernrestingECGmachinesisthePhilipsPageWriterTC7016-leadECG.ThisisarelativelyexpensivedevicewithanMSRPof$9990,whichincorporatesalargecartandbatteryforhospitaluse.TheseECGsallowforadditionalprecordialleadsforhospitalusesoastodiagnoseright-sidemyocardialinfarctioninvolvement.Furthermore,theycontainverypowerfulprocessorsforadvancedDSPthatsimplyisnotpracticalforuseinthesmaller,lessexpensivedevices.However,thesedevicesallowfordatabaseintegrationoverWi-FisothatclinicianscaneasilyaccessoldECGs.Althoughtypicallyonly12-leadECG,theactiveECGsforstressteststypicallycostmorethantherestingECGs.18

Inthepre-hospitalenvironment,devicestendtogetsignificantlymoreexpensive.Althoughthesedevicestendtoincorporateanumberofadditionalfeaturessuchasblood-oxygensaturation,carbon-dioxideconcentration,automaticbloodpressuremonitors,biphasicdefibrillators,andpacers,theytypicallylacktheresolutionofthehospital-gradeequipment.Theseportableunitsarebuiltextremelyrobusttotakefallsandphysicaldamageinthepre-hospitalenvironment.Despitetheirlackofaccuracycomparedtothehospitalequipment,theyarestillaccurateenoughtoprovidelife-savingdifferentialdiagnosesonpatientsinthefield.Theseportableunitstypicallycostbetween$10000and$50000.19

InthewirelessECGenvironment,thereareveryfewoptionsthatareavailableatthemoment.Thereareanumberofproductscurrentlyavailablethatareabletoacquireasingle-leadECGandwirelesstransmittoadevicetoview,buttherearefewtononethatareabletointerfacewithasmartphoneoverBluetooth.Theonlycurrentexampleofacompanytryingtoachieveasmartphone-based12-leadECGisNimbleheartInc.inCalifornia.However,noneoftheirproposedproductsarecurrentlymarket-ready.Nopricingispresentlyavailabletoserveasareference.Despitebeinginthisearlystate,thecompanyispursuingaFDAClassIIcertificationforitsdevice.Thecostofthiscertificationisexpectedtobeextremelyhighandwilllikelyexcludethemedicaldevicemarketsindevelopingcountriesduetoexorbitantcostlikemostotherdevicescurrentlyavailable.20

Chapter3-ProjectObjectivesHigh-LevelArchitectureInthisproject,weaimtocreateanovelarchitectureforanAndroid-based12-leadECGthatiscapableofstreamingliveECGdatatoasmartphonewithanaccuracythatiscomparabletothatofamodern

18(Philips,2015)19(Physio-ControlInc.,2015)20(Nimbleheart,2015)

13

hospital-gradeECG.Inordertodothis,therearethreemajorcomponentstotheoverallarchitecturewhichareoutlinedin(INSERT)withtheirrespectiveinterfaces.ThefirstandarguablymostimportantistheECGanalogfrontend(AFE).ThisAFEwillberesponsibleforacquiringallECGsignalsintheanalogrealminrealtimewithtremendousaccuracy.Thesecondmajorpartofthearchitectureistheembeddedprocessorboard.Thisboardwillbeabletoreadinthe12analogoutputsfromtheAFEviaanalog-to-digitalconversionataratethatbestpreservestheresolutionoftheacquiredleadsignals.ThisboardwillthenhavetointerfacewithasmartphoneoverClassicBluetoothataratefastenoughtokeeptheacquiredsignalsreal-time.Finally,asmartphonerunningtheAndroidoperatingsystemwillreadinthedatareceivedthroughBluetoothanddisplaythisdatainrealtimeonthephone’sdisplay.

FIGURE8-HIGHLEVELARCHITECTURE

ECGAnalogFrontEndBoardTheanalogfrontendofthedeviceisthemostcrucialpartofthesystemasthisisresponsiblefortheinitialsignalacquisitionfortheleads.Aswasdiscussedinapriorsection,thesignalsthathavetobeacquiredrangefromapproximately0.1mVtoapproximately1mV.Theseareextremelysmallvaluessowewillneedtousemedical-gradecomponents.Typicallyspeaking,mostECGsystemsuseatotalsystemgainof1kV/Vforeachoftheoutputleads.Inordertoachievehighaccuracy,highgain,andhighresolution,wewillneedtohavetousethemostaccurateresistorsforgainwhileusingoperationalamplifierswithaninputoffsetvoltageontheorderofpicovolts.TexasInstrumentsmakesanumberofcomponentsthatarespecificallydesignedforthistypeofsignalacquisition.Finally,anotherimportantaspectoftheAFEboardistheright-legdrivecircuit.ARL-drivecircuitisafeaturecommonlyusedinelectricalmedicalinstrumentssuchasEEGsandECGstoreducenoiseandtosetthecommon-moderatiovoltageofthebody.Thisisafeedbackloopthattakestheaveragevoltagefromtheacquiredsignals,offsetsthemtothemedianvoltageofanyADC’svoltage(2.5Vinthiscase),andamplifiesthemat-38toreducethebody’snoise.Weaimtokeepthecostofthisunder$300forasingleboard,nottakingeconomiesofscaleintoaccount.Wewillsimplyuseanoff-the-shelfsetofelectrodestoplugintotheboard.

EmbeddedBoardandBluetoothConnectivityForourembeddedboard,weaimtoreadthe12analoginputsthrough12uniqueanalog-to-digitalconvertersonaCortexM4processorintobufferswitharesolutionofatleast12-bitaccuracyataspeedofatleast1MS/s.inordertogiveusthegreatestlevelofflexibilitysincetheAHAonlyrequiresustosampleat500S/sforanECG.Thesebufferedinputsaretransmittedintotime-dividedblocksoverClassicBluetoothusingaBluetoothcapableexpansionboardtoanAndroidsmartphone.Thesmartphonewillberunningabespokeapplicationthatisdesignedtoreadourdatastream.Thisboard,alongwiththeAFEboard,willrunoffa5Vlithium-ionrechargeablebatterypackthatcanbechargedoverUSB.Thisentireunitwillbehousedina3Dprintedenclosure.Ifmoneyandtimepermit,wewouldliketocreate

14

anall-inclusiveprintedcircuitboard(PCB)thatcontainstheARMprocessor,AFEforleadacquisition,andanywirelesshardware.

AndroidApplicationTheAndroidsmartphoneapplication,aspreviouslystated,willbetheend-pointfordataacquisition.TheappwillbedesignedtotakeinaBluetoothserialdatastream,determinewhichleaditbelongsto,andappendittothecurrentdisplayofreal-timeECGdata.TheappwillalsoberesponsiblefortakingstandardECGtimemeasurementssuchasventricularrate,PRintervaltime,QRSduration,amongothers.Theappwillalsobecapableof“printing”outtheECGacquisition.ItwilllooksimilartothestandardECGoutputshowninFigure9.Thisimagewillhavetheabilitytobeemailedtootherphysicians.TheremayhavetobesomeresearchdoneinhowtomakethisoutputHIPAAcompliant.Givenextratime,wemayaddinrhythmdetectiontodetectrhythmssuchasatrialfibrillation,ST-ElevationMyocardialInfarctions(STEMIs),heartblocks,andmore.

FIGURE9-TYPICALOUTPUTOFA12-LEADECG21

Chapter4-ApproachStep1–BackgroundElectronicsResearchOurdesignapproachisstraightforward.WhencreatingourECGcircuit,wearerelyingonexistingcircuitry.Specifically,thecircuittoacquire12ECGleadsiswidelypublishedandanumberofdifferentcomponentmanufactureseithermakeapplicationspecificIC’sthatoutputSPIforthispurposeormakeinstrumentationamplifiersandoperationalamplifiersthatareintendedforuseinECGapplications.Asadesignchallenge,wearegoingtomaketheentireanalogfrontend.Asaninitialreference,webased

21(Larson,2014)

15

our12-leaddesignonasingle-lead,single-supply,verylowpowerECGcircuitfromtheOPA333datasheet,showninFigure10.22

FIGURE10-SINGLE-SUPPLY,VERYLOWPOWER,ECGCIRCUIT23

Step2–ExpansionandVerificationoftheAnalogFrontEnd(AFE)AscanbeseeninFigure10,TIhasgeneratedacircuitforasingle-leadECGacquisitionlikethosefoundinhospitalbedsidemonitors.Asingle-leadECGusesthreesensingleads(RA,LA,LL)andcomparedtwotocreateitssingleoutputlead.Italsousesaright-legdrivecircuit(RL)tosetthecommon-modevoltageandreducenoiseinthebody.Usingtheknowledgewegainedinpre-projectresearchthatcanbefoundinourbackgroundsection,wewereabletoappropriatelyexpandthiscircuittoincludeall12ECGsignals.Theoutputstageisthesameforeachofthe12outputleadsasthisallowseachoutputleadtohavethesamefrequencyresponseand.ThedifferenceliesmainlyintheuseofthecorrectinputfortheINA321instrumentationamplifier.Toverifythiscircuit,weusetheanaloganalysissoftwareMultisimto

22(TexasInstruments,2013)23(TexasInstruments,2013)

16

confirmthattheoutputofthecircuitfunctionsasanticipatedandwithinthecorrectfrequencyresponserequiredforanaccurateECG(frequenciesbelow150Hz),asdefinedbytheAHA.24

Inordertoachieveexpectedfunctionalityfromtheanalogfront-endboardoutlinedinFigure10-SINGLE-SUPPLY,VERYLOWPOWER,ECGCIRCUITthroughFigure15,thereneededtobesomerelativelysimplehandanalysis.TheinputbufferssimplyfunctionsuchthatVin=Vout.TheWilsonCentralTerminalisavoltageaveragingcircuitofthelimb-leadsignals.Voutisdefinedasfollows:

V678 = 9:9;<

==9><

9:9?

;9;<

;9><

;9? (4)

Theresistorvaluesusedintheaveragingcircuitarearbitrary.However,evenlyaveragingallthreesignalsagainstoneanotherrequiresthatallthreeresistorsbeequal.FortheECG,weareusingresistorsof100kΩ.Aswasdefinedabove,theAHArecommendsapproximatefrequencybandwidthof<150HztoachievecorrectECGfunctionality.Weachievethisusinganactivelow-passfilterontheoutputamplifierstageoftheECG,whichisshowninFigure13.ThisissimplyanRCcircuitforwhichtheanalysisisshownasfollows:

fA = B

CDEF= B

CD BGΩ BIJ= 159Hz (5)

Asisshownhere,theactivelow-passfilterusedontheoutputwillprovideacut-offfrequencyof159Hzwhenusingtheresistorvalueof1MΩandthecapacitorvalueof1nF.ThisallowsthedevicetomeettheAHAguidelineonfrequencybandwidth.Mostright-legdrivecircuitsalsocontainanactivelow-pass

filtersothatunnecessarilyhighfrequenciesarenotdrivenbacktothebodywhenattemptingtoreducenoise.Ourright-legdrivecircuit’sfilterisdefinedasfollows: fA =

BCDEF

= BCD OPQRΩ STUJ

= 8.682kHz (6)

Thiscutofffrequencyallowsreasonablenoisereductionwithfilteringforabnormallyhighfrequenciesthatdonotneedtobedriventothebody.ThefinalanalysisdeterminedwhatresistorstousetogetthedesiredoutputgainoftheoutputstageshowninFigure13.ItisimportanttonotethattheINA2321hasadefaultgainof5,whichmeansthattheoutputgainthatissetismultipliedby5.InordertogetdesiredECGoutput,weneededagainof1000,or1kV/V.Thesimulatedoutputstageshowingthesimulatedgainof1000isshowninFigure14.Thisisshownasfollows:

A[ = \]^_\`a

= 5 ∗ ECEB= 5 ∗ BGΩ

cRΩ= 1000𝑉/𝑉 (7)

Figure15showsthatwehavetheexpectedactivelow-passfilterresponsewiththekneepositionedat150Hz.Figure11,Figure13,andFigure16showoursolutiontogeneratinginputs,creatingtheWilsonCentralTerminal,generatingoutputs,andusingtheRight-LegDrivecircuittoreducesystemnoiseandsettheCommon-ModeRatioVoltageofthebodyto0.5*Vcc.TheinputstageinFigure9involvesusingbufferstoseparatetheHigh-Zimpedanceofthehumanbodyfromtherestofthecircuit.Italsoshowshowthelimbleadsarecombined,aspreviouslydefined,tocreatetheWilsonCentralTerminal.TheoutputandamplificationstageinFigure10showsususinganINA321instrumentationamplifierandtwoOPA333operationalamplifierstogetouroutputsignal,doactivefilteringontheoutputtomeetour

24(Rijnbeek,Kors,&Witsenburg,2001)

17

frequencyresponserequirement,amplifytheoutputwithagainof1kV/V,andsetthereferencevoltagetothatofthebody(currently0.5*VccduetotheRLDcircuit).Finally,wecanseehowourright-legdrivecircuitinFigure11usestwoOPA333operationalamplifierstobuffertheoutput,invertthesignalfromtheWCT,filterthesignaltoreducenoise,andsetthecommon-moderatiovoltageofthebody.ThiscircuitwasfabricatedintoaPCBfortesting.Aslarge-scaleproduction(arunof1000ormore),thecostoftheanalogfrontendhardwarewouldonlycostapproximately$100forafullturn-keysystem.Thismeansthatthisanalogfrontendisanextremelycost-effectivemethodforECGsignalacquisition.

FIGURE11–INPUTBUFFERSANDWILSONCENTRALTERMINAL

FIGURE12-INPUTBUFFERFREQUENCYRESPONSE

18

FIGURE13–OUTPUTSTAGEWITHACTIVEFILTERING

FIGURE14-SIMULATEDOUTPUTFROM1MVSINEWAVE@100HZ(500MV/DIV,50MS/DIV)

19

FIGURE15-OUTPUTSTAGEFREQUENCYRESPONSE

FIGURE16–RIGHT-LEGDRIVECIRCUIT(RLD)

20

FIGURE17-RIGHTLEGDRIVEFREQUENCYRESPONSE

Step4–EmbeddedSoftware

FIGURE18-EMBEDDEDSOFTWAREDIAGRAM

Fortheembeddedboard,wewillsimplybeusinganARMCortexM4evaluationboardfromTexasInstrumentsthathasasufficientnumberofanaloginputandprocessingpowertoacquireall12analogsignals.TheTM4C123GfromTexasInstrumentsprovidesthisfunctionalityaswellasadedicatedUARTconnectionthatisusedtointerfacewithoutSparkFunBluetoothmodule.Usingthesetwoboardstogetherprovidessufficientdataacquisition,processingspeed,andwirelessoutputtoachieveourdesiredresults.UsingtheBluetoothmodule,weuseBluetoothSerial(SPP),essentiallyawirelessserialconnection,toanAndroidPhoneforthedataacquisition.Figure18showsabasicblockdiagramoftheembeddedsoftwarearchitecture.TocomplywithAHArecommendations,thissystemwillneedtotransfersamplesat500Hzperlead.25Thismeansasamplingrateof6kS/s.Assumingthateachsampleis12-bitsinsize,thismeansthattheoveralldataratewouldhavetobe72kbpsoverBluetoothtoachievethecorrectdatastreamonthesmartphone.

25ibid

21

Step5–AndroidDevelopment

FIGURE19-ANDROIDSOFTWAREFLOWCHART

Forourapplication,wewillbeprogrammingforAndroidusingtheJavaprogramminglanguage.AlthoughwewereinitiallygoingtouseBluetoothLEtocommunicatewithanAppleiPhone,wequicklyrealizedthatAppleplacesanumberoflicensingrestrictionsforBluetoothperipheralsthroughtheir“MadeforiPhone”program.Wewouldhavehadtoapplythroughtheprogramandspendalargesumofmoneytogettheappropriatelicensingso,instead,wehadtomakethemovetoAndroidsmartphones.AnotherfactorwasthatAndroidhasaverylargemarketshareofthesmartphonemarket,especiallyindevelopingcountries,sotheswitchfromiPhonetoAndroidhadadditionalbenefitsandreasonsalongwiththeBluetoothrestrictions.

Inordertomeetallofthebaselinerequirementsofa12-leadECG,anumberofcomplexfeaturesweredevelopedtomeettheprojectgoals.Thefirstmajorchallengewasdevelopingsoftwaretogivealive-display(cardiacmonitor)ofall12signalsbeingacquiredinreal-time.Inordertodothis,datawasreceivedonthesmartphonesequentially.Datathatwasstoredina12-elementarrayontheembeddedsoftwarewassenttothephoneoverSPPBluetoothsequentiallyasthephonerequestedsamples.InordertocomplywithAHAregulationsfordataacquisitionforECGs,thesmartphonerequestsasetofsamples500timespersecond.Whenthedatastreamends,thephonehasreceivedtheentirelyofthelastsample,andcanparsethedatatothescreenaccordingly.Furthermore,thelast10secondsofdataforall12leadsarestoredinabufferfortheECG“printout.”Inordertoactivatetheprintout,theusersimplytouchesanon-screenbutton.

ThemostcrucialelementforfunctionalitywastodisplaytheacquiredECG.UsingFigure9asaguideline,theapplicationdisplaystheacquiredECGfollowingtheaforementionedconvention.Additionally,theuserisabletoselectwhichofthe12leadsshouldbeshownacrossthebottomoftheimage(the10-second-longrhythmstrip).Thelastandmostimportantpartoftheapplication’ssoftwarewastoaddfunctionalitytocalculatetheRRinterval(heartrate),PRinterval,QTinterval,QTcinterval,QRSduration,andaxis.Inmoderndigital12-leadECGs,thesoftwarecombinesthefull10-secondsofdataforall12

22

leadsintoasingle“mega-lead”forrhythmanalysis.26Thisallowsthesoftwaretodeterminetheaverageelectricalactivityfromtheentireacquisition.Thenextstepwastodeterminetheheartrate.ApeakdetectionalgorithmwasdevelopedwhichwasabletodistinguishRwavesfromanyotherdataornoiseinthesignal.Theinternalswerethenusedtodetermineheartrate.UsingtheRwavesasreference,thealgorithmthensearchesinbothdirectionsuntilthepreviousandnextRwavestofindanyotherwaysinthatspace.Usingmorepeakdetection,theremainderoftheintervalsareacquiredandtheirtimesconvertedtomilliseconds.Inordertodetermineaxis,thealgorithmdeviatesfromthe“mega-lead”andsimplycomparesthemagnitudeofthepeaksforLeadIandLeadaVF.TheappropriatedataisdisplayedinaconventionalformatontheECGprintout.Allcalculatedvalueswerecomparedwithaconventional12-leadECGinordertodetermineclinicalsignificance.Figure20showsanexample12-leadECGprintoutfromtheAndroidapplication.NotethattheelectrodeonV1wascomingoffduetoapoorapplicationofadhesiveontheoff-the-shelfelectrode.Thisdoesnoteffecttherestoftheoutput.

FIGURE20-SAMPLE12-LEADECGOUTPUT

Step6–FunctionalityTestInordertoverifythatthe12-leadECGfunctionscorrectlyinaclinicalenvironment,wewillhavetocreateafunctionalityandtestingplan.Thegroupcurrentlyholdsrelationshipswithanumberofcardiologistsintheregionwhoareinterestedinassistinginthetestingprocess.Furthermore,thegroupcurrentlypossessesaprofessional12-leadECGtousetotestequivalency.BeforepursuingFDAapprovalforthedevice,wesimplyhavetoproveequivalencywithpre-existingtechnology.OurpossessionofanECGwillmaketheverificationsignificantlyeasierhowevertheprocesstakesasubstantialamountof26(Clifford,2006)

23

timethatwillextendpastthescopeofthisproject.Inordertotestfunctionality,weplantohaveprofessionalsusethedevicetodeterminethatitisprovidingthemwithalloftheinformationthattheyneedinordertodotheirjob.

Toverifyfunctionalityinlab,wewillbeabletotaketheECGcablethatwouldbeattachedtooneofthegroupmembers,acquireanECGfromonedevice,plugitintoanother,andacquireasecond.Ouracquisitionshouldbeequalinquality,ifnotbetterthantheprofessionaldevice.Allcalculatedvaluesforintervalsshouldbeequivalentaswell.Printoutsshouldlooknearlyidentical.Inordertofinalizeverificationaftertheendoftheprojectperiod,wewilllikelymoveontoin-depthclinicaltrialsinordertotestfunctionalityonindividualspresentingrhythmswhicharenotsimplyhealthynormalsinus.

Chapter5-ProjectDeliverablesProjectdeliverablesareasfollows:

• AworkingECGanalogfrontendboardthatsuccessfullycapturesall12ECGleadswithcorrectrelativemagnitude

• AnembeddedboardwithsoftwaretoconverttheanalogsignalstodigitalsignalsandtransmitthemwirelesslytoanAndroidsmartphoneoverBluetooth

• AsmartphoneapplicationdesignedtoacquiretheECGleadsignalsoverBluetoothanddisplaytheminrealtime,aswellasgeneratea“print-out”image.

Futuredevelopmentofthisprojectincludescreatingafullycustomembeddedboardthatmatchesthesizeconstraintsoftheanalogfrontendboardforconvenientplacementintoanenclosure.Aprototypeboardhasalreadybeendevelopedbytheteam,howeverthereissignificantdebuggingtobedoneuntilthiscanbeconsideredafullyfunctionalreplacementforthesolutionthathasalreadybeenimplemented.Furthermore,thegroupintendstopursueapatentapplicationand,aftersubstantialdevelopmentandclinicaltesting,FDAapproval.

Chapter7-ConclusionThisprojecthasshowntobeanextremelyviableproof-of-conceptthata12-leadECGthatisaccurate,portable,andlow-cost.Consideringthatretailcostscanbeasmuchas10timesthatofhardwarecosts,thiswouldmeanthatouranalogsolutionwouldcost$1000orless.Consideringthatotherproductsonthemarketcostwellover$8000donotmeetthesameleveloffunctionalityorconveniencethatourmobile-basedproductprovides,wecanconfidentlysaythatwehavedevelopedacost-effectiveandaccessiblesolutionforaportable12-leadECG.WithBluetoothbatterychargingandtheabilitytouseanyAndroid-basedsmartphonewiththedevice,thisprojecthastheabilitytoappealtoagreatnumberofaudiencesinvariousmarkets(particularlythosewherecostofthedeviceisasignificantfactor).

Althoughourrequirementsforproof-of-concepthavebeenmet,therearestillanumberofobjectivestocompleteaswemoveforwardoutsideofthescopeoftheMQPtimeline.Thegroupwillcontinuedevelopingandpolishingthesoftwarefunctionality,aswellasfurtheriteratingoverthetwoPCBdesignsthatarebeingusedfortheproject.Furthermore,thedevicewillbecontinuallytestedinordertoverifyfunctionalityonanumberofindividualstofurthersolidifyequivalencyforpotentialFDAapproval.Finally,withhelpofvariousresources,thegroupwillbecompilingapatentapplicationtobesubmitted

24

totheUSPatentingofficeinordertoprotectandallintellectualpropertythathasbeentestedanddevelopedduringthecompletionoftheMQP.

25

BibliographyChen,C.-Y.,Chang,C.-L.,Chang,C.-W.,Lai,S.-C.,Chien,T.-F.,Huang,H.-Y.,etal.(2013,March4).ALow-PowerBio-PotentialAcquisitionSystemwithFlexiblePDMSDryElectrodesforPortableUbiquitousHealthcareApplications.RetrievedfromSensors:http://www.mdpi.com/1424-8220/13/3/3077/htm

Clifford,G.D.(2006).AdvancedMethods&ToolsforECGDataAnalysis.Cambridge,MA:ArtechHouse.

DXEMedical.(2015).RetrievedfromPhysio-ControlLifePak15Defibrillator/Monitor:http://www.dxemed.com/physio-control-lifepak-15-defibrillator-monitor.html?utm_source=google_shopping&gclid=COW0vrTGsMgCFQgHaQodA3cJsw

EmanuelGoldberger,Cardiologist,Diesat81.(1993,May12).TheNewYorkTimes.

iHealth.(2015).http://www.ihealthlabs.com/glucometer/wireless-smart-gluco-monitoring-system/.RetrievedfromiHealth:http://www.ihealthlabs.com/glucometer/wireless-smart-gluco-monitoring-system/

Johnson,D.(2011,August3).Physio-Controltoput12-leadsinhandsofruralsystems.RetrievedfromEMS1:https://www.ems1.com/ems-products/Patient-Monitoring/articles/1091036-Physio-Control-to-put-12-leads-in-hands-of-rural-systems/

Larson,G.(2014,May1).12leadgeneratedsinusrhythm.

Malmivuo,J.,&Plonsey,R.(1995).Bioelectromagnetism.Oxford,UnitedKingdom:OxfordUniversityPress.

Nimbleheart.(2015).Products.RetrievedfromNimbleheart.com:http://www.nimbleheart.com/products.htm

Nimunkar,A.J.,DavidVanSickle,VanSickle,D.,&Webster,J.G.(2009).Low-costMedicalDevicesforDevelopingCountries.Retrievedfromhttp://ewh.slc.engr.wisc.edu//publications/conferences/2009/IEEE_EMBC/Medecal_LowCostDevicesIEEEMBS2009_v14.pdf

Philips.(2015).ViewdetailsofPhilipsPageWriterTC70.RetrievedfromPhilips.com:http://www.usa.philips.com/healthcare/product/HC860315/pagewriter-tc70-cardiograph

Physio-ControlInc.(2015).EmergencyMedicalCarePrehospitalProducts:Monitor/Defibrillators-LIFEPAK15.RetrievedfromPhysio-ControlInc.:http://www.physio-control.com/ProductDetails.aspx?id=2147484979

Rijnbeek,P.R.,Kors,J.A.,&Witsenburg,M.(2001).MinimumBandwidthRequirementsforRecordingof.RetrievedfromAmericanHeartAssociation:http://circ.ahajournals.org/content/104/25/3087.full.pdf

TexasInstruments.(2013,November).1.8VmmicroPower,CMOSOperationalAmplifiers,Zero-DriftSeries.RetrievedfromTexasInstruments:http://www.ti.com/lit/ds/symlink/opa333.pdf

26

UniversityofRochesterMedicalCenter.(2015).ArrhythmiasinChildren.RetrievedfromUniversityofRochesterMedicalCenter:https://www.urmc.rochester.edu/encyclopedia/content.aspx?ContentTypeID=90&ContentID=P01764

Withings.(2015).WithingsPulse.RetrievedfromWithings:http://www.withings.com/us/en/products/pulse

Withings.(2015).WithingsWirelessBloodPressureMonitor.RetrievedfromWithings.com:http://www.withings.com/us/en/products/blood-pressure-monitor