QKZee Technologies

How to Set Up an IR Receiver KY-022 and Remote with Arduino – Easy Guide for Student Projects

IR Receiver KY-022 Module connected to Arduino for DIY automation project - ideal for student and final year projects by QKZee Tech Lahore

How to Set Up an IR Receiver KY-022 and Remote on an Arduino – Complete Guide

Introduction

Setting up an IR (Infrared) receiver and remote with an Arduino is one of the most exciting and practical DIY tasks you can do as a beginner or a student working on final year projects, science exhibitions, or engineering automation systems. This project is widely used across all universities of Pakistan, especially for students from technical colleges and schools who aim to create smart control systems, remote-controlled home automation, and Arduino-based student projects.

In this complete guide, we’ll explore the step-by-step setup of an IR receiver and remote with Arduino, using easy-to-find components from Hall Road Lahore or online stores like QKZee Technologies and QKZ Tech, known for offering the best engineering service in Lahore.

Infrared (IR) remote controls are widely used in home appliances, automation, and DIY electronics. In this guide, we’ll show you how to interface an IR receiver (KY-022) with an Arduino to decode signals from any IR remote. This project is perfect for:
✅ Student projects & Final Year Projects (FYP)
✅ Arduino enthusiasts & hobbyists
✅ Automation & engineering projects
✅ Science experiments & school projects

Whether you’re a student in Pakistan or a DIY electronics lover, this step-by-step tutorial will help you build a functional IR remote control system easily.

Components Required

ComponentModel/SpecificationPurpose
Arduino BoardArduino Uno, Nano, or MegaMain microcontroller
IR Receiver (KY-022)VS1838B (common model)Receives IR signals
IR Remote ControlAny standard TV/DVD remoteTransmits IR codes
Breadboard & Jumper WiresCircuit connections
LED (Optional)5mm, any colorVisual feedback
Resistor (220Ω)For LED current limitingProtects LED

Where to Buy Components?

    • Local Market: Hall Road Lahore (best for quick purchases).

    • Online Stores: Qkzee Tech, Qkz Tech (for home delivery).

Understanding the KY-022 IR Receiver

Pin Configuration

The KY-022 IR receiver has 3 pins:

    1. OUT (Signal) → Connects to Arduino digital pin

    2. GND (Ground) → Connects to Arduino GND

    3. VCC (Power +5V) → Connects to Arduino 5V

       

       

      IR Receiver  KY-022 Module connected to Arduino for DIY automation project - ideal for student and final year projects by QKZee Tech Lahore

       

How It Works

    • The IR receiver detects modulated IR signals (usually 38kHz) from remotes.

    • It demodulates the signal and sends a digital output to Arduino.

    • Arduino decodes the signal using the IRremote library.

Step-by-Step Setup Guide

Step 1: Install the IRremote Library

    1. Open Arduino IDE.

    2. Go to Sketch → Include Library → Manage Libraries.

    3. Search for “IRremote” and install it.

Step 2: Connect the Circuit

    1. Connect KY-022 to Arduino:

      • VCC → 5V (Arduino)

      • GND → GND (Arduino)

      • OUT → Digital Pin 11 (or any other)

    2. (Optional) Add an LED:

      • Connect LED (+) via 220Ω resistor to Pin 13.

      • Connect LED (-) to GND.

        IR Receiver KY-022 Module connected to Arduino for DIY automation project - ideal for student and final year projects by QKZee Tech Lahore
         

Step 3: Upload the Code

#include <IRremote.h>  

const int RECV_PIN = 11;  
IRrecv irrecv(RECV_PIN);  
decode_results results;  

void setup(){  
  Serial.begin(9600);  
  irrecv.enableIRIn();  
  pinMode(13, OUTPUT); // For LED (optional)  
}  

void loop(){  
  if (irrecv.decode(&results)){  
    Serial.println(results.value, HEX); // Print HEX code  
    digitalWrite(13, HIGH); // Blink LED on signal  
    delay(1000);  
    digitalWrite(13, LOW);  
    irrecv.resume();  
  }  
}  

Step 4: Test the IR Remote

 

    1. Open Serial Monitor (Ctrl+Shift+M).

    2. Point your IR remote at the receiver and press buttons.

    3. LED Light Will Be on For 1 Second 

    4. Note the HEX codes displayed (e.g., FFA25D).

Common Issues & Troubleshooting

1. No Signal Detected?

 

    • Check connections (VCC, GND, OUT).

    • Test with a different remote (some remotes use different protocols).

    • Ensure the IR LED is working (use a phone camera to see IR light).

2. Garbage Values in Serial Monitor?

 

    • Move closer to the receiver (3-5 feet works best).

    • Avoid direct sunlight or strong IR interference.

3. LED Not Blinking?

 

    • Check resistor value (use 220Ω for standard LEDs).

    • Verify the correct Arduino pin in the code.

Advanced Applications

1. Control Home Appliances

Use a relay module to switch lights, fans, or TVs with IR signals.

2. Create a Custom Remote

Program an Arduino + IR LED to mimic remote signals.

3. Automation Projects

Integrate with smart home systems using NodeMCU or Raspberry Pi.

Why This Project is Great for Students?

    • Teaches sensor interfacing & signal decoding.

    • Useful for Final Year Projects (FYP) in Pakistani universities.

    • Enhances coding & electronics skills.

Need Professional Help?

For custom FYP projects in Lahore, contact:

    • Qasim Shahzad Lahore (Electronics Expert)

    • Qkzee Technologies (Best for Arduino & automation)

Final Thoughts

This IR Remote & Receiver (KY-022) setup is a simple yet powerful project for:
🔹 DIY electronics enthusiasts
🔹 Engineering students in Pakistan
🔹 Automation & smart home projects

Start experimenting today and unlock wireless control for your Arduino projects!

Where to Buy Your Electronics Components 

Looking for affordable components for this Arduino project? Check out QKZee Technologies, an online shop in Lahore, Pakistan, offering the best components for students and DIY projects. Whether you’re looking for sensors, modules, or other electronics at a cheap price, they’ve got it all. Visit them at QKZeeTech.

Yes, any transformer with 7-12V AC output will work (e.g., 220V to 12V)

This project teaches power electronics fundamentals - great for learning!

Up to 1A with proper heat sinking (less without heat sink)

Definitely! This 12V to 5V converter is perfect for student projects, final year projects, DIY systems, Arduino automation, and school science projects. It's widely used in universities and technical colleges across Pakistan.

visit QKZee Technologies Hall Road Lahore, or contact QKZee Technologies for genuine parts and student-friendly prices

Scroll to Top