The IR transmitter LED emits modulated 940nm infrared light. A carrier frequency (typically 38kHz) is used to distinguish the signal from ambient IR noise at the receiver. NEC protocol encodes an 8-bit address and 8-bit command as a series of burst/gap pairs following a 9ms leader pulse.
| LED wavelength | 940 nm |
| Carrier frequency | 38 kHz |
| Protocol | NEC / RC5 / SIRC |
| Range | Up to 10m |
| Current | 20 – 100 mA |
| Modulation | 38 kHz PWM burst |
The MCU generates a 38kHz carrier on a PWM pin. To send a '1' bit, the carrier is enabled for 562µs then disabled for 1686µs. A '0' bit: 562µs on, 562µs off. A full NEC frame is: 9ms leader → 4.5ms space → 32 bits (address + command + inverses) → stop bit.
Line-of-sight only — cannot penetrate walls. Range drops significantly outdoors in sunlight. NEC protocol has no error correction. Requires precise microsecond timing. Interference from other IR sources possible.