Infrared sending command but device is not responding

I've an UFO Cooler and i want to control with arduino,

Device is : https://www.google.com/imgres?imgurl=https%3A%2F%2Fcdn.vatanbilgisayar.com%2FUpload%2FPRODUCT%2FUFO%2Fthumb%2Fv2-90909_large.jpg&imgrefurl=https%3A%2F%2Fwww.vatanbilgisayar.com%2Fufo-attfi-01-uzun-kule-vantilator-uzaktan-kumandali-.html&tbnid=t9zW4AXJSvEvBM&vet=12ahUKEwjHptOD8NznAhWRwYUKHeonD9EQMygAegUIARC3AQ..i&docid=h4qZbmAVQIQ_dM&w=1000&h=1000&q=UFO%20Ufo%20ATTFI-01&hl=tr&ved=2ahUKEwjHptOD8NznAhWRwYUKHeonD9EQMygAegUIARC3AQ

i'm using infrared transmitter as : KY-005 Infrared Transmitter Module - ArduinoModulesInfo

Device's remote controller dump as below;

Encoding  : UNKNOWN
Code      : A32AB931 (32 bits)
Timing[23]: 
     +1400, - 250     +1400, - 250     + 600, -1100     +1350, - 250
     +1400, - 250     + 600, -1100     + 550, -1100     + 550, -1100
     + 550, -1100     + 600, -1100     + 550, -1100     +1350
unsigned int  rawData[23] = {1400,250, 1400,250, 600,1100, 1350,250, 1400,250, 600,1100, 550,1100, 550,1100, 550,1100, 600,1100, 550,1100, 1350};  // UNKNOWN A32AB931

Encoding  : UNKNOWN
Code      : 39D41DC6 (32 bits)
Timing[23]: 
     +1400, - 250     +1400, - 250     + 600, -1100     +1400, - 200
     +1450, - 250     + 550, -1100     + 550, -1100     +1400, - 250
     + 600, -1100     + 550, -1100     + 550, -1100     + 550
unsigned int  rawData[23] = {1400,250, 1400,250, 600,1100, 1400,200, 1450,250, 550,1100, 550,1100, 1400,250, 600,1100, 550,1100, 550,1100, 550};  // UNKNOWN 39D41DC6

Encoding  : UNKNOWN
Code      : 371A3C86 (32 bits)
Timing[23]: 
     +1400, - 250     +1400, - 250     + 600, -1100     +1350, - 250
     +1450, - 200     + 600, -1100     + 550, -1100     + 550, -1100
     + 600, -1100     +1350, - 250     + 600, -1100     + 550
unsigned int  rawData[23] = {1400,250, 1400,250, 600,1100, 1350,250, 1450,200, 600,1100, 550,1100, 550,1100, 600,1100, 1350,250, 600,1100, 550};  // UNKNOWN 371A3C86

Encoding  : UNKNOWN
Code      : 143226DB (32 bits)
Timing[23]: 
     +1400, - 250     +1400, - 250     + 600, -1100     +1400, - 250
     +1400, - 250     + 550, -1100     + 600, -1100     + 550, -1100
     + 550, -1100     + 550, -1100     +1400, - 250     + 550
unsigned int  rawData[23] = {1400,250, 1400,250, 600,1100, 1400,250, 1400,250, 550,1100, 600,1100, 550,1100, 550,1100, 550,1100, 1400,250, 550};  // UNKNOWN 143226DB

Encoding  : UNKNOWN
Code      : E0984BB6 (32 bits)
Timing[23]: 
     +1400, - 250     +1450, - 200     + 600, -1100     +1400, - 250
     +1400, - 250     + 600, -1100     + 550, -1100     + 550, -1100
     +1400, - 250     + 550, -1100     + 550, -1100     + 600
unsigned int  rawData[23] = {1400,250, 1450,200, 600,1100, 1400,250, 1400,250, 600,1100, 550,1100, 550,1100, 1400,250, 550,1100, 550,1100, 600};  // UNKNOWN E0984BB6

I'm sending command as below;

#include <IRremote.h>

IRsend irsend;

void setup()
{
}

void loop() {
irsend.sendNEC(0xaA32AB931, 32);

but device is not responding, as far as i understand from my searches this device is using an universal ir remote system because if you search "A32AB931" on google there are lots of topics but i couldn't find a solution in it.

In one of those topics one russian guy mentioned when he send code repeatedly(2 times) with delay it worked i've tried that but it didn't worked for me.

This was his approach

#include <IRremote.h>

IRsend irsend;

void setup()
{
}

void loop() {
irsend.sendNEC(0xaA32AB931, 32);
delay(7);
irsend.sendNEC(0xaA32AB931, 32);

since i don't have an oscilloscope (if i have i don't quite know how to use it anyway) i don't know the pulse and breaks.

I've also tried that send non-hex commands but didn't work too, i thought maybe device doesn't see infrared properly so i attached (with tape) ir transmitter to device :slight_smile: but didn't help too.

With the same setup when i define my tv's (Vestel) codes it works but couldn't be able to control this device.

These are the remote controller's button map :

POWER ON - OFF : A32AB931
SWING : 39D41DC6
ION ON - OFF : 371A3C86
FAN SPEED : 143226DB
SHUTDOWN TIMER : 3768077238

What am i doing wrong?

Your grabbing of the IR signal shows the encoding scheme used as unknown but your sending the codes using the NEC encoding scheme.

Encoding  : UNKNOWN
Code      : A32AB931 (32 bits)
Timing[23]:
     +1400, - 250     +1400, - 250     + 600, -1100     +1350, - 250
     +1400, - 250     + 600, -1100     + 550, -1100     + 550, -1100
     + 550, -1100     + 600, -1100     + 550, -1100     +1350
unsigned int  rawData[23] = {1400,250, 1400,250, 600,1100, 1350,250, 1400,250, 600,1100, 550,1100, 550,1100, 550,1100, 600,1100, 550,1100, 1350};  // UNKNOWN A32AB931
irsend.sendNEC(0xaA32AB931, 32);

Try sending the code using rawData (you may need to repeat the code 2 or 3 times) and see if that works.

@Riva i don't know how to thank you, thanks for your attention and help,i did send the raw and it works like a charm.

I've edited my code as below;

#include <IRremote.h>
#include <SoftwareSerial.h>

unsigned int  OnOff[23] = {1400,250, 1400,250, 600,1100, 1350,250, 1400,250, 600,1100, 550,1100, 550,1100, 550,1100, 600,1100, 550,1100, 1350};
unsigned int  Swing[23] = {1400,250, 1400,250, 600,1100, 1400,200, 1450,250, 550,1100, 550,1100, 1400,250, 600,1100, 550,1100, 550,1100, 550};  // UNKNOWN 39D41DC6
unsigned int  IonOnOff[23] = {1400,250, 1400,250, 600,1100, 1350,250, 1450,200, 600,1100, 550,1100, 550,1100, 600,1100, 1350,250, 600,1100, 550};  // UNKNOWN 371A3C86
unsigned int  FanSpeed[23] = {1400,250, 1400,250, 600,1100, 1400,250, 1400,250, 550,1100, 600,1100, 550,1100, 550,1100, 550,1100, 1400,250, 550};  // UNKNOWN 143226DB
unsigned int  ShutDownTimer[23] = {1400,250, 1450,200, 600,1100, 1400,250, 1400,250, 600,1100, 550,1100, 550,1100, 1400,250, 550,1100, 550,1100, 600};  // UNKNOWN E0984BB6

void setup()
{
  Serial.begin(9600);
}

void loop() // run over and over
{
Serial.println("Sending");
irsend.sendRaw(OnOff,23,38);
delay(7);//in my device you need to send ir code twice with 0.07ms break to make it work
irsend.sendRaw(OnOff,23,38);
Serial.println("Sent");
delay(2000); 
}

My project was about bluetooth/android communication, my work desk at home has built-in soft led lights (instead of using desk lamp) and i'm not good with heat so that's why i'm using this fan/cooler while i'm working at my desk (summer and winter all the time :slight_smile: ), usually my headphones are in my ears all the time while i work, what i want to do was open/close/dim led lights of the desk, open/close/swing cooler fan, open/close room's light, i was able to do all of them without controlling the cooler fan, now with your help i'm able to do it from my phone,many thanks :slight_smile:

I'm sharing my project's full codes so maybe someone needs it in the future;

#include <IRremote.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(11, 10); // RX, TX
IRsend irsend;
String data = "";
int rolea = 2;
int roleb = 3;
int rolec = 4;
int roled = 5;
unsigned int  AcKapat[23] = {1400,250, 1400,250, 600,1100, 1350,250, 1400,250, 600,1100, 550,1100, 550,1100, 550,1100, 600,1100, 550,1100, 1350};
unsigned int  Swing[23] = {1400,250, 1400,250, 600,1100, 1400,200, 1450,250, 550,1100, 550,1100, 1400,250, 600,1100, 550,1100, 550,1100, 550};  // UNKNOWN 39D41DC6
unsigned int  IonOnOff[23] = {1400,250, 1400,250, 600,1100, 1350,250, 1450,200, 600,1100, 550,1100, 550,1100, 600,1100, 1350,250, 600,1100, 550};  // UNKNOWN 371A3C86
unsigned int  FanSpeed[23] = {1400,250, 1400,250, 600,1100, 1400,250, 1400,250, 550,1100, 600,1100, 550,1100, 550,1100, 550,1100, 1400,250, 550};  // UNKNOWN 143226DB
unsigned int  ShutDownTimer[23] = {1400,250, 1450,200, 600,1100, 1400,250, 1400,250, 600,1100, 550,1100, 550,1100, 1400,250, 550,1100, 550,1100, 600};  // UNKNOWN E0984BB6
void setup()
{
  mySerial.begin(38400);
  Serial.begin(9600);
  pinMode(rolea, OUTPUT);
  pinMode(roleb, OUTPUT);
  pinMode(rolec, OUTPUT);
  pinMode(roled, OUTPUT);
  digitalWrite(rolea, HIGH);
  digitalWrite(roleb, HIGH);
  digitalWrite(rolec, HIGH);
  digitalWrite(roled, HIGH);
}//setup - end

void loop() // run over and over
{
    while(mySerial.available()==0)
    {}

    char character;
    while(mySerial.available()>0)
    {
      character = mySerial.read();
      mySerial.write(character);
      data = data + character;
      if (data == "1")
      {
      Serial.println("LEDLERI YAK");
      digitalWrite(rolea,LOW);
      data="";
      }
      else if (data == "2")
      {
      Serial.println("LEDLERI SONDUR");
      digitalWrite(rolea,HIGH);
      data="";
      }
      else if (data == "3")
      {
      Serial.println("UFO AÇ");
irsend.sendRaw(AcKapat,23,38);
delay(7);
irsend.sendRaw(AcKapat,23,38);
      data="";
      }
      else if (data == "4")
      {
      Serial.println("UFO SWING");
irsend.sendRaw(Swing,23,38);
delay(7);
irsend.sendRaw(Swing,23,38);

      data="";
      }
      else if (data == "5")
      {
      Serial.println("UFO ION");
irsend.sendRaw(IonOnOff,23,38);
delay(7);
irsend.sendRaw(IonOnOff,23,38);
      data="";
      }
      else if (data == "6")
      {
      Serial.println("UFO FAN SPEED");
irsend.sendRaw(FanSpeed,23,38);
delay(7);
irsend.sendRaw(FanSpeed,23,38);
      data="";
      }
      else if (data == "7")
      {
      Serial.println("UFO SLEEP TIMER");
irsend.sendRaw(ShutDownTimer,23,38);
delay(7);
irsend.sendRaw(ShutDownTimer,23,38);
      data="";
      }
      else if (data == "8")
      {
      Serial.println("ODA ISIGI AC");
      digitalWrite(roleb,LOW);
      data="";
      }
      else if (data == "9")
      {
      Serial.println("ODA ISIGI KAPAT");
      digitalWrite(roleb,HIGH);
      data="";
      }
    }
}//loop - end

Here is the android app's structure / made it by MIT APP INVENTOR :



Dimming led lights are not completed yet,i'll use a transistor for it and will upload updated code when i'm done.

Just one question : i'm using 4x relay shield, normally when i write digitalWrite(rolea, HIGH); relay must be ON but it does the opposite, HIGH is closing the relay and LOW is opening, not this relay shield all the relays i bought does the same thing, why?

Just one question : i'm using 4x relay shield, normally when i write

digitalWrite(rolea, HIGH);

relay must be ON but it does the opposite, HIGH is closing the relay and LOW is opening, not this relay shield all the relays i bought does the same thing, why?

Most relay shields/modules I have seen have 3 connections per relay on the switched side (not the side connected to the Arduino). The connections are usually called NO, COM, NC, one wire will connect to COM (common) and you choose the other connection depending on how the device is switched when the relay is not energized. You would connect to NC (normally closed) if you want the equipment to be powered when the relay is not energized and NO (normally open) if you want the equipment not to be powered when the relay is not energized.
Another thing that can effect the switching of relays is if the Arduino switched side goes through an opto-isolator as these can sometimes be wired to reverse the pin logic.
Post a picture or link to the relay shield and a drawing on how it is wired up.