Using PICAXE as IR receiver/buffer...

Grogster

Senior Member
#1
Hi all.

Firstly, before I talk about the thread topic - FANTASTIC JOB WITH THE NEW FORUMS!!!

I love the new, easier to use forum format.
:)

Except that I seem to have joined four years before I was born...
;)

Now, on with the plot...

I want to use a PICAXE 08M to receive commands from a remote control using the [INFRAIN2] command to receive the data from an IR receiver IC, then convert the codes to ASCII and send them serially(probably 1200 baud) to a PC running GIRDER automation software, to control my media player PC, rather then having the big bulky keyboard I currently use.

According to the David Lincoln PICAXE book, page 161, receiving the IR remote codes should be pretty straight-forward, and then using modified code, using [SEROUT] to serially send the data to the PC for GIRDER to make use of.

My main question therefore is:

- The David Lincoln book says that INFRAIN2 expects Sony Infrared Control(SIRC) protocol, but is there any way to accept data received by an IR receiver IC, which is NOT in the SIRC format?

"No" means that I am limited to a select family of remotes.
What about RC5 format from Philips?

Thanks.
 

Technical

Technical Support
Staff member
#2
infrain/2 only work with SIRC format. People have manually 'bit busted' other formats in the past - search the forum archives.
 

hippy

Technical Support
Staff member
#3
The David Lincoln book says that INFRAIN2 expects Sony Infrared Control(SIRC) protocol, but is there any way to accept data received by an IR receiver IC, which is NOT in the SIRC format?

"No" means that I am limited to a select family of remotes.
What about RC5 format from Philips?
INFRAIN and INFRAIN2 only decode the Sony IR Codes. Other code decoding is possible but depends upon how short the IR pulses sent are. If sent too fast then the PICAXE cannot run quickly enough to catch them and process them.

Google and Alta Vista are good places to start searching for information on particular IR protocols. Anything with pulse times over 1mS is probably bit-bangable but there's never any guarantees. Run with SETFREQ M8 for maximum speed. Phillips RC5 looks like it's possible but I'm not sure about what the toggle bit does -

http://users.pandora.be/davshomepage/rc5.htm

You can find information on bit-banging IR inputs here -

http://www.hippy.freeserve.co.uk/picaxeir.htm

It's always useful to have an oscilloscope to hand when decoding IR as you can then see exactly what the PICAXE is getting as input. Without that it can be a bit hit and miss.

Most universal remote controls should be capable of generating Sony IR Codes, even the $1 bargain bucket ones. That may be the easiest solution. Don't forget that you can strip the innards out of many remote controls and build your own purpose built controller with only the buttons you need - just remember to leave a means to select the Sony protocol after batteries have been replaced !
 
#4
I have the opposite problem to many people: I have a Sony TV (wonderful new LCD job). The problem is that if I use the (Sony) controller on my PICAXE, it causes the TV to change channels/volume etc when pointed at the TV, windows or glass light fittings. Its what you'd expect really but limits where I can use the IR on the PICAXE.

The remote control for the old (defunct) AKAI TV still works, so I'll have to try the bit banging method. Perhaps I can write some generic code that will read and store any IR activity received and play it back as serial to the computer for interpretation.
 

Grogster

Senior Member
#5
Thanks for all that, guys.
:)

I do have a scope, so I might hook it up to my remote I plan to use, to see what it is doing...
Most of those remotes tend to use 433(or is it 455?) ceramic resonators...

- QUESTION: If I bought a universal remote, and programmed it for ANY Sony DVD player, for example, then it should output the correct SIRC protocol, correct?

I assume that the Sony SIRC protocol is universal across all Sony remotes, although the key-codes would naturally be different between models depending on the device...
 

hippy

Technical Support
Staff member
#6
The microcontroller resonator isn't really important, it's the frequency the IR Led is modulated at; that's usually 38kHz.

A universal control set for a Sony DVD player probably will not work. INFRAIN/2 only respond to TV commands.

SIRC should be universal across all Sony devices. There's a 5-bit device code ( TV, DVD, etc ) and then a 7-bit Command/Key Code. Each key code may do something different on each device. Although it's likely the same key code for common commands may be sent to all devices, such as for Volume Up / Down, that's not defintely guaranteed AFAIK.
 
Top