More About IR


Some other interesting things related to IR.

Sending Random IR Codes

When transmitting random IR codes about the place, expect occasional unintended consequences. Whilst the wrong code arriving at a device should do nothing, it may unlock an unreleased feature or enter a test mode in the device, which could possibly brick that device in the rarest of cases. If you know a devices address and protocol, and are sending random commands to that device, then beware of this. If something unintended does happen, then resetting that device should, in most cases restore it.


Electromagnetic Frequency Spectrum

Infrared covers the electromagnetic spectrum range from 300 GHz up to 430 THz, which corresponds to a wavelength range between 700 nm and 1 mm. The InfraRed part of the electromagnetic spectrum sits between the microwave and visible parts of the spectrum. InfraRed is further split into near, mid and far infraRed, corresponding to its distance from the visible spectrum. IR tranmitters for remotes, all work in the near-infra red range, typically centered on a wavelength of 940 nm, although other wavelengths are also available (e.g. 850 nm). Whilst this is one further consideration to take into account when designing an IR remote system, the wavelength overlap between IR transmitters and receivers is generally sufficient regardless of sensor/transmitter combination that the hobbiest can ignore this extra detail.

The InfraRed light is turned on and off(or modulated) at the carrier frequency. The carrier frequency is then in turn modulated by the IR pattern.


Encoding Methods

There are three ways that are commonly used in IR remotes to encode a signal onto the modulated carrier wave. They are Pulse Distance Modulation, Pulse Width Modulation and Manchester Encoding.

Pulse Distance Modulation

In pulse distance modulation, the length of time between pulses is changed to represent different data. For example, a 1 could be represented with a long gap, and a 0 by a short gap.

pulse distance modulation
Pulse Distance Modulation

The NEC and JVC InfraRed protocols are examples of pulse distance modulation.

Pulse Width Modulation

This could also be called pulse length modulation, or pulse duration modulation. They all refer to the length of the pulse being changed to encode different information. For binary 0 and 1 data, two different pulse lengths are used.

pulse width modulation
Pulse Width Modulation

The SIRC IR protocol is an example of pulse width modulation.

Pulse width modulation can also be used to encode more than just 0 and 1. By adjusting the width between 0% and 100% of the time period of a signal, we can effectively control the duty cycle and power output to a device. See the Color Changing LED example for PWM used this way.

Manchester Encoding

Manchester coding is also known as bi-phase encoding, The order of the high and low is opposite for the binary data 0 and 1. Which way around the 0 and 1 are defined depends on which standard/protocol is being followed.

biphase enconding
Manchester Encoding

The RC-5 and RC-6 protocols use Manchester encoding.