外文翻译基于电话线的PC远程控制家用电器.docx
《外文翻译基于电话线的PC远程控制家用电器.docx》由会员分享,可在线阅读,更多相关《外文翻译基于电话线的PC远程控制家用电器.docx(10页珍藏版)》请在冰豆网上搜索。
外文翻译基于电话线的PC远程控制家用电器
PCREMOTECONTROLOFAPPLIANCESBYUSINGTELEPHONELINES
ABSTRACT
TheideaofHomeAutomationusingtelephonelinesandaPCwasshowninthisstudy.ThesystemwasbasedontheDualToneMultifrequency(DTMF)signalsthatcouldbesentthroughaloopofwiretoswitchon/offvariousappliancesviaaPersonalComputer(PC).ThesystemhardwareandsoftwareweredesignedbasedontheTelephoneStandards.ThehardwarepartincludedtheDTMFreceiverOn/OffHookdetector,RingdetectorandanInput/OutputPCInterfacingcard.Anexampleofcontrollinganappliancewasprovidedinthestudy.ThesoftwarecontrolprogrammingwaswritteninTurboBasicandtheirflowchartsarepresentedhereforthereader'sattention.
INTRODUCTION
HomeAutomationthatwasintroducedinthisstudywasimplementedbydesigningthe"SmartControlSystemthatControlsAllAppliancesRemotelybyPhone".ThedesignwasbasedontheTelephonyStandardswhichmeantthatthesystemwasqualifiedtobeinstalledonthepublicswitchingsystems.ThesystemdesignwasutilizingtheDualToneMultifrequency(DTMF)signalsthatcouldbeproducedbythetelephoneset.Thesesignalsweresentfromtheuserendthroughtheloopwiretothedestinationend,wherethecontrolsystemwasstationed.Thesystemconsistedofthreemajorparts.ThefirstpartwastheringdetectorandDTMFreceiver.ThesecondpartwastheInput/Outputinterfaceunit.ThethirdpartwasthepersonalcomputerwhichwasprogrammedwithTurboBasicSoftwaretoperformtheonlineoperations.Blockdiagramofthesystemwasshowninfigure1.
Figure1:
SmartcontrolsystemtocontrolAppliancesremotelybyphone
BRIEFOPERATIONOFATELEPHONESET:
Asummaryofthetelephonesetoperationwasgivenhereforthereadertovisualizethesystemoperation.Blockdiagramofatelephonesetisshowninfigure2.
(a)Localloop:
Eachsubscribertelephonewasconnectedtoanexchangeofficethatcontainedtheswitchingequipment,signallingequipmentandbatteriesthatsuppliedthedirectcurrenttooperatethetelephone.Eachphonewasconnectedtothecentralofficethroughalocalloopoftwowirescalledawirepair.OneofthewireswascalledT(fortip)andtheotheronewascalledR(forring)whichreferredtotheTIPandRINGpartsoftheswitchusedinmanualswitch-boards.Switchesintheexchangeofficerespondedtothedialpulsesortonesfromthetelephonetoconnectthecallingpartytothecalledparty.Whentheconnectionwasestablished,thetwotelephonescommunicatedovertransformercoupledloopsusingthecurrentsuppliedbytheexchangeofficebatteries.
(b)Initiatingacall:
Thesituationwherethe"receiver"handsetwasliftedfromitscradlewascalledtheoff-hookcondition.Theoff-hooksignalinformedtheexchangethatsomeonewantedtomakeacall.Theexchangesentadialtonetothecallerphonetoletthecallerknowthattheexchangewasreadytoacceptatelephonenumber.(Thetelephonenumberwassometimesreferredasanaddress.)
(c)SendingaNumber:
Sometelephonesetssentthetelephonenumbersbydialpulseswhileotherssentitbyaudiotones.Inthisstudy,audiotonetelephonesetswereused.Thesesetshadapush-buttonkeypadwith12keys.Pressingoneofthekeyscausedanelectroniccircuitinthekeypadtogeneratetwooutputtonesthatrepresentedthenumber.ThesetonesarecalledDualToneMultifrequency(DTMF)signals.
(d)ConnectingthePhones:
Theexchangeofficehadvariousswitchesandrelaysthatautomaticallyconnectedthecallerandthecalledphones.Ifthecalledphonehandsetwasoff-hookwhentheconnectionwasattempted,abusytonewasgeneratedbytheexchangeofficeandwasreturnedtothecallerphone.Otherwise,aringingsignalwassenttothecalledphonetoalertthecalledparty.Atthesametime,aringbacktonewasreturnedtothecallertoindicatethatthefailedphonewasringing.
e)AnsweringtheCall:
Whenthecalledpartyremovedthehandsetinresponsetoaring,thelooptothatphonewasclosedandaloopcurrentflowedthroughthecalledtelephone.Theexchangeofficethenremovedtheringingsignalandtheringbacktonefromthecircuit.
f)EndingtheCall:
Intoday'smostswitchingsystems,thecallwasended,theconnectionwasreleased,onlywhenthecallingartywenton-hook.
Figure2:
Blockdiagram
SYSTEMDESIGN:
ThesystemwasdesignedtoreceiveandrespondtotheDTMFsignals.Hence,thecallerpartyshoulduseatelephonesetequippedwithaDTMFkeypadforsendinganumber.Telephonesets,usingtheDTMFmethod forsendingatelephonenumber,wereequippedwithapush-buttonkeypadwith12keyswhichrepresentedthenumbers0through9andthesymbol*and#.Seefigure3.PressingoneofthekeyscausedtheDTMFgeneratortogeneratetwotonesinthevoiceband(300-3,000Hz).Therewasalowfrequencytoneforeachrowandahighfrequencytoneforeachcolumn.Pressingkey5,forexample,generateda770Hztoneanda1,336Hztone.Byusingthedualtonemethod,12uniquecombinationswereproducedfromonlyseventoneswhenthe12positionkeypadwasused.
Figure3:
DTMFKeypadandFrequencies
Thefrequenciesandthekeypadlayouthavebeeninternationallystandardized,butthetolerancesonindividualfrequenciesvariedindifferentcountries.TheNorthAmericanstandardswere*1.5%forthegeneratorandf2.0%forthereceiver.ThetoneshavebeenselectedcarefullysothattheDTMFreceiverintheexchangeofficewouldnotconfusethemwiththeothertonesthatmightoccuronth6line.TheseDTMFtonesfromtheexchangeofficeweretransmittedthesameasspeechoverthetelephoneline.ThispermittedustoreceivetheDTMFtonesbyoursystem'sDTMFReceiverifanynumberwaspressedonthekeypad.
a)DTMFReceiverCircuit:
ThetaskoftheDTMFReceiverwastodetectthepresenceofavalidtonepaironatelephonelineorothertransmissionmedium.Thepresenceofavalidtonepairindicatedasingledialleddigit.Inordertogenerateavaliddigitsequence,eachtonepairshouldbeseparatedbyavalidpause.ThefollowingtableshowedtheestablishedBellsystemstandardsforavalidtonepairandavalidpause:
Low-GroupTone:
697or770or852or941Hz
High-GroupTone:
1209or1336or1477or1633Hz
FrequencyTolerance:
for(1.5%+2Hz)
AmplitudeRange:
-24dBm.CA<+6dBm@600Ohm
ToneDuration:
40msorlonger
PauseDuration:
40msorlonger
Figure4showedthecompletecircuitfortheDTMFreceiver.ThecircuitemployedtheRadio-Shack(276-1303)DTMFReceiverIC.ItwasacompleteDualToneMultifrequency(DTMF)Receivercircuitdetectingaselectablegroupof12or16standarddigits.
Figure4:
DTMFReceiver&TelephoneSourcecontroller
TheblockdiagramoftheDTMFreceiverinternalstructure.Theanaloginputsignalwaspreprocessedbya60-Hzrejectfilter,apreamplifierandalowpassfiltertoemphasizethesignalpart.Theoutputofthepreprocessorstagewasthensplitintotwofrequencybands,eachofwhichcontainedonlyoneDTMFtonegroup.
Theoutputofeachband-splitfilterwasamplifiedandthefollowingzero-crossingdetectorconvertedthesinusoidalsignalstosquarewaves.Thesesquarewaves,passedthroughtonefrequencybandpassfilterstogeneratetheindividualfrequenciesineachtonegroup.Eachbandpassfilteroutputwasdetectedbyanamplitudedetectorandfedtoatimingcircuittodeterminethedetectionvaliditywithin40ms.Thedetectoroutputwasalsofedtoanoutputdecodertodecodethetonestotheirequivalentbinarynumbers.Thetimingcircuitryproducedthecontrolpulses,foranoutputregister.Forexample,thedatastrobefromthetimingcircuitenabledthedecoderoutputstobelatchedattheregisteroutputsD1,D2,D4,D8.Theregisteroutputsbecamevalidafteratonepairhasdetectedandtheywereclearedwhenavalidpausehasarrived.TheoutputformatwasprogrammedbytheHEX/B28pin.WhenHEX/B28=1,theoutputwashexadecimalandwhenHEX/B28=0,theoutputwasabinarycode.Thefollowingtablesshowedthetwooutputformats.
A,B,CandDwereusedforextendedkeypads.TheDataValid(DV=l)pinindicatedavalidtonepairwassensedanddecodedattheoutputpinsofD1,D2,D4andD8.DVremainedhighuntilavalidpauseoccurred.Asshowninfigure4,theinputpins9and10ofDTMFreceiverICwereconnectedtoanIsolationtransformerwhichwasusedtoisolatethetelephonelinegroundfromthedigitalground.Pin10wastiedtothedigitalground,whichwastheinputground.TheRingterminalofthetelephonelinewasconnectedtooneterminaloftheIsolationtransformerandtheothertransformerterminalwasconnectedtooneendofarelay.TheotherendoftherelaywasconnectedtooneterminalofacapacitorwhichalloyedACsignalstopassthrough.ThesecondterminalofthecapacitorwasconnectedtotheTipterminalofthetelephoneline.TherelayprovidedthecontrolofconnectingtheDTMFreceivertothetelephonelineviathePC.ItalsoprotectedtheDTMFreceiverfromtheringsignalsthatcoulddamageit.Theringsignalswereintherangeof40to130Vrmsand16to60Hz.ThetypicallU.S.valueswere90Vrmsand20Hz.Pin4wastiedtothegroundtoenablethedetectionoftonepairs.Pin2wastheHEX/B28pinanditwastiedtohightoshowthattheoutputwasinhexadecimal.Pin3wastiedtohigh,whichconfiguredtheoutputstobepushpull.Pins1,16,17and18,theoutputpinsandpin14,thedatavalid(DV)pinwereconnectedtothe1/0interfacecardviaHEXinverters.Pin7wastheICground.Itwastiedtothedigitalgroundwhichwasprovidedfromthe1/0interfacecard.Pin15(CLRDV)wasalsotiedtothedigitalgroundtoshowthattheDataValid(DV)wasclearedbyavalidpauseonly.Pin5wastheICpow