The Modulo Led Infrarrojo Receptor (KY-022) is an infrared receiver module designed to detect and process infrared (IR) signals. Manufactured by Sensor, this module is widely used in remote control applications to receive commands from IR remote control devices. It is compact, easy to use, and compatible with microcontrollers like Arduino, making it ideal for hobbyists and professionals alike.
The following table outlines the key technical details of the KY-022 module:
Parameter | Specification |
---|---|
Operating Voltage | 3.3V to 5V |
Operating Current | 0.4mA to 1.5mA |
Carrier Frequency | 38kHz |
Reception Distance | Up to 18 meters (depending on IR source) |
Reception Angle | ±45° |
Output Signal | Digital (active low) |
Dimensions | 18.5mm x 10mm x 8mm |
The KY-022 module has three pins, as described in the table below:
Pin | Name | Description |
---|---|---|
1 | Signal | Digital output pin that provides the received IR signal. |
2 | VCC | Power supply pin (3.3V to 5V). |
3 | GND | Ground pin. |
Connect the Pins:
Place the Module:
Load the Code:
IRremote
library to decode the received IR signals.Below is an example code to use the KY-022 module with an Arduino UNO to decode IR signals:
#include <IRremote.h> // Include the IRremote library
const int RECV_PIN = 2; // Define the pin connected to the KY-022 Signal pin
IRrecv irrecv(RECV_PIN); // Create an IRrecv object
decode_results results; // Create a variable to store decoded results
void setup() {
Serial.begin(9600); // Initialize serial communication
irrecv.enableIRIn(); // Start the IR receiver
Serial.println("IR Receiver is ready to receive signals.");
}
void loop() {
if (irrecv.decode(&results)) { // Check if a signal is received
Serial.print("Received IR code: ");
Serial.println(results.value, HEX); // Print the received code in hexadecimal
irrecv.resume(); // Prepare to receive the next signal
}
}
IRremote
library in the Arduino IDE before uploading the code.No Signal Detected:
Interference from Ambient Light:
Short Reception Distance:
Unstable Output:
Q1: Can the KY-022 module work with 3.3V microcontrollers?
A1: Yes, the KY-022 is compatible with both 3.3V and 5V systems.
Q2: What is the maximum distance for signal reception?
A2: The module can receive signals from up to 18 meters, depending on the strength of the IR source.
Q3: Can I use the KY-022 to control devices?
A3: No, the KY-022 is a receiver module. To control devices, you would need an IR transmitter module.
Q4: How do I decode the received IR signals?
A4: Use the IRremote
library with an Arduino to decode and interpret the received signals.
By following this documentation, you can effectively integrate the KY-022 module into your projects and troubleshoot any issues that arise.