Go Down

Topic: Interfacing with LG A/C - direct connection to IR reciver (Read 581 times) previous topic - next topic

zeljko_ciric

5-6 years ago I modify my LG A/C so I can use PICAXE micro and RS485 to connect to PC server and control remotely.
I got 5V directly from AC control board, signal from LED that is ON and use "FORCE" button to run AC in FULL POWER COOL mode.

Now I have plan to replace that with ESP8266 (Wemos D1 mini module + 3.3-5V level converter) so I can:

1) got status from AC LED (ON-OFF, coole-heat) - DONE
2) "spy" commands that AC receive from original remote - DONE, test with /IRremoteESP8266/IRrecvDemo return regular data
3) "inject" commands directly without IR LED hanging in front of AC - here I need help

All libraries that I find are for IR LED - modulated to produce 38kHz signal I need to produce signal without carrier. 



Watcher

Why dont you somehow just attach the IR led emitter near or on the the A/C's IR receiver. Maybe it can be done under the A/Cs external housing so it doesnt show from the outside. Then you just route a couple of wires to your board that drive the LED. Use twisted pair for this purpose.

That way you wont interfere with the unit's electronics and you will maintain isolation.

By the way
Quote
1) got status from AC LED (ON-OFF, coole-heat) - DONE
How did your get the cool-heat status?

Riva

The version of IRremote I have might be a bit old but if you create a copy and modify it to remove the TIMER_CONFIG_KHZ(khz); line does it then output just an on/off sequence without the carrier?
Code: [Select]
void IRsend::enableIROut(int khz) {
  // Enables IR output.  The khz value controls the modulation frequency in kilohertz.
  // The IR output will be on pin 3 (OC2B).
  // This routine is designed for 36-40KHz; if you use it for other values, it's up to you
  // to make sure it gives reasonable results.  (Watch out for overflow / underflow / rounding.)
  // TIMER2 is used in phase-correct PWM mode, with OCR2A controlling the frequency and OCR2B
  // controlling the duty cycle.
  // There is no prescaling, so the output frequency is 16MHz / (2 * OCR2A)
  // To turn the output on and off, we leave the PWM running, but connect and disconnect the output pin.
  // A few hours staring at the ATmega documentation and this will all make sense.
  // See my Secrets of Arduino PWM at http://arcfn.com/2009/07/secrets-of-arduino-pwm.html for details.

  
  // Disable the Timer2 Interrupt (which is used for receiving IR)
  TIMER_DISABLE_INTR; //Timer2 Overflow Interrupt
  
  pinMode(TIMER_PWM_PIN, OUTPUT);
  digitalWrite(TIMER_PWM_PIN, LOW); // When not sending PWM, we want it low
  
  // COM2A = 00: disconnect OC2A
  // COM2B = 00: disconnect OC2B; to send signal set to 10: OC2B non-inverted
  // WGM2 = 101: phase-correct PWM with OCRA as top
  // CS2 = 000: no prescaling
  // The top value for the timer.  The modulation frequency will be SYSCLOCK / 2 / OCR2A.
  TIMER_CONFIG_KHZ(khz);  <<-- Comment out this line
}
Don't PM me for help as I will ignore it.

Go Up