03 · 12 min

Infrared remotes

How consumer IR actually talks, which encodings you will see, and how to learn your own TV without guessing.

Most TV, AC, and projector remotes are a near-infrared LED pulsed at a carrier around 36–40 kHz (38 kHz is the common default). The carrier is not the message. The message is the on/off pattern of that carrier — a pulse-distance or pulse-width code the receiving MCU already knows.

Why there is a carrier

Ambient light is mostly DC from the receiver's point of view. A band-pass around 38 kHz lets a cheap photodiode ignore lamps and still hear a remote across a room. That is also why IR is line-of-sight and why a pocket tool with an IR LED can stand in for a remote you own.

Encodings you will actually meet

Consumer IR, not a complete catalog

FamilyFingerprintNotes
NEC / NEC extended9 ms burst, 4.5 ms space, then address + commandHuge share of TVs and generic remotes
SamsungNEC-like timings, different address widthCommon on Samsung TVs
Sony SIRCFixed-bit PWM, 12/15/20-bit variantsSony kit; repeats while held
Philips RC5 / RC6Manchester, toggle bitOlder European kit, some projectors

Flipper can capture a button, show a guessed protocol, and save it. If the guess is wrong you still have the raw timings, which is enough to replay to the same device. Universal remotes work the same way: they either speak a known code set or they learn a burst from the original remote.

What 'learn' is not

IR does not authenticate you. Anyone with line of sight can send power-off. That is annoying in a lecture hall and still not a reason to blast strangers' TVs. Some conference-room gear uses IR; treating other people's rooms as a playground is how you get asked to leave.

  • Carrier frequency is a receiver filter, not encryption.
  • Repeats (hold-to-repeat) are part of the protocol, not a new command.
  • AC units often use long, stateful frames. Capture the exact button; do not invent bits.
  • Keep IR files on the SD card under a name you will recognize in six months.

Related labs