First Test: Super StarterKit from Elegoo - Infrared

First Test: Super StarterKit from Elegoo - Infrared © GPL3+

This explains my short experience with infrared sensors.

  • 1,178 views
  • 0 comments
  • 4 respects

Components and supplies

Apps and online services

About this project

Project

Today, is my first time connecting an infrared remote to a component from the Elegoo Super Starter Kit for Uno R3 projects. I thought at first that a second UNO was necessary as a transmitter, but this turned out to be an error on my part. Essentially, it is about the programming of the receiver sensor, which is connected to the device. The receiver serves as an encoder of the received signal, in order to set a trigger (power strip on/off, switch the transmitter of a TV up/down).

It showed, in my case, that the signal from different remote controls arrived at the receiver, which was signaled by a red LED. The program code in the example was not suitable to play the pressed key, like in the serial monitor.

Update 12.11.2017

I did not want to leave the described failure and have taken the Enlightenment again. Today I describe the points, which I have checked again and led to the success:

  • the remote control may need fresh batteries to be able to transmit at all
  • sometimes the batteries are already inserted in the remote control and are protected with a film from direct contact - in this case pull off the protective film
  • check the wiring to the receiver: I have written down the letters G, R, Y again
  • I have the integer values on the serial monitor times test for power and button 5 output and listed in the function with.

Use an Decimal to Hexadecimal Converter to get the Hex like this: http://www.binaryhexconverter.com/decimal-to-hex-converter

Schematic

  • Y: Signal pin of IR receiver to Arduino Digital pin 11
  • G: Black to GND
  • R: Red to 5V DC.

Update 31.12.2017

Today I have the additional codes of another manufacturer, the company TechniSat included in the listing and found in this manufacturer a double assignment of the keys with 2 codes. I have inserted these for the numbers 0-9 in the listing.

The picture shows the open remote control: the printing is done by a silicone mat on the PCB board.

Conclusion

This was an interesting approach for a trigger on a trigger, but even with the original remote, it does not work. It is not applicable to me.

Hope you have other experiences with Infrared components, and I would appreciate feedback!

You will find here a short introduction into my testing from a servo motor.

You will find more under my account.

Code

Original Example Code from ElegooC/C++
// IRremote - Version: Latest 
#include <IRremote.h>
#include <IRremoteInt.h>

int receiver = 11; // Signal Pin of IR receiver to Arduino Digital Pin 11

/*-----( Declare objects )-----*/
IRrecv irrecv(receiver);     // create instance of 'irrecv'
decode_results results;      // create instance of 'decode_results'

void setup()   /*----( SETUP: RUNS ONCE )----*/
{
  Serial.begin(9600);
  Serial.println("IR Receiver Button Decode"); 
  irrecv.enableIRIn(); // Start the receiver

}/*--(end setup )---*/


void loop()   /*----( LOOP: RUNS CONSTANTLY )----*/
{
  if (irrecv.decode(&results)) // have we received an IR signal?

  {
    translateIR(); 
    irrecv.resume(); // receive the next value
  }  
}/* --(end main loop )-- */

/*-----( Function )-----*/
void translateIR() // takes action based on IR code received

// describing Remote IR codes 

{

  switch(results.value)
    
  {
  case 0xFFA25D: Serial.println("POWER"); break;
  case 0xFFE21D: Serial.println("FUNC/STOP"); break;
  case 0xFF629D: Serial.println("VOL+"); break;
  case 0xFF22DD: Serial.println("FAST BACK");    break;
  case 0xFF02FD: Serial.println("PAUSE");    break;
  case 0xFFC23D: Serial.println("FAST FORWARD");   break;
  case 0xFFE01F: Serial.println("DOWN");    break;
  case 0xFFA857: Serial.println("VOL-");    break;
  case 0xFF906F: Serial.println("UP");    break;
  case 0xFF9867: Serial.println("EQ");    break;
  case 0xFFB04F: Serial.println("ST/REPT");    break;
  case 0xFF6897: Serial.println("0");    break;
  case 0xFF30CF: Serial.println("1");    break;
  case 0xFF18E7: Serial.println("2");    break;
  case 0xFF7A85: Serial.println("3");    break;
  case 0xFF10EF: Serial.println("4");    break;
  case 0xFF38C7: Serial.println("5");    break;
  case 0xFF5AA5: Serial.println("6");    break;
  case 0xFF42BD: Serial.println("7");    break;
  case 0xFF4AB5: Serial.println("8");    break;
  case 0xFF52AD: Serial.println("9");    break;
  case 0xFFFFFFFF: Serial.println(" REPEAT");break;  

  default: 
    Serial.println(" other button   ");

  }// End Case

  delay(500); // Do not get immediate repeat


} //END translateIR
Update v1.1C/C++
Serial.println(results.value); // > here you get the integer from your Remote
// IRremote - Version: Latest 
#include <IRremote.h>
#include <IRremoteInt.h>

int receiver = 11; // Signal Pin of IR receiver to Arduino Digital Pin 11

/*-----( Declare objects )-----*/
IRrecv irrecv(receiver);     // create instance of 'irrecv'
decode_results results;      // create instance of 'decode_results'

void setup()   /*----( SETUP: RUNS ONCE )----*/
{
  Serial.begin(9600);
  Serial.println("IR Receiver Button Decode"); 
  irrecv.enableIRIn(); // Start the receiver

}/*--(end setup )---*/


void loop()   /*----( LOOP: RUNS CONSTANTLY )----*/
{
  if (irrecv.decode(&results)) // have we received an IR signal?
  {
    Serial.println(results.value); // > here you get the integer from your Remote
    // use an Decimal to Hexadecimal Converter to get the Hex like this: http://www.binaryhexconverter.com/decimal-to-hex-converter
    // add your Mapping in the function translateIR > check the two examples with Power and number 5-Button
    translateIR(); 
    irrecv.resume(); // receive the next value
  }  
}/* --(end main loop )-- */

/*-----( Function )-----*/
void translateIR() // takes action based on IR code received

// describing Remote IR codes 

{

  switch(results.value)
    
  {
  case 0xFFA25D: Serial.println("POWER Elegoo"); break;     // 16753245 Elegoo
  case 0xE0E040BF: Serial.println("POWER Samsung"); break;  // 3772793023 Samsung
  case 0xD5AD0B51: Serial.println("POWER Technics"); break;  // 3584887633 Technics
  case 0xFFE21D: Serial.println("FUNC/STOP"); break;
  case 0xFF629D: Serial.println("VOL+"); break;
  case 0xFF22DD: Serial.println("FAST BACK");    break;
  case 0xFF02FD: Serial.println("PAUSE");    break;
  case 0xFFC23D: Serial.println("FAST FORWARD");   break;
  case 0xFFE01F: Serial.println("DOWN");    break;
  case 0xFFA857: Serial.println("VOL-");    break;
  case 0xFF906F: Serial.println("UP");    break;
  case 0xFF9867: Serial.println("EQ");    break;
  case 0xFFB04F: Serial.println("ST/REPT");    break;
  case 0xFF6897: Serial.println("0");    break;
  case 0xFF30CF: Serial.println("1");    break;
  case 0xFF18E7: Serial.println("2");    break;
  case 0xFF7A85: Serial.println("3");    break;
  case 0xFF10EF: Serial.println("4");    break;
  case 0xFF38C7: Serial.println("5 Elegoo");    break;     // 16726215 Elegoo
  case 0xE0E0906F: Serial.println("5 Samsung");    break;  // 3772813423 Samsung
  case 0xB1CE824B: Serial.println("5 Technics");    break;  // 2983101003 Technics
  case 0xFF5AA5: Serial.println("6");    break;
  case 0xFF42BD: Serial.println("7");    break;
  case 0xFF4AB5: Serial.println("8");    break;
  case 0xFF52AD: Serial.println("9");    break;
  case 0xFFFFFFFF: Serial.println(" REPEAT");break;  

  default: 
    Serial.println(" other button   ");

  }// End Case

  delay(500); // Do not get immediate repeat


} //END translateIR
Update v1.2C/C++
// IRremote - Version: Latest 
#include <IRremote.h>
#include <IRremoteInt.h>

int receiver = 11; // Signal Pin of IR receiver to Arduino Digital Pin 11

/*-----( Declare objects )-----*/
IRrecv irrecv(receiver);     // create instance of 'irrecv'
decode_results results;      // create instance of 'decode_results'

void setup()   /*----( SETUP: RUNS ONCE )----*/
{
  Serial.begin(9600);
  Serial.println("IR Receiver Button Decode"); 
  irrecv.enableIRIn(); // Start the receiver

}/*--(end setup )---*/


void loop()   /*----( LOOP: RUNS CONSTANTLY )----*/
{
  if (irrecv.decode(&results)) // have we received an IR signal?
  {
    Serial.println(results.value); // > here you get the integer from your Remote
    // use an Decimal to Hexadecimal Converter to get the Hex like this: http://www.binaryhexconverter.com/decimal-to-hex-converter
    // add your Mapping in the function translateIR > check the two examples with Power and number 5-Button
    translateIR(); 
    irrecv.resume(); // receive the next value
  }  
}/* --(end main loop )-- */

/*-----( Function )-----*/
void translateIR() // takes action based on IR code received

// describing Remote IR codes 

{

  switch(results.value)
    
  {
  case 0xFFA25D: Serial.println("POWER Elegoo"); break;     // 16753245 Elegoo
  case 0xE0E040BF: Serial.println("POWER Samsung"); break;  // 3772793023 Samsung
  case 0xD5AD0B51: Serial.println("POWER Technics"); break;  // 3584887633 Technics
  case 0xA0C: Serial.println("POWER TechniSat"); break; // TechniSat
  
  case 0xFFE21D: Serial.println("FUNC/STOP"); break;
  case 0xFF629D: Serial.println("VOL+"); break;
  case 0xFF22DD: Serial.println("FAST BACK");    break;
  case 0xFF02FD: Serial.println("PAUSE");    break;
  case 0xFFC23D: Serial.println("FAST FORWARD");   break;
  case 0xFFE01F: Serial.println("DOWN");    break;
  case 0xFFA857: Serial.println("VOL-");    break;
  case 0xFF906F: Serial.println("UP");    break;
  case 0xFF9867: Serial.println("EQ");    break;
  case 0xFFB04F: Serial.println("ST/REPT");    break;
  
  case 0xFF6897: Serial.println("0");    break;
  case 0x200: Serial.println("0 TechniSat"); break; // TechniSat
  case 0xA00: Serial.println("0 TechniSat"); break; // TechniSat
  
  case 0xFF30CF: Serial.println("1");    break;
  case 0x201: Serial.println("1 TechniSat"); break; // TechniSat
  case 0xA01: Serial.println("1 TechniSat"); break; // TechniSat
  
  case 0xFF18E7: Serial.println("2");    break;
  case 0x202: Serial.println("2 TechniSat"); break; // TechniSat
  case 0xA02: Serial.println("2 TechniSat"); break; // TechniSat
  
  case 0xFF7A85: Serial.println("3");    break;
  case 0x203: Serial.println("3 TechniSat"); break; // TechniSat
  case 0xA03: Serial.println("3 TechniSat"); break; // TechniSat
  
  case 0xFF10EF: Serial.println("4");    break;
  case 0x204: Serial.println("4 TechniSat"); break; // TechniSat
  case 0xA04: Serial.println("4 TechniSat"); break; // TechniSat
  
  case 0xFF38C7: Serial.println("5 Elegoo");    break;     // 16726215 Elegoo
  case 0xE0E0906F: Serial.println("5 Samsung");    break;  // 3772813423 Samsung
  case 0xB1CE824B: Serial.println("5 Technics");    break;  // 2983101003 Technics
  case 0x205: Serial.println("5 TechniSat"); break; // TechniSat
  case 0xA05: Serial.println("5 TechniSat"); break; // TechniSat
  
  case 0xFF5AA5: Serial.println("6");    break;
  case 0x206: Serial.println("6 TechniSat"); break; // TechniSat
  case 0xA06: Serial.println("6 TechniSat"); break; // TechniSat
  
  case 0xFF42BD: Serial.println("7");    break;
  case 0x207: Serial.println("7 TechniSat"); break; // TechniSat
  case 0xA07: Serial.println("7 TechniSat"); break; // TechniSat

  case 0xFF4AB5: Serial.println("8");    break;
  case 0x208: Serial.println("8 TechniSat"); break; // TechniSat
  case 0xA08: Serial.println("8 TechniSat"); break; // TechniSat
  
  case 0xFF52AD: Serial.println("9");    break;
  case 0x209: Serial.println("9 TechniSat"); break; // TechniSat
  case 0xA09: Serial.println("9 TechniSat"); break; // TechniSat
  
  case 0xFFFFFFFF: Serial.println(" REPEAT");break;  

  default: 
    Serial.println(" other button   ");

  }// End Case

  delay(500); // Do not get immediate repeat


} //END translateIR

Comments

Similar projects you might like

Infrared Remote

Project tutorial by 4 developers

  • 3,337 views
  • 0 comments
  • 37 respects

Alarm System Security Put to the Test

Project tutorial by danionescu

  • 13,176 views
  • 4 comments
  • 23 respects

Stepper - A First Introduction to Nema 17

by Ingo Lohs

  • 5,643 views
  • 6 comments
  • 43 respects

Making your own Infrared Controller with Arduino

Project tutorial by RobotGeek Projects Team

  • 3,314 views
  • 0 comments
  • 18 respects

Clone Infrared Signals with Arduino

Project tutorial by Rick Osgood

  • 17,177 views
  • 1 comment
  • 20 respects
Add projectSign up / Login