The Lucas Eckels Blog

Wow, this blog hasn't seen any new content for years. You might be interested in more recent biking stuff posted on Travelogue. For older electronics geekery, carry on.

Sunday, August 23, 2009

Arduino IR transmitter

A while back, I bought a universal remote for the entertainment system. I chose one fancy enough to have learning capability, but not fancy enough to be programmed with a computer.

Annoyingly, the factory and universal remote only had a button to toggle through the various inputs. This gets tedious quickly when you have a few video game consoles. I knew that the TV had discrete codes, which would take you directly to a selected input. But I didn’t have a way to program the remote with these codes.

So I wrote an IR transmitter for Arduino. Then I could use the Arduino to program the remote, and have nice discrete component access straight from the remote that I’m already using. My TV is a Samsung, which uses the . It’s a pretty simple protocol consisting of two address bytes and two command bytes, with a 9 ms burst ahead of it. Ones and zeros are encoded as different pauses after a short burst at 38 kHz. My previous IR project was very helpful for debugging timing issues.

Download the code. The only hardware required is an IR LED attached to pin 13.

posted by Lucas at 7:22 pm  

Monday, May 4, 2009

Really simple Arduino IR receiver

Arduino with IR remote receiver
I use a Mac Mini as a media center computer. While I generally like Front Row, and have a few custom (unsupported) plugins, sometimes you really just want something one button away. I’m already using a universal remote, but the Mini’s built-in IR receiver can only detect the signals for the 6 buttons on the Apple remote.

As a quick-and-dirty solution, I wrote this sketch for the Arduino, using a generic IR remote receiver. When reset, the Arduino starts listening for an IR remote command. It remembers the timing of the pulses, then listens for a similar set of pulses and signals over the serial port. I wrote a few lines of Python to listen to the serial port and do something interesting.

Now I can eject a DVD without messing with any menus. I’ll probably need a more complete solution some day, but for now, I’m set.

Download IRMon

posted by Lucas at 10:08 pm  

Powered by WordPress