Let's Make Robots!

? Sending Serial Via IR?

So I read Frits's post about his little "data-in, data-out" RF doo-dads and it got me to thinkin'...

Can we send serial "pulses" (or high/low data in general) via IR using a picaxe? Now, I know that the picaxe chips have the "sony code IR" stuff built in and can use the irin command... Could I skip all this stuff and just set-up a data-in/ data-out system using IR? Would I use a IR transistor (2 pin) as a receiver or stick with the 3-pin unit? Also, when  the 3-pin IR reciever says "38khz" what does this mean? C'mon electronics geeks, gimme a schematic! I want a simple IR system where I can stick [serial] data in and get [serial] data out on the other end...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

This has been posted many times.

I know cptn tuna has posted on this.


I've posted this image before showing the ir receiver I had worked on. It uses a 38khz modulated receiver(tsop34838) and minimal parts to build...I added the 3906 and green led to know when I received a signal. The rest was taken from the datasheet.


 The transmitter side uses an ir emitter and a 3904 transistor. you just feed the collecter a pwm signal(modulated at 38.5khz) and send the base the serial output. hook up the emmiter to...well..the emitter...side and you have your transmitter setup. I've done this on a 08m. works like a charm. 

One advantage to using your own protocol might be speed. When I built my IR remote control using the sony protocol I found it was very slow. Too slow for what I intended.
I noticed when reading ir signals from a remote for my receiver(stereo not the ir one  :D) that it sent a group of values, like around 6 or so unique variables. maybe thats why it was slow? Just a thought as I found that interesting. 

Part of the problem is the low frequency of the carrier wave.

With the sony IR code, it sends 5 bits of data each time to specify device but since The IR input commands don't make use of this, it's wasted bits. I think the on/off times are also a bit long. I think they were after reliability over speed since an IR remote is not designed to send large volumes of data.

Admittedly if the on / off times are too short then not enough 38KHz pulses will get through to be recognised by the receiver as something other than noise. 

I need to experiment with using my own IR protocols as I would like to control 4 servos from my IR remote in something resembling real time.

Real time only exists in our minds... :D I dont think anything electronic happens in real time. :D

A humans concept of real time is completely different to a computers though.