Pages: [1]   Go Down
Author Topic: IR Remote issues  (Read 930 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 1
Posts: 481
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i followed this guide: http://luckylarry.co.uk/arduino-projects/arduino-redefining-the-tv-remote/

and i have my codes for a Sony TV and the TV doesn't recognize any signals, and ive tried other codes for other DVD players etc. ive confirmed that the IR LED is actually working by using my phone's camera to see the IR. I had the Arduino within inches of the TV so i know its not a range issue.

there are three different IR receiving programs in that library from the link.

one program(IRrecord) will output as raw like:
Code:
Received unknown code, saving as raw
 m2200 s750 m1050 s750 m450 s750 m1000 s800 m400 s800 m1000 s750 m500 s700 m450 s750 m1050 s750 m450 s750 m450 s750 m450 s700 m500


Then another program(IRrecvDump) in the library outputs it as raw also, but in a different format:
Code:
Could not decode message
Raw (26): 16036 2350 -650 1150 -650 550 -650 1150 -650 550 -600 1150 -650 550 -700 500 -650 1150 -650 550 -650 550 -650 500 -700 550


and in the last program(IRrecvDemo) i get the code: A90
and then the code i would use for it would be:
Code:
#include <IRremote.h>
IRsend irsend;

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

void loop()
{
  digitalWrite(13,HIGH); //just for status for program

  for (int i = 1; i <= 3; ++i)
  {
    irsend.sendSony(0xa90, 12); // Sony TV power code
    //Serial.print(i);
    delay(100);
  }
  digitalWrite(13,LOW); //just for status for program

  delay(10000); //wait 10 sec before sending again
}

those all are all pressing the same button...a Sony TV power button on the remote & i got all data through serial monitor...

in the link i posted, the person uses IRrevDump, and he gets something like i did as a raw output, then he removed all the spaces and - signs, and put commas instead so that they can be used in a index:
Code:
Raw (26): 16036,2350,650,1150,650,550,650,1150,650,550,600,1150,650,550,700,500,650,1150,650,550,650,550,650,500,700,550

then the code would be like:
Code:
#include <IRremote.h>
IRsend irsend;

// just added my own array for the raw signal
unsigned int TvPwr[26] = {
  16036,2350,650,1150,650,550,650,1150,650,550,600,1150,650,550,700,500,650,1150,650,550,650,550,650,500,700,550};

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

void loop()
{
  digitalWrite(13,HIGH); //just for status for program

  irsend.sendRaw(TvPwr,26,38);
  delay(100);
  irsend.sendRaw(TvPwr,26,38);
  delay(100);
  irsend.sendRaw(TvPwr,26,38);
  digitalWrite(13,LOW);
  delay(2000);
}

thanks
« Last Edit: October 25, 2011, 05:37:43 pm by sirbow2 » Logged

http://dduino.blogspot.com all my Arduino/electronic projects!!!

{NEW} Getting Started, Learning, Reference + FAQ PDF!!:
[url]http://ar

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 46113
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
the code i received using the arduino receiver program(IRrecvDump, and i already removed the spaces and - signs :
Could,not,decode,message
If the receiver application does not recognize what your remote control is sending it, then sending anything to emulate that remote control does not make sense.

Perhaps your remote control and TV are not using Sony protocol.
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 481
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i redid the first post. look there

well it is sony TV, so it is sony protocol? and as i said, one of the dump programs detects it as as sony code A90 (power)

thanks for your patients, i realize my post was unclear...
Logged

http://dduino.blogspot.com all my Arduino/electronic projects!!!

{NEW} Getting Started, Learning, Reference + FAQ PDF!!:
[url]http://ar

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 46113
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
there are three different IR receiving programs in that library from the link.

one program(IRrecord) will output as raw like:
Received unknown code, saving as raw
Quote
Then another program(IRrecvDump) in the library outputs it as raw also, but in a different format:
Both programs are telling you that the data that it received from the remote control was not in a recognized format.

Quote
and in the last program(IRrecvDemo) i get the code: A90
Code:
    irsend.sendSony(0xa90, 12); // Sony TV power code
send and get don't go together.

This code is sending a signal using Sony encoding. If your TV doesn't recognize it, the TV isn't using Sony encoding.

Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 481
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Both programs are telling you that the data that it received from the remote control was not in a recognized format.
ya, i know that...

the page said, if it is in a unrecognized format then you have format it and put it in an array like i did:
Code:
Raw (26): 16036 2350 -650 1150 -650 550 -650 1150 -650 550 -600 1150 -650 550 -700 500 -650 1150 -650 550 -650 550 -650 500 -700 550
to
Code:
Raw (26): 16036,2350,650,1150,650,550,650,1150,650,550,600,1150,650,550,700,500,650,1150,650,550,650,550,650,500,700,550
and then into the code like:
Code:
#include <IRremote.h>
IRsend irsend;

// just added my own array for the raw signal
unsigned int TvPwr[26] = {
  16036,2350,650,1150,650,550,650,1150,650,550,600,1150,650,550,700,500,650,1150,650,550,650,550,650,500,700,550};

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

void loop()
{
  digitalWrite(13,HIGH); //just for status for program

  irsend.sendRaw(TvPwr,26,38);
  delay(100);
  irsend.sendRaw(TvPwr,26,38);
  delay(100);
  irsend.sendRaw(TvPwr,26,38);
  digitalWrite(13,LOW);
  delay(2000);
}

Quote
This code is sending a signal using Sony encoding. If your TV doesn't recognize it, the TV isn't using Sony encoding.
yeah, i knew that too... i think your not understanding. the first two programs aren't supposed to give me a code like a90, they are DUMPing programs, and thus dont convert it into the a90 etc, only give the raw signal. since it is capturing the RAW signal from the remote when i press the power button, it should send out exactly what the raw code says when i put it(the raw code) into the array in the program that is designed to send raw codes. im not talking about the A90 code here, im saying that my tv doesn't recognize the raw code received by the arduino with the dump program, and then resent through the arduino.

Quote
irsend.sendSony(0xa90, 12); // Sony TV power code
the program(IRsendDemo) that has that code to send the a90 code, is completely different than the one(IRrecvDemo) that "got" the a90 code.

thanks.
Logged

http://dduino.blogspot.com all my Arduino/electronic projects!!!

{NEW} Getting Started, Learning, Reference + FAQ PDF!!:
[url]http://ar

Offline Offline
Sr. Member
****
Karma: 1
Posts: 481
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i set up another Arduino to receive what the first Arduino is sending( first Arduino sending already recorded raw data from remote).

arduino(either one) recieving remote code directly from remote:
Code:
Decoded SONY: A90 (12 bits) A90
Raw (26): -25800 2350 -650 1150 -650 550 -650 1200 -600 550 -600 1200 -600 600 -600 600 -600 1150 -650 550 -650 550 -650 550 -600 600

1st arduino sending:
Code:
2400,650,1150,600,600,600,1200,600,650,550,1150,650,650,550,550,650,1150,650,550,650,550,600,600,600,600

2nd arduino receiving
Code:
Decoded SONY: A90 (12 bits) A90
Raw (26): 2894 2400 -650 1100 -650 600 -600 1250 -550 750 -500 1200 -600 750 -450 600 -650 1150 -650 550 -650 600 -550 650 -550 700
varies abit, but pretty close. alot of the time it doesn't detect it as sony unless the ir led is really close to the ir receiver on the arduino. so i guess the issue is that its not re-sending the code accurately enough. any tips? the tv still deont turn on, even if the other arduino detects it as a power on signal.

thanks

EDIT/// YES!!! it works! i shortened the delay between each of three times sending the power code to 50ms. i had a 220 ohm resistor, which was only allowing 15ma for the IR led, i used a 62 ohm and that is 39.2 ma for the led now and so i have about 6ft range for turning on my tv smiley
« Last Edit: October 27, 2011, 08:05:05 pm by sirbow2 » Logged

http://dduino.blogspot.com all my Arduino/electronic projects!!!

{NEW} Getting Started, Learning, Reference + FAQ PDF!!:
[url]http://ar

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I am building an icon-based TV  remote with an Arduino Uno and came up with an integration of Ladyada's receiver and sender that eliminates the need to type in IR codes.
I modified the print section of the receiver sketch to print the necessary C code to send a key, rather than just print the timing.
Here is the new routine.
 
void printpulses(void) {
   Serial.println("void PUT_KEY_NAME_HERE {");
  for (uint8_t i = 0; i < currentpulse; i++) {
      Serial.print("delayMicroseconds(");
    Serial.print(pulses
  • * RESOLUTION, DEC);
    Serial.println(");// OFF");
       Serial.print("pulseIR(");
    Serial.print(pulses[1] * RESOLUTION, DEC);
    Serial.println("); //ON");
  }
    Serial.println(")");
}

You just run the modified receiver program,  aim the remote at the receiver circuit and press the remote button you want to encode. The serial monitor window will show you the C code you need for the sender. Just copy and paste from that window to the sender program, and give the subroutine a name. No messy typing of codes!   It works great.  I encoded 15 buttons from my TV remote in just a few minutes.
Logged

Upstate NY
Offline Offline
Full Member
***
Karma: 2
Posts: 183
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are errors in your code.  I think you have to use the "code" tag so that the code will display correctly.
Logged

Pages: [1]   Go Up
Jump to: