IR Transmitter NOT working for ALL devices

Hi,

Tl;dr: The IR Transmitter could switch my TV on/off, but not my AC Unit.

Context: I built an IR Receiver circuit on the side to test the controllers of the TV and AC, in order to obtain the HEX codes. I copied the codes over and paste them into the code below. The purpose of the inByte serial input is to trigger the IR Transmitter to send out different HEX codes for different orders. I tested it on my TV first and it worked perfectly fine! However, it surprisingly does not work with my AC.

Suspicion: My current suspicion is the attributes that I call from the 'irsend' class (see attached header file for more info). There is a list of device brands (i.e. Samsung, Sharp, Bosewave), but Midea, the brand of my AC is not one of them. So I had to resort to the 'sendNEC' attribute instead, which is generally the default for most generic controllers. However, I tried using both sendNEC and sendLG on my LG television, and it both worked. So I would conclude this suspicion is likely invalid.

Disclaimer:

  1. I tried changing the IR Transmitter (a similar model) but the problem persists. I have yet to try a different model.
  2. I used a 100 Ω resistor along with the IR Transmitter.
  3. The AC model is Midea.

My code is as follows:

#include <IRremote.h>
int inByte = 0; //Serial input to send data to control devices
IRsend irsend;

void setup() {
  Serial.begin(9600);
  Serial.print("Transmitter Ready");
}

void loop() {

  // AC ON
  inByte = Serial.read();
  if (inByte == '1') {
    Serial.println("Turning the AC on");

    for (int i = 0; i < 5; i++) {
      irsend.sendNEC(0xB24D7B84, 32);
      Serial.println("AC ON");
      delay (500);
    }
  }

  // AC OFF
  if (inByte == '2') {
    Serial.println("Turning the AC off");

    for (int i = 0; i < 5; i++) {
      irsend.sendNEC(0xB24DBF40, 32);
      Serial.println("AC OFF");
      delay(500);
    }
  }

  // TV ON & OFF - NEC
  if (inByte == '3') {
    Serial.println("Turning TV ON/OFF - NEC");

    for (int i = 0; i < 3; i++) {
      irsend.sendNEC(0x20DF10EF, 32);
      Serial.println("TV ON NEC");
      delay(500);
    }
  }

  // TV ON & OFF - LG
  if (inByte == '4') {
    Serial.println("Turning TV ON/OFF - LG");

    for (int i = 0; i < 3; i++) {
      irsend.sendLG(0x20DF10EF, 32);
      Serial.println("TV ON LG");
      delay(500);
    }
  }
}

Please let me know any follow-up questions, I'm more than happy to clarify them for you!

IRremote.h (18.5 KB)

Are they the same modulation and coding techniques? These are typically designed so as to not cause a different unit to operate. NXP has some nice applications notes on there web site explaining this.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.