Back

Infra-red Protocols

Carrier

Consumer infrared is usually transmitted on a nominal 38KHz carrier - sometimes 36KHz or 40KHz. There are other frequencies, but these are generally only for specialist use

The carrier frequency indicates how rapidly the IR transmitter actually flashes on and off. When the transmitter is flashing at the nominated frequency, this is treated as logically 'ON'. The reason for using a pulsed transmitter is to make receivers more resistant to interference - it is unlikely that interference will be broadcast on exactly the same frequency.

Phase Modulation

From here1 and here2

Phase modulation relies on the change of state of the transmitter (either from 0 to 1 or 1 to 0) in order to encode the data. This mechanism uses a clock pulse, running at twice the data rate, and XORs the data with the clock. Thus, each bit of data is XORed with a clock at both 0 and 1

ClockDataResult
000
011
101
010

So the bit sequence for data bits are:

Data BitOutput Sequence
001
110

Philips RC-5 Protocol

The RC-5 Protocol uses Phase Modulation in the polarity specified above. The packet format is:

BitMeaning
0Start bit - logic 1
1Field bit - MSb of Command Code
2Control bit - toggles with each key press
3-7System address (5 bits) MSb transmitted first
8-13Command code (6 bits) MSb transmitted first

Due to Manchester coding, each packet would be expected to be 28 bits in length - then decoded using the Phase technique into 14 bits, as above

Pulse Width Modulation

From here3

Either the ON time or the OFF time is fixed, the other varies for 0 or 1

e.g. (Sony scheme)

DataON/OFF time (microseconds)
0600/600
11200/600

Most schemes have a Preamble and Postamble component to their packets

Sony

Encoding

Frequency:40KHz (pulse=25 microseconds)
Burst time:24 cycles (600 microseconds)
Lead in:2400 microseconds ON / 600 microseconds OFF
Data 0:600 microseconds ON / 600 microseconds OFF
Data 1:1200 microseconds ON / 600 microseconds OFF
Lead out:Additional OFF time of 990 microseconds

Note that the OFF time is constant, except for the lead out

Packet structure

Version AVersion BVersion C
Lead inLead inLead in
7 bits7 bits7 bitsCommand ID (LSb transmitted first)
5 bits8 bits13 bitsDevice Code (LSb transmitted first)
Lead outLead outLead out

NEC

Encoding

Frequency:40KHz (pulse=25 microseconds)
Burst time:22 cycles (550 microseconds)
Lead in:8550 microseconds ON / 4275 microseconds OFF
Data 0:550 microseconds ON / 600 microseconds OFF
Data 1:550 microseconds ON / 2400 microseconds OFF
Lead out:550 microseconds ON / 35675 microseconds OFF

Note that ON time is constant

Packet structure

Lead in
8 bitsDevice Code (LSb transmitted first)
8 bitsDevice Code compliment
8 bitsFunction Code (LSb transmitted first)
8 bitsFunction Code compliment
Lead out

External links

1http://en.wikipedia.org/wiki/RC-5
2http://en.wikipedia.org/wiki/Manchester_code
3http://www.hifi-remote.com/infrared/IR-PWM.shtml