# Confused by IR pulses

I'd like to decode some IR signals from a TV remote control. I scavenged a 3 pin IR receiver from some old junk and hooked it up.

From what I've read about RC-5, I was expecting to see a start bit indicating the bit time, which I could synchronize to. But, I'm seeing lots of transitions per bit time.

Is this a sign that I'm mixing 38kHz and 56kHz devices? Or am I expecting the wrong thing?

Edit:

I was concerned that the weirdness I was seeing was the IR receiver being odd. So, I wired up a plain old 2 pin IR LED receiver to compare (bottom trace). With the LED, I see the 32kHz carrier wave and the modulated signal, the "smart" receiver filters out the carrier perfectly leaving just the pulse widths.

-
 Joby - Shouldn't your 'edit' really be a second answer? – Kevin Vermeer Oct 4 '10 at 23:27 Potato - potato. It was Amos' response that led to the understanding... – Toby Jaffey Oct 4 '10 at 23:36 The potato-potato saying doesn't work very well online, but I think I understand.... – Kevin Vermeer Aug 7 '11 at 8:43

ladyada has a discussion about ir pulses over on her page detailing the design of the TV-B-Gone Kit she sells. It might be of some use to you.

EDIT: There's a brand new tutorial on ladyada's site discussing how to build an IR decoder in even more detail, which has just been posted today: IR Detector

-
Massively useful, thanks. – Toby Jaffey Oct 4 '10 at 23:00
She must be reading... ;) – Toby Jaffey Oct 6 '10 at 18:38
-

This is definitely not RC-5, which you can easily tell from the preamble in the first and second screenshots. RC-5 is Manchester modulated (aka Biphase modulation), which is characterized by its mid-bit edge:

so you always have a pattern of equally-spaced clock edges (either rising or falling) with data edges (present or not) halfway between two clock edges. Neither the preamble nor the following pulses match this criterion.
The last screenshot indicates that it uses pulse-pause modulation: a pulse with a fixed width followed by a variable pause. A long pause could be a 1 and a short one a 0 or vice versa.
This modulation method has the disadvantage that messages aren't the same duration; their duration depends on the number of 1-bits in it. An advantage is that decoding is a bit easier than Manchester.

-