Microcontrollers "/>

IR Remote Control

09 January 2012 at 10:24 pm

Article image for IR Remote Control

Since I got a bunch of different IR sensors and IR LEDs just before the weekend, I knew I wanted to play with that as soon as the weekend was over. Started out with Ladyada’s tutorial but had limited results. I could read codes, but sending them back didn’t work too well. I then remembered Ken Shirriff’s blog. He’s written a great library for working with IR and it’s rock solid. I ended up using one of his examples together with a piezo buzzer so I had some audible feedback on the codes learned.

The problem of sending codes remained and I scratched my head quite a bit on this one. It then dawned on me - I’m not driving the LEDs at max current? Sure enough, everything including my early tests worked fine as long as I held the IR LED about half a meter away from the device I wanted to control. Really eager to get my Make:Electronics kits now so I can learn how to adjust the current to what I need!

Fascinating to see how many of the IR devices I have in my house that use the NEC protocol. Due to the limited range, I can’t take this part further now but with some luck I’ll be able to hook it up via WiFi in a few days. Should be fun!

Since I got a selection of different IR sensors, I had to figure out how to use those that didn’t have the typical three legs. Turned out to be very easy as you can see from the Fritzing diagram.