Introduction
Television remotes, air conditioner remotes, and automotive steering-wheel-mounted remotes all send their commands using pulses of infrared light encoded according to a standard protocol. In this experiment, an infrared receiver module is wired to the STM32F070RB, and the microcontroller decodes button presses from a standard infrared remote control by measuring the precise timing of the received pulses.
2. Scope
This experiment covers understanding the structure of the widely used NEC infrared protocol, measuring pulse and space durations using a free-running microsecond timer, and reconstructing the thirty-two bit NEC command word from the received pulse train. By the end, the operator will understand how a real, standardised communication protocol can be decoded entirely through precise timing measurement, without any dedicated decoding hardware.
3. Prerequisite
3.1 Hardware
-
STM32 Nucleo-F070RB development board
-
Infrared receiver module, such as a KY-022 or equivalent TSOP series receiver
-
A generic infrared remote control, NEC protocol compatible, most inexpensive remotes are
-
Breadboard and jumper wires
-
Micro-USB cable
-
PC with PuTTY
3.2 Software
-
STM32CubeMX (standalone)
-
STM32CubeIDE
-
ST-LINK USB driver
-
PuTTY, or an equivalent serial terminal application
Community Q&A
0 questionsAsk questions and get answers from our community and staff moderators.
No questions yet — be the first to start the conversation!
Ask a Question
Please log in to ask a question or post a reply.
Login to Participate