Step 7IR remote control
Frankly I don't know much about Infrared (IR) remote control protocol... there's a long history going back to our old friend Tesla and his work in radio technology... but before the Laser Ball I'd never built a remote control system. So what did I do?... I turned to the web and the open-source community to see what people had been sharing... and there's lots!
And what did I learn? There are plenty of other remote interfaces like blue-tooth or wifi but frankly I don't think IR can be beat for its simplicity, low cost, and ease of use. The IR remote control interface works simply by detecting sequences of light pulses produced by the IR LED and detected by the photo-sensitive receiver. Basically each button is represented by a string of 1's and 0's (either the LED is ON or OFF) and the string represents a code word that can be identified in software. Check out the resources at the bottom of this step for more resources and tutorials on IR remote control systems.
Why does a Laser Ball need a remote control?
Well I guess technically the Laser Ball doesn't need a remote, but it adds a nice bit of functionality to compliment the Teensy. A simple push button could serve the same purpose but I hesitated to go down that path because if it were mounted on the surface of the ball I'd think there'd be a fairly high risk of damage during games of Laser toss and accidental button pushes during Laser Ball juggling.
Choice of IR remote and IR receiver?
There's no right answer for this. Adafruit and Sparkfun both have options for IR remote control. The Adafruit remote looks like its intended for a car stereo system but that doesn't mean it can't find its way into any project. The IR receiver and remote are a great combination but have two main limitations: 1) The receiver needs to be in the line-of-sight of the remote (which is true of any IR remote control system) and 2) As I mentioned the remote is most likely intended for use in a car, so the output power of the LED is relatively weak and as such the system range is limited to short distances (a couple of feet in most cases).
Adafruit IR remote control specs:
- Mini remote control with 21 buttons
- 38KHz NEC code output, 940nm IR LED
- 40mm x 86mm x 7mm (3.4" x 1.6" x 0.3")
- Runs on CR2032 battery, included
Adafruit has some great tutorials on the fundamentals of IR remote controls. You could certainly develop your own software libraries to decode the signals coming from your remote... but we are living in an open-source world so why not get a head start by using the resources we have available. That's exactly what I did when I found Ken Shirrif's IR remote control library for the Arduino (link). It worked great "out of the box" and within a couple of minutes I was able to test out functionality on a simple breadboard circuit. I liked it so much I ended up incorporating it into the Laser Ball source code. Go team!
Check out these links for more information on IR remote control:
| « Previous Step | Download PDFView All Steps | Next Step » |
























































I'm planning on(though still looking into) switching the IR remote with a RF. This way the line of sight with the remote issue is removed. I can't think of any reason why this wouldn't work. Can anyone see any potential issues?