A remote-controlled digital picture frame
Or: How I spent my Winter Break
By Nathan True (frame@nospam.co.uk@natnonspammingetrue.com)
Also check out our choose-your-own-adventure DVD, Make My Day!
The IR module
|
|
The PIC16F628
|
|
The remote
|
|
Jump to: Introduction
| Slideshow software
| Remote control module
Infrared codes: A primer
Let's begin with a primer on how infrared remote controls work. You've all seen them before, the magic little clickers that control your TV, VCR, DVD player, etc. They work by modulating an infrared light signal at 40 KHz, sending a series of pulses via an invisible conical beam out the front of the remote. These pulses are picked up by a remote receiver module, usually behind a dark red panel on the device being controlled. The signals are often powerful enough to bounce off of several surfaces and still get picked up!
The hardware: A pulse-to-serial interface
Okay. Inside every one of those electronic devices is one of these, an Infrared Receiver Module which receives the light signals, filters out all but the 40KHz remote signals, and converts them to a train of pulses.
Now computers in general aren't trained to receive pulses of varying length. This is where the PIC comes in. If you're not familiar with Microchip's PIC products, they're little chip-sized microcontrollers that will run an assembly program you write for it. I decided to go with the PIC16F628 for this project, because of its internal oscillator. This means I don't need any support parts at all, and the entire unit can be made out of one IR receiver module, the PIC, and a serial connector. Very simple, easy-to-assemble hardware.
The firmware that runs on the PIC is fairly simple too. It waits for a pulse from the module, then measures the length of each pulse until they stop. Of course, my former project included facility for also sending out IR signals, but they don't apply here. The PIC sends out the pulse information using standard RS232 timings into a serial port.
The Software: Recognition and scripting
These messages are picked up using a custom program I wrote called Remotomator which compares received signals to those pre-stored in a configuration file. When Remotomator receives a signal, it searches the signals in its memory of the same length, comparing each pulse to the corresponding received one. If they're all within a certain preset threshold, the signal is "recognized" and it triggers a script. For this particular project, the only thing each script does is send a particular keystroke to a particular program - in this case, to the slideshow applicaton.
Conclusions
Ah, sweet combination. Putting together laptop troubleshooting, mounting hardware, microchip programming, and software design produces such a beautiful and useful thing as a digital picture frame.
Read about more of my projects at Natetrue.com!
Or, you can try a change of pace and check out some sweet video projects I've made with my friends over at Make My Day DVD and Hidden Frame Productions!
Copyright © by Nathan True. All rights reserved.