2

I'm trying to use an Arduino to control my Bionaire window fan. I followed several guides to build an IR receiver circuit to record the patterns sent by the remote for its five buttons Fan Remote. From there, I've tried both an IR transmitter circuit with IRSendRaw and a separate Raspberry Pi circuit using an IR transceiver hat and LIRC enter image description here, but the fan does not seem to pick up either. I've verified that the Pi receiver recognizes the commands from the Arduino transmitter circuit just as it does from the fan's actual remote and vice-versa, but even if I put the fan directly against the IR LED, it does not respond to any of the commands from the circuit.

What else might I need to do to make this work properly? As an alternative, what would be the best way to go about directly activating the 'buttons' on the remote circuit board pictured above?

Thanks in advance for your help

For future refernece, these are the signals I recorded for the remote, which match up with this post on electronics stackexchange.

power: 4E87E0AB
1300 -400 1300 -350 450 -1200 1300 -400 1300 -350 1300 -400 450 -1200 500 -1200 450 -1200 1300 -400 1300 -350 450
temp_up: 4EA240AE
1300 -400 1300 -350 450 -1200 1300 -400 1300 -350 1300 -400 450 -1200 450 -1250 450 -1200 450 -1250 1300 -350 1300
temp_down: 1D2FEFF6
1300 -400 1300 -350 450 -1250 1300 -350 1300 -350 500 -1200 1300 -350 500 -1200 450 -1200 500 -1200 450 -1200 450
mode: 39D41DC6
1300 -350 1300 -400 450 -1200 1300 -350 1300 -400 450 -1200 500 -1200 1300 -350 500 -1200 450 -1200 450 -1250 450
air_flow: E0984BB6
1300 -400 1300 -350 500 -1200 1300 -350 1300 -400 450 -1200 450 -1250 450 -1200 1300 -350 500 -1200 450 -1200 500

This is the sketch I'm trying to use to transmit data (just a modified version of the send raw demo from the library). Note that I also tried with only 23 items in the array (as originally recorded), but that made no difference:

#include <IRremote.h>

IRsend irsend;

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

}

void loop() {
  int khz = 38; // 38kHz carrier frequency for the NEC protocol
  Serial.println("Sending power");
  unsigned int irSignal[] = {1300,350, 1300,350, 500,1200, 1300,350, 1300,400, 1300,350, 450,1250, 450,1200, 450,1200, 1300,400, 1300,350, 500, 1200};
  irsend.sendRaw(irSignal, 24, khz); //Note the approach used to automatically calculate the size of the array.

  delay(1000); //In this example, the signal will be repeated every 5 seconds, approximately.
}

EDIT to show that I seem to be able to replicate the real signal.

In the following output from the IRecvDump2 example, the top two signal dumps are from the real remote and the bottom two are from my RPi sending the recorded signal. They're very slightly different, but seem (to me) to be within the variation of the recording of the true signal anyway.

What else could I be missing? Could there be some brightness threshold such that even holding the Pi directly up to (i.e. touching) the fan receiver wouldn't work? Some other sort of wake-up signal that for whatever reason the Arduino isn't recording/receiving?

Encoding  : UNKNOWN
Code      : 4E87E0AB (32 bits)
Timing[23]: 
     +1300, - 400     +1300, - 350     + 450, -1200     +1350, - 350
     +1300, - 350     +1300, - 400     + 450, -1200     + 500, -1200
     + 450, -1200     +1300, - 400     +1250, - 400     + 450
unsigned int  rawData[23] = {1300,400, 1300,350, 450,1200, 1350,350, 1300,350, 1300,400, 450,1200, 500,1200, 450,1200, 1300,400, 1250,400, 450};  // UNKNOWN 4E87E0AB

Encoding  : UNKNOWN
Code      : 4E87E0AB (32 bits)
Timing[23]: 
     +1300, - 400     +1300, - 350     + 450, -1250     +1300, - 350
     +1300, - 400     +1300, - 350     + 450, -1200     + 500, -1200
     + 450, -1200     +1300, - 400     +1300, - 350     + 450
unsigned int  rawData[23] = {1300,400, 1300,350, 450,1250, 1300,350, 1300,400, 1300,350, 450,1200, 500,1200, 450,1200, 1300,400, 1300,350, 450};  // UNKNOWN 4E87E0AB

Encoding  : UNKNOWN
Code      : 4E87E0AB (32 bits)
Timing[23]: 
     +1350, - 350     +1300, - 350     + 450, -1200     +1300, - 350
     +1300, - 350     +1300, - 400     + 450, -1200     + 450, -1200
     + 450, -1200     +1350, - 350     +1300, - 350     + 450
unsigned int  rawData[23] = {1350,350, 1300,350, 450,1200, 1300,350, 1300,350, 1300,400, 450,1200, 450,1200, 450,1200, 1350,350, 1300,350, 450};  // UNKNOWN 4E87E0AB

Encoding  : UNKNOWN
Code      : 4E87E0AB (32 bits)
Timing[23]: 
     +1350, - 300     +1350, - 350     + 450, -1200     +1300, - 350
     +1300, - 350     +1350, - 350     + 450, -1200     + 450, -1200
     + 450, -1200     +1300, - 350     +1350, - 350     + 450
unsigned int  rawData[23] = {1350,300, 1350,350, 450,1200, 1300,350, 1300,350, 1350,350, 450,1200, 450,1200, 450,1200, 1300,350, 1350,350, 450};  // UNKNOWN 4E87E0AB
13
  • Those codes look way to short to me. They also don't seem to include a preamble. Could you tell how you got those signals codes?
    – Gerben
    Dec 7 '20 at 19:29
  • I got the signals from the IRRecvDump2 example in the Arduino-IRremote library. I thought the signals looked odd as well, but I found one other post in the EE stack exchange where someone had recorded the same signals. I am using the IRSendRaw example from the same library to send from the Arduino and lirc's irsend when sending from the Pi
    – ihleonard
    Dec 7 '20 at 21:55
  • Updated the main post with my sketch @jsotola
    – ihleonard
    Dec 8 '20 at 5:39
  • there is another thing to try ... if you have access to a learning IR remote ... use it to learn one of the fan remote control buttons and confirm that it can control the fan ... next use it to learn the arduino non-working signal .... then use the arduino to record the learned code .... compare it to the original recorded values
    – jsotola
    Dec 9 '20 at 2:42
  • 1
    one other thing you could try .... set all the timing values to what the controller IC datasheet shows ... the two values are 1266 μs and 422 μs .... the trailing gap should be 6752 μs ... so 1300,350, 1300,350, 500,1200 ... should be 1266, 422, 1266, 422, 422, 1266 ... and the very last 1200 should be 6752
    – jsotola
    Dec 9 '20 at 3:12
-1

Interesting question with a lot of paths. I know nothing about your controller but in working with IR remotes in the past I found almost all IR remotes use the infrared frequency range (300 GHz - 400 GHz). This range should not be confused with the modulation rate (carrier frequency) of the remote control. The remote control codes are sent to the receiver using the modulation rate. The modulation rate for the remotes and set top boxes is between 36 kHz and 60 kHz, typically 36 kHz to 39kHz. Try this link it may be a bit redundant but it may help. http://www.pehratek.com/documents/FAQ-Infrared-Light-Control.pdf

5
  • I think you meant 300Ghz - 400Ghz.
    – Gerben
    Dec 7 '20 at 19:23
  • @Gil There is no link in your answer. Maybe you forgot it
    – chrisl
    Dec 7 '20 at 20:35
  • Sorry, I should have clarified: I'm using IRSendRaw example from the Arduino-IRremote library to send, so the 38 KHz modulation should be handled.
    – ihleonard
    Dec 7 '20 at 22:01
  • 1
    Sorry I am not familiar with that example or library. Sorry Gerben I hit a K instead of a G, thanks, I changed it.
    – Gil
    Dec 8 '20 at 19:59
  • @Gil gHz is gram hertz ... it should be GHz
    – jsotola
    Dec 10 '20 at 6:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.