Introduction #
Infrared remote control module is an electronic module that receives and sends infrared signal to realize wireless remote control function. It usually consists of an infrared transmitting module (infrared remote control) and an infrared receiving module.
As the transmitting part, the infrared remote control can emit infrared light signal. Infrared light signal is a kind of electromagnetic wave, its wavelength is long, the human eye can not see. When the button in the infrared remote control is pressed, the infrared remote control will emit a specific infrared light signal, and each key corresponds to a specific infrared code.
The infrared receiving module has an integrated infrared receiving component that can detect infrared light about 38kH, and can receive the infrared signal emitted by the infrared remote control. When the infrared signal is received, it is parsed into a specific infrared code by the decoder according to the communication protocol.
Application reference: remote control, game control, etc.
Specifications #
Parameters of the infrared receiver module #
Parameters | Value/Description |
Operating voltage | 3.3V~5V |
Operating temperature | -20°C~+80°C |
Frequency | 38KHz |
Receiving Angle | ±35° |
Receiving distance | 15m |
Output signal | Digital signal |
Size | 3.16cm*2.38cm |

Corresponding coding value of infrared transmitting module

#
Wiring Diagram #
Note:Expansion board is attached to esp32 controller board.
Infrared Receiving Module | ESP32 |
VCC | 5V |
GND | GND |
Sign | Pin 32 |
Sample Code #
#include #include "IRremote.h"
int receiver = 32; //The signal pin of the infrared receiver is connected to pin 32 of the esp32
IRrecv irrecv(receiver); //Create IRrecv infrared receiver objects to receive infrared signals
void setup() {
Serial.begin(115200); //Set the baud rate of the serial port to 115200
irrecv.enableIRIn(); //Start infrared decoding
}
void loop() {
if (irrecv.decode()){ //Check whether an infrared signal is received
if (!irrecv.decodedIRData.flags) //If the decoding succeeds
{
Serial.print("IR code:0x"); //Serial print string "IR code:0x"
Serial.println(irrecv.decodedIRData.decodedRawData, HEX);//Convert the infrared remote decoded data into hexadecimal display
}
irrecv.resume(); //Wait for the next infrared signal
}
}
Note: If you are using an Arduino board, then change the pin in the program to PIN7, set the baud rate to 9600, and then connect the hardware pin to PIN7 and upload the program.
Test Result #
After uploading the code to the controller board, open the serial port monitor of the Arduino IDE and set the baud rate to 115200.
When we press the remote control key, the serial port returns the hexadecimal code value of the key.
Note: If the light in the surrounding environment is strong and interferes with the data reception of the infrared receiver, you can block the strong light with your hand at an appropriate distance above the receiver.
Related Resources #
Get One Now #
B2B Business: info@acebott.com
Official Website: IR Receiver Module