IR hex code decoding

As part of a project I am trying to send out the "power on" IR code for a epson projector. I read http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1270451288 and all links in that topic, but when I looked at the codes for the epson, nothing made sense.

Here is the hex code:

0000 0070 0000 0019 0023 000f 000c 0023 000c 000f 000c 000f 000c 0019 000c 000f 000c 002d 000c 000f 000c 000f 000c 0023 000c 0019 000c 0019 000c 0019 000c 0019 000c 0019 000c 000f 000c 000f 000c 000f 000c 000f 000c 000f 000c 0019 000c 0023 000c 0023 000c 000f 000c 0d1b

Source: http://www.remotecentral.com/cgi-bin/codes/epson/powerlite_8100/

While all of the 000c's are the same, a lot of the other bits are close to each other and I cannot differentiate the 1's and the 0's. Also I dont quite know how I would implement this once I got it decoded, I was planning to base it off code like this...

int pinIRLED = 1;                               // place the IR LED between this pin and ground

void setup() {
  pinMode(pinIRLED, OUTPUT);                         // set the pin as an output
}
 
// this sets a signal on for a set amount of microseconds, and pulses it on and off for that time
// frequency is one over twice the delays
void pulseON(int pulseTime) {
  unsigned long endPulse = micros() + pulseTime;       // create the microseconds to pulse for
  while( micros() < endPulse) {
    digitalWrite(pinIRLED, HIGH);                   // turn IR on
    delayMicroseconds(13);                         // half the clock cycle for 38Khz (26.32×10-6s) - e.g. the 'on' part of our wave
    digitalWrite(pinIRLED, LOW);                   // turn IR off
    delayMicroseconds(13);                          // delay for the other half of the cycle to generate wave/ oscillation
  }
 
}
 
void pulseOFF(unsigned long startDelay) {
  unsigned long endDelay = micros() + startDelay;      // create the microseconds to delay for
  while(micros() < endDelay);
}
 
void shoot() {
  for (int count=0; count < 2; count++) {         // repeat twice
    pulseON(2000);                               // on for 2000 uS (Microseconds)
    pulseOFF(27850);                               // off for 27850 uS
    pulseON(390);                               // on for 390 uS
    pulseOFF(1580);                                     // off for 1580 uS
    pulseON(410);                                       // etc.
    pulseOFF(3580);
    pulseON(400);
    pulseOFF(63200);    
  }                                          
}
 
void loop() {
  shoot();                               // shoots a picture
  delay(4000);                           // delay in milliseconds so it doesn't take two before you release the button
}

source: http://www.instructables.com/id/E7OY9ADG0KQLHUE/

Am I on the right track? Any help would be welcome.

As you seem to understand, based on the program, the Infrared (IR) signal sent by a Remote Control (RC) is modulated at quite a high frequency (about 38kHz).

The cleanest way to do this is to set an Arduino timer to the right frequency, and it will generate the modulation.

Then those codes represent how often to switch the modulation on and off.

An explanation of that code is at:
http://www.hifi-remote.com/infrared/IR-PWM.shtml
http://www.remotecentral.com/features/irdisp2.htm

Then examples of Arduino code are at:

http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/

HTH
GB

Thanks, this helps, especially the remote class. however I still don't get the hex code because both of the websites describe clear ones and zeros but I do not see them in this hex code...

I'm sorry, I don't understand what you want to know.

You understand that there the IR LED goes on and off quickly, say at 40KHz, so that the receiver can tell the difference between the IR transmitter and things like sun light, or an electric fire.

This rapid on/off is the carrier frequency. It isn't itself the data, but carries the data. Different IR systems may use different carrier frequencies, for example 36KHz, 38KHz and so on.

The data to be sent is encoded using specific numbers of cycles of that rapid on/off carrier, or periods with nothing. The period of nothing is measured using cycles of the the carrier frequency, even though there is no light being transmitted. A single chunk of on/off's and single continuous period of off is called a burst pair. So the burst pair are just two numbers, how many cycles of the carrier frequency to transmit, and how many cycles if the carrier to not transmit (stay silent).

Does this make sense?
If it does what is the part of those websites that doesn't make sense, because I couldn't find "clear ones"

I'm sorry, I was not clear. I meant that the website said that each burst pair could be classified as a "1" or a "0" but I cannot tell what is what in my hex code...

0000 0070 0000 0019 - starting information
0023 000f - lead in pair
000c 0023 - 1?
000c 000f - 0
000c 000f - 0
000c 0019 - 1
000c 000f - 0
000c 002d - 1?
000c 000f - 0
000c 000f - 0
000c 0023 - 1?
000c 0019 - 1
000c 0019 - 1
000c 0019 - 1
000c 0019 - 1
000c 0019 - 1
000c 000f - 0
000c 000f - 0
000c 000f - 0
000c 000f - 0
000c 000f - 0
000c 0019 - 1
000c 0023 - 1?
000c 0023 - 1?
000c 000f - 0
000c 0d1b - lead out

I just don't know what to make of the 23's, 19's and 2d's. Even though that they are so far off from each other can they all mean "1"?

Reference: RC: The Pronto's IR Code Format (2)

I think your interpretation is correct. However, consider these points:

  1. The first number is "0000", which means "learned code" so the timing numbers might wander a bit.
  2. On the 3rd page (irdisp3) they decode a Sony code and note that Sony "likes" to monkey with what data gets sent.
  3. They also mention that there is no standard, and other mfrs can do as they please.

So, there is no guarantee that the code your looking at is a "simple" sequence of binary pairs. Epson might have added in some other special numbers for their own nefarious purposes. A google search might uncover their true meaning.

However, as long as the code sequence works - why worry about it?

I want to know how your going to use this data?

I guess the thing to do is set up a PWM at your modulation frequency, then turn it ON/OFF for the times given in the codes - just ignore the first 4 numbers, unless you want to make your software "smart" so it calculates the modulation frequency from the second number.

When I search Arduino for "Pronto hex" I get a bunch of hits, perhaps there is already some code for handling this?

I did a google search for "Pronto hex converter" and found lots of sites offering software to convert it into binary or hex numbers - but don't forget that might not work if those "odd" pairs are Epson-specific codes.

Hi!
I just wanted to say that some time ago i wanted to record the Power-On-IR-Pattern from my heat pump's remote control, so that when im at school and it gets cold (arduino is logging temperature and gives me alert), I can turn the heat pump on over the internet. So I bought IR receiver and emitter (ir diode). I connected ir receiver to microphone cable and pluged it in. For recording i used Audacity audio-recording program. It seemed to work, i saw the digital impulses but when i connected ir-emitter to headphone cable and pluged it in, while playing it nothing happened. Maybe the receiver was no as sensitive as the heat-pump's remote control ir transmitter (the Hz didnt match) or the ir signal sender couldnt handle it. Then I thought that the emitter isnt enough powerful and so i tried different lengths to heat pump sensor but nothing happened.

"D3C3PT1C0N":

You should start a new thread, your problem is not related to this thread.

And by the way, humans don't hear very well above 20 KHz so our audio equipment tends to stay below that. Most IR controls are around 40 KHz. So your audio recording is not likely to play back well enough for the receiver to recognize it as a valid signal.

There is an Arduino project for a universal remote, and another for web access. Merge the two and your in business!