View Full Version : IR protocol tolerance or noise

February 25th, 2008, 01:18 PM
Hi, even though it was many years ago there seemed to be some technical/electronics discussions going on here so I thought I'd give it a shot and ask.

I have a bit of a problem with my DIY receiver, I'm mostly receiving garbage code after a pause, but then if I press the same code fast over and over it stabilizes. So to debug I look at the raw data coming from the IR receiver (a sharp GP1U52 variant).

I noticed that the timings are a bit off, but seem stable. Mor specifically, I'm using a Hitachi remote, I found the protocol specs online and it says

T = 550us
1 = T, 3T (pulse-space pair)
0 = T, T (pulse-space pair)

What I seem to be getting though (when sending codes at a relaxed pace) is something like
1 = ~750us, ~1550us
0 = ~750us, ~360us

it seems like the pulse (when the GP1U52 drops to 0 on the data line) lasts 200us too long, while the space OTOH is 200us too short on 0-bit (and around 100us too short on 1-bit). In my depseration I tried adding a 5k pullup to the IR data line too, that I saw being used in some other circuits, but that made no difference.

I'm not sure if this is within accepted tolerances, seems a bit too much to me (and the PIC software isn't liking it too much either).

when sending frequently, the timings become around
1 = ~660us, ~1600us
0 = ~660us, ~470us
slightly towards more correct (enough for the software to accept them)

What I'm wondering is if the noise, that can affect the IR receiver that has been mentioned in some old posts and on the UIRT2 page, does manifest itself in that way (in that the pulse-to-space transition being delayed)? Or is it actually working ok and just needs more tolerant software. Again, it doesn't flip out randomly, it seems pretty consistent +/- 40us, and the timing improvement when pressing frequently is also consistent, but I don't know what kind of effect noise has.

The IR receiver is one with a metal case and it is connected to GND, allthough the receiver is connected with 5" wiring as it's not directly on the circuit board. Power levels are fine.

Any help, ideas or comments would be greatly appreciated.