The KY-022 is an infrared receiver module designed to detect and process infrared signals, typically from remote controls. Manufactured by Arduino with the part ID nbv
, this module is a compact and reliable solution for integrating remote control functionality into electronic projects. It is equipped with a built-in infrared receiver that can decode modulated IR signals, making it ideal for wireless communication.
The KY-022 module is designed to operate efficiently in a variety of electronic systems. Below are its key technical details:
Parameter | Value |
---|---|
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 15mm x 10mm |
The KY-022 module has three pins, as detailed in the table below:
Pin | Name | Description |
---|---|---|
1 | Signal | Digital output pin that provides the decoded IR signal (active low). |
2 | VCC | Power supply pin. Connect to 3.3V or 5V. |
3 | GND | Ground pin. Connect to the ground of the circuit. |
The KY-022 module is straightforward to use and can be easily integrated into a variety of circuits. Below are the steps and considerations for using the module:
VCC
pin to a 3.3V or 5V power source, depending on your system's voltage requirements.GND
pin to the ground of your circuit.Signal
pin to a digital input pin on your microcontroller (e.g., Arduino UNO).Below is an example of how to use the KY-022 module with an Arduino UNO to decode IR signals from a remote control:
#include <IRremote.h> // Include the IRremote library for decoding IR signals
const int RECV_PIN = 2; // Define the pin connected to the KY-022 Signal pin
IRrecv irrecv(RECV_PIN); // Create an IR receiver object
decode_results results; // Create a variable to store decoded results
void setup() {
Serial.begin(9600); // Initialize serial communication for debugging
irrecv.enableIRIn(); // Start the IR receiver
Serial.println("KY-022 IR Receiver is ready to decode signals.");
}
void loop() {
if (irrecv.decode(&results)) { // Check if an IR signal is received
Serial.print("IR Code: ");
Serial.println(results.value, HEX); // Print the received IR code in hexadecimal
irrecv.resume(); // Prepare to receive the next signal
}
}
IRremote
library must be installed in the Arduino IDE. You can install it via the Library Manager.RECV_PIN
is set to pin 2 in this example, but you can change it to any digital pin on the Arduino UNO.No Signal Detected:
Signal
pin.Unstable or Incorrect Output:
Signal
pin if the output is unstable.Short Reception Distance:
Q: Can the KY-022 decode all types of IR signals?
A: The KY-022 is designed to decode modulated IR signals, typically at 38kHz. It may not work with non-modulated or non-standard IR signals.
Q: Can I use the KY-022 with a Raspberry Pi?
A: Yes, the KY-022 can be used with a Raspberry Pi. Connect the Signal
pin to a GPIO pin and use an appropriate IR decoding library, such as lirc
.
Q: What is the maximum range of the KY-022?
A: The module can receive IR signals from up to 18 meters, depending on the strength of the IR source and environmental conditions.
By following this documentation, you can effectively integrate the KY-022 module into your projects and troubleshoot any issues that arise.