You are on page 1of 26

WirelessSIDSMonitor

By

AngelaAntonou
CarrieFabbrini

ECE345,SENIORDESIGNPROJECT

FALL2003

TA:HanSeokKim

December9,2003

ProjectNo.17

1
2
ABSTRACT

Wehaveconstructedamonitorandinfantunitthatwillalertparentsiftheirbabyissufferingfromsigns
thatcanindicateSuddenInfantDeathSyndrome.Wechosethisprojectbecauseitissomethingthatcan
beusedonadailybasisinmanyhouseholds,andcanpreventalifealteringtragedy.Theprojectis
excitingforusbecauseonedaywemightbeabletouseitwithourownchildren,andchildrenofour
closefriendsandfamilytohelpkeepthemsafeandalive.

ThegoalofthisprojectistosuccessfullymonitorthesymptomsofSIDSwhileconsideringthecomfort,
safetyandconvenienceofthefamily.SincethecauseofSIDSisstillunknown,themostaccurate
methodofpreventinginfantdeathduetoSIDSistomonitorthebreathingoftheinfant.

3
TABLEOFCONTENTS

1. INTRODUCTION....................................................................................................................4
1.1 ProjectVision.....................................................................................................................4
1.2DesignOverview................................................................................................................4
1.3CustomerBenefits..............................................................................................................4

2. DESIGNPROCEDURE...........................................................................................................5
2.1DesignDecisions................................................................................................................5
2.1.1TemperatureSensor.................................................................................................5
2.1.2Microcontroller........................................................................................................5
2.1.3Transmitter/ReceiverPair........................................................................................6
2.1.4AlarmUnit...............................................................................................................7
2.2ToolsUsed..........................................................................................................................7

3. DESIGNDETAILS..................................................................................................................8
3.1TemperatureSensorandCircuitry......................................................................................8
3.2Microcontroller...................................................................................................................9
3.3Transmitter/ReceiverPair.................................................................................................11
3.4MonitorUnitCircuitry......................................................................................................12
3.5AlarmUnit........................................................................................................................12

4. DESIGNVERIFICATION.....................................................................................................13
4.1TemperatureSensorandCircuitry....................................................................................13
4.2Microcontroller.................................................................................................................13
4.3Transmitter/ReceiverPair.................................................................................................14
4.4MonitorUnitCircuitry......................................................................................................15
4.5AlarmUnit........................................................................................................................15

5. COST......................................................................................................................................16
5.1Parts..................................................................................................................................16
5.2Labor.................................................................................................................................16
5.3Total..................................................................................................................................16

6. CONCLUSIONS....................................................................................................................17
6.1Successes..........................................................................................................................17
6.2Challenges.........................................................................................................................17
6.3FutureRefinements...........................................................................................................17

APPENDIXMicrocontrollerPinDiagram..........................................................................18
APPENDIXMicrocontrollerPinDefinitions......................................................................19
APPENDIXTemperatureSensorOutputGraph.................................................................20
APPENDIXReceiverOutputGraph...................................................................................21

4
REFERENCES.......................................................................................................................22

5
1.INTRODUCTION

1.1 ProjectVisionandObjectives

ThegoalofthisprojectistosuccessfullymonitorthesymptomsofSIDSwhileconsideringthecomfort,
safetyandconvenienceofthefamily.SincethecauseofSIDSisstillunknown,themostaccurate
methodofpreventinginfantdeathduetoSIDSistomonitorthebreathingoftheinfant.

1.2 BlockDiagram
Infant Unit

Sensors Microcontroller Transmitter

Monitor Unit

Analysis
Receiver Alarm
Circuitry

Figure1.2:BlockdiagramofSIDSMonitor

Ourdesignhastwoseparatecomponentstoitthatarelinkedbyawirelesstransmitterandreceiverpair:

Theinfantunitcollectsthebreathingdatafromtheinfantthroughtemperaturesensors,analyzesthedata
withamicrocontroller,andthentransitsasignaltoindicatewhetherornotthereisanemergency.Ifa
breathhasnottakenplaceandasetamountoftimehaspassed,analarmsignalwillbesent.

Themonitorunitacceptsdatafromtheinfantunitthroughthetransmitter,analyzesthedatathroughthe
analysiscircuitry,andthenintegratesthealarmcomponentsoftheprojecttoknowwhentoactivatethe
alertsystem.

1.3 CustomerBenefits

Theinfantunitwillbesmallandcomfortableforthechildtowear.ManySIDSmonitorsonthe
markettodayutilizesensorsthatcauseskinirritations.
Themonitorunitandinfantunitwillcommunicatewirelessly,thereforeeliminatingtheriskof
harmtotheinfantfromthecablesthatoftenrunbetweentheunitsonothercurrentSIDS
monitors.
Themonitorunitwillbothvisiblylightandaudiblybuzziftriggered,thereforequicklyalerting
theparentsofanyproblems.
Thealarmwillhaveashutoffswitchthatcanbeusedifthealarmisactivatedsothatyoucan
checkonthestatusoftheinfantwithoutexcessivenoise.

6
7
2.DESIGNPROCEDURE

2.1DesignDecisions

Throughouttheprojectthereweremanydecisionsthatwehadtomakeaboutourdesign.Somewere
madeattheverybeginningofthesemesterandcarriedoutthroughouttheproject.Othersweremade
alongthewayorchangedmidprojectwhenaparticularchallengewasfaced.

2.1.1TemperatureSensor

The major decision that we faced with the temperature


sensor was the type of sensor to use. At the beginning of the
semester we ordered a Motorola MTS-102 temperature
sensor (referredtoasMTSthroughoutthepaper) and
assumed that we would be using that sensor for the
remainder of the project. We originally chose the MTS-102
because of its availability at the ECE Parts Shop, the
appealing linear voltage output with temperature input, and
relatively low error of 2% (Figure 2.1.1).

Figure2.1.1:Temperaturevs.VoltageResponse

AfterfamiliarizingourselveswiththeMTS102andresearchingotherpossibilities,wecametothe
realizationthatabeadthermistorwouldworkbetterforoursystem.Previously,wehadnotconsidered
characteristicssuchassensorcasingandtimeconstants,bothofwhichwillbeimportantsinceweare
measuringafragiletemperaturedifferenceinaspecifiedamountoftime.TheMTS102hasatime
constantofabout8seconds.Thismeansthataquickchangeintemperaturewouldnothaveaquick
responsefromtheMTS.Duetothefactthataninfant,newbornto11months,hasabreathrateof3035
breaths/minute,wewouldneedasensorwithaveryquicktimeconstant(2secondsorless).Theslow
responsetimeeliminatestheMTSfrombeingconsideredforarealworldSIDSmonitoringdevice.
Exposedbeadthermistorsaretemperaturesensingdeviceswhoseresistancechangeswithtemperature.
Theyaremuchmoresensitive,buthaveahighlynonlinearresistanceversustemperaturegraph.The
timeconstantsforthesedevicescanbeaslowasahalfofasecond.Thequickresponsetimemakes
exposedbeadthermistorsmuchmoreappealingforarealworlddevice.Despitetheobviousfunctional
benefitsofusinganexposedbeadthermistorinsteadoftheMTS102temperaturesensor,withlimited
timewecontinuedtousetheMTSforourproject.

2.1.2Microcontroller

Whencontemplatingwhichmicrocontrollertouse,wefoundthattheBasicXwasanexcellentmatchfor
ourproject.TheBasicXhasaplethoraofresourcesavailableontheinternet(aswellasonourown
ECE345coursewebpage).ThetwoshiningattributestotheBasicXarethatithasarelativelysimple
programminglanguageandanextensivelibrary.Asaresult,time(proportionaltolaborcost)issaved
andtheprogramlengthitselfremainedshort.Sincetheprogramlengthwaslessthan100lines,the
limitedprogrammingsizeof8000lineswasaconcernduringthedecision.Additionally,theBasicXhas
abuiltinclock,whichwewereabletouseasourreferencetimetodeterminetimeelapsedbetween
breaths.AnotherpositiveattributeoftheBasicXisthatithasanA/Dconverterbuiltinit.Thisallowed

8
ustoeliminatetheA/Dconverterfromourdesign,savingbothcostandtime(fromresearchingtheA/D
converteranditscapabilities).OneofthelimitationsoftheBasicXisthatithasalimitedamountofI/O
pins.However,weonlyneeded3pinsforourdesign,sothatwasnotamajorconcern.Belowaretwo
tablesdescribingsomeoftheaspectsoftheBasicXthatwehadtoconsider.

Table2.1.2a:BasicXparameters
MAXProg
Language RamSize Multitasking Timers IOTechnology Speed
Size

BasicX BASIC 400Bytes Yes Yes(RTC) TTL 8000lines ~8000lines/sec

Table 2.1.2b: BasicX Pros and Cons


MCU Pros Cons
SimpletoWire
Simpletoprogram
TTLCompatible RatherSlow
BasicX HUGEFunctionLibrary SmallRamSize
ProgramsinFlash(Savedafterpowerfailure) LimitedIOPins
Variablesinflash
Multitasking

Anotherimportantdecisionthathadtobemadeaboutthemicrocontrollerwaswhetheritshouldbe
locatedontheInfantUnitortheMonitorUnit.Inourinitialdesignforourdesignproposalanddesign
review,wehadthemicrocontrollerlocatedontheMonitorUnit.Themainreasonbehindthisinitial
decisionwasthesizerestrictionswiththeInfantUnitsinceitwillbelocatedclosetotheinfant.Since
theBasicXMicrocontrollerwewereusingwasadecentsizephysically,ourpreferencewastobuildit
intotheMonitorUnit.Afterseveralchallengesthatwefacedwiththefunctioningofthetransmitterand
receiverpair,wedecidedtomovethemicrocontrollertotheInfantUnit.Inmassproduction,the
microcontollercouldbebuiltmuchsmallerthantheBasicXweareusing,andsizewouldnotbea
restrictionthatwouldkeepusfrombuildingitintotheInfantUnit.

2.1.3Transmitter/ReceiverPair

Initially,weplannedtousetheLinxLCSeriesDigitalTransmitter/Receiverpair.Afewweeksintothe
project,weencounteredachallengewiththetemperaturesensorthatmadeusreconsiderthisdecisionin
casewewouldhavetotransmitananalogsignalinsteadofadigitalsignal.So,weswitchedtotheLinx
HP2SeriesDigitalorAnalogTransmitter/Receiverpairsothatwewouldhavetheflexibilityofusing
eitherdigitaloranalogtransmission.AnadditionalbenefitofusingtheHP2SeriesovertheLCseriesis
theincreasedpossibletransmissiondistance.WhiletheLCSerieswouldonlyguaranteeaccurate
transmissiontoadistanceof300ft,theHP2Seriescantransmitasfaras1000ftaccurately.

9
2.1.4AlarmUnit

Weconcludedthathavingbothanaudibleandvisualalarmwouldbestsuitpracticaldeviceusage.If
theparentwassleepingorgenerallynotlookingatthealarmunit,weneededforthemtobeabletohear
ifanemergencyispresent.Iftheparentislisteningtomusicorwearingheadphones,etc,weneededthe
parenttobeabletoreceiveavisualsignal.

Onedecisionthathadtobemadeforthealarmunitwasthetypeofalarmtouse.Wehadtheoptionof
usingatwoterminalbuzzerorathreeterminalbuzzer.Sincewewouldbeutilizingthebuzzertosimply
senseavoltage,onlyatwoterminalbuzzerwouldbenecessary.

However,wehadtwodifferentoptionsoftwoterminalbuzzers.Oneoperatesoffofa6Vsupplyandthe
otheroffofa12Vsupply.Sincewewerebuildingtherestofourcircuitaround+5V,a6Vbuzzerwould
bemoreappropriatewithourcircuitspecifications.

ThebuzzerthatweusedforourfinalcircuitwastheMB726buzzermanufacturedbyLeeds.

2.2ToolsUsed

Agilent54642AOscilloscope
PhilipsPM5193FunctionGenerator
OnePCin246EverittLab
CadenceCapture
PSpiceSchematics
BasicX2.00
HPVEESoftware
OnePCin268EverittLab
AgilentE3631APowerSupply
Hairdryer

10
3.DESIGNDETAILS

3.1TemperatureSensorandCircuitry
TheMTS102temperaturesensorisaBipolar
JunctionTransistor(BJT)thatissensitiveto
changesinthetemperatureoftheairthatsurrounds
it.Thevoltagedifferencebetweenthebaseand
emitterterminalschangeslinearlywithachangeof
temperatureasisseeninFigure2.1.1.While
presentingtheMTS102withavarietyof
temperaturesandlookingattheoutputonan
oscilloscope,wewereabletoseetheformofthe
output.LookattheAppendixforTemperature
SensorOutputonpage20toseetheshapeofthe
outputcurve.Theoutputvoltageisrepresentedas
themaximumvaluethatthecurvereachesatany
Figure3.1a:TemperatureSensorCircuit giventime.

Inordertodecideonthevaluesabove,weusedKirchoff'sVoltageLaws:
Accordingtothedatasheet,VBE=595mVwhenIc=.1mA,andV=IR.
VBE=Ic*RTS,whereVBE=VoltagefromMTS,Ic=current,andRTS=resistanceofthetemperaturesensor
VBE/Ic=595/.1=5950Ohms=5.95kOhms=RTS
So,witha.1mAcurrent:5V=.1*103*R1+595*103,thereforeR1=44kOhms.

Forroomtemperature,theoutputvalueofthetemperaturesensorcircuitisapproximately590mV,and
thatvalueincreaseswithdecreasingtemperatureanddecreaseswithincreasingtemperature.
Theequationthatrepresentsthevoltagewithrespecttotemperatureis:
VBE=2.265e3*(T25)+.595,whereTistemperatureisCelsius
Thoughwehadtheequationthatgavetheformulafortheexacttemperature,ourcircuitismore
concernedaboutthechangeintemperature.Becauseofthis,wecalculatedsomevoltagesthatsignified
temperatureswithinthepotentialrangethatwewerelookingfor.
VBE=.595Vat25oC
VBE=.583675Vat30oC
VBE=.578239Vat32.4oC
VBE=.5707645Vat35.7oC
Ofcourse,theexhilationbreathtemperatureis32.435.7oC,sothetheoreticalvoltagedifferencecanend
upbeingabout.0242355V.

Sincethechangeinvoltageissosmall,wefounditnecessarytouseanOpAmpbetweentheoutputof
thesensorcircuitandtheinputoftheBasicXtodecreasetheamountoferrorthatwilloccurduetosuch
smallvoltagechanges.

11
Figure3.1b:CircuitrythataccompaniesMTS102TemperatureSensor

Theopampcircuitresistorvaluesweredeterminedbytheequation:
(R1/R3)*(Voltagedifference)
Note:R2=R1andR4=R3
Theinputvoltage(theanalogvoltageontheleftofFigure3.1b)comesfromthetemperaturesensor.
Thevoltagereferenceisapredeterminedvalue.Thatvoltagerepresentsthereferencevoltagethatis
comparedwiththeinputvoltagefromthetemperaturesensor.Becausewewantedthevoltage
differencetobe0atroomtemperature,wedeterminedthevoltagereferencetobe590mVor.59V,
whichisthevoltageatroomtemperature.ThevaluesofR6andR5weredeterminedbydecidingwhat
thatvoltagereference,whichisthevoltageattheintersectionofR6,R5,andR4,shouldbe.Simple
voltagedividerwasusedtodeterminethosevalues.
.59V/(5V.59V)=ratioofresistors=R5/R6

3.2Microcontroller(BasicX24)

Figure3.2b:BasicX24andboarddiagram

Figure3.2a:BasicX24andboard

12
Enable?
no
yes

10second Receives
delay Input
no
Breath?
noyes

15

seconds Resets
elapsed? Counter
yes

Outputs Outputs
One Zero
Figure3.2c:FlowchartforSIDSmonitoringdeviceprogram

Ourprogram,usingtheBasicX24,actsasthebrainforourdevice.Itgathersthedataanddecides
whetheranemergencyisoccurring.TheprogramfirstchecksiftheEnableisactivated.TheEnableisa
switchwhichallowstheusertoturnthedeviceonoroffasneeded.Afterthatischecked,theprogram
collectsthedatafromtheMTS102.ItsendsthedatathroughaninternalADC(A/Dconverter)and
determineswhetherahighorlowvoltagehasbeenpresented.Usingthisvalue,theprogramdecides
whetherabreathhasoccurredbyseeingthatahighrepresentsabreath.Ifabreathisindicated,the
variablethatstoredthetimebetweenbreaths(wecallitthe"counter")isresetanda0isoutputtothe
transmitter/receiver(0representsnoalarm).Ifabreathhasnotoccurred,theprogramcomparesthe
counterandinternaltimer.If15secondshaselapsed,a1isoutputtothetransmitter/receiver,indicating
analarm.Atenseconddelayisthenactivated.Wewantthealarmtosoundforatleast10seconds,
despiteuserinteraction.Itisasafetymeasuretoensurethatthealarmwillindeedsound.However,if
15secondshadnotelapsed,thecountermaintainsthesametimeandthecycleisstartedagain.

Duetothefactthatourtransmitter/receiverhadthecapabilityofsendingbothdigitalandanalogsignals,
twoprogramsweredrafted:oneforeachoutput.Thestructureandflowofeachversionisalmost
identical,theonlydifferencewastheformatoftheoutputsenttothetransmitter.

Hereisthesectionofourcodethatdetermineswhetherabreathhasoccurred.Asyoucansee,the
temperaturewe'reconcernedwithisnotanactualtemperaturevaluebutacomparativevalue:whatthe
temperatureisnowcomparedtotheprevioustemperature.TheTempDiffValueandTempPinare
predeterminedvalues.Theyareconstantsthroughouttheprogram,usedonlyasareferenceandpin
number,respectively.TempPinistheinputthatwereceivefromtheoutputoftheOpAmp.Averyshort
delay,whichvariesdependingonthetemperaturesensoryou'reusing,andtheTempDiffValuecanbe
setupsothatthecodeisabletodifferentiatebetweenwhatishighandlowwithrespecttotheinfant's
breath.Also,thevariablesthatrepresenttemperatureactuallyholdvoltagevalues.

13
Do
Temperature_Sensor=GetADC(TempPin)
Work_Temp=Temperature_Sensor
Temp_Diff=Work_TempPrevious_Actual_Temp


If(Previous_Actual_Temp<2.5)Then
If(Temp_Diff>TempDiffValue)Then
TimeNow=Timer
OutputVal=0
ElseIf((TimerTimeNow)>15.0)Then
OutputVal=1
EndIf
EndIf

Previous_Actual_Temp=Work_Temp
Loop

3.3Transmitter/ReceiverPair

Goingintothisproject,wethoughtthatincorporatingawirelesslinkintoourcircuitwouldbeavery
simpleprocess.Thetransmittersandreceiversarealreadydesignedtoworktogether,andrequirevery
fewconnections.AftermakingafewdesigndecisionsasmentionedinSection2.1.3,wefiguredit
wouldbeaseasyasconnectingafewwiresanddoingsometests.Unfortunately,wewerewrong.

TheHP2Seriestransmitter/receiverpairarecapableoftransmittingeitherdigitaloranalogdataovera
rangeofupto1000ft.Totransmitdigitalinformation,thetransmitterusesfrequencyshiftkeying,a
binaryformoffrequencymodulation.Totransmitanalogdata,FMmodulationisused.1Aspartofthe
transmitter/receiverpair,threechannelselectsallowthepairtocommunicateoveranyoneofeight
differentfrequenciesrangingfrom903.37Hzto921.37Hz.

Afterweeksoftesting,wewerestillnotabletogetthetransmitterandreceiverpairtogiveusoutput
thatwasthesameastheinputwewerefeedinginfromthefunctiongenerator.However,aftersome
testingwediscoveredthatatleasttheoutputthatweweregettingwasuniquefortheinput,sowewere
abletobuildthemonitorunitcircuitryaroundtheoutputthatweknewwewouldhavefortheinputsthat
wouldbepossibleforoursystem.

1
LinxTechnologyHP2SeriesTransmitterManual
14
3.4MonitorUnitCircuitry

Originallywethoughtthatthemonitorunitcircuitrywouldbeastraightforwarddesign,butafterthe
challengesfacedwiththetransmitterandreceiver,theanalysiscircuitrydesigngotmuchmore
complicatedaswell.

Thetwoinputsthatthecircuitrywillreceivefromthereceiveriseithera5Vpeakpeaksquarewave
with50Hzfrequencywitha2.5Voffsetora5Vhighvoltage.Thejobofthemonitorunitcircuitryisto
takethe5Vpeakpeaksquarewaveandmakeitintoa5Vhighvoltage,andtakethe5Vhighvoltage
andmakeitintoa0Vlowvoltage.Inordertodothis,wehadtousearectifiercircuitandinverteras
seeninFigure3.4.Then,wehadtobuildtwoseparatecircuitstobeabletosimultaneouslyrunboththe
LEDandbuzzercomponentsofthealarm.

Figure3.4:MonitorUnitCircuitrySchematic

3.5AlarmUnit

Afterbuildingthemonitorunitcircuitryandtakingintoconsiderationthevoltageandcurrent
requirementsoftheLEDandbuzzer,itwassimpletoincorporatethelightandbuzzercomponentsby
simplyconnectingthem.BasictestswerepreformedontheLEDandbuzzerindependentlybeforethey
wereintegrated.Itwaseasytodeterminethatbothrequiredatleast2.3Vtohavecorrectoperation,and
thatthecurrentlevelthroughthebuzzerneededtobearound1mA.

15
4.DESIGNVERIFICATION

4.1TemperatureSensorandCircuitry

AfterexperimentingwiththetemperaturesensorasdescribedinSection3.1,weunderstoodthewayit
performedwellenoughtocreateschematicsandrunsimulationsoftheOpAmpcircuitrythatisbetween
theMTS102itselfandthemicrocontroller.

Aftercreatingtheschematics,wewereableto
runaseriesofsimulationstoseehowthe
circuitrywouldperformwithavarietyofinput
temperatures(intheformofinputvoltages),and
theresultsareseeninGraph4.1.Anyoutput
voltagesbelow1Vwillbereadasalowvoltage,
andanyoutputvoltagesabove3Vwillbereadas
ahighvoltage.Asyoucanseefromthegraph,
onlyasmallsectionofinputvoltageswillfallin
the13Vrange,makingthisOpAmpcircuitryas
effectiveaspossibleforoursystem.

Graph4.1:OutputofOpAmpvs.InputVoltage

Table4.1:Outputvoltageforhairdryertest
Afterweactuallybuiltthecircuitry,werananother HairDryerLevel MaximumVoltage
seriesoftestsbypresentingthetemperaturesensor Off 0.5938V
withavarietyoftemperaturesusingahairdryerwith Low 0.5469V
differentsettings.Aswepredicted,eachoutputtook High 0.5000V
theshapeofthegraph(seetheAppendixfor
TemperatureSensorOutputonpage20)andthemaximumvaluechangedasthetemperaturechanged.

4.2Microcontroller

Themicrocontrollercodewascompiled.Aftercompiling,wetesteditsfunctionalitybysendingina
voltagehighorlowdirectlyintotheinputpinofthemicrocontroller.Wehadtheoutputpinconnected
totheoscilloscopeinordertoseetheresponse.Weexpectedtheoutputtobelowwhenthevoltage
inputwasbeingalternatedbetweenhighandloworif15secondshadnotpassedby.Ifthevoltagewas
setlowand15secondswaslettopass,weexpectedtheoutputtojumptoahighvalue.Weranthistest
withboththeenableactivatedandinactivated.OurresultsareshowninTable4.2.Wefoundthatthe
microcontrollerrespondedasexpected.Thechartindicatestestsusingtheprogramwithdigitaloutput.

Table4.2:Trialswithmicrocontroller
WithoutEnable WithEnable
Numberoftrials 5 3
Numberofaccurateresponses 5 3

16
4.3Transmitter/ReceiverPair

Themaintestthatwasperformedwiththetransmitterandreceiverpairwasatestoftheeffectthatan
increasedistancebetweenthetwounitswillhaveontheoutputresults.Weperformedthetestata
varietyofdistancesrangingfrom2feetto38feetandwithbothhighandlowinputwaves.Wewere
pleasantlysurprisedtofindthattheoutputvoltageslightlyincreasedandweincreasedthedistance.
Therewouldhavebeenrestrictionswewouldhavehadtoputonourmonitorifinthevoltagehad
decreasedwithanincreaseindistance,butwithanincreasingvoltageoutputwedonthavetoworry
aboutgettingvoltagelevelsthatcouldbeinterpretedaseitherahighorlowvoltage.

Change in Output with Varied Distance


3.27
3.26

3.25 Output (5V input)


Output (V)

3.24 Output (0V input)

3.23
3.22

3.21
3.2
0 100 200 300 400 500
Inches between transmitter and receiver
Graph4.3:Outputvoltageofreceiverforvarieddistancesbetweenreceiverandtransmitter.

4.4MonitorUnitCircuitry

Totestthemonitorunitcircuitry,wefirstcreatedschematics(SeeFigure3.4)andsimulationsofthe
overallcircuitry.AftermakingmanyadjustmentstotheresistorandcapacitorvaluesoftheLEDand
buzzercomponentsofthecircuit,wewerefinallyabletogetanacceptablevoltageleveltoruntheLED,
andacceptablevoltageacurrentlevelstorunthebuzzer.

17
Graph4.4:VoltageandCurrentsimulationsforMonitorCircuitry

Notmuchtestingwasdoneonthecircuitonceitwasbuilt,since(asdiscussedinSection4.5)itwas
easytotellifthecircuitrywasworkingcorrectlybysimplyconnectingthebuzzerandLED,and
presentingthecircuitrywithavarietyofinputs.

4.5AlarmUnit

WhenwefirstgottheLEDandbuzzeratthebeginningofthesemester,weperformedaseriesoftests
onthem.Weknowthatthe2.3VlevelisthevoltagecutoffwheretheLEDshiftsfrombrighttodimor
evenunlit,andwherethebuzzershiftsfromoperationtosilence.

Beyondthat,theonlytestingthatwasdonewiththealarmunitwasconnectingthebuzzerandLEDinto
themonitorunitcircuitrytoseeiftheywouldlightandsoundattheappropriatetimes.

18
5.COST

5.1Parts

Table5.1:CostofParts
Part Cost NumberUsed TotalCost
BasicX24Microcontroller 49.95 1 49.95
HP2SeriesReceiver 76.00 1 76.00
HP2SeriesTransmitter 53.00 1 53.00
CWSeriesAntennas 15.00 2 30.00
MTS102Temp.Sensor 2.00 1 2.00
LM741OpAmp 0.50 1 0.50
Buzzer 2.50 1 2.50
LED 1.00 1 1.00
Capacitor 0.35 4 1.40
2N4401BJT 0.10 2 0.20
1N4950Diode 0.25 2 0.50
Resistor 0.10 12 1.20
Total $217.95

5.2Labor

Dreamsalary:$33.65/hr
Hourstocomplete:125hours
Totallaborcostperperson:$33.65*2.5*125=$10,515.63
TOTALlaborcost:$21,031.25

5.3Total

TotalParts=$217.95
TotalLabor=$21,031.25
ProjectTotal=$21,249.20

19
20
6.CONCLUSIONS

6.1Successes

Thetransmitterandreceiverwereabletocommunicate.Wecouldtellbecausewegotauniqueoutput
fromthereceiverforeachinputthatweputintothetransmitter.
Wewereabletodistinguishvaluabledatafromthetemperaturesensor.Originallywethoughtthe
peaktopeakvoltagewouldchange,butwewereabletofigureoutthatitwasthemaximumvoltagethat
variedwithdifferenttemperatures.
Themonitorunitcircuitrysuccessfullyinterpreteduniquedatafromreceiver.Thisallowedthebuzzer
andLEDtofunctionasexpected.
Themicrocontrollercodecompiledandgaveexpectedoutputs.

6.2Challenges

Thereceiverdidnotgiveustheoutputthatweexpected,butwewereabletogetauniqueoutput
instead.Wewerepleasedbeabletoovercomethischallengewiththemonitorunitcircuitry.
Thetemperaturesensorwasnotasresponsive(duetoan8secondtimeconstant)asoursystem
required.Wecontinuedexperimentationwiththeslowersensorwiththeintentionofchoosingafaster
sensorinthefuture.
TheOperationalAmplifierfunctioneddifferentlywhenwebuiltitfromwhatweexpectedafter
runningaseriesofsimulations.
OurBasicXmicrocontrollerwasveryunreliable.Wehadanonfunctioningmicrocontrollerforseveral
weeksbeforewediscoveredthattheproblemwasthehardwareitself.Aftergettinganew
microcontrollerweweresuccessfuluntilthelastfewdayswhenitdecidedtostopfunctioningaswell.

6.3FutureRefinements

WewoulduseanexposedbeadthermistorinsteadoftheMTS102temperaturesensor.Havingan
appropriatetimeconstant(0.51second)formeasuringtheinfantsbreathisacriticalcharacteristicof
oursystemandonethatwewoulddefinitelyexperimentwithinthefuture.
Wecouldfocusonthespecificsoftheunitthattheinfantwillneedtowearsuchassizeandmaterials
used.Wedidntevenconsiderthisportionoftheproject,butinthefutureitwouldbeanimportant
additiontoourmonitorasawhole.
Moreexperimentationwiththetransmitter/receiverpairwouldbeimportant.Ifwecouldgetitto
functionaswasexpectedthemonitorunitcircuitrycouldbesimplified.
ThereareafewwayswecouldapproachtheOpAmpinthefuture.Onewouldbetoexperimentwith
offsetvaluesofOpAmp.AnotherconsiderationwouldbetoaddaWheatstonebridgetothetemperature
sensorcircuittohavemorecontroloverthecurrentvaluesrunningthroughourothercircuitry.

21
APPENDIXMicrocontrollerPinDiagram

22
APPENDIXMicrocontrollerPinDefinitions

Pin Primary Primary Alternate Alternate


# Function Description Function Description

1 Com1 High speed Com port Serial download transmit See Com Ports
Transmit
2 Com1 High speed Com port Serial download receive See Com Ports
Receive
3 ATN line For serial downloading
4 Ground Common with pin 23 See below for DC
characteristics
5 PortC, Bit 7 General Purpose I/O Port
6 PortC, Bit 6 General Purpose I/O Port
7 PortC, Bit 5 General Purpose I/O Port
8 PortC, Bit 4 General Purpose I/O Port
9 PortC, Bit 3 General Purpose I/O Port
10 PortC, Bit 2 General Purpose I/O Port
11 PortC, Bit 1 General Purpose I/O Port Interrupt pin
12 PortC, Bit 0 General Purpose I/O Port Input capture pin
13 PortA, Bit 7 ADC channel 7 General Purpose I/O Port
14 PortA, Bit 6 ADC channel 6 General Purpose I/O Port
15 PortA, Bit 5 ADC channel 5 General Purpose I/O Port
16 PortA, Bit 4 ADC channel 4 General Purpose I/O Port
17 PortA, Bit 3 ADC channel 3 General Purpose I/O Port
18 PortA, Bit 2 ADC channel 2 General Purpose I/O Port
19 PortA, Bit 1 ADC channel 1 General Purpose I/O Port
20 PortA, Bit 0 ADC channel 0 General Purpose I/O Port
21 VCC 5 V output from regulator 4.8 V to 5.5 V power input
(when powered at Vin) (when Vin not used)
22 Reset Low Active Reset
23 Ground Common with Pin 4 See below for DC
characteristics
24 Vin, 5.5 V to Input to 5 V regulator See below for DC
15 V (see note below) characteristics

23
APPENDIXTemperatureSensorOutputGraph

24
APPENDIXReceiverOutputGraph

25
REFERENCES

[1] LinxTechnologiesStaff,HP2TransmitterDesignGuide,LinxTechnologies,Inc.,1999.

[2] LinxTechnologiesStaff,HP2ReceiverDesignGuide,LinxTechnologies,Inc.,1999.

[3] AdelS.SedraandKennethC.Smith,MicroelectronicCircuits.NewYork:OxfordPress,1998.

[4] Marilyn Hockenberry, Wong's Nursing Care of Infants and Children, Seventh Edition. Missouri:
Mosby, 2003.

[5] John Webster. The Measurement, Instrumentation, and Sensors Handbook. Florida: CRC
PRESS, 1999.

[6] VendorDocumentationBX24only,UniversityofIllinois.Webpagemodification:April
2003.courses.ece.uiuc.edu/ece345/microdocs/bx_docs.

[7] Basic Express System Library. Version 2.0. NetMedia, Inc, 1998-2002.
courses.ece.uiuc.edu/ece345/microdocs/bx_docs/BX_Docs/System_Library.doc

[8] BX-24 Hardware Reference. NetMedia, Inc, 1998-2002.


courses.ece.uiuc.edu/ece345/microdocs/bx_docs/BX_Docs/BX24_Hardware_Reference.doc

[9] Basic Express Language Reference. Version 2.0. NetMedia, Inc, 1998-2002.
courses.ece.uiuc.edu/ece345/microdocs/bx_docs/BX_Docs/Language_Reference.doc

[10] Basic Express BXK24. BasicX-24 Developer Kit. NetMedia, Inc, 2002.
courses.ece.uiuc.edu/ece345/microdocs/bx_docs/BX_Docs/BX24_Getting_Started.doc

[11] Ngai, Joe and Oster, CJ. Notes on using your BX24, University of Illinois.
April 2003. courses.ece.uiuc.edu/ece345/microdocs/bx24-notes.html

26

You might also like