Intro: Infrared Remote Control for the Parallax QuickStart Board
One-Wire Infra-Red Remote Control interface for the QuickStart
One of the coolest things about the Propeller's software devices
is how little it takes to add peripherals!
Small IR sensor - adafruit/157
Double row socket (female) 1." centers - 4 places long.
A cheap universal remote control (and code sheet!)
Needle nosed pliers
Parallax Propeller Tool
Device drive software (from the Parallax Propeller OBEX - "Object Exchange")
Application program - this example - or your project?
The IR sensor is a TSOP38238 which is available from Lady Ada at Adafruit for $1.95.
But buy a few spares because they are quite fragile physically. Any twisting of the
pins can fracture the connections internally and cause the part to fail.
So make sure that any bending of the pins is well clamped to protect the case.
This device is a miniature receiver for infrared remote control systems.
It detects a 38Khz modulated infrared signal, so all the filtering is done on-chip.
These parts are optimized to suppress almost all spurious pulses from florescent lamps.
I like it because it runs well on 3.3 volts used by the Propeller chip.
That saves a lot of fussing around dealing with 5 volt signals.
(actually, all that means is a 3K series resistor to protect the input port,
but if we don't need it, why bother?)
Bend the output pin
(left pin when looking at the front of the part) "back".
Use needle nose pliers to hold the part so that NO STRESS IS APPLIED TO THE CASE!
If you wan to cover the exposed metal of the pin with a small piece of tube or heat shrink
do that before bending the pin.
Solder on the interface wire:
Use a clamp-on heat sink (or needle nose pliers) to hold the sensor while soldering
the wire to the output pin.
For this example, I used a half of a hook-up wire that had pins on both ends.
That's the blue wire in the photos.
But a single pin from a pin header strip could be soldered to the other end of the wire.
Solder the socket header to the Quick Start board.
That gives us a convenient place pick up Vdd (3.3V) and Vss (ground) and to attach the
Install the Infrared Sensor on the QuickStart board:
The "bump" faces away from the board ad the output pin is toward the touch pads.
Insert the other end of the interface wire in the 40 pin socket header.
My example code used pin P02.
Refer to the TV codes for the remote control unit and program it for the first Sony
TV in the list. That's the most common codes and the ones we will use here.
That's it for the hardware.
The rest is all software.
Grab the example code from the zip file here and save it to the same folder as
IR_Remote.Spin - from
Extract both of those to a work folder.
Bring up the Propeller Tool (programming editor) and load the example file.
(Be careful of indentation as that determines program structure in SPIN)
Press F9 to make sure the code compiles properly.
Press F10 to download it to the QuickStart's RAM memory.
The Quickstart IR example code uses the number keys 1 to 8,
Channel UP/DOWN, Volume UP/DOWN, OK, and Power keys.
Reading through my example application code you will see that most of the
program is a long case statement that picks the "handler" for the key code
from the remote control.
For YOUR project you will need to write some new code to do what you want
the QuickStart to do when you press a key.
So whatever you are creating, a light show, or a robot, you can control it
though your handy remote control!
Have fun with it...