SKILL BUILDER IR REMOTE HACK
makeprojects.com/v/30
0
1
0
0
1
0
0 0 00 1 1
0 0 11
0
1Space-Width Encoding
Space-width encodes
data in the time between
IR light pulses. Each pulse
of IR light precedes the
transmission of a bit. A
short amount of time after
a pulse and before the next
one represents a logical 0,
while a logical 1 is a long
period of time between
pulses. Space-width
encoding is the most common way data is encoded,
and is used by most Japanese manufacturers.
2Pulse-Width Encoding
Pulse-width (aka pulse-time) encoding focuses on
the duration of the pulses
rather than the spaces
between them. The signal
stays high for a variable
amount of time, with logical 0 being a short pulse
and 1 a long pulse. Time
between pulses marks the
end of one bit and the start
of another. Pulse-width
encoding is used by Sony.
3Bi-Phase Encoding
In bi-phase encoding, all
bits take the same amount
of time, during which the
signal jumps midway
through, either from high
to low, which represents
logical 0, or from low to
high, which represents 1.
With consecutive bits of
the same value there will
be an additional transition
between bits.
4Alternating Encoding
This is the least used but
simplest way of encoding
data. A logical 1 is a long
period of time of either signal value, high or low, and a
logical 0 is a short time of
signal high or low.
A
IR SIGNALS, DISSECTED
There is no universal standard for IR communication, and manufacturers use a variety of
quasi-standards. Even so, infrared signals all
share one common property: they use infrared light to encode digital (binary) data. In our
experience, this data is encoded in a signal in
one of 4 ways, shown here (above) in rough
order of most to least common.
Though these 4 are the primary ways IR
data gets encoded, other patterns exist
that are manufacturer specific. For example,
Roombas use a modified version of bi-phase
encoding that looks at a signal-level value
(not a transition) in the middle of a bit.
In addition to how data is encoded, IR
protocols differ in other important ways:
Number of bits: The number of bits encoded
per each button-press transmission varies
substantially by device — 8, 12, 16, 20, 24, and
32 are all common. Some devices that send
24 or 32 bits of data actually only use 8 bits
for information, and use the additional bits for
error checking and correction.
Timing: The amount of time a signal goes
high or low varies with different manufacturers, with pulses and gaps typically ranging
between 500μs (microseconds) and 2,000μs.
Most IR remotes transmit data at rates from
250Hz to 2kHz, with the signal timing being
the main determinant of bit rate.
Address pulses and bits: IR signals frequently begin with a long pulse or a sequence
of bits that indicate which device the remote
control is attempting to control. For example,
Sony TV, DVD player, and sound system
remote controls encode data in the same way,
but to prevent a DVD remote’s power button
from turning on a TV, each signal starts with
a unique address pulse.
Carrier frequency: All IR signals pulse on and
off at a carrier frequency that’s faster than the
bit rate (Figure A). Roughly 90% of remote
controls use a carrier between 36kHz–40kHz,
and most of the rest use 56kHz. Using a modulated carrier greatly reduces interference from
other sources of IR light like sunlight and most
artificial lighting. IR receiver circuitry recognizes signals with a certain carrier frequency,
and incompatibility issues arise when a remote
uses a different carrier than the receiver.
Tom Lauwers
120 Make: makezine.com/30