Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

IR Protocol

IR Protocol

2006-11-15 by Kathy Quinlan

Hi all,

I have a few questions regarding IR remotes for TV / VCR etc.

I have a product that has IR interface but no Serial port, so I am 
trying to design an adapter from RS 232 - IR, but my problem is I have 
never played with IR.

I know the carrier is 38KHz, I have some hardware working for Rx with my 
PC and some spare remotes to play with, but I am not sure if this is RC5 
or not (how do I tell ? (I am playing with WinLIRC, but it does not say 
what the protocol is, just that it is a 64 button remote))

Any pointers to get me started would be great :)

-- 
Regards,

Kat.
---------------------------------------------------------------
  K.A.Q. Electronics     Website: www.kaqelectronics.dyndns.org
  IM: Yahoo: PinkyDwaggy MSN: katinka@kaqelectronics.dyndns.org
  For Everything Electronics 		   Phone: 0419 923 731
---------------------------------------------------------------

Re: [AVR-Chat] IR Protocol

2006-11-15 by Ned Konz

Kathy Quinlan wrote:
> Hi all,
> 
> I have a few questions regarding IR remotes for TV / VCR etc.
> 
> I have a product that has IR interface but no Serial port, so I am 
> trying to design an adapter from RS 232 - IR, but my problem is I have 
> never played with IR.
> 
> I know the carrier is 38KHz, I have some hardware working for Rx with my 
> PC and some spare remotes to play with, but I am not sure if this is RC5 
> or not (how do I tell ? (I am playing with WinLIRC, but it does not say 
> what the protocol is, just that it is a 64 button remote))
> 
> Any pointers to get me started would be great :)
> 

Typical IR controls send different codes for each button. If you can 
receive raw bitstreams you might just try coming up with an encoding 
that can encode all the bitstreams corresponding to the buttons you need 
to have pressed.

I would tie the output of the IR receiver to your DSO input and just 
record the various button codes. Then analyze them on the PC.

I've even used straight phototransistors (with a collector resistor) and 
a bit of black tubing to analyze IR transmitters.

As far as the protocol, you can sometimes tell by the number of bit 
periods, the number of start bits, etc.

However, if you have a single product to do this on you might just be 
better off recording the bitstreams, expressing them as numbers (perhaps 
numbers of cycles of 38Khz) and then putting them into a lookup table in 
flash. This might well be faster than understanding the protocol and 
coding it.

Factor out the common prefix/suffix, of course (there's always a burst 
of start bits, for instance).

One button might be encoded as something like:

{20, 10, 40, 38, 23, 0}

where the first number is number of "1" pulses to send, the second is 
number of pulses to pause, etc. and 0 marks the end.

As I recall, Dr. Dobbs (or was it Embedded Systems?) some years ago had 
a good article on an encoding scheme for infrared codes (for a universal 
remote); this had some good background info.

Also see:
http://pd.pennnet.com/display_article/247261/21/ARTCL/none/CONS/Design_of_universal_IR_controllers/
http://www.innotechsystems.com/primer1.pdf

-- 
Ned Konz
ned@bike-nomad.com
http://bike-nomad.com

Re: IR Protocol

2006-11-15 by stevech11

--- In AVR-Chat@yahoogroups.com, Kathy Quinlan <kat-yahoo@...> wrote:
>
> Hi all,
> 
> I have a few questions regarding IR remotes for TV / VCR etc.
> 
> I have a product that has IR interface but no Serial port, so I am 
> trying to design an adapter from RS 232 - IR, but my problem is I have 
> never played with IR.
> 

There are 2-3 products on the market that receive IR and output RS232.
I have used "IRman". It's inexpensive. It generates ASCII text (hex
characters). Each such data string is unique to a given button on a
given remote, e.g., 8FE3D56 might be channel-up on a remote for a JVC
model xyz TV.

There are others that do the same thing, but on USB.

I wrote AVR code that does the above, and also accepts data back from
the serial port (PC) and emits the same IR. That AVR (C and asm)
source code is a donated project on avrfreaks.net, in the projects
section. Look for "TWIRP".

steve

Re: [AVR-Chat] Re: IR Protocol

2006-11-15 by David VanHorn

>
>
> I wrote AVR code that does the above, and also accepts data back from
> the serial port (PC) and emits the same IR. That AVR (C and asm)
> source code is a donated project on avrfreaks.net, in the projects
> section. Look for "TWIRP".


I always thought it would be amusing to do a box that repeats codes that it
sees, after a random time delay.  Leave it in a non-obvious spot in your
local TV store, and watch the fun.


[Non-text portions of this message have been removed]

Re: [AVR-Chat] Re: IR Protocol

2006-11-16 by Ned Konz

David VanHorn wrote:
>>
>> I wrote AVR code that does the above, and also accepts data back from
>> the serial port (PC) and emits the same IR. That AVR (C and asm)
>> source code is a donated project on avrfreaks.net, in the projects
>> section. Look for "TWIRP".
> 
> 
> I always thought it would be amusing to do a box that repeats codes that it
> sees, after a random time delay.  Leave it in a non-obvious spot in your
> local TV store, and watch the fun.

It's been done.

The person who made it left it on a university campus; turns out that 
the security cameras were aimable via IR remote controls.

And there's even a product that does that: the "Couch Potato Tormentor":
http://www.engadget.com/2005/03/02/the-couch-potato-tormentor/

-- 
Ned Konz
ned@bike-nomad.com
http://bike-nomad.com

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.