This wiki article covers the KY-005 infrared transmitter (IR) module. Included are wiring diagrams, code examples, pinouts, and technical data. This sensor is generally used to transmit IR signals to other devices such as TVs and AV equipment.
Content
- Sensor/Module Image Gallery
- Description and Technical Data
- Device Pinout
- Projects that use this Sensor/Module
- Code Examples
- Code example for Arduino
- Code example for Raspberry Pi
Sensor Module Image Gallery
Description and Technical Data
The KY-005 infrared transmitter module is designed to transmit coded infrared signals at a frequency of 38kHz and a wavelength of 940nm. This is outside the spectrum detectable by humans. For standalone projects this module is generally paired with the KY-022 infrared receiver.
Tech Specs for the KY-005 IR Transmitter:
- Operating Voltage: 5V
- Current Consumption: 30-60mA
- Frequency: 38kHz
- Wavelength: 940nm
- Dimensions: 0.728in x 0.591in (18.5mm x 15mm)
Device Pinout & Schematics
his module has three pins: Vcc+, Signal, and Ground
The KY-005 infrared module pinout is as follows:
Our Projects that Use this Sensor
The following Geek Pub projects use the KY-005 infrared transmitter module:
You’ll find below code examples of using the KY-005 infrared transmitter module with both the Arduino and the Raspberry Pi (Python).
KY-005 Infrared Transmitter Code Example for Arduino
The following code example is for the Arduino. This code snippet will transmit the A90 code via IR every second.
Arduino Wiring:
- KY-005 IR GND to Arduino GND
- KY-005 IR Vcc+ to Arduino +5V
- KY-005 IR Signal to Arduino PIN 11
#include <IRremote.h>
#include <IRremoteInt.h>
IRsend irsend;
void setup()
{
}
// main program loop
void loop() {
irsend.sendRC5(0xA90, 12);
delay(1000);
}
KY-005 Infrared Transmitter Code Example for Raspberry Pi
KY-005 Infrared Transmitter Code Example for Raspberry Pi
The following code example is for the Raspberry Pi using the Python programming language. This code will transmit the A90 IR code every 1 second.
Raspberry Pi Wiring:
- KY-005 IR GND to Raspbery Pi GND
- KY-005 IR Vcc+to Raspberry Pi PIN 2
- KY-005 IR Signal to Raspberry Pi PIN 11 (GPIO 17)
We hope this wiki article has been helpful to you. Please leave a comment below if you have any questions or comments, as we try to keep these articles constantly up to date.
5 Responses
Does KY005 transmit continuously ? Mainly I want to build a sensor systems that counts time passed between anyone has passed across sensors
That’s dependent upon the code you write. Also, I’d recommend using this instead: https://www.thegeekpub.com/wiki/sensor-wiki-ky-050-hc-sr04-ultrasonic-sensor/
Do you have some of doccumentarion about program the module in raspberry 3? I cant find anything in the web
hi, does the “#Coming Soon!” refer to the python code?
which library i need to install for this