In the last post (Understanding IR Remote Controls) I explained what IR is and why it is commonly used in remote controls. Now let's see some common encoding methods used in IR remotes.
As you know by now, the IR signals emitted by remote controls are modulated to a frequency between 30 KHz and 60 KHz. In order to send a command, it has to be encoded in to this signal. There are several encoding protocols of which the SIRC protocol introduced by SONY and the RC 5 protocol introduced by Philips are used more commonly.
SIRC
SIRC stands for 'SONY Infrared Remote Control Code'. It used 40 KHz modulated IR signals. The logic levels (0 and 1) are represented by the width of the IR pulse.
As you can see, the logic '1' is sent by a pulse of 1.2ms and then waiting 0.6ms. Similarly, logic '0' is sent by a pulse of a 0.6ms and then waiting 0.6ms. Those who are familiar will identify this as a sort of a pulse width modulation (I'll be doing a post on pulse width modulation too).
Since only one bit can be sent at a time, a command should be sent as a packet of data (serially). The structure of a SIRC data packet is as follows:
To initialize the data packet, an IR pulse of 2.4ms is sent and then waits for 0.6ms. This 3ms is called the start bit. Then, the command code is sent using seven bits (D0 to D6). The five bits after that (C0 to C4) is the device code, which defines what device this command is destined for. The standard device codes are shown below.
Here's an example data packet that uses SIRC protocol. This is the set of pulses sent when you press the volume button on a SONY remote control.
If you press and hold the button, the same data packet is repeated every 45ms.
I'll talk about the RC 5 protocol in the next post.
Special thanks to Vidusara newspaper, from which I gained this knowledge.
As you know by now, the IR signals emitted by remote controls are modulated to a frequency between 30 KHz and 60 KHz. In order to send a command, it has to be encoded in to this signal. There are several encoding protocols of which the SIRC protocol introduced by SONY and the RC 5 protocol introduced by Philips are used more commonly.
SIRC
SIRC stands for 'SONY Infrared Remote Control Code'. It used 40 KHz modulated IR signals. The logic levels (0 and 1) are represented by the width of the IR pulse.
SIRC Logic Levels |
Since only one bit can be sent at a time, a command should be sent as a packet of data (serially). The structure of a SIRC data packet is as follows:
Structure of a SIRC data packet |
Address | Device |
1 | TV |
2 | VCR 1 |
3 | VCR 2 |
6 | Laser Disc Unit |
12 | Surround Sound |
16 | Cassette Deck/Tuner |
17 | CD Player |
18 | Equalizer |
Here's an example data packet that uses SIRC protocol. This is the set of pulses sent when you press the volume button on a SONY remote control.
Example SIRC data packet |
I'll talk about the RC 5 protocol in the next post.
Special thanks to Vidusara newspaper, from which I gained this knowledge.
Is SIRC strictly limited to handling consumer electronic devices? As far as I can see, it has no inherent capabilities to cope up with bit errors. Besides it is working with variable time length packets that makes it more susceptible to various signal impairments. This may be the most prominent limiting factor for the distance we can achieve with a standard remote controller. But the lack of overhead with parity check and such is exactly what is needed in the domain of their applications within an indoor environment. Short and Sweet!!! :)
ReplyDeleteWait till you see RC 5. It's simpler that SIRC. Now we can guess why the TV remote acts crazy sometimes ;)
ReplyDelete