Introduction
In this tutorial, we are Interfacing KY-005 Infrared Transmitter module with Arduino, The KY-005 Infrared Transmitter module transmits infrared light at 38kHz. It can be operated to control TVs, air conditioners, stereos, and other appliances with IR receivers. It can also be utilized together with the KY-022 Infrared Receiver module.
This module is able to interface with popular electronic platforms like Arduino, ESP32, Raspberry Pi, and other microcontrollers. that can be used for transmitting data.
Hardware Required
You will require the following Hardware Components for the Interfacing KY-005 Infrared Transmitter module with Arduino
Components | # | Buy From Amazon |
---|---|---|
Arduino UNO | 1 | Buy Link |
USB 2.0 cable type A/B | 1 | Buy Link |
KY-005 Infrared Transmitter module | 1 | Buy Link |
9v DC Adapter (Optional) | 1 | Buy Link |
Jumper Wires | – | Buy Link |
Breadboard | 1 | Buy Link |
Specifications
This module is entirely simple and contains a 5mm infrared LED and 3 male header pins. Handle with a warning, do not blink the IR light instantly to the eyes.
Operating Voltage | 5V |
Forward Current | 30 ~ 60 mA |
Power Consumption | 90mW |
Operating Temperature | -25°C to 80°C [-13°F to 176°F] |
Board Dimensions | 18.5mm x 15mm [0.728in x 0.591in] |
TECHNICAL DATA
Forward voltage | 1.1 V |
Forward Current | 20 mA |
Emitting wavelength | 940nm (non-visible light) |
Pinout
Pin Configuration
Pin Name | Pin Type |
---|---|
S | Signal Pin |
middle Pin | Vcc (+5) |
( – ) | Ground |
Circuit Diagram
The following circuit shows you the connection of the Interfacing KY-005 Infrared Transmitter module with Arduino Please make the connection carefully
Circuit Connections
Place the module on the Breadboard and attach the power line (middle) and ground (-) of the module to +5 and GND of the arduino and connect the signal pin (S) to pin 3 of the arduino respectively.
The pin number for the IR transmitter is defined by the IRremote library. Other platforms might use a separate pin.
Arduino | KY-005 module |
---|---|
+5v | Middle |
GND | GND |
Pin 3 | Signal |
Installing Arduino IDE Software
First, you will require to Download the updated version of Arduino IDE Software and Install it on your PC or laptop. if you Learn How to install the Arduino step-by-step guide then click on how to install Arduino Button given Blow
Installing Libraries
Now when you are Ready to upload the code, to the Arduino Board you will need first to add the Following Libraries in Arduino, If you Learn How to add the library in the Arduino step-by-step guide click on how to install the library Button given Blow
Code
The following Arduino code works as a TV remote control. It operates the IRremote library to serially transmit instructions to a TV operating infrared light.
In this example, we will transmit the power command for Sony TVs on every 5 seconds, turning on and off the TV 10 times.
Check the IRremote library documentation for helped TV commands and appliances. Links to the needed libraries can be found in the following Downloads section.
//For more Projects: www.arduinocircuit.com
#include <IRremote.h>
IRsend irsend;
void setup()
{
Serial.begin(9600); // Initialize serial interface
}
void loop()
{
for (int i = 0; i < 10; i++) {
irsend.sendSony(0xa90, 12); // code for Sony TV power command
delay(5000); // wait 5 seconds
}
}
Applications
- Remote Control Systems: The module is commonly used as a transmitter in remote control systems for various devices such as TVs, audio systems, and air conditioners.
- Infrared Communication: It enables communication between different electronic devices using infrared signals, facilitating data transfer and control commands.
- Home Automation: The KY-005 module is integrated into home automation projects to control smart devices like lights, fans, and home appliances.
- Object Detection: It can serve as a proximity sensor in projects where objects need to be detected or their presence needs to be sensed.
- Robotics: The module is utilized in robotics to send commands and instructions wirelessly to robotic systems, enabling remote control and communication between robots.