infrared remote control switch 405 Method Not Allowed
-
Upload
romit-sharma -
Category
Documents
-
view
217 -
download
0
Transcript of infrared remote control switch 405 Method Not Allowed
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
1/18
Page1
RemoteControlsRadioFrequencyorInfraredWhitepaperbyMartinGotschlich,InfineonTechnologiesAG,2010
ContentRemoteControlsRadioFrequencyorInfrared....................................................................................1
Introduction.............................................................................................................................................
2
JointAspectsofIR andRFRemoteControls..........................................................................................2
IRdatacommunication...........................................................................................................................3
IRprotocols.............................................................................................................................................5
RFdatacommunication..........................................................................................................................8
BidirectionalRFRemoteControls......................................................................................................9
RFprotocols...........................................................................................................................................10
DifferencesbetweenIRandRF.............................................................................................................11
ThingstobeaddedgoingfromIRtoRF................................................................................................12
Receiver
wake
up
..............................................................................................................................
12
Synchronizationofreceiverwithincomingdataclock......................................................................13
Coding................................................................................................................................................13
UniqueIDandPairing........................................................................................................................13
RF2irExampleRFtoIRconverter.......................................................................................................15
RF2ir RoomforImprovement.........................................................................................................17
SummaryandConclusion......................................................................................................................18
Links.......................................................................................................................................................18
IRRemoteControls...........................................................................................................................18
RFtransmittersandreceivers...........................................................................................................18
RF2ir...................................................................................................................................................18
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
2/18
Page2
IntroductionDoyourememberthosetimeswhenyouneededtostandupandsteptoyourtelevisionsetto
changechannelsortunethevolume?Orareyouyoungenoughandalreadygrownupwithan
infraredremotecontrolinyourhands?Nodoubt,thecomfortprovidedbyremotecontrolsis
essentialinoureverydaylife.Infrared(IR)remotecontrolshaveprovenbeingacostefficientsolution
forcontrollingmanykindsofelectronicdevices:Homeentertainment,aircondition,homelighting.
Buttherearesomelimitationsanddisadvantagesusinginfraredlightasthemedium.Duringrecent
yearsthereisastrongtrendtowardsradiofrequency(RF)remotecontrols.Deliveringevenmore
comfortfortheuser,thebillofmaterialscouldbeshrunktoacompetitivelevelandnowbeing
competitivewithIR.
InthispaperyouwillreadaboutthedifferencesbetweenIRandRFremotecontrolsnotonlyfrom
theusersviewbutalsofromtheengineersviewwhohastodesignsuchremotecontrolsystems.
JointAspects
of
IR
and
RF
Remote
Controls
Theremotecontrolleritself,alsocalledtransmitter,isamobiledeviceandhastoprovidegood
usabilityinhumanshand.Theonlyreasonablepowersourceisbatteries.Regardlessofusing
disposalorrechargeablebatteries,AAcell,AAAcell,9VPP3blockorbuttoncellbatteries,minimum
powerconsumptionisoneofthemostimportantrequirements.Notonlytheactivemodesupply
currentdirectlyfollowingabuttonpressisofinterest(upto500mApeakcurrentinIRemitting
diodes).Evenmorechallengingisalowidlecurrentduringtimeswhennobuttonispressed.
Theactivecurrentisbasicallydefinedbytheoutputpowerofthetransmitterandthedurationof
sucharemotecommand.DifferentprotocolsforIRandRFareestablished,someofthemare
standardsoratleastdefactostandards.Allofthemshowadifferentnumberofinformationbits,
differentmodulationandcoding,anddifferentdatarates.Whilesingleeventcommandsarerather
short(e.g.poweronorchannelup)therearealsotuningcommandswhereabuttonishelddown
foralongerperiod(e.g.volumeup).Whenselectingordefiningsuchaprotocoltheengineerhasto
findatradeofftakingthefollowingparametersintoaccount:
Bitlengthofcommanddataframe:Thelowerthenumberofbitsinaframe,thelowertheenergyconsumption.Ontheotherhand,longerframesallowlongersynchronization
patternsandmorepayloadinformationcontent.
Bitrate:Higherbitratesresultinshorterdurationoftransmission.Ontheotherhand,higherbitratesrequirefasterreceiverhardwareandhigherbandwidthforradioremotecontrols.
Reliability:Stabilityofthelinkmaybeincreasedbyadditionalerrordetectionbitsinthedataframe(e.g.CRC).
Receiverarchitecture:Dependingonthereceiverandmodulationconcept,theprotocolpossiblymustbyfreeofDCcomponents(seeManchesterCoding)andmustprovidea
suitableruninsequencegivingthereceiverthechancetoadapttochangingmedia
conditions.
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
3/18
Page3
Thepowerdowncurrentisdefinedbythemicrocontrollerdesignwaitingforawakeuptriggeredby
abuttonpress.Highendremotecontrollersmayofferadditionalfeatureswhichfurthercontribute
totheoverallpowerconsumption:Illuminationofthepushbuttons,LCDs,selflearningfeaturesand
manymore.
Oneinteresting
topic
is
the
need
for
security.
Depending
on
the
application
there
may
be
the
requirementforasecurelinktoavoidmisuseofthecontrolleddevice(e.g.remotekeylessentryfor
automotiveorgaragedooropeners).Suitableencryptionalgorithms(e.g.AES,XTEA,..)and rolling
codemechanismschangingthetransmittedbitpatterneachbuttonpressarecommonlyusedfor
securityrelevantremotecontrollers.Theexchangeofencryptionkeysintroducessomeadditional
complexitytothesecuresystem.Furthermore,encryptionanddecryptionareconsumingadditional
powerregardlessofbeingimplementedinahardwareengineorinmicrocontrollerfirmware.
Incontrasttothemobileremotecontroller,thecontrolleddevice(e.g.TVset)istypicallymains
supplied.Butthisfactdoesnotrelaxthedemandforlowestpowerconsumption.Beingreadyto
receivecommands
at
any
time
during
stand
by
(waiting
for
power
on
command)
this
is
an
essential
contributortotheelectricalenergyconsumptioninhouseholds.Thiswasteofenergyisnotcaused
bythereceivercircuititselfbutmainlybybadefficiencyofpowersuppliesespeciallywhenoperated
atcurrentconsumptionmuchlowerthanitsnominalvaluesrequiredforpoweronoperation.The
EuropeanUnionhasissuedregulationslimitingthestandbypowerconsumptionofelectrical
equipmentto2Watt(1Wattfrom2014onwards).
IRdatacommunicationInfraredremotecontrolsuseinvisiblelightpulsesbelowthevisiblewavelengthspectrum(approx.
950nm).In
terms
of
its
radiation
behavior
it
is
like
any
other
visible
source
of
light:
There
must
be
a
lineofsightbetweenthetransmitter(lightsource)andthereceiver(lightdetector).Anyobstacles
betweentransmitterandreceiverwillpreventfromcorrectreception.Undergoodconditions
scatteredlightorlightreflectedfromwallsmaykeepthesystemworking.Havingwallsbetweenthe
remotecontrollerandthereceivingdevicewilldefinitelydisabletheremotecontrol.Thisobvious
disadvantageofIRremotecontrolssimplifiestheprotocolatthesametime.Allremotecontrolsfor
thesamedevicemodelmayuseidenticalcoding.Thereisnoneedforexplicitpairingbetween
transmitterandreceiverwithdedicateduniquecodesasthedifferentiationisguaranteedbyoptical
separationofidenticaldevices.
Practicallythere
is
no
legal
regulation
of
the
maximum
emitted
light
power.
This
is
more
limited
by
powerconsumption(batterylifetime)andrange.Upto10metersisthetypicalrangeofinfrared
remotecontrolsassumingperfectconditions(controllerphysicallyorientedtowardsthereceiver,no
obstacles,andnodisturbanceofotherlightsources).Tomaketheinfraredconnectionmorerobust
againstanyotherinfraredlightsources(e.g.electronicballastsoffluorescentlamps)theremote
controlsignalisonoffpulsedatafrequencyofapprox.38kHz.Thedatainformationismodulated
onthis38kHzcarrierusingonoffkeying.Thebitinformationisrepresentedwithpulsedistance
codingorBiPhase(Manchester)coding.
Theadvantagesofinfraredremotesystemsareobvious:Withaverylowbillofmaterialsonboth,
thetransmitter
and
receiver
side,
they
are
widely
used
in
many
lowest
cost
applications.
On
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
4/18
Page4
transmitsidethereisjusttheneedforaverysimplemicrocontroller.Thenumberofrequiredinput
andoutputpinsisbasicallydefinedbythenumberofbuttonsonthecontroller.TheIRLEDissimply
connectedtooneoftheoutputpinsofthemicrocontrollerdirectlyor insomecasesdrivenbyan
additionaltransistorstage.Asatimebaseacrystalisratheroverengineered;mostdesignsrelyona
cheapceramicresonatororevenaRCoscillatorwithratherpoorfrequencystability(upto+/5%
maybetoleratedbythereceiver).Disposalbatteriesarethefirstchoiceforthepowersupply.Asthe
dimensionsoftheremotecontrollercasearemainlydefinedbythenumberofbuttonsand
ergonomicaspectsthereisenoughspaceforcheapestAA orAAAcells.
Figure1:Blockdiagramofatypicalinfraredremotecontroller
Onthereceivesidethebillofmaterialsisbasicallydefinedbytheinfraredsensitivetransistor.
Today,manydesignsuseanintegratedinfraredreceivercomponentwhichnotonlyincludestheIR
transistorbutalsoademodulatorandanautomaticgaincircuit(e.g.TSOP1838,TSOP11xx,SFH506,
SFH5110).
Its
output
is
already
adigital
signal
with
clean
edges
for
easy
protocol
handling
by
a
microcontroller. Asthedatarateoninfraredisratherlow(approximately500to1000bitper
second)amicrocontrollerwhichisanywayinthereceivingdevicemayhandletheIRreceptionasa
sidetaskbysimplymeasuringthetimedistancebetweenedgesusingatimer.Therealdesign
challengeisthepowersupplyconceptsincetheremotecontrolreceivermustremainactiveevenin
standbymodeofthesystem.
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
5/18
Page5
IRprotocolsMostIRprotocolscontainthefollowinginformation:Adeviceaddresswhichisthesameforall
devicesofthesamemodeltypeandacommand(e.g.volumeup).Simplestrategiesimprovingthe
linkrobustnessarecommonlyused:Forexampleresendingofthesamebitpatterninaninverse
manner.Comparingthepayloadreceivedindifferentversionsenablesthereceiverdetectingerrors
inthereceivedbitstream.Suchframesaresimplyignored.SomeextendedfeaturesinIRprotocols
are:
Togglebitschangingtheirstatewitheachbuttonpressenablingthereceivertodistinguishcontinuousbuttonpressesfromrepresseseasily.
Batterydownbits:Assoonasthebatterycharginglevelofthetransmitterfallsunderacertainthresholdthisbitwillbeset.Thereceiverwillsignalizethistotheuserwhohasthe
chancetochangebatteriesbeforeasuddenbreakdown.
MostIRprotocolsuseoneofthefollowingmodulationtechniquesrepresentingone andzerobits
onthe38kHzcarrier:
Pulsedistancecoding:Thebitinformationisrepresentedinthedistanceofedges.Typically,thiscodingisnotfreeofDCcomponents.ButthisisnorealissueforIRreceivers.Itisrather
simpletodecodetheinformationinthereceiversmicrocontrollerbymeasuringthepulse
durationsusingatimer.
Manchestercoding:TheadvantageofManchesterCodingisthatitisfreeofDCcomponents.This
enables
receivers
to
perfectly
adjust
the
decision
threshold
between
incoming
high
and
lowlevels.Decodingisslightlymoredifficultinthereceiversmicrocontrollersincethe
directionoftheedgeinthemiddleofeachdatabithastobedetected(risingorfalling).
Findbelowthetimingdiagramsoftwotypicalinfraredprotocols.TheRC5protocolwasinitially
definedbyPhilipsandSIRCwasintroducedbySony.Botharewidelyusedforhomeentertainment
equipmenttoday.
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
6/18
Page6
Figure2:PhilipsRC5infraredprotocol
Figure3:SonySIRCinfraredprotocol(12bitversion)
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
7/18
Page7
Thesetwoprotocolexamples,RC5andSIRCdemonstratethetypicaldifferencesbetweencommon
IRprotocols.WhileRC5isusingManchesterCoding,SIRCisusingPulseDistancecoding.RC5
transmitsmostsignificantbits(MSBs)first;SIRCLSBsfirst.SIRCisusingareservedstartbitsymbol
foreasieridentificationofframestartbythereceiver.RC5providesatogglebitwhichenablesthe
receiverdistinguishingrepetitivebuttonpressesfromcontinuousbuttonpresses.Witheachnew
buttonpressthestateofthetogglebitwillbesimplyreversed.
AgoodsourceforfindingmoreinformationaboutinfraredprotocolsistheLinuxInfraredRemote
Controlproject(LIRC):http://www.lirc.org.LIRCdefinesadescriptionformatforallkindsofinfrared
protocols.Actually,theformatsofallIRprotocolsonthemarketcanbefoundontheinternetin
LIRCconfigfilerepresentation(seehttp://lirc.sourceforge.net/remotes).
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
8/18
Page8
RFdatacommunicationRadiofrequencycommunicationuseselectromagneticwavesastransmissionmedium.Their
propagationpropertiesallowconnectionsofextremelyhighdistances.Electromagneticwavespass
throughnonshieldingmaterialstosomeextent(e.g.concretewalls).Thisattractivenessdemands
somelimitationenforcedbyworldwideregulationsdefinedbystandardizationgroups(e.g.ETSI,
FCC,).Forallregionsoftheworldthereexistbindingregulationscoveringfollowingaspects:
Frequencybands(spectrum) Maximalpowerofemittedradiowaves Bandwidthofemittedsignal Durationofemissions(dutycycle) Purposeofemission(e.g.TVbroadcast,mobilephonenetworks,authorityscommunication,
generalpurpose)
LicensefeesForremotecontrolapplicationstherearesomelicensefreebandsavailable,thesocalledISMbands
(industrial,scientificandmedicalbands).ForRegion1(Europe,Africa,formerSovietUnion)themost
attractivefrequencybandisat434MHz,forNorthandSouthAmericaat902928MHz.
Additionally,inEuropetheSRDband(shortrangedeviceband)at868MHzandintheUSthe
frequencybandat315MHziscommonlyusedforremotecontrols.Analternativewithworldwide
compatibilityisISMbandat2.4GHz.Unfortunately2.4GHzrequireshigherpowerconsumptionat
comparablerangeandthereforehighercost.Practically,RFremotecontrolsuse315,434or868MHz
asRFcarrierfrequency.
ThepayloaddataneedstobemodulatedontheRFcarrier.Basically,therearetworathersimple
modulationtechniquespopular:AmplitudeShiftKeying(ASK)andFrequencyShiftKeying(FSK).For
powerconsumptionreasons,ASKismostlyimplementedasOnOffKeying(OOK).Thatmeans,the
carrierissimplyturnedonandoff(asthisisdoneforinfraredcommunicationdescribedabove).
Transmittersforbothtechniques,OOKandFSK,maybeimplementedasClassCpoweramplifiers
resultinginhighpowerefficiency.WithOOKthereisnoneedtochangethecarrierfrequencyatall.
Inthiscase,SAWbasedtransmittersarethefirstchoiceifsomefrequencytoleranceisaccepted.
UsingcrystalstabilizedPLLsynthesizersallowhigheroutputpowerastheydonotneedanysafety
marginsintermsoftheregulationslimits.ForFSK,SAWbasedtransmittersmaybeusedonlywith
somelimitationsandtricksastheoutputfrequencymustalternatecontinuously.Therefore,FSKis
preferablyimplementedwithPLLsynthesizerswhichallowexactgenerationofbothfrequenciesby
digitallyswitchingthedividerfactorofthePLL.Generally,FSKprovidesbetterrobustnessagainst
disturbersatthepriceofhigherhardwarecomplexityandslightlyincreasedpowerconsumption.
Someknowhowandeffortmustbespentforthedesignoftheantennaitselfandthematching
networkbetweenantennaandTx orRxIC.Modernsoftwaretoolssimplifythedesignerslifein
doingthisimportantdesignstep.Thechallengeisfindinganantennadesignorconceptwhich
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
9/18
Page9
representsaperfectcompromisebetweencostandperformance.Furthermore,acleanRFdesignis
essentialformeetingtheradioregulations.
BidirectionalRFRemoteControls
HighendremotecontrolsmaybebasedonbidirectionalRFlinks.Inadditiontothelinkfromthe
remotecontrollertothecontrolleddevicethereisanadditionallinksbackwardsfromthedeviceto
thecontroller.Thisbackwardslinkmaybeusedforseveralpurposes:
Securingtherobustnessoftheremotelinkbyusinghandshakeprotocols:Thecontrolleriswaitingforapositiveacknowledgethatthecommandwassuccessfullyreceived.Otherwise,
itwillstartanewtransmissionattempt(maybewithhigheroutputpoweroronadifferent
RFchannel).
Givingfeedbacktotheuser:Adisplayontheremotecontrollermayvisualizeinformationfromthecontrolleddevice(e.g.devicestatus).Thismaybeofspecialattractivenesswhen
thereis
no
line
of
sight
between
the
user
and
the
remote
controlled
device.
BidirectionalRFlinksareimplementedusingsocalledRFtransceiverICswhichincludeanRFreceiver
andRFtransmittersharingonesinglePLLandusingonesingleantenna.InfineonsTDA7255Visa
typicalexampleofsuchaRFtransceiverIC:http://www.infineon.com/TDA7255V.
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
10/18
Page10
RFprotocolsBasically,RFremotecontrolprotocolshavetorepresentthesameinformationasIRremotecontrol
protocols:Deviceaddressandcommand.But,communicationviaRFdemandssomeadditional
measures(seechapterThingstobeaddedgoingfromIRtoRFbelow).Thepowerconsumptionofa
RFtransmitterisnotashighasofanIRLEDandmaximumdataratesofaRFlinkarehigherresulting
inframeswithshorterduration.Asaconsequence,frameswithahighernumberofbitsandmore
informationcontentarepossibleusingRFwhilesavingbatterylifetimeatthesametime.Thisfact
enablessomemorefancyfeaturesforRFremotecontrols.
EachRFremotecontrolrequiresauniqueID.ThismaybecomparedwiththedeviceaddressofIR
remotes.TheonlydifferenceisthatIRusesthesameaddressforthewholeseriesofdevicesofthe
samemodeltypewhereasRFremotesuserealuniqueIDsmeaningthateachtransmitterworldwide
hasanotherID.Therefore,thebitlengthreservedforRFIDsislonger(e.g.3240bit).
Asmentioned
above
some
IR
protocols
provide
atoggle
bit
for
identification
of
successive
button
presses.SomeRFprotocolsevenimplementacountersignalizinghowoftenabuttonwaspressed
repeatedly.
ForimprovedrobustnessoftheRFlinkCRCvalues(cyclicredundancycheck)areoftengeneratedand
transmittedaspartoftheframe(e.g.8bit).Thereceivermayclearlyidentifyanybiterrorsby
recalculatingtheCRCvalueofthereceiveddataframeandcomparingitwiththeonegenerated
beforetransmission.
Thetransmittersbatterycharginglevelmaybesignalizednotonlybyasinglebit(batterylowbit)but
evenwith
acomplete
4bit
or
8bit
data
field
representing
the
measured
battery
voltage.
Additionalsecuritymaybeintroducedbyrollingcodeschangingsomebitswitheachbuttonpress
(e.g.simple16bitcounter)andencryptionofthecompleteoratleastapartofthepayload(e.g.AES
orXTEA).
FindbelowatypicalexampleofRFremotecontrolprotocolasimplementedinInfineonsPMAfob
applicationexample(seehttp://www.infineon.com/PMAfob):
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
11/18
Page11
Figure4:PMAfobRFremotecontrolprotocol(XTEAencryptionmode)
DifferencesbetweenIRandRFFollowingtablesummarizesthegeneraldifferencesbetweenIRandRFremotecontrols:
Infrared RadioFrequency
Powerconsumption
transmitter(activeduring
transmit)
20150mA(sometimesupto
500mApeak)dependingon
numberof
LEDs
and
range
520mA
Powerconsumption
transmitter(standby)Dependingonmicrocontrolleridlecurrent(
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
12/18
Page12
BitlengthofframeRestrictedbybatterylifetime
(typicallymax.40bitperframe)
Typically,80140bitpossible.
Forextendedfeatureslike
security,robustnessand
additionalstatusinformation
(e.g.batteryvoltagestatus).
Datarate Typ.500bit/s1kbit/s Upto100kbit/s
Regulation Nolimitations
Regulatedinworldwide
standards(ETSI,FCC,).
Needforcompliancetests.
Expecteddesigneffort Low
Low(usingRFmodules),higher
whenimplementingoptimized
antennaandmatching
ThingstobeaddedgoingfromIRtoRFThemanifoldadvantagesofRFoverIRmotivateengineerstoconvertexistingremotecontrol
systemsfromIRtoRF.
ReplacinganIRLEDbyaRFtransmitter(module)andanIRreceiverbyaRFreceiver(module)is
notabigdeal.Behindthissimplesentencethereissomeconsiderabledesigneffortbehind.While
theIR
hardware
is
rather
simple
(an
IR
diode
as
transmitter
and
an
integrated
IR
receiver
component
withadigitaloutputsignalasareceiver),RFhardwareismorecomplex.Asimplesolutionmaybe
theuseofRFmoduleswhichcompriseallnecessarycomponentsonasmallPCB.Theoptimal
solutionisadedicatedtransmitterandreceiverdesign.Thisgivesthechancetousespecificantenna
designsandasuitableantennamatchingdesign.
Anyway,inmanycasestheeffortshallbeaslowaspossibleandthechangesontransmitterand
receiversideshallinterferewiththerestofthesystemtoaminimalextentonly.Thenaiveideato
keeptheIRprotocolbasicallyunchangedandtomodulatethesamedataframeonaRFcarrier
seemsbeingasmartsolution.Unfortunately,thiswillnotworkforthefollowingreasons:
Receiverwakeup
Asmentionedabove,lowstandbypowerconsumptionofthereceiverisanessentialrequirement.
WhileanIRreceivermayremainpoweredatconsiderablelowconsumption(approx.1mA),anRF
receiverisconsuming5mAorevenmore.Toovercomethisissueasuitablepollingschememaybe
applied.Duringpollingthereceiverisswitchedonforashorttimeperiodtocheckwhetherthereisa
validsignalavailable.Ifnot,thereceiverfallsbackinpowerdownmodeimmediately.Dependingon
thepollingintervalasuitableRFprotocolhastobedesigned.Afterpressingabuttonontheremote
controllerapredefinedruninsequencebeinglongenoughmustbesentgivingthereceiverthe
chancetowakeupaftertheendofthepollinginterval.
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
13/18
Page13
Synchronizationofreceiverwithincomingdataclock
Infraredprotocolsareveryrobustintermsoftimingaccuracy.Evenwithconsiderablehighclock
instabilitiesitispossibletodistinguishzero andonebits.RFcommunicationismuchmoresensitive
onclockerrors.Therefore,thereceiverhastomeasuretheincomingdataframeclockbeforestarting
payloaddecoding.
Long
enough
preamble
(run
in
and
sync
patterns)
with
fixed
content
(e.g.
0000001)intheprotocolenabletheRFreceivertosynchronizewiththeincomingsignalsclock.
Coding
Infraredcommunicationisratherrobustagainstdisturbers(e.g.sunlight)usinga38kHzonoff
modulation.Incontrast,RFismuchmoresensitivetonoise.Therefore,RFreceiversautomatically
adjusttheirzeroonedecisionthreshold(dataslicer)basedontheincomingdatasignal.Inorderto
haveawellpositioneddecisionlevel,zero andonebitsmustbedeployedinabalancedoccurrence.
ThisisimplementedbycodingtheactualpayloadwithcodesbeingfreeofDCcomponents.Oneof
thecommonlyusedcodesforthispurposeisManchestercodingwhichrepresentseachbitofthe
payloadwithtwoconsecutiveunequalchips.Theactualbitinformationisrepresentedbythecenter
edgeinthemiddleofthetwochips. Arisingedgerelatestoaonebitafallingedgerelatestoazero
bit(orviceversa).
Figure5:
Manchester
Coding
(DC
free)
OnedisadvantageofManchestercodingisobvious:Actually,thenumberofbitsonthechannel
(calledchips)istwiceashightheninthepayloadaseachpayloadbitisrepresentedbytwochips.
Thatmeansthattheactualbitrateandbandwidthrequirementsaretwiceashighasforuncoded
data.
UniqueIDandPairing
AsIRcommunicationisrestrictedonalineofsightbetweentransmitterandreceiverthereislowrisk
thatidenticalsystemsintheneighborhoodareinfluencedunintentionally.Allmodelsofagiven
equipmenttype
are
using
the
same
identification
and
their
remote
controllers
are
exchangeable.
In
thissensethehigherrangeofradioremotecontrolsgoingeventhroughwallsturnsoutbeingkindof
aproblem.Thereishighprobabilitythatsomebodycontrolstheequipmentinanearbyroomwithout
intention.Asasolutiontothisproblem,RFtransmitterandRFreceiverhavetobepairedusinga
uniquecodeembeddedinthedataframe.Usually,eachRFtransmitterprovidesahardcodedunique
identifier.Thereceiverhastobepairedtoeachoftheassignedtransmittersduringapairing
procedurewherethereceiverlearnstheuniqueIDofagiventransmitter.Typically,thepairing
processisintroducedbypressingadedicatedbuttononthereceiverunit.ThenextreceivedIDwill
beaddedtothelistofpaireddevices.Innormaloperationthereceiverwillacceptonlydataframes
withIDcodesbeinglearnedduringpairingprocedurebefore.Allotherframeswithmismatching
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
14/18
Page14
codesaresimplyignored.Asaconsequence,thereceiverrequiresnonvolatilememory(e.g.
EEPROM,Flash,)tokeepthepairinglistevenduringpowerdown.
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
15/18
Page15
RF2irExampleRFtoIRconverterFollowingdesignexamplenamedRF2irperfectlyillustratesthedifferencesbetweenIRandRF
remotecontrolsystems.
Figure6:RF2irblockdiagram
Itrepresentsaconverterbetweenthetwoworlds:ReceivingRFcommandsandtransmittingrelated
IRcommands.OntheRFsideitiscompatiblewithInfineonsPMAfobremotecontroller.More
informationaboutthiskeyfobdesign,itsinternalhardwarebasedontheSmartLEWISMCU
PMA5105,thefirmwareandtheprotocolisavailablehere:http://www.infineon.com/PMAfob
Figure7:
PMAfob
fotos
of
housing
and
PCB
ForthisRFtoIRconverterthereisnotanyspecialencryptionforthedataframeimplementedasthis
isnotrequiredfortypicalhomeentertainmentsystems.InfineonsnewTDA7210Vsuperhetreceiver
demodulatestheincomingRFcommands.Thisrobustreceiverprovidesexcellentperformance
(sensitivityupto 118dBm),doesnotrequireanydigitalregisterconfigurationandisperfectlysuited
forconsumerapplicationswithitslowsizeVQFNpackage.MoreinformationabouttheTDA7210Vis
availablehere:http://www.infineon.com/TDA7210V
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
16/18
Page16
AnAtmelAVRATtiny44microcontrollerisusedtoreconstructthereceivedRFdataframe(clock
recovery,datasliceranddecoder),extracttheremotecontrolcommandandtobuildupanIRdata
framewithanequivalentcommandforbeingsentoutviaIR.TheAVRseriesiswellknowninthe
worldwideembeddedsystemscommunity.Powerfulsoftwaredevelopmenttoolsareavailablefor
free.ThefirmwareforthisdesignexamplewasdevelopedusingAtmelsAVRStudio4withGNUs
avrgcccompiler.AllsoftwareusedanddevelopedfortheRFtoIRconverterisfreeunderGNU
GeneralPublicLicense.
OntheRFsidetheRF2irfirmwareincludesaveryrobustandconfigurablealgorithmwhich
implementsthefollowingtasks:
RFcarrierdetection Clockrecoveryandsynchronization Manchesterdecodingofpayloaddata Payloadbitframeextraction
TheRFreceivealgorithmispurelybasedontimedistancemeasurementsbetweenedgesofthe
receiveddigitalsignalusinga16bittimerofthemicrocontroller.
OntheIRsidetheconverteremitscommandswhichcanbechosenoutofabroadvarietyof
protocolsdefinedbyvariousmanufacturers.AcomprehensivesoftwarelibraryforIRtransmission
waspublishedbyFrankMeyerundertheGNUGeneralPublicLicenseandisreusedfortheRFtoIR
converter.ThehomepageoftheIRSNDprojectislocatedhere:
http://www.mikrocontroller.net/articles/IRMP#SourceCode_IRSND(Germanonly).
ThisRF2ir
firmware
was
implemented
and
verified
using
ageneric
ATmega
16
evaluation
board
connectedtoaTDA7210Vevaluationboard.Withminimalchangesitwillbecompatibletothe
ATtiny44asproposedabove. ThesourcecodeispublishedundertheGNUGeneralPublicLicense
availablefordownload:http://www.infineon.com/RF2ir.
Followingmicrocontrollerfeaturesareutilized:
8bittimerforgenerationofthe38kHzinfraredcarrier 16bittimerfortimedistancemeasurementsbetweenedgesofthereceivedRFdatasignal
andalternativelyas10kHzclockforgenerationoftheIRdataframeoutput
Themicrocontrollersoscillatorwithan8MHzcrystalprovidetheclocksource.DependingontheconfiguredIRprotocol,theRF2irfirmwareexamplerequiresacodesizeof
approximately3300bytesandusesabout110bytesofrandomaccessmemory.
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
17/18
Page17
RF2ir RoomforImprovement
FocusduringdevelopmentoftheRF2irdesignwastheillustrationofdifferencesbetweenRFandIR.
Ifitcomestoamoreproductfocuseddesignthereshouldbesomeoptimizationtakeninto
consideration:
TheRF2irexampleusestwoseparatedcrystaloscillatorsfortheTDA7210Vreceiverandthe
microcontroller.FortheTDA7210Vtheclockaccuracyandstabilityofacrystalisabsolutely
mandatorybutforthemicrocontrolleraninternalRCoscillatormaybesufficient.Unfortunately,
thereisnowaytoderiveamicrocontrollerclockfromtheRFreceiversoscillator.
TheinfraredLEDisdirectlyconnectedtooneofthemicrocontrollersgeneralpurposeIOpins.The
availablecurrentissufficientforshortdistancesofafewmeters.Butforamorepowerfullight
sourceandawiderrangeadriverstage(onetransistor)fortheLEDisrecommended.
Intheexistingdesigntherewasnofocusonpowerconsumption.Oneideamaybeadaptingthe
designtotherequirementsofabatterypowersource.ThatmeansmakinguseoftheTDA7210V
powerdownmodeandapollingstrategytowakeupandsynchronizetheconverterjustintime
beforethepayloaddataiscomingin.ForsuchapollingschemeanadaptationoftheRFprotocoland
theruninsequenceshouldbetakenintoconsideration.
InthisinitialversionofRF2irtheuniqueidentifierofthetransmitterisnotevaluated.Thereceiver
reactsonanyreceivedframesignoringthetransmittersidentificationcode.Inaproductiveversiona
pairingfunctionneedstobeaddedandnonassignedIDcodeshavetobeignored.
ThebasicimplementationofRF2irdoesnotcareaboutimprovedcommunicationrobustnessand
security.A
better
version
of
RF2ir
may
check
the
consistency
of
the
8bit
CRC
transmitted
by
the
PMAfobtransmitterembeddedinthedataframebydefault.Furthermore,encryptionofthe
communicatedpackage(e.g.AES)andarollingcodemaypreventfrommisuse.
-
7/30/2019 infrared remote control switch 405 Method Not Allowed
18/18
Page18
SummaryandConclusionRFremotecontrolsprovidemultipleadvantagesfortheusercomparedtoIRremotes.Most
importantistheRFrangesincetheradiosignalsevenpassconcretewalls.Thereisnoneedforthe
usertotargetatthereceiver.HighrobustnessofRFlinksresultinincreasedusabilityandcomfort.
OntopofthatRFcommunicationenablesthedesignertoimplementnewfeaturesandsecurity.
LowerpowerconsumptionforRFtransmitterallowsforsmallerbatterieswhichdonthavetobe
replacedformanyyearsofuse.
DesigneffortandbillofmaterialsforRFremotecontrolsisalreadyintherangeofIRremotessince
integratedtransmitter andreceiverICssimplifytheschematicatoptimalperformance.
Comprehensivedocumentation,toolingandexampledesignsreducethedesignineffort,especially
whenusingcomponentsfromInfineonTechnologies.
Links
IRRemoteControls
Collectionofwwwlinksaboutinfraredremotecontrol:
http://www.epanorama.net/links/irremote.html
LinuxInfraredRemoteControlproject(LIRC):
http://www.lirc.org
LIRCconfigfilesofmanydevices:
http://lirc.sourceforge.net/remotes
RFtransmittersandreceivers
GeneraloverviewofInfineonsWirelessControlproductportfolio:
http://www.infineon.com/wirelesscontrol
IntegratedmicrocontrollerandRFtransmitterSmartLEWISMCUPMA71xx:
http://www.infineon.com/PMA
PMAfob DesignexampleofanRFremotecontrolbasedonPMA7105:
http://www.infineon.com/PMAfob
TDA7210V ASK/FSKSingleConversionRFReceiverIC:
http://www.infineon.com/TDA7210V
RF2ir
SourceCodeandHWdesignexampleincludingschematicandPCBlayout:
http://www.infineon.com/RF2ir