Arduino Infrared Remote Control Experiment

By Kumantech | 05 July 2017 | 12 Comments
An infrared-receiver is a component which receives infrared signals and can independently receive infrared ray and output signals compatible with TTL level. It's similar to a normal plastic-packaged transistor in size and suitable for all kinds of infrared remote control and infrared transmission.
 
Experiment 1
Components needed:
1 * KUMAN Uno board
1 * USB data cable
1 * Infrared-receiver
1 * Remote controller
1 * 3-Pin anti-reverse cable
 
Experimental Steps:
Step 1: Build the circuit


Note: Here you need to add a library. Refer to the description in LIBRARY
Step 2: Compile the code
Step 3: Upload the sketch to the KUMAN Uno board
Now, press the Power key of a remote control, and both the LED attached and that connected to pin 13 on the KUMAN Uno board will light flashing. Then, the code values for the corresponding key are printed in the serial port monitor in the arduino ide
 
Program code:
/*
date:2017.6.27
IDE versions:1.7.7
Function: get the code value of each key of the remote control
*/
 
#include
 

int LED=13;
int RECV_PIN = 11; // Infrared receiving head is connected to Arduino 11 pin
 
IRrecv irrecv(RECV_PIN);
 
decode_results results; // Objects used to store encoding results
 
void setup()
{
Serial.begin(9600); // Initialize serial port communication
irrecv.enableIRIn(); // Initial infrared decoding
pinMode(LED,OUTPUT);
}
 
void loop()
{
if (irrecv.decode(&results))
{
digitalWrite(LED,HIGH);
delay(100);
digitalWrite(LED,LOW);
Serial.println(results.value, HEX);
irrecv.resume(); // Accept the next encoding
}
}


 1、Infrared receiving head introduction
What is the infrared receiver head?
From the infrared remote control signal is a series of binary pulse code. In order to make it from other infrared signal interference in wireless transmission process, usually first its modulation on the specific carrier frequency, and then by the infrared emitting diodes emitted, and the infrared receiving device to filtering the clutter, they receive the specific frequency signal and restore it to the binary pulse code, also is demodulation.

Working principle
The built-in receiver will transmit the infrared emission tube light signal into a weak signal, this signal through the IC internal amplifier amplification, and then through the automatic gain control, band-pass filtering, demodulation, waveform shaping after the original encoding to restore the original signal output by the receiver signal output pin input to the electrical appliances on the encoding recognition circuit.

Pin and connection of infrared receiving head

The infrared receiving head has three pins as follows:
When using the VOUT to the analog port, GND received the experimental board GND, +5v. received the VCC on the experimental board
 
Experiment 2
Components
1 * KUMAN Uno board
1 * USB data cable
1 * Infrared-receiver
1 * Remote controller
1 * LCD1602
1 * LED
1 * 9-Pin anti-reverse cable
Line connection diagram:



Program code:
/*
Date:2017.6.27
IDE version:1.7.7
Function:LCD displays coded value from remote control
*/
 
#include   
#include
#include
 

int LED=7;
decode_results results; // Use for saving object of the encoding results
int RECV_PIN = 11; // Integrated Infrared receiver connects to Aduino 11# pin
 
IRrecv irrecv(RECV_PIN);
LiquidCrystal_I2C lcd(0x3F,16,2);
 
void setup()
{
    //Serial.begin(9600); // Initialize serial port communication
    irrecv.enableIRIn(); // Initialize infrared decoding
    lcd.init();                 
    lcd.backlight();
    pinMode(LED,OUTPUT);
}
 
void loop()
{
    lcd.setCursor(0,0);               
    lcd.print("IRremote test");  
    lcd.setCursor(0,1); 
    lcd.print("code:");
    if (irrecv.decode(&results))
    {
         digitalWrite(LED,HIGH);
         delay(100);
         digitalWrite(LED,LOW);
         lcd.setCursor(5,1);
         lcd.print(results.value, HEX);
         irrecv.resume(); // Receive next coding
    }
}

 
odokefovije
August 24,2019 09:10
http://mewkid.net/order-amoxicillin/ - Amoxicillin 500mg Capsules <a href="http://mewkid.net/order-amoxicillin/">Brand Amoxil</a> voh.axxi.kumantech.com.efc.bv http://mewkid.net/order-amoxicillin/
ozoqubezab
August 24,2019 08:45
http://mewkid.net/order-amoxicillin/ - Buy Amoxicillin Online <a href="http://mewkid.net/order-amoxicillin/">Buy Amoxicillin</a> qgn.ncqh.kumantech.com.hed.mw http://mewkid.net/order-amoxicillin/
Clwvdecf
January 16,2019 13:34
In afin d'acqu??rir Messi de Barcelone, toute l'??quipe devra d??penser au moins 250 millions d'euros, mais les ??quipes de haut niveau en Europe ont d??j?? exprim?? leur volont?? de casser la banque pour obtenir le 27-year-old. The Yankees auraient voula
Zllpgqds
January 12,2019 07:45
Il ne serait pas trop nous affecter, mais nous sommes plein d'espoir. M??me sans DeSean Jackson ou un quart d'??lite, Maclin a prouv?? qu'il peut ??tre un n ?? 1 option. Et pourtant, il conna?t une ann??e extraordinaire pour Barcelone. <a href=https://ww
Gorjrbxh
January 12,2019 03:37
?Tr??s attendu 'Lucha Underground' de El Rey R??seau premi??res mercredi soir, promettant d'apporter le style de haut vol mexicaine lucha libre au spectacle de audiences. Il y aura quelques autres prix qui sont aussi ventilateur s??lectionn??e, mais les j
Ujldefuk
January 06,2019 10:39
Haut Micros Semaine 6However, Anthony dit que il est descendu ?? se demander si il ??tait pr??t ?? d??m??nager sa famille et commencer une nouvelle vie ?? Chicago - un facteur que finalement l'a convaincu d'accepter une p??riode de cinq ans 124 millions d
Ucxylzdu
January 06,2019 09:03
Vick a ??galement couru pour un autre 39 verges et est devenu le seul quart pour ??clipser la marque de 6000 verges au sol de carri??re. Maclin a maintenant 71 captures, 1088 verges et neuf touch??s cette season. Deux juges marqu?? il 120-108, tandis que
Rnaehybg
January 01,2019 16:32
Mir, qui a admis que la revanche possible avec Lesnar ??tait un de ses motivations rubrique dans son lutter contre Silva, a gagn?? par soumission ?? sa premi??re ??preuve de force avec Lesnar au UFC 81 en 2008, qui ??tait Octagon les d??buts de la superst
Cxzqsrln
December 30,2018 09:14
Les Royals de Kansas City et les Giants de San Francisco aura affronter dans cette circonstance exacte pour une chance de gagner la rupture du monde 2014 Series. Bumgarner est la b??te, l'homme', a d??clar?? de 41 ans Aden Bacus. ?La Colombie et le Kowe?t
Gqxvqwzo
December 24,2018 17:57
La star portugaise est le meilleur finisseur en Liga, et il a l'un des taux les plus ??lev??s objectif de notation dans le monde. COM SPORTS PAGE?Hector Olivera aurait conclu un accord avec les Dodgers de Los Angeles apr??s avoir examin?? les offres de pl
Zrqugfhc
December 16,2018 13:40
The handicap of being slow is it is served at every press conference. "Reuters3Rio Ferdinand believes Michael Keane can do a Paul Pogba and go back to Man UnitedKeane, lik." " lucky to win the set-piece in the first place, though, with replays showing Ede
Jkgihwci
November 24,2018 00:06
"With the other big boys chasing the five-time champions, the Spurs boss insists?that everyone else will be hoping Tottenham win the match." " fixtures, results and live match commentaryAnd, according to Marca, the Stamford Bridge club are preparing to ma
Leave a Reply
Your email address will not be published.Required fields are marked. *
Name *
Email *
Content
Popular blog
Categories