How Infrared Actually Gets Your TV to Listen
Most people think their TV remote is some kind of magic wand. It's not. It's a plastic brick with an LED that blinks at a frequency your eye can't see. That's it. The whole system is older than the World Wide Web and honestly, it works better than most wireless protocols people are obsessed with today.The basic setup is embarrassingly simple. Press a button on your remote and a microcontroller inside encodes a specific sequence of pulses. That sequence is sent as modulated infrared light through the LED on the front of the remote. Your TV has a photodiode receiver that detects those pulses, decodes them, and does whatever you told it to do. The modulation is the critical part because it's what keeps sunlight from accidentally turning your TV on every time you open the blinds. I remember spending three days in 2019 debugging a custom IR setup for a museum interactive exhibit. We were building a wall-mounted interface where visitors would point a remote at a sensor to trigger projection mapping. The problem was that the fluorescent lights in the gallery were interfering with the receiver. Every time someone walked by with a metal cart, the signal would drop out completely. I ended up switching from the standard 38kHz carrier to a custom 56kHz one and adding a narrow bandpass filter to the receiver circuit. That solved it. The fluorescent lights are fixed at roughly 100Hz flicker and won't touch 56kHz, so the interference vanished overnight. Here's what most beginners get wrong about IR remotes. They assume the remote is sending data like a serial connection. It's not. Each button press sends a burst of encoded pulses that represent a unique command code, and then nothing happens until you press another button. The remote has no concept of whether the receiver actually got the signal. If you're standing too far away or there's a reflective surface bouncing the signal around, the TV might register two commands instead of one and suddenly change the channel twice while you were just trying to adjust the volume. This happens more often than you'd think with older Samsung and LG models that have sensitive receivers.
The carrier frequency is what makes IR practical for home use. The LED doesn't just blink on and off when you press a button. It pulses at 30 to 60kHz, typically 38kHz for consumer electronics. The receiver module on the TV is tuned to only respond to that exact frequency and ignores everything else. This means ambient infrared from incandescent bulbs, candle flames, or even direct sunlight gets filtered out completely. The raw signal from the LED is just intensity modulation, but the receiver outputs clean digital pulses after demodulation. That's why your TV still works at noon when a window is blazing with sunlight behind you.
The Pulse Encoding Schemes You Need to Know
There are several encoding methods used across different brands and neither one is objectively superior. NEC is the most common in Asia and budget electronics. Sony uses its own proprietary format called SIRC. RC5 and RC6 come from Philips and are found in European equipment and older DVD players. The difference matters if you're trying to build a universal remote or replicate signals with an Arduino because each protocol has a different timing structure and address length. The NEC protocol sends a 16-bit address and an 8-bit command. The address identifies the device type and the command identifies which button was pressed. The remote holds the button down and it repeats the same signal every 108 milliseconds until you release it. This is why holding down the volume button on a cheap NEC-based remote sounds like a machine gun. The receiver gets the same pulse burst over and over and treats each one as a fresh command. A proper implementation debounces this or uses a repeat delay, but cheap TVs just obey every single repetition. Sony's SIRC protocol is shorter. It uses a 7 or 12-bit command with no device address at all. That's why Sony remotes are notoriously bad at being universal. There's no device identifier baked into the signal. Any Sony receiver will accept the command as valid regardless of what brand the TV is supposedly supposed to control. If you're building a universal remote, you need a large database of Sony codes and you just try them one by one until something responds. This takes longer than NEC because you can't narrow down the search space with a device address.
Get the Full Details

Building Your Own IR Transmitter Circuit
You can build a functional IR transmitter for about twelve dollars if you have a soldering iron and a spare microcontroller. The parts list is a IR LED, a 2N2222 NPN transistor, a 100-ohm resistor, a 1k resistor, and a breadboard. Wire the LED anode to the collector of the transistor through the 100-ohm resistor. Connect the emitter to ground. Run a 1k resistor from your microcontroller pin to the transistor base. That's the entire circuit. Upload a library like irremote and start sending codes. The range on a bare-bones circuit like this is usually about six meters line of sight. That's adequate for a coffee table setup but useless if you're trying to control equipment across a room with furniture obstacles. The IR LED I recommend is the TSAL6200. It's a 5mm diffused LED rated for 100mA continuous current and it peaks around 940 nanometers, which is standard for consumer IR. Don't go cheaper. The TPST100 LEDs from AliExpress will work for a weekend project but they degrade fast and the output drops by half within a month of regular use. One thing nobody warns you about is power draw. A typical IR remote runs on a CR2032 coin cell and lasts two years. Your custom circuit drawing 50mA from a 5V USB supply will work fine, but if you're battery powering anything, budget the current properly. An IR LED pulse at 100mA draws about 200mA peak when you include the modulation circuit overhead. A standard 18650 lithium cell at 3000mAh will last roughly fifteen hours of active use before it dies. If your project involves periodic polling instead of continuous operation, factor in the duty cycle. Most remotes transmit for less than 0.1 percent of their operational time because the LED only flashes during button presses.
Why IR Isn't Dead Yet and Why It Won't Be
People love to declare IR dead every time a new wireless standard comes out. Bluetooth, Wi-Fi, Zigbee, Matter. They all have advantages that IR doesn't. But IR has a cost advantage that nothing else can match. A complete IR receiver module like the VS1838B costs about thirty cents in bulk. A Bluetooth radio with the accompanying firmware stack costs at least four dollars and requires a microcontroller with significantly more RAM to handle the protocol overhead. When you're manufacturing fifty million TVs and soundbars, that difference is millions of dollars. IR also has a security property that wireless protocols struggle with. You can't intercept an IR signal from another room. The light doesn't pass through walls. If someone wanted to capture your remote control signals and replay them, they'd need to be in the same room with a line of sight to both your remote and your TV. RF protocols don't have that constraint. This is why IR is still used for things like set-top boxes and AV receivers where you don't want neighboring apartments accidentally triggering your equipment through shared walls. The real limitation is directionality. You have to point the remote at the receiver. This seems obvious but it's a genuine usability problem for ceiling-mounted projectors, wall-mounted soundbars hidden behind furniture, or any device where the IR receiver isn't visible from the primary seating position. I've had to use IR extenders in three different installations because the receiver port was on the back panel of a TV that was flush-mounted to the wall. An IR extender is just a cable that runs from a receiver module placed where the remote can see it to an emitter module placed right next to the actual TV receiver. They cost about eight dollars and solve the problem permanently.
If you need to control devices through walls or from multiple rooms, IR is the wrong tool. Use a powerline communication system like the Logitech Harmony with a broadlink integration, or go full smart home with Zigbee or Thread devices that have mesh networking. But for single-room control of consumer electronics, IR remains the most reliable, cheapest, and simplest solution available. It hasn't been replaced because it wasn't broken. It's been replaced only where the use case demanded features that IR was never designed to provide. The pulse width modulation in modern IR protocols has gotten more sophisticated too. Some newer remotes use a variant called pulse distance encoding where the gap between pulses carries information instead of the pulse width itself. RC5 uses Manchester encoding which means every bit has a transition in the middle. This makes clock recovery trivial for the receiver and eliminates a whole class of timing errors that plagued early NEC implementations. If you're reverse-engineering an unknown remote, checking whether it's pulse width or pulse distance encoded is usually the first thing that tells you which protocol family you're dealing with.
