User loginNavigationNew photosRandom QuoteThe biggest challenge of my life is that, during one long hot shower, I can plan about 40 hours of work. So maybe I could be happy if I only showered once a week. |
Clara's Remote
So I said, “Hey… Would you like me to make you your own special remote control, that would have just the buttons you need, and that you wouldn’t have to point anywhere?” She said yes. DesignMy basic plan was to build two modules: the battery-powered handset unit with buttons (which I called the ‘Remote’ proper), and the mains-powered ‘Base.’ The Remote and Base both have ZigBee radio transceivers, to provide directional-independence. A bidirectional connection is overkill, because nothing needs to get sent back to the Remote, but I have existing microcode for working with this particular ZigBee module (the MaxStream XBee), and that’s turned out to be useful in the course of the project. The Base receives the user commands from the Remote, then sends out the necessary infrared codes to the DVD player and audio amplifier. ProcessFirst, I made a quick infrared receiver module (schematic, photo), which I used to analyze the signals sent by the remotes for the two boxes I wanted to control - the Philips DVD 714 player and Sony STR-D590 amplifier. With an oscilloscope monitoring the receiver’s output, I could take a snapshot of the signal sent when I pressed each button of interest. With those, I abstracted out the details of the protocols, like carrier rate, preamble, command encoding, and how repeated commands are handled. I then programmed a small microcontroller, the PIC12F675, to send these infrared commands in response to a four-bit command sent on a simple 5-wire parallel bus. I could certainly have generated the IR codes on the main processor, but this approach seemed more modular and simpler - I didn’t have to worry about losing serial input from the radio while outputting timing-critical infrared commands, for instance. I called this chip the ‘Oscillator,’ for no very good reason other than that it spends most of its time outputting square waves. Once the Oscillator was sending commands, I got the Base and Remote units talking to each other over the radios, using existing code for the PIC16F688 chip to control the Base, and a PIC16F916 for the Remote (since it needed more pins for all the buttons). Here I spent some time on power management on the Remote, since I wanted some reasonably-long battery life from it. I settled on an LDO regulator from a 9V battery for simplicity, but chose a relatively new LDO from Microchip that uses only 1 uA quiescent current. Both the radio module and the main chip sleep most of the time, and are awakened by an interrupt when a button is pressed. A power usage spreadsheet gives me an estimated battery life of at least a year or two for a normal 9V alkaline battery, which seems sufficient. I then got the Base unit semi-permanently installed. I used two infrared LEDs on short cables, taped to the front of the two boxes I wanted to control. I boxed up the rest of the Base unit in a quick enclosure made from an umbrella case, put it in place, and called it done. While tweaking the Remote, I got some samples of the relatively new PIC16F886 chip from Microchip, and realized that, since this chip has eight interrupt-on-change lines instead of four on the ‘916, if I switched, I could save a few components. So I did; porting was simple. At this point, Clara and I were using the breadboarded Remote daily. From our usage experience, we decided to rearrange the buttons for easier access. I also implemented a couple of new features: Replay and Repause, AKA the “Say What?” buttons. The former pauses, rewinds for several seconds, then plays; the latter does the same, except it ends on a pause. These are useful when you just want to repeat the last few lines of dialogue in a movie. I also tweaked the implementation of some commands, added auto-repeat for volume changes, etc. The Base unit was fine in its umbrella case, but I wanted a small case for the Remote that would be easy for Clara to hold, and also robust (the power switch fell off the Remote often, and of course we had to be careful not to drop it). So, I designed a circuit board for it (top, bottom), using mostly surface-mount components to save space, had it made, and put the whole thing in a Hammond enclosure I’d worked with before. I used conventional tactile switches mounted on the board, with actuators that extend through holes in the enclosure top, covered by an escutcheon. At present, the escutcheon is paper, but I plan to print it on a color laser printer, laminate it, and glue it to the enclosure top. Some lessons learned
ConclusionsGood project. Clara’s happy using it; she clutches it while watching her movies, and in fact, her mom had to pull out the original DVD remote to use, because Clara wouldn’t give hers up. It provides several benefits over our previous stock remotes, even for adults (after Clara’s in bed). The way Rewind and Fast Forward are implemented on our DVD player is particularly annoying and accident-prone; this remote prevents all the mishaps we used to have, when trying to rewind slightly would take us back to the last chapter point. In fact, the Replay button removes most of our need for Rewind at all. The elapsed time - five weeks to useful, sixteen to completion - isn’t too bad, for a hobby project. And the cost isn’t even TOO bad, for a one-off; the radios are about $38 total, which is pretty steep, but the board and box are the only other parts I didn’t already have on hand. I will happily share the design resources with anyone who’s interested. The main weakness of this project for widespread use is that the command set and their implementation is customized to my own needs. But if you’re used to dealing with microcontrollers, it should be pretty easy to customize. Future development
|