Jump to content
Arduino.lk Community Sri Lanka
  • Announcements

    • Team Arduino.lk

      Arduino Stater Kit 2 එකක් දිනාගන්න.   11/13/2017

      arduino.lk community වෙත ඔබව සාදරයෙන් පිළිගනිමු. ඔබගේ ගැටළු අදහස් මෙහි පළකර Rs 3650.00 වටිනා Arduino Stater Kit 2 එකක් දිනාගන්න. ඔබ කල යුත්තේ Arduino, හා සම්බන්ධ අදහස්, ලිපි, කමෙන්ට් මෙහි පල කර මෙහි ඇති LeaderBoard එකේ පළමු තැනට පැමිණීමයි. සැම මාසකම අවසාන දින 11.55 PM හොදම Contributor තෝරනු ලැබේ
Sign in to follow this  
Team Arduino.lk

KY-022 INFRARED RECEIVER MODULE

Recommended Posts

Description

Arduino IR receiver module KY-022, reacts to 38kHz infrared light.

KY-022_infrared_receiver_module-240x240.KY-022 Specifications

This module consists of a 1838 IR receiver, a 1kΩ resistor and a LED. It works together with the KY-005 IR transmitter module. Compatible with popular electronic platforms like Arduino, Raspberry Pi and ESP8266.

 
Operating Voltage 2.7 to 5.5V
Operating Current 0.4 to 1.5mA
Reception Distance 18m
Reception Angle ±45º
Carrier Frequency 38KHz
Low Level Voltage 0.4V
High Level Voltage 4.5V
Ambient Light Filter up to 500LUX

KY-022 Connection Diagram

Connect the Power line (middle) and ground (-) to +5 and GND respectively. Connect signal (S) to pin 11 on the Arduino. Line un IR receiver and transmitter.

Arduino_KY-022_Keyes_Infrared_Receiver_m

 
KY-012 Arduino
S Pin 11
middle +5V
GND

KY-022 Arduino Code

The following Arduino sketch uses the IRremote library to receive and process infra-red signals. Use the KY-005 IR transmitter module to serially send data to this module.

Links to the required libraries for KY-022 Arduino example sketch can be found in the Downloads section below.

#include <IRremote.h>

int RECV_PIN = 11; // define input pin on Arduino 
IRrecv irrecv(RECV_PIN); 
decode_results results; // decode_results class is defined in IRremote.h

void setup() { 
  Serial.begin(9600); 
  irrecv.enableIRIn(); // Start the receiver 
} 

void loop() { 
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX); 
    irrecv.resume(); // Receive the next value 
  }
  delay (100); // small delay to prevent reading errors
}

 

View the full article

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×