IR Communications Tutorial

After seeing our communications via light post , reader [Chris] dropped this handy little link in our inbox. A very good tutorial about using infrared to enable communications between 2 pic micro controllers.

The tutorial covers all the parts you will need, physical wiring and schematics with notes detailing each section of the circuit. It then goes on into basic IR theory, and a simplified push button circuit you can make to see that it is, in fact, working. Once you get the exercise built on some breadboards, he does some software and get some results from it all.

Now in the end this little device was hitting in the neighborhood of 9600 baud, but had to be pretty darn close to each other with a direct line of sight. These  are often accepted as a couple of drawbacks to IR technologies. IR, which has never really vanished, is in use on a lot of devices though. The more you know the better off you are.

Join us after the break for a quick video!

[youtube=http://www.youtube.com/watch?v=UKfnrhUbH24&w=450]

5 thoughts on “IR Communications Tutorial

  1. You usually do this by modulating the emitting light with a certain frequency and look for that frequency at the receiving end. It’s not more complicated than this.
    At the emitter side of things you pulsate the light at the frequency of, say, 36KHz and you use a special receiver such as a TSOP2736. Data rate with this system is lower, up to about 2kbps, but usually it is not a problem. Alternative way is to use full IRDA devices.

    The method presented here is quite limited, and transmitting data like this without modulation is done strictly where you can position the emitter and transmitter at close range and without interference from ambient light. And btw, this can be done with regular leds….

  2. Bogdan is completely correct: transmitting data without modulation like this will produce garbage instead of data in (1) daylight, (2) rooms with moving lights like a projector, (3) links over 10 inches or so, and (4) any other real life situation. A simple fix: AND transmitted uart data with a PWM 39 KHz carrier to produce modulated bitstream. then use a 38 KHz IR receiver to receive it – it will produce a MUCH more resilient communications method.

  3. This is a great intro. For anyone that takes it further there is a hint that might help- the gain of specialized receivers is boosted a huge amount for sensitivity but too much “ON” time during transmission will back off the gain and scramble reception. Check the specs of IR receivers for duty cycle and data burst length limits.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.