Libelium is offering new technical support channels, to contact with de Technical Support team to solve any issue our doubt please contact with your sales agent or visit our contact site

Post a new topicPost a reply Page 1 of 1   [ 3 posts ]
Author Message
 Post subject: IR REMOTE shield with Samsung aircon
PostPosted: Thu Dec 05, 2019 6:10 pm 

Joined: Mon Dec 02, 2019 9:39 am
Posts: 2

Some weeks ago I buy an Ir-Remote shield from the shop.
For my project i need to read and send the code of a Samsung remote like the one in the video on the explanation page.

I find 4 error or problem:

1. The duty cycle of the frequency is wrong, the sketch have a 50% but the remote have 19%;
2. The period is approx 30microseconds and the resultant frequency is 33khz, but the sketch say about 38khz like my remote;
3. The reading sketch don't read well the code and remove the first part of it;
4. The voltage on the irled pin is too low compared to the original Samsung remote IR led and the light emitted too.

The duty cycle and the frequency now work well with 1 microsecond up and 15 microsecond down (instead 10 and 10), and the frequency too.

The voltage is too low i think and i can't adjust it (approx 1.3 volt at the peak!).

About the raw code, i try to read and write it manually from a Fluke oscilloscope the first part but the result is the same.

Please can you tell me a list of sketch and library used for do the work that i see in the video on the shop or explain a solution for my problem?

Thank you.

 Post subject: Re: IR REMOTE shield with Samsung aircon
PostPosted: Wed Dec 11, 2019 3:43 pm 

Joined: Mon Dec 02, 2019 9:39 am
Posts: 2
Problem: SOLVED!

For RAW lenght < 255 bit:
Open IRremoteInt.h in the last IRRemote library version
Edit the #define RAWBUF value from 101 to 255
Edit the #define _GAP value from 5000 to 20000

If your RAW is longhest than 255, you need to edit the unit from 8 bit to 16 bit.
BUT in this case i find a good sketch for extract the RAW (see the link below): ... s-arduino/

With a mod version of it i read my code of 349 bits and it work fine.

  Author: Stefano Martino
  Versione: 1.1 - 11 dec 2019

  With this AnalysIR mod you can read long raw IR Remote codes used tipically on Airconds and hvac systems.
  The extracted RAW can pasted directly on the Coocking Hacks SEND Sketch, without any other mods.

  NOTE: for some aircon isn't necessary to repeate the code!

  Credit: Copyright AnalysIR 2014-2019

  PINOUT (only tested on Arduino UNO):

  Receiver IR         Arduino
  V+             ->   +5v
  GND            ->   GND
  Signal         ->   Digital Pin 2

#define maxLen 800
#define rxPinIR 2

volatile unsigned int irBuffer[maxLen];
volatile unsigned int x = 0;

void setup() {
  attachInterrupt(digitalPinToInterrupt(rxPinIR), rxIR_Interrupt_Handler, CHANGE);
  Serial.print("Press a key (once) and wait...");

void loop() {


  if (x) {
    Serial.print(F("Below are coded "));
    Serial.print((x - 1));
    Serial.print(F(" [RAW] pulses: "));


    for (int i = 1; i < x; i++) {

      if (!(i & 0x1)) {
      } else {
      Serial.print(irBuffer[i] - irBuffer[i - 1]);
    x = 0;
    Serial.println("Ready for another key...");

    attachInterrupt(digitalPinToInterrupt(rxPinIR), rxIR_Interrupt_Handler, CHANGE);

void rxIR_Interrupt_Handler() {
  if (x > maxLen) return;
  irBuffer[x++] = micros();



 Post subject: Re: IR REMOTE shield with Samsung aircon
PostPosted: Wed Dec 11, 2019 4:26 pm 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Hi Stefano,

Apologies for our late response, glad to hear you solve the problem by yourself.

If you have any other question, please feel free to ask.


Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 3 posts ]

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of

© Libelium Comunicaciones Distribuidas S.L. | Terms of use.