Searching \ for '[EE]: IR Codes ... figuring them out?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/io/irs.htm?key=ir
Search entire site for: 'IR Codes ... figuring them out?'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: IR Codes ... figuring them out?'
2003\06\08@212531 by ?q?Debbie=20Hynes?=

flavicon
face
part 1 1862 bytes content-type:text/plain; charset=iso-8859-1 (unknown type 8bit not decoded)

PICers,

Could really do with some help on this one. :)

The question of IR codes and how to grab'em came up the other day and someone -
sorry can't remember who :( - had a brilliant idea: convert the IR pulse train
to sound and decode'em with an audio package like GoldWave. Or Cool Edit in my
case.

I tried feeding the pulse train out of a Rohm 3-terminal IR receiver chip into
a PC's line input. That didn't work too well cuz all u get is a splatter of
waves with peaks all over the place. Can't pick out the 1's & 0's.  I guess coz
it's a train square waves with lots of harmonics. No good :(

Then I thought of the attached schematic : grab an AF sig gen & feed its o/p
thru a CD4016 analogue gate and use the IR Rx chip to gate it on/off. That way
u should get a train of pulses made up of pure sine waves going into the PC?
5KHz in this case.

I did that and wot u get at first is a long recording of the carrier signal - u
hafta put Cool Edit on record then run to the workbench, zap the Rx a coupla
times with the remote, then run back & stop recording.

Probably should have inverted the gate cuz the sine wave is on all the time and
the raw recording is a big green blob. So I notch filtered the 5KHz signal down
a bit to bring up the actual data pulses. See IRcode03.gif

OK... so what's the next move? The trains from different commands all look
pretty much the same to me. Which part of the signal is the important bit with
actual information content? And do I now figure out the 1's, 0's and durations?

Thankz 4 advice - Debbie

http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.



part 2 3474 bytes content-type:image/gif; name="ir_cct01.gif" (decode)


part 3 1724 bytes content-type:image/gif; name="ircode03.gif" (decode)


part 4 2 bytes
-

2003\06\08@230332 by David Duffy

flavicon
face
Debbie Hynes wrote:
> Could really do with some help on this one. :)
>
> The question of IR codes and how to grab'em came up the other day and someone -
> sorry can't remember who :( - had a brilliant idea: convert the IR pulse train
> to sound and decode'em with an audio package like GoldWave. Or Cool Edit in my
> case.

I used that method a few years ago with some (Win) software I wrote.

> I tried feeding the pulse train out of a Rohm 3-terminal IR receiver chip into
> a PC's line input. That didn't work too well cuz all u get is a splatter of
> waves with peaks all over the place. Can't pick out the 1's & 0's.  I guess coz
> it's a train square waves with lots of harmonics. No good :(

Did you use a pullup resistor? (47K is usually all you need)
The output on a lot of IR decoders are open collector.

{Quote hidden}

Sounds ugly & not neccessary. The raw waveform will do just fine.

> OK... so what's the next move? The trains from different commands all look
> pretty much the same to me. Which part of the signal is the important bit with
> actual information content? And do I now figure out the 1's, 0's and durations?

You have to drive the soundcard hard to get nice sqare edges.
I don't think I even used a coupling capacitor when I did mine.
David...

--
___________________________________________
David Duffy        Audio Visual Devices P/L
U8, 9-11 Trade St, Cleveland 4163 Australia
Ph: +61 7 38210362   Fax: +61 7 38210281
New Web: http://www.audiovisualdevices.com.au
___________________________________________

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\06\08@234751 by ?q?Debbie=20Hynes?=

flavicon
face
part 1 1397 bytes content-type:text/plain; charset=iso-8859-1 (unknown type 8bit not decoded)

--- David Duffy <spam_OUTdavidTakeThisOuTspamAUDIOVISUALDEVICES.COM.AU> wrote: > Debbie Hynes wrote:

> I used that method a few years ago with some (Win) software I wrote.
>
> > I tried feeding the pulse train out of a Rohm 3-terminal IR receiver chip
> into
> Did you use a pullup resistor? (47K is usually all you need)
> The output on a lot of IR decoders are open collector.

I put a PNP transistor bewteen it and the CD4016 to invert the sig. now I get a
cleaner wave train & don't need to filter anything. See attached gif.

The first group is "power up", the second is "record". They don't look too
different 2 me. :| How did u work it out?

>
> Sounds ugly & not neccessary. The raw waveform will do just fine.

hmmm ...ok.
>
>
> You have to drive the soundcard hard to get nice sqare edges.
> I don't think I even used a coupling capacitor when I did mine.

To max amplitude? I was keeping the sinewave low to avoid flat topping

Bob's idea of downloading the specs sounds good. "Practical decoding". :)

Debbie :)



http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.



part 2 2717 bytes content-type:image/gif; name="ircode04.gif" (decode)


part 3 2 bytes
-

2003\06\09@052704 by David Duffy

flavicon
face
Debbie Hynes wrote:
>  --- David Duffy <.....davidKILLspamspam@spam@AUDIOVISUALDEVICES.COM.AU> wrote: > Debbie Hynes wrote:
>
>>I used that method a few years ago with some (Win) software I wrote.
>>
>>>I tried feeding the pulse train out of a Rohm 3-terminal IR receiver chip
>>
>>Did you use a pullup resistor? (47K is usually all you need)
>>The output on a lot of IR decoders are open collector.
>
> I put a PNP transistor bewteen it and the CD4016 to invert the sig. now I get a
> cleaner wave train & don't need to filter anything. See attached gif.
>
> The first group is "power up", the second is "record". They don't look too
> different 2 me. :| How did u work it out?

You are sampling at way too low a rate I suspect. You need
to spread the waveform over a much larger area to see and
measure the patterns correctly. Try 44100Hz 8 bit mono.

>>You have to drive the soundcard hard to get nice sqare edges.
>>I don't think I even used a coupling capacitor when I did mine.
>
>
> To max amplitude? I was keeping the sinewave low to avoid flat topping

If you're talking about the raw waveform then no, let it clip.
I've attached a sample to show you what it should look like.
David...
--
___________________________________________
David Duffy        Audio Visual Devices P/L
U8, 9-11 Trade St, Cleveland 4163 Australia
Ph: +61 7 38210362   Fax: +61 7 38210281
New Web: http://www.audiovisualdevices.com.au
___________________________________________

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body

2003\06\09@071423 by ?q?Debbie=20Hynes?=

flavicon
face
part 1 1273 bytes content-type:text/plain; charset=iso-8859-1 (unknown type 8bit not decoded)

--- David Duffy <.....davidKILLspamspam.....AUDIOVISUALDEVICES.COM.AU> wrote: > Debbie Hynes wrote:
> >  --- David Duffy <EraseMEdavidspam_OUTspamTakeThisOuTAUDIOVISUALDEVICES.COM.AU> wrote: > Debbie Hynes
> wrote:
>  You are sampling at way too low a rate I suspect. You need
> to spread the waveform over a much larger area to see and
> measure the patterns correctly. Try 44100Hz 8 bit mono.

I bonked up the signal to ~1V & sampled at 32kHz, up from 22050 - results are
looking good!
>

The data's in the fine structure of the burst circled in ircode06.gif
If we take that burst and expand it, as in ircode07.gif, we can see the data
bits. This is getting pretty close to the sample Sony pulse train Adnan very
kindly sent over!

Go Adnan! :)

I'm a bit worried about the transients on the base line though. The coupling is
now DC - dispensed with the transformer.

Looks like we're making serious progress on this. Do more tomorrow - thanks
everybody!

Debbie :)


http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body



part 2 4786 bytes content-type:image/gif; name="ircode06.gif" (decode)


part 3 4672 bytes content-type:image/gif; name="ircode07.gif" (decode)


part 4 2 bytes
-

2003\06\09@071632 by ?q?Debbie=20Hynes?=

flavicon
face
Whoops, sorry - I meant Anand, of course. Been at this off & on all day. :(
Time to take a break ...

Debbie :)

http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body

2003\06\09@075618 by Olin Lathrop

face picon face
> I tried feeding the pulse train out of a Rohm 3-terminal IR receiver
> chip into a PC's line input. That didn't work too well cuz all u get is
> a splatter of waves with peaks all over the place. Can't pick out the
> 1's & 0's.  I guess coz it's a train square waves with lots of
> harmonics. No good :(

Maybe.  Of course your signal will have lots of harmonics, but it should
still be within the capabilities of an audio card to capture it reasonably
well.  A typical carrier is about 40KHz, but most receiver modules need a
minimum of around 10 carrier cycles per pulse to receive them properly.
That's only the carrier ON pulse, so a complete carrier on/off burst
shouldn't be much less than 20 carrier cycles, or 2KHz.  That leaves
plenty of headroom for the sound card to capture enough harmonics that the
signal should be understandable.

Make sure the sound card is set to a high sample rate, like "CD quality"
or 44.1KHz.  8 bit mono resolution should be fine.  This method should
work, and it is probably useful to undestand why it didn't.  Yous symptom
sounds like the sampling rate was too low.

I am also a bit suspicious what this "cool edit" software might be doing.
You don't want it to edit anything before grabbing the WAV file.  I would
use something as dumb as possible just to record the WAV file, then you
can apply all kinds of post processing later.

The waveform peaks are probably not meaningful due to all the various
harmonics.  Try taking the raw WAV file and making a square wave from it
by looking at the zero crossings only.  You could even apply a little
hysterisis in the process if you want to.

> Then I thought of the attached schematic : grab an AF sig gen & feed
> its o/p thru a CD4016 analogue gate and use the IR Rx chip to gate it
> on/off. That way u should get a train of pulses made up of pure sine
> waves going into the PC? 5KHz in this case.

Again, this sounds like a kludge to work around some other problem that
should be understood in its own right.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body

2003\06\10@013423 by ?q?Debbie=20Hynes?=

flavicon
face
part 1 1189 bytes content-type:text/plain; charset=iso-8859-1 (unknown type 8bit not decoded)

PICers,
Just an update on that IR decoding question from yesterday. With sincere thanks
to all who helped out!

I'm now getting pretty good waveforms captured direct from the IR controller's
beam into my PC's line i/p & displayed on screen with Cool Edit 2000. See
attachement irc001.gif which shows the initial few bits.

I've logged the zero crossings, the pulses measure 600 usec wide. They're
bunched in groups : there's one lot of 8 with 600usec spacing, another lot of 6
with 600 usec spacing, 2 lots of pairs with 600 usec spacing & the rest come
singly with approx 2.2msec spacing. I count 33 pulses in all.

I guess next stage is to figure out a subroutine to dupe the sequence. This one
sez "POWER ON" to a VCR. If the programme works, I'll feel confident to lash
out on an IR controlled digital cam.

Well, thankz very much again. This PICLIST is a major resource IMHO.

Debbie :)

http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu



part 2 5893 bytes content-type:image/gif; name="irc001.gif" (decode)


part 3 2 bytes
-

2003\06\10@014909 by Marc Nicholas

flavicon
face
Hmmmm...IrDA based on not something like RC5? Curious.


-marc

On 10/6/03 01:32, "Debbie Hynes" <spamBeGonedebbiehynes2002spamBeGonespamYAHOO.COM.AU> wrote:

{Quote hidden}

--------------------------------------------------
Marc Nicholas Geekythings Inc. C/416.543.4896
UNIX, Database, Security and Networking Consulting

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspamTakeThisOuTmitvma.mit.edu>

2003\06\10@065731 by David Duffy

flavicon
face
Debbie Hynes wrote:

>Just an update on that IR decoding question from yesterday. With sincere thanks
>to all who helped out!
>
>I'm now getting pretty good waveforms captured direct from the IR controller's
>beam into my PC's line i/p & displayed on screen with Cool Edit 2000. See
>attachement irc001.gif which shows the initial few bits.
>
>I've logged the zero crossings, the pulses measure 600 usec wide. They're
>bunched in groups : there's one lot of 8 with 600usec spacing, another lot of 6
>with 600 usec spacing, 2 lots of pairs with 600 usec spacing & the rest come
>singly with approx 2.2msec spacing. I count 33 pulses in all.
>
>I guess next stage is to figure out a subroutine to dupe the sequence. This one
>sez "POWER ON" to a VCR. If the programme works, I'll feel confident to lash
>out on an IR controlled digital cam.
>
Usually, the highs are fixed in length and the lows are one of two lengths.
They are the one's and zero's. Sometimes lows are fixed & highs change.
Create a bit banging serial routine that does them 8 bits at a time but
instead of just highs & lows, you're encoding the short & long marks.
Also, remember that you'll have to do the space between pulse trains &
send the whole sequence at least twice for the equipment to recognise it
as valid data. Do you get what I mean? Hope this helps. :-)
David...

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestEraseMEspam.....mitvma.mit.edu>

2003\06\10@092239 by Olin Lathrop

face picon face
> Usually, the highs are fixed in length and the lows are one of two
> lengths. They are the one's and zero's. Sometimes lows are fixed &
> highs change.
> Create a bit banging serial routine that does them 8 bits at a time but
> instead of just highs & lows, you're encoding the short & long marks.
> Also, remember that you'll have to do the space between pulse trains &
> send the whole sequence at least twice for the equipment to recognise it
> as valid data. Do you get what I mean? Hope this helps. :-)

Also IR codes have a preamble of "sync" bits that let the receiver auto
gain circuitry stabalize.  All the codes I've seen also contain some sort
of checksum because the bit error rate is assumed to be significant.  The
real payload data is somewhere in the middle of a burst and might be
tricky to spot.  You need to look at several different burst.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspammitvma.mit.edu>

2003\06\10@094317 by Mike Harrison

flavicon
face
On Tue, 10 Jun 2003 09:22:40 -0400, you wrote:

>> Usually, the highs are fixed in length and the lows are one of two
>> lengths. They are the one's and zero's. Sometimes lows are fixed &
>> highs change.
>> Create a bit banging serial routine that does them 8 bits at a time but
>> instead of just highs & lows, you're encoding the short & long marks.
>> Also, remember that you'll have to do the space between pulse trains &
>> send the whole sequence at least twice for the equipment to recognise it
>> as valid data. Do you get what I mean? Hope this helps. :-)
>
>Also IR codes have a preamble of "sync" bits that let the receiver auto
>gain circuitry stabalize.  All the codes I've seen also contain some sort
>of checksum because the bit error rate is assumed to be significant.  The
>real payload data is somewhere in the middle of a burst and might be
>tricky to spot.  You need to look at several different burst.

Most consumer codes do not have checksums, but it is not uncommon for receivers to only respond
after seeing 2 correct codes.
--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestEraseMEspamEraseMEmitvma.mit.edu>

2003\06\10@115623 by Anand Dhuru

flavicon
face
>Most consumer codes do not have checksums,

Thats been my observation too.

>but it is not uncommon for receivers to only respond
>after seeing 2 correct codes.

True; on the other hand, I have seen protocols that send the burst only once
for each key stroke. That is, if the receiver misses the beginning of the
stream (or any part in between, for that matter), it will not respond till
the key is released, and pressed again. These protocols usually send the
actual data once, and then just a simple pulse every few ms to indicate the
key being still pressed.

Anand Dhuru

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspam_OUTspamKILLspammitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspamspammitvma.mit.edu>

2003\06\10@161350 by ?q?Debbie=20Hynes?=

flavicon
face
Thankz Anand and everybody.
There doesn't seem to be any checksum code - the following bursts, when you
hold the key down, are all the same as the first one. I think you would need to
give it at least two repetitions to validate. This one's a rather low end VCR.
I'll go check the PIC archives 4 some code ideas.

Best - Debbie :)


--- Anand Dhuru <EraseMEardhuruspamspamspamBeGoneVSNL.COM> wrote: > >Most consumer codes do not have
checksums,
{Quote hidden}

http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestSTOPspamspamEraseMEmitvma.mit.edu>

2003\06\11@081622 by Micro Eng

picon face
So if a consumer device responds after two correct code sequences....does
that mean that if you press a remote button and hold it down, its not a
oneshot but a continuous repeat of the code? If so....whats the delay
between sending the code out?


{Quote hidden}

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\06\11@083246 by Mike Harrison

flavicon
face
On Wed, 11 Jun 2003 06:16:06 -0600, you wrote:

>So if a consumer device responds after two correct code sequences....does
>that mean that if you press a remote button and hold it down, its not a
>oneshot but a continuous repeat of the code?
Usually, yes

> If so....whats the delay
>between sending the code out?
Depends on the system - typically 50-200mS

This is where it gets complicated when the receiver has to discriminate between a key held down and
multiple keypresses.......

Some systems (e.g. RC5, RC6) use a toggle bit, which changes on each keypress - this allows easy
discrimination between repeat and new keys. This has the advantage that multiple keypresses can be
rapidly identified,  however it can cause a major problem for learning remotes - they learn the code
with only one toggle-bit state, so the receiver may ignore multiple keypresses of the same key -
epecially annoying for things like channel numbers with repeated digits and menu navigation keys!
Some systems simply rely on the timing - if the code has a repeat rate of, say, 100ms, then a gap of
say >200ms is taken to be a new key, not a repeat.
On the receiver end, it's wise to do both if possible, i.e. if it sees a different code, a different
toggle bit or a long gap, treat it as a new key.
Another scheme I've seen is for the transmitter to send an initial code to identify the key, then a
'repeat' code for as long as the key is held down. This generally works OK with most learning
remotes and avoids the sluggishness that can be caused by using hold-off delays.  
{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

More... (looser matching)
- Last day of these posts
- In 2003 , 2004 only
- Today
- New search...