文献翻译基于电话线的PC远程控制家用电器.docx
《文献翻译基于电话线的PC远程控制家用电器.docx》由会员分享,可在线阅读,更多相关《文献翻译基于电话线的PC远程控制家用电器.docx(14页珍藏版)》请在冰豆网上搜索。
文献翻译基于电话线的PC远程控制家用电器
附录
附录A
PCREMOTECONTROLOFAPPLIANCESBYUSING
TELEPHONELINES
ABSTRACT
TheideaofHomeAutomationusingtelephonelinesandaPCwasshowninthisstudy.ThesystemwasbasedontheDualToneMultifrequency(DTMF)signalsthatcouldbesentthroughaloopofwiretoswitchon/offvatiousappliancesviaaPersonalComputer(PC).ThesystemhardwareandsoftwareweredesignedbasedontheTelephoneStandards.ThehardwarepartincludetheDTMFreceiveron/offHookdetector,RingdetectorandanInput/OutputPCInterfacingcard.Anexampleofcontrollinganappliancewasprovidedinthestudy.ThesoftwarecontrolprogrammingwaswritteninTurboBasicandtheirflowchartsarepresentedhereforthereader’sattention.
INTRODUCTION
HomeAutomationthatwasintroducedinthisstudywasimplementedbydesigningthe“SmartControlSystemthatControlsAllAppliancesRemotelybyphone”.ThedesignwasbasedontheTelephoneStandardswhichmeantthatthesystemwasqualifiedtobeinstalledonthepublicswitchingsystem.ThesystemdesignwasutilizingtheDualToneMultifrequency(DTMF)signalsthatcouldbeproducedbythetelephoneset.Thesesignalsweresentfromtheuserendthroughtheloopwiretothedestinationend,wherethecontrolsystemwasstationed.Thesystemconsistedofthreemajorparts.ThefirstpartwastheringdetectorandDTMFreceiver.ThesecondpartwastheInput/Outputinterfaceunit.ThethirdpartwasthepersonalcomputerwhichwasprogrammedwithTurboBasicSoftwaretoperfomtheonlineoperations.BlockdiagramofsystemwasshowninfigureA.1
FigureA.1SmartcontrolsystemtocontrolAppliancesremotelybyphone
BRIEFOPERATIONOFATELEPHONESET
Asummaryofthetelephonesetoperationwasgivenhereforthereadertovisualizethesystemoperation.
(a)Localloop:
Eachsubscribertelephonewasconnectedtoanexchangeofficethatcontainedtheswitchingequipment,signalingequipmentandbatteriesthatsuppliedthedirectcurrenttooperatethetelephone.Eachphonewasconnectedtothecentralofficethroughalocalloopoftwowirescalledawirepair.OneofthewireswascalledT(fortip)andtheotheronewascalledR(forring)whichwasrefferedtotheTIPandRINGpartsoftheswitchusedinmanualswitch-boards.Switchesintheexchangeofficerespondedtothecalledparty.Whentheconnectionwasestablished,thetwotelephonecommunicatedovertransformercoupledloopsusingthecurrentsuppliedbytheexchangeofficebatteries.
(b)Initiatingacall:
Thesituationwherethe“receiver”handsetwasliftedfromitscradlewascalledtheoff-hookcondition.Theoff-hooksignalinformedtheexchangethatsomeonewantedtomakeacall.Theexchangesentadialtonetothecallerphonetoletthecallerknowthattheexchangewasreadytoacceptatelephonenumber.
(c)Sendinganumber:
Sometelephonesetsthetelephonenumbersbydialpulseswhileothersentitbyaudiotones.Inthisstudy,audiotonetelephonesetswereused.Thesesetshadapush-buttonkeypadwith12keys.Pressingoneofthekeyscausedanelectroniccircuitinthekeypadtogeneratetwooutputtonesthatrepresentedthenumber.ThesetonesarecalledDualToneMultifrequency(DTMF)signals.
(d)ConnectingthePhones:
Theexchangeofficehadvariousswitchesandrelaysthatautomaticallyconnectedthecallerandthecalledphones.Ifthecalledphonehandsetwasoff-hookwhentheconnectionwasattempted,abusytonewasgeneratedbytheexchangeofficeandwasretunedtothecallerphone.Otherwise,aringingsignalwassenttothecalledphonetoalertthecalledparty.Atthesametime,aringbacktonereturnedtothecallertoindicatethatthefailedphonewasringing.
(e)AnsweringtheCall:
Whenthecalledpartyremovedthehandsetinresponsetoaring,thelooptothatphonewasclosedandaloopcurrentflowedthroughthecalltelephone.Theexchangeofficethenremovedtheringingsignalandtheringbacktonefromthecircuit.
(f)EndingtheCall:
Intoday’smostswitchingsystems,thecallwasended,theconnectionwasreleased,onlywhenthecallingartywenton-hook.
SYSTEMDESIGN
ThesystemwasdesignedtoreceiveandrespondtotheDTMFsignals.Hence,thecallerpartyshoulduseatelephonesetequippedwithaDTMFkeypadforsendinganumber.Telephonesets,usingtheDTMFmethodforsendingatelephonenumbe,wereequippedwithapush-buttonkeypadwith12keyswhichrepresentedthenumbersthrough0to9andthesymbol*and#.Seefigure3.PressingoneofthekeyscausedtheDTMFgeneratortogeneratetwotonesinthevoiceband(300-3,000Hz).Therewasalowfrequencytoneforeachrowandahighfrequencytoneforeachcolumn.Pressingkey5,forexample,generateda770Hztoneanda1,336Hztone.Byusingthedualtonemethod,12uniquecombinationswereproducedfromonlyseventoneswhenthe12positionkeypadwasused.
FigureA.3:
DTMFKeypadandFrequencies
Keypad
HighFrequency(Hz)
1209
1336
1477
1633
LowFrequency
(Hz)
697
1
2
3
A
770
4
5
6
B
852
7
8
9
C
941
*
0
#
D
Thefrequenciesandthekeypadlayouthavebeeninternationallystandardized,butthetolerancesonindividualfrequenciesvariedindifferentcountries.TheNorthAmericanstandardswere*1.5%forthegeneratorandf2.0%forthereceiver.ThetoneshavebeenselectedcarefullysothattheDTMFreceiverintheexchangeofficewouldnotconfusethemwiththeothertonesthatmightoccuronth6line.TheseDTMFtonesfromtheexchangeweretransmittedthesameasspeechoverthetelephoneline.ThispermittedustoreceivetheDTMFtonesbyoursystem'sDTMFReceiverifanynumberwaspressedonthekeypad.
(a)DTMFReceiverCircuit:
ThetaskoftheDTMFReceiverwastodetectthepresenceofavalidtonepaironatelephonelineorothertransmissionmedium.Thepresenceofavalidtorpairindicatedasingledialleddigit.Inordertogenerateavaliddigitsequence,eachtonepairshouldbeseparatedbyavalidpause.ThefollowingtableshowedtheestablishedBellsystemstandardsforavalidtonepairandavalidpause:
Low-GroupTone:
697or770or852or941Hz
High-GroupTone:
1209or1336or1477or1633Hz
FrequencyTolerance:
for(1.5%+2Hz)
AmplitudeRange:
-24dBm.GA<+6dBm@600Ohm
ToneDuration:
40msorlonger
PauseDuration:
40msorlonger
Figure2showedthecompletecircuitfortheDTMFreceiver.ThecircuitemployedtheRadio-Shack(276-1303)DTMFReceiverTC.TtwasacompleteDualToneMultifrequency(DTMF)Receivercircuitdetectingaselectablegroupof12or16standarddigits.
FigureA.2DTMFReceiver&TelephoneSourcecontroller
TheblockdiagramoftheDTMFreceiverinternalstructure.Theanaloginputsignalwaspreprocessedbya60-Hzrejectfilter,apreamplifierandalowpassfiltertoemphasizethesignalpart.Theoutputofthepreprocessorstagewasthensplitintotwofrequencybands,eachofwhichcontainedonlyoneDTMFtonegroup.
Theoutputofeachband-splitfilterwasamplifiedandthefollowingzero-crossingdetectorconvertedthesinusoidalsignalstosquarewaves.Thesesquarewaves,passedthroughtonefrequencybandpassfilterstogeneratetheindividualfrequenciesineachtonegroup.Eachbandpassfilteroutputwasdetectedbyanamplitudedetectorandfedtoatimingcircuittodeterminethedetectionvaliditywithin40ms.Thedetectoroutputwasalsofedtoanoutputdecodertodecodethetonestotheirequivalentbinarynumbers.Thetimingcircuitryproducedthecontrolpulses,foranoutputregister.Forexample,thedatastrobefromthetimingcircuitenabledthedecoderoutputstobelatchedattheregisteroutputsDl.D2.D4.D8.Theregisteroutputsbecamevalidafteratonepairhasdetectedandtheywereclearedwhenavalidpausehasarrived.TheoutputformatwasprogrammedbytheHEX/B28pin.WhenHEXB28=1,theoutputwashexadecimalandwhenHEX.B28-0.theoutputwasabinarycode.Thefollowingtablesshowedthetwooutputformats.
A.B,CandDwereusedforextendedkeypads.TheDataValid(DV=l)pinindicatedavalidtonepairwassensedanddecodedattheoutputpinsofDl,D2,D4andD8.DVremainedhighuntilavalidpauseoccurred.Asshowninfigure4.theinputpins9and10ofDTMFreceiverICwereconnectedtoanIsolationtransformerwhichwasusedtoisolatethetelephonelinegroundfromthedigitalground.Pin10wastiedtothedigitalground,whichwastheinputground.TheRingterminalofthetelephonelinewasconnectedtooneterminaloftheIsolationtransformerandtheothertransformerterminalwasconnectedtooneendofarelay.TheotherendoftherelaywasconnectedtooneterminalofacapacitorwhichalloyedACsignalstopassthrough.ThesecondterminalofthecapacitorwasconnectedtotheTipterminalofthetelephoneline.TherelayprovidedthecontrolofconnectingtheDTMFreceivertothetelephonelineviathePC.ItalsoprotectedtheDTMFreceiverfromtheringsignalsthatcoulddamageit.Theringsignalswereintherangeof40to130Vrmsand16to60Hz.Thetypical1U.S.valueswere90Vrmsand20Hz.Pin4wastiedtothegroundtoenablethedetectionoftonepairs.Pin2wastheHEX/B28pinanditwastiedtohightoshow-thattheoutputwasinhexadecimal.Pin3wastiedtohigh,whichconfiguredtheoutputstohepushpull.Pins1,16,17and18,theoutputpinsandpin14,thedatavalid(DV)pinwereconnectedtothe1/0interfacecardviaHEXinverters.Pin7wastheICground.Itwastiedtothedigitalgroundwhichwasprovidedfromthe1/0interfacecard.Pin15(CLRDV)wasalsotiedtothedigitalgroundtoshowthattheDataValid(DV)wasclearedbyavalidpauseonly.Pin5wastheICpowersupply(+5)whichwasprovidedfromtheI/Ointerfacecard.TheICcrystalwasconne