The KY-005 Infrared Transmitter module emits infrared light at 38kHz. It can be used to control TVs, stereos, air conditioners and other devices with IR receivers. It can also be used together with the KY-022 Infrared Receiver module.
Compatible with Arduino, Raspberry Pi, ESP32 and other popular microcontrollers.


KY-005 Specifications
This module is quite simple and consists of a 5mm infrared LED and 3 male header pins. Handle with caution, do not flash IR light directly 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] |
Connection Diagram
Connect the board power line (middle) and ground (-) to +5 and GND on the Arduino respectively.
Connect the signal pin (S) to pin 3 on the Arduino Uno.
The pin number for the IR transmitter is determined by IRremote library. Other platforms might use a different pin.
KY-005 | Arduino Uno |
---|---|
S | Pin 3 |
middle | +5V |
– | GND |

KY-005 Arduino Code
The following Arduino sketch acts as a TV remote control. It uses the IRremote library to serially send instructions to a TV using infrared light.
In this example, we will send the power command for Sony TVs every 5 seconds, turning the TV on and off 10 times.
Check the IRremote library documentation for supported TV commands and devices. Links to the required libraries can be found in the Downloads section below.
You can also use the KY-022 IR Receiver module to receive and process the signal.
#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
}
}
Be careful – I have connected +5V to S pin and GND to – and my IR Led has blown up. This module is not secure, watch your eyes.
I do not understand the purpose of connecting the middle pin to +5V. On my device, the middle pin is only connected to an SMD pad, however, there is no resistor on the board. Thus the middle pin has no connection to the LED.
Instead I wonder, if I should connect the device directly to the Arduino output, since current should not exceed 40mA and the device exceeds this value.
I agree with thomas there is nothing connected to the middle pin except the smd pad
I know this is an old post but incase anyone else reads this, the middle pin is not in use however it is there so it can be used when you add your own resistor to the board it depends on the voltage you are using