Keyes - Infrared Transmitter Module
Keyes - Infrared Transmitter Module
General Description
An infrared emitter, or IR emitter, is a source of light energy in the infrared spectrum. It is a light
emitting diode (LED) that is used in order to transmit infrared signals from a remote control.
Specification
Supply Voltage: 2.7V to 5.5V
Supply Current : 1.5mA
Operating Temperature: -25°C to 85°C
Frequency: 37.9KHZ
Transmitting Angle: Very Wide
Page 1 of 4 pages
Schematic
Using IR Transmitter
You need:
2 Arduino
Keyes IR Transmitter Module
Connecting Wires
Keyes IR Receiver Module
1. Connect the Keyes IR Transmitter Module to your arduino by following the pin connections
shown below.
2. Download IRremote library and extract it to library folder in your Arduino directory.
3. For the transmitter, enter this sketch to your Arduino IDE then click upload. You can also find
this at RFID library examples. This program will display the hex equivalent of the button pressed
on a remote.
#include <IRremote.h>
IRsend irsend;
void setup() {
}
Page 2 of 4 pages
void loop() {
irsend.sendSony(0x68B92, 20);
delay(100);
irsend.sendSony(0x68B92, 20);
delay(100);
irsend.sendSony(0x68B92, 20);
delay(3000);
}
4. For the receiver, get another Arduino and upload this code:
#include <IRremote.h>
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
irrecv.blink13(true);
}
void loop() {
if (irrecv.decode(&results)) {
if (results.decode_type == NEC) {
Serial.print("NEC: ");
} else if (results.decode_type == SONY) {
Serial.print("SONY: ");
} else if (results.decode_type == RC5) {
Serial.print("RC5: ");
} else if (results.decode_type == RC6) {
Serial.print("RC6: ");
} else if (results.decode_type == UNKNOWN) {
Serial.print("UNKNOWN: ");
}
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
}
Page 3 of 4 pages
Results
Actual Setup
Page 4 of 4 pages