Hi everyone,
I'm trying to use arduino and an IR Led to turn my AC on and off.
I've managed to find the remote code and protocol and yet when i'm trying to use the led to transmit and turn on/off the ac nothing happend.
I double checked the code: Using TSOP sensor i got the same code from the AC original remote and also from my phone using AC remote application.
One more important thing: Using the same circuit, i can turn on/off my tv, even from far distance.
Maybe the LED dont get enough current? what do u think?
This is the circuit i'm using:
arduino pin 3 ----> 100 ohm resistor ---> IR Led ----> GND
the code im using for the transmitter:
/*
* IRremote: IRsendDemo - demonstrates sending IR codes with IRsend
* An IR LED must be connected to Arduino PWM pin 3.
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* http://arcfn.com
*/
#include <IRremote.h>
IRsend irsend;
void setup()
{
}
void loop() {
// Turn ON
for (int i = 0; i < 3; i++) {
irsend.sendNEC(3499099658, 32);
delay(40);
}
delay(5000); //5 second delay between each signal burst
// Turn OFF
for (int i = 0; i < 3; i++) {
irsend.sendNEC(2147484682, 32);
delay(40);
}
delay(5000); //5 second delay between each signal burst
}
The codes i've got from th original remote using the receiver:
Pressing on ON button:
Encoding : NEC
Code : 98DD060A (32 bits)
Timing[73]:
+8850, -4400 + 600, -1650 + 600, - 600 + 600, - 550
+ 600, -1650 + 650, -1600 + 650, - 550 + 600, - 600
+ 600, - 550 + 650, -1650 + 600, -1650 + 600, - 550
+ 650, -1650 + 600, -1650 + 600, -1650 + 600, - 600
+ 600, -1650 + 600, - 550 + 650, - 550 + 600, - 600
+ 600, - 600 + 600, - 550 + 600, -1650 + 600, -1650
+ 650, - 550 + 600, - 600 + 600, - 550 + 650, - 550
+ 600, - 550 + 650, -1650 + 600, - 550 + 650, -1600
+ 650, - 550 + 600, - 600 + 600, -1650 + 600, - 600
+ 600
unsigned int rawData[73] = {8850,4400, 600,1650, 600,600, 600,550, 600,1650, 650,1600, 650,550, 600,600, 600,550, 650,1650, 600,1650, 600,550, 650,1650, 600,1650, 600,1650, 600,600, 600,1650, 600,550, 650,550, 600,600, 600,600, 600,550, 600,1650, 600,1650, 650,550, 600,600, 600,550, 650,550, 600,550, 650,1650, 600,550, 650,1600, 650,550, 600,600, 600,1650, 600,600, 600}; // NEC 98DD060A
unsigned int data = 0x98DD060A;
Pressing on OFF button:
Encoding : NEC
Code : 88DD040A (32 bits)
Timing[73]:
+8800, -4400 + 650, -1650 + 600, - 550 + 650, - 550
+ 600, - 550 + 650, -1650 + 600, - 550 + 650, - 550
+ 650, - 500 + 650, -1650 + 600, -1650 + 600, - 600
+ 600, -1650 + 600, -1650 + 600, -1650 + 600, - 600
+ 600, -1650 + 600, - 600 + 600, - 550 + 650, - 550
+ 600, - 550 + 650, - 600 + 550, -1650 + 650, - 600
+ 550, - 600 + 600, - 550 + 650, - 550 + 600, - 550
+ 650, - 550 + 650, -1600 + 650, - 550 + 600, -1650
+ 600, - 600 + 600, - 550 + 650, -1650 + 600, - 550
+ 650
unsigned int rawData[73] = {8800,4400, 650,1650, 600,550, 650,550, 600,550, 650,1650, 600,550, 650,550, 650,500, 650,1650, 600,1650, 600,600, 600,1650, 600,1650, 600,1650, 600,600, 600,1650, 600,600, 600,550, 650,550, 600,550, 650,600, 550,1650, 650,600, 550,600, 600,550, 650,550, 600,550, 650,550, 650,1600, 650,550, 600,1650, 600,600, 600,550, 650,1650, 600,550, 650}; // NEC 88DD040A
unsigned int data = 0x88DD040A;