This is only a preview of the August 2003 issue of Silicon Chip. You can view 31 of the 104 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "PC Infrared Remote Receiver":
Items relevant to "Digital Instrument Display For Cars, Pt.1":
Items relevant to "Home-Brew Weatherproof 2.4GHz WiFi Antennas":
Items relevant to "Fitting A Wireless Microphone To The PortaPAL":
Items relevant to "Jazzy Heart Electronic Jewellery":
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
Play DVDs and MP3s on your PC
via infrared remote control!
PC Infrared
Remote Receiver
Dedicated DVD players come with full remote
control. Now you can have remote control for
the DVD player in your PC with this easy-tobuild unit.
S
INCE THE PUBLICATION of our
MP3 Jukebox back in October
2001, we’ve had many requests
for a similar remote control system
for DVD players. This time around
though, we’ve dispensed with the
liquid crystal display in favour of onscreen display (OSD) and designed a
simpler, lower-cost infrared receiver.
Like the previous design, this unit
hooks up to a free serial port and can
be installed inside your PC or mounted
externally. It even includes the ability
to power up your PC remotely!
In conjunction with free Windows
remote control software, it can be used
to drive a popular DVD player (Win
DVD 4 or 5) and MP3 player (Winamp
3). In fact, if you’re a keen programmer,
you can set it up to control just about
any Windows application you
desire.
Project overview
The hardware part of the project consists of a single, small PC
board that receives and decodes infrared transmissions from a remote
control handpiece.
Most off-the-shelf universal remotes
can be set up to work with the receiver.
In addition, we’ve included specific
support for Sony Playstation remotes,
as they include all the function keys
necessary to simplify DVD player
control.
After processing by an on-board
microcontroller, received key presses
are transmitted to your PC via a simple
serial port connection.
If installed inside a PC, the receiver
can be powered from the motherboard’s Wake-on-LAN (WOL) connector, enabling it to “wake up” the
PC from sleep mode on reception of a
pre-programmed infrared command.
It can also be mounted in a small
project case and powered from a
plugpack if so desired. This may be
more practical in cases where the PC
system unit is on the floor or hidden
behind a desk.
Key codes received on the serial port
connection are interpreted and acted
on by a program called “Girder”. This
unusually named software package
is probably one of the most versatile
remote control packages of its kind.
It can be programmed to perform just
about any action within the Windows
environment based on events from a
variety of sources.
Playing DVDs
With DVD players now available at
rock-bottom prices, why would you
want one on your PC? Well, PC-based
players allow you to do all sorts of
things that you can’t do on stand-alone
units, like capturing frames and creating playlists.
On the other hand, perhaps you
By PETER SMITH
22 Silicon Chip
www.siliconchip.com.au
Fig.1: the design is based around an Atmel AT90S2313 microcontroller (IC1),
supported by an infrared receiver & demodulator (IC3) and an RS232 receiver/
driver (IC2). IC4 resets the microcontroller when the supply voltage is too low.
eat and sleep next to your PC and it’s
the convenience factor that you find
attractive! Whatever the reason, it’s a
fact that most new PCs are shipped
with CD-ROM drives that can read
DVD discs. All that’s required (in most
cases) to play a DVD is the addition of
a software player package.
For use with the infrared receiver,
we’ve selected WinDVD, reputedly
the most popular software DVD player around. If comes pre-installed on
many name-brand PCs, or can be purchased in retail shops or on the Internet at www.intervideo.com Note that
only versions 4 & 5 are guaranteed to
work with our remote control software.
If you’re thinking of purchasing
on-line, then it’s a good idea to “try
before you buy”. A fully functional
www.siliconchip.com.au
evaluation version is available that
will work for 14 days from date of
installation. Minimum hardware and
software requirements are all listed on
InterVideo’s web site.
during the installation processes.
Remote-controlling Windows
Conventional Windows applications expect to receive their instruc-
Playing MP3s
The best (we think) and cheapest
(it’s free) MP3 player in the universe is
Winamp 3, so it was an obvious choice
for this project. You can download
it from Nullsoft’s web site at www.
winamp.com
Note: we recommend that you
install your player software and
check that it is working properly before attempting any other
part of this project. Be sure
to load the software into the
default directories suggested
August 2003 23
How it works
Fig.2: follow this diagram to build the receiver module. Take care with the
orientation of the two ICs , diodes D1 & D2 & the electrolytic capacitors.
tions from the mouse and keyboard.
For example, to start Winamp playing,
a mouse click on the “play” button is
required. The trick is to augment this
behaviour so that a press on a remote
control’s “play” button does the same
thing.
This is where Girder comes in. Girder
can translate events from any number
of sources, including commands from
an infrared remote, into actions that any
application can understand.
Girder is designed to be all-purpose,
so it’s not supplied pre-programmed
for any particular application. Our job
was to program Girder to work with
WinDVD and Winamp in conjunction
with a number of popular remote control handpieces.
Once Girder is programmed with
the necessary instructions, the results
can be saved to disk in a file (called
a “group” file, with an extension of
“.GML”) for easy recall later. The
group files we’ve created for WinDVD
and Winamp can be downloaded from
the Silicon Chip website but more on
that later.
remotes, we can not guarantee that all
models will work well with the key
assignments that we’ve programmed
(see Tables 1 & 2).
For best results, use one of the
specified remote controls. Doing so
means that you won’t have to poke
around inside Girder to reassign keys
codes – something that we’d probably only recommend to those with
a good understanding of Windows
programming!
OK, by now you should have some
idea of how everything hangs together.
Before assembling the hardware, let’s
have a closer look at what makes it tick.
Infrared remotes
The infrared receiver module is
designed to work with any “universal” type remote control – see panel
entitled “About Infrared Remotes” in
this article for all the details.
It’s important to note that because
the function keys vary widely between
24 Silicon Chip
Fig.3: this is the full-size etching
pattern for the PC board. Check
your board carefully before installing the parts.
Fig.1 reveals a simple but effective
design based around an Atmel microcontroller (IC1). This is supported by
an infrared receiver & demodulator
(IC3), an RS232 receiver/driver (IC2), an
MC34064 undervoltage sensor (IC4) and
a power supply (D1, D2 & REG1). Power
can be provided from either a 9-12V DC
source or a 5V DC source.
The 9-12V input (CON2) should
be used in all cases except when the
module is mounted inside your PC and
you want to use the remote power-up
function (see below). This input can be
powered either by an unregulated 9V
DC plugpack (freestanding unit) or a
spare disk drive connector from the PC
power supply (internally mounted).
Reverse-polarity protection is provided by diode D1. Following this, a
100µF capacitor provides some filtering upstream of a 78L05 3-terminal
regulator (REG1). The regulator output
provides the +5V supply rail for the
circuit.
Remote power-up
Some constructors have noticed
that this function stops working
after switching power on and off a
number of times. Traced to EEPROM
corruption during brownout of the
+5V supply to IC1.
To fix this, mount an MC34064P-5
(Altronics Z-7252/Farnell 703-709)
undervoltage sensing IP on the bottom (copper) side of the PC as shown
on page 98 of Nov 2013; This should
be done after all components have
been installed.
Slip a short length of heatshrink
tubing over the GND lead of the IC
before soldering it. This ensures that
the GND and +5V leads can't short together. This modification only needs
to be done if you're using the remote
power-up function.
Alternatively, to make use of the
remote power-up function, +5V
standby power must be applied to the
CON3 input. This is sourced from the
motherboard’s Wake-on-LAN (WOL)
connector and is present whenever
AC power is present.
All ATX (ACPI 2.1 compliant) motherboards we’ve seen have a 3-pin, single-row header for the WOL function.
Two pins provide the standby power
output (+5VSB and GND), while a
third (SENSE) is a digital input. This
pin can be driven high to bring the PC
out of power-down or sleep modes.
www.siliconchip.com.au
Although originally designed for use
with PCI networking cards, the WOL
function is rarely used on home/small
office machines.
Back on the receiver board, the +5V
standby power input is reverse-polarity protected by D2. We’ve used a
Schottky diode for this circuit rather
than a rectifier diode to minimise
forward voltage losses.
Additional filtering of the +5V rail
is required for the sensitive analog circuitry inside IC3. This is provided by a
33Ω resistor and 47µF capacitor, which
together form a simple low-pass filter.
The PC IR Receiver module was mounted
on an aluminium plate and attached to a
cut-down 3.5-inch drive mounting bracket.
This assembly was then attached to a plastic
blanking plate, with holes drilled for the IR
receiver and acknowledge LED. Note: the
prototype PC board shown here
differs from the final version
shown in Fig.2.
Infrared reception
IC3 contains all of the circuitry
necessary to receive and demodulate
the remote’s 38kHz (±2kHz) infrared
transmission. The recovered digital
signal appears on pin 1 and is piped
directly into the microcontroller (IC1)
on pin 17.
The microcontroller decodes the
serial stream in accordance with either
the Philips RC5 or Sony SIRCS protocol definitions. Switching between
the two protocols is performed “on the
fly”, based on information in the first
part of the received data.
Each “chunk” of data from the infrared remote contains both a code for the
key pressed and an equipment address
(VCR, TV, CD, etc). This is packaged
with a synchronisation (start) byte and
a checksum byte and then transmitted
out the micro’s TXD line (pin 3).
IC2 converts the transmitted data
from TTL signal levels to ±10V (nominal) RS232 levels, after which it
appears on the D-9 connector (CON1)
at pin 2.
Each time the micro receives a key
press from the remote, it flashes the
“Ack” LED by driving pin 15 low for
about 100ms.
Assembling the IR receiver
All parts mount on a small PC board,
coded 07108031. Using the overlay
diagram in Fig.2 as a guide, begin by
installing the single wire link using
tinned copper wire. Follow up with the
four resistors and two diodes (D1 & D2).
Next, install the two sockets for
IC1 and IC2. These go in opposite
ways around, so be sure that you have
the pin 1 (notched) ends oriented as
shown. Don’t plug in the ICs just yet,
though. Leave them out until you’re
ready to test the completed unit.
The crystal (X1) can go in next. It
www.siliconchip.com.au
The completed unit slots into a spare drive bay on your PC or can be used as a
freestanding module.
mounts horizontally, so bend the leads
at 90° (about 2mm from the body) before soldering it into position. To hold
it firmly in place, solder a short length
of tinned copper wire to the top edge
of the can and the pad directly below.
Install all of the capacitors next,
aligning the positive leads of the three
electrolytics as indicated by the “+”
marking on the overlay.
All remaining parts except for the
LED and infrared receiver (IC3) can be
installed next. LED1 and IC3 should
be set aside until you’ve devised a
mounting method for the module.
You’ll then be able to gauge the required lead length and bend needed
to position both devices so that they
protrude through any panelwork.
Note: the microcontroller (IC1) must
be programmed before it can be used
in this project. If you’ve purchased a
kit, then this will already have been
done. However, if you’re sourcing all
the parts yourself, then you’ll need
to either buy a pre-programmed microcontroller or program a “blank”
device yourself. The microcontroller
program file (IRR.HEX) can be down
loaded from the Silicon Chip web site.
Pre-programmed microc ontrollers
(and PC boards) are available from
RCS Radio, phone (02) 9738 0330.
Installing the module
The small size of the receiver board
August 2003 25
Fig.4: you can use an off-the-shelf
“pin-to-pin” cable for the serial port
connection or make your own using
the connections shown here.
Fig.5: if you’re mounting the module inside your PC
but don’t need the power-up function, then make up
this cable for connection to a spare disk drive power
socket.
Cat. XC-4630) if your PC has a spare
5.25-inch drive bay.
Another option might be to attach it
to a convenient spot on the metalwork
behind the case cover. It all depends
on the design of your case as well
as how much time you’re willing to
spend to make the result look “original
equipment”!
Note: all tracks (including ground)
on the rear of the PC board must be
isolated from the PCs metal casing.
Use non-metallic brackets, nylon/plastic stand-offs or some other method to
ensure isolation.
Don’t want to fiddle around inside
your PC? Well, you can also install the
module in a small instrument case and
power it from a 9V DC plugpack. This
method offers the advantage of being
able to position the unit anywhere in
your room!
Whatever mounting method you
choose, the hole for the infrared receiver (IC3) must be drilled a little
larger than the bump on the package
so that the lens is not obscured. The
receiver lens should then be positioned inside the hole, with the body
of the package flush with the rear of
the panelwork.
In addition, light from the LED must
not illuminate the infrared receiver, as
this will interfere with its operation
in low-light situations.
Serial cabling
Fig.6: to use the remote powerup function, you must power
the module from the
motherboard’s WOL header.
Here’s how to wire up the
necessary cable. Keep the length
as short as possible and twist
the three wires tightly together.
will allow it to fit comfortably behind
a 3.5-inch or 5.25-inch drive-bay
blanking plate. A right angle bracket
attached to the 3mm holes on the PC
26 Silicon Chip
Fig.7: if you’re building
a freestanding unit, then
power the unit from a 9V DC
plugpack. You’ll need a
panel-mount DC socket for
the plugpack connection,
wired up as shown here.
board is one possible mounting meth
od (see photos).
It could also be fitted to a 3.5-inch
to 5.25-inch drive adapter (eg, Jaycar
For connection between the module
and your PC’s serial port, you’ll need
a D-9 male to D-9 female “pin-to-pin”
cable. If you’re making the cable yourself refer to Fig.4 for the wiring details.
For internally mounted modules,
the cable must be routed out through
the rear of the case in order to connect
to one of the external 9-pin serial
port connectors. The quickest way to
achieve this is to remove one of the
brackets adjacent to the PCI expansion bus and feed the serial cable out
through the exposed slot.
Note that ready-made serial cables
with large moulded backshells may not
fit through the slot. In this case, you can
cut the (male connector) end off and
replace it with your own D-9 solder
type connector, without a backshell.
Alternatively, make up a cable using
IDC-style connectors & IDC cable. This
method works well, because you can
route the cable neatly inside the case
and only make it as long as it needs
to be.
www.siliconchip.com.au
Power cabling
As mentioned previously, internally
mounted modules can be powered
from either a spare disk drive power
connector (Fig.5) or the motherboard’s
Wake-on-LAN (WOL) connector
(Fig.6). The latter connection is required in order to use the remote
power-up function.
The motherboard WOL header is
generally of the 2mm-pitch variety.
Unfortunately, sockets to mate with
these high-density headers are not
currently available from the usual kit
suppliers.
We made ours up from a WOL cable
that was supplied with a PCI network
card. You may be able to score one of
these from your local PC equipment
installer. Alternatively, a 2mm-pitch
socket for unshrouded type headers
is available from Farnell Electronic
Components, Cat. 672-300.
Note: the WOL header (and some
parts of the motherboard circuitry) are
live whenever AC power is applied.
Disconnect AC power from you PC
before connecting/disconnecting cables or inserting/removing PCI cards.
Refer to your motherboard manual
for the location of the header and the
position of pin 1.
Setting up and testing
Check that jumper JP1 is set according to the power source that you’ve
chosen and remove jumpers JP2 &
JP3 if you fitted them earlier. Now
apply power and reach for your trusty
multimeter.
The following measurements are
all made with the negative probe
connected to any convenient ground
point (the negative side of the 10µF
or 47µF capacitors, for example). If
the module is powered from the WOL
header, then the voltage drop across
D2 will reduce all of the readings by
at least 0.4V.
With your meter set to read volts,
measure at pin 20 of IC1 and pin 16
of IC2. Both readings should be about
+5V. That done, measure pins 2 and 6
of IC2. These readings should be about
+9.5V and -9.4V, respectively.
OK, let’s check out the infrared
receiver section. First, set up your
infrared remote as per the instructions
in the “About Infrared Remotes” panel.
Now point your remote at the infrared
receiver and press any key. The “Ack”
LED should flash each time a key is
pressed.
www.siliconchip.com.au
Parts List
1 PC board coded 07108031,
47mm x 59mm
1 3-way 2.54mm SIL header
(JP1)
2 2-way 2.54mm SIL headers
(JP2, JP3)
3 jumper shunts
1 20-pin IC socket
1 16-pin IC socket
1 9-way 90° PC-mount female ‘D’
connector (CON1)
1 3-way 2.54mm SIL connector
& socket (CON3)
1 2-way 2.54mm SIL connector
& socket (CON2)
9-way RS232 cable (D9M to
D9F) for serial connection
(see text)
Red, black & yellow light-duty
hook-up wire
Small cable ties
Semiconductors
1 AT90S2313P-4 (or –10) microcontroller (IC1), programmed
with IIR.HEX
1 MAX232 RS232 receiver/driver
IC (IC2)
1 38kHz infrared receiver module (IC3) (Jaycar ZD-1952,
Altronics Z-1611)
1 MC34064P-5 undervoltage
sensing IC (IC4)
1 78L05 +5V regulator (REG1)
1 1N4004 diode (D1)
Programming the
power-up function
Disconnect power from the receiver
module and install a jumper shunt on
JP2. Power up again and point your
remote at the receiver. Press the key
that you wish to use as the power-up
key (usually the “Power” key!). The
“Ack” LED should flash five times to
indicate that the new key has been
accepted. Now power off and remove
the jumper.
The microcontroller stores the key
code in on-chip EEPROM, so it is not
lost when power is disconnected.
However, the code can be reprogrammed at any time by repeating the
above steps.
Before the power-up function will
work it must be enabled in your PC’s
BIOS setup. Generally, you can access
the BIOS setup by hitting the <Esc>
key during power up.
1 1N5817 or 1N5819 Schottky
diode (D2)
1 3mm red LED (LED1)
1 4MHz crystal, HC49 package (X1)
Capacitors
1 100µF 25V PC electrolytic
1 47µF 16V PC electrolytic
1 10µF 16V PC electrolytic
5 1µF 50V monolithic ceramic
2 100nF 50V monolithic ceramic
2 22pF ceramic disc
Resistors (0.25W, 1%)
1 10kΩ
1 470Ω
1 150Ω
1 33Ω
Additional parts for internally
mounted module:
1 4-way cable mount PC disk
drive plug (Jaycar PP-0743)
OR1 3-way 2mm-pitch SIL header
socket for WOL (see text)
Mounting hardware to suit
Additional parts for freestanding unit:
1 plastic instrument case, “UB1”
size or similar
4 10mm tapped spacers
4 6mm pan head screws
4 6mm countersunk head screws
1 2.5mm panel-mount DC socket
1 9V DC 150mA (min.) plugpack
Once in the BIOS setup, look for the
“Power Management Setup” menu (or
similar). There you’ll need to enable
both the “ACPI” and “Resume on
LAN” options. The menu probably
also displays a long list of APM (power
management) options. You should not
need to alter any of these for the WOL
function to operate.
Note: power management setup
menus vary considerably between
motherboards. Refer to your motherboard manual for details on how to
enable the Wake-on-LAN function.
Well, that completes the hardware
part of the project. The next task is to
download and install the Windows
remote control software.
Downloading Girder
Point your browser to www.girder.
nl and go to the main download page.
Click on the “Girder Installer” link at
August 2003 27
Fig.8: Girder looks
after all the remote
control stuff in
Windows. Here it’s
shown ready to
direct all the action
in WinDVD 5.
named “xml”.
Move both the file and folder to the
Winamp plugins folder at “C:\Program
Files\Winamp3\Wacs”.
If all that sounds a little confusing,
have a look at the “readme.htm” file
included in the ZIP archive. It explains
in detail where each file should reside.
To check that they’re in the right
places and operating correctly, launch
Winamp and press <Ctrl><P> to open
the “Preferences” window. Scroll
down to the bottom of the list and you
should see an entry named “Girder”
(see Fig.14).
Note: future plugin releases may
use different filenames to those described above. If in doubt, refer to
the documentation included with the
download or check out the on-line help
at www.girder.nl
Download & installing
the “group” files
Fig.9: settings on the “General” tab
control Girder’s startup and shutdown
options.
the top of page to download the latest
version. At time of writing, Girder was
at release 3.2.9b but this will obviously
change over time.
In addition to the Girder Installer,
three “plugins” are also required
for this project. Plugins are used to
extend the functionality of Girder,
as we’ll see shortly. Click on the
“Plugins” link at the top of the main
download page to go to the plugins
download page.
Download the following three
plugins by clicking on their respective
links: “Generic Serial IR”, “Popup
OSD” and “Winamp 3”.
Installing Girder
Navigate to wherever you saved the
Girder Installer file and double-click
on it to launch the installation. Follow
the prompts to complete the installation, using the default options as
presented.
OK, let’s install the three plugins.
Begin by unzipping the “Generic Serial
IR” file, named “uir_m_1.5.zip” (or
similar), into a temporary directory.
This archive contains just one file,
named “uir_m.dll”. Move this file into
28 Silicon Chip
Fig.10: our system requires the use of
several extensions, or “plugins”, to do
everything we’ve asked of it. This is
where we tell Girder which plugins
to load. Some plugins have their own
settings dialog, accessed by highlighting the plugin name and clicking on
the “Settings” button.
the Girder plugins folder located at “C:\Program Files\girder32\
plugins”.
Next, unzip the “Popup OSD” file,
named “PopUp.3.0.6.zip” (or similar)
into the temporary directory. This time
you’ll see two files, “PopUp.dll” and
“ReadMe.txt”. As described above,
move the “PopUp.dll” file into the
Girder plugins folder.
Finally, unzip the “Winamp 3” file,
named “Winamp-1.6.zip” (or similar)
into the temporary directory. You’ll
notice that a folder named “plugins”
has been created in the temporary directory. Under the “plugins” folder is
another folder named “Winamp3” and
a file named “Winamp3.dll”. Again,
move the “Winamp3.dll” file to the
Girder plugins folder.
Go back to the temporary directory
and open the “Winamp3” folder. You’ll
now see another folder named “wac”.
Open this folder, and inside you’ll find
a file named “girder.wac” and a folder
Your Girder installation is now
almost ready to go. All that remains
is to program it for the task at hand,
which in this case is to control either
Winamp or WinDVD in conjunction
with the infrared hardware.
We’ve already done the programming job for you and the fruits of our
labour are available for download from
the Silicon Chip web site. Point your
browser to www.siliconchip.com.au
and then click on the “Software Downloads” link on the left side of the main
page. Download the “GirderGroups.
zip” file listed for this month and
unzip it into a temporary directory.
Navigate to “C:\Program Files\
girder32” and create a new folder
named “groups” to hold the new files.
Now move the files unzipped above
into the new folder at ‘’C:\Program
Files\girder32\groups”. You’ll note
that there are six files in all:
(1) Winamp3_RC5.GML,
(2) Winamp3_SONY.GML,
(3) WinDVD4_RC5.GML,
(4) WinDVD4_SONY,
(5) WinDVD5_RC5.GML; and
(6) WinDVD5_SONY.GML.
As you can see from the names,
we’ve provided group files for Winamp
3, WinDVD 4 and WinDVD 5. There are
two sets of files for each application,
one for use with universal remotes
(RC5) and one for Playstation remotes
(Sony).
Setting up Girder
Launch Girder from the Windows
www.siliconchip.com.au
Start menu. From the main menu
bar at the top of the Girder window,
click on File and choose Settings. The
“Settings” dialog box appears with the
“General” tab visible (Fig.9). Click on
the “Browse” button and navigate to
the group files that you saved earlier in
“C:\Program File\girder32\ groups”.
Double-click on the file appropriate
for your setup.
For example, if you want to control
Winamp with a universal remote,
choose “Winamp3_RC5.GML”.
Next, click on the “Auto Load”,
“Load Girder on Windows startup”
and “Hide on startup” check boxes
to enable them. These options ensure
that everything happens automatically
at Windows startup.
Still on the “General” tab, click
on the “Register Filetype” button.
This creates an association between
the Girder application and it’s group
(.GML) files.
Skip over the “User Interface” tab,
as the default settings are generally
OK. Instead, click on the “Plugins” tab
(Fig.10). Enable the following plugins
by clicking in the boxes next to their
names: “AlarmTimer”, “Generic serial
based IR receiver”, “OSD PopUp” and
“Winamp3”.
If any of the last three plugins aren’t
listed, then you may not have installed
them correctly. Go back and double-check that you’ve copied all the
relevant files into the Girder plugins
folder as described under “Installing
Girder”.
Now click on the “Auto Enable input device”, followed by the “Apply”
button. That done, we can now set up
Girder to receive data from the infrared
receiver hardware.
Serial port & infrared
receiver configuration
Highlight “Generic serial based IR
receiver” in the plugins list and click
the “Settings” button. The “Device
configuration” dialog should now
appear (see Fig.11).
Change the settings as necessary to
match those shown in Fig.11. Make
sure that all of the options listed under “Device Settings”, “Timings” and
“Filtering” are disabled (not ticked)!
In addition, two settings need to
be altered to suit your system. Under
“Port settings”, select the COM port that
you’ve using with the infrared receiver,
and set the “Code length” to match your
infrared remote. For a universal remote,
www.siliconchip.com.au
Fig.11: key codes from
the infrared receiver are
picked up by this plugin,
which then passes them on
to Girder. Your settings
should look like this,
although you may need
to change the “Port” and
“Code length” entries (see
text).
choose “4” bytes. For a Playstation
remote, choose “5”.
That done, click on the “OK”
button to close the configuration
window.
Note: if you’ve highlighted the “Generic serial based IR receiver” and
clicked on the “Settings” button but
nothing happened, then chances are
that the “Device configuration” window has appeared behind the main
Girder window. Look down on the
Windows task bar. If you see a “Device
configuration” button, click on it to
make the window visible.
On-screen
display settings
Finally, click on the OSD Settings
tab (Fig.12). Information here determines the basic format of the on-screen
displays and can be changed to suit
your taste. The default character size
is much too small, so click on the
“Select Font” tab and change the font
to “Arial” and the size to “20” as a
reasonable starting point.
Click on the “Apply” and then the
“OK” buttons at the bottom of the
“Settings” window to complete your
Girder setup.
If you’re still with us, you should
now have a fully functional system.
From the main Girder menu, select
File -> Exit Girder, then restart your
computer.
System checkout
When Windows starts, Girder
should start up automatically. An icon
in the System Tray will be the only
indication that it is running. Point
your remote at the receiver and press
the “Open/Close” button to launch
your chosen application.
You should now be able to control
the most commonly used Winamp/
WinDVD functions via remote control!
Controlling both
Winamp & WinDVD
So far, our instructions have assumed that you only want to be able to
control either Winamp or WinDVD. To
control both applications on the same
system, you need to switch between
the two Girder group files.
Let’s say that you’ve set up Girder
to automatically control Winamp at
startup, but now you want to switch
to WinDVD. To do this, double-click
on the Girder icon in the System Tray
to open it. Next, from the main menu
bar, select File -> Open and load the
group file for WinDVD control.
You can then send Girder back to
the System Tray by selecting File ->
Close Window or by clicking on the
“X” in the top right corner of window.
That’s it!
Help, it doesn’t work!
Fig.12: system-wide OSD (On Screen
Display) settings can be customised
here.
OK, so you’ve pressed a key, the
“Ack” LED on the receiver board
flashed, but nothing happened in
Windows.
First up, try launching Winamp/
August 2003 29
Fig.13: shed your basic Winamp skin and slip into
something sexy! This is just one of many available for
download from www.winamp.com
WinDVD manually and see if they
respond to key presses. If remote control is now working, this suggests that
the key we’ve assigned for the Open/
Close function is not compatible with
your remote. In this case, you can
either start the application manually
or reassign the key code for the Open/
Close function (see Tables 1 & 2 and
“Reassigning remote keys” below).
Still not working? OK, let’s make
sure that Girder has loaded the group
(.GML) file and that it’s receiving the
key presses.
Double-click on the Girder icon in
the System Tray to open it. Along the
top of the Girder window, you should
see the name of the currently loaded
group file. The contents of the file are
displayed on the left side of the Girder window. This is the programming
information that instructs Girder on
what action to take when it receives a
remote key press.
If there’s no indication that the
group file was loaded, then go back
over the steps under “Setting up Girder” to correct the problem.
Assuming it was loaded successfully, point your remote at the receiver
and press any key. The 4-byte code for
the key should appear on the status
(bottom) bar of the Girder window.
If it does, have a close look at the
number displayed (it’s in hexadecimal
notation). The first byte is always FE
(the sync byte), the next is the equipment address, the third is the key code
and the last byte is the checksum.
It is vital that the second byte of the
string is 05, as this is the equipment
address for VCRs. If it’s some other
value, then you’ve chosen an incompatible device code for your remote.
Refer to the information in the “About
Infrared Remotes” panel for details.
Note: the above information applies
only to universal remotes set up for
Philips (or compatible) appliances.
For Playstation remotes, the code
will be five bytes long and cannot be
incorrect.
If you’re still with us, we assume
this means that nothing is displayed
on the status bar when you press a
key on your remote. The most likely
problem at this point is either incorrect setup of the “Generic serial based
IR receiver” plugin or a problem with
serial communications from the receiver module.
Start by double-checking the settings for the plugin, as described
under “Serial port & infrared receiver
configuration” above. Note that the last
received key code should be displayed
under “Activity monitor” on the bottom line of the configuration window.
No go? Then you can determine if
the serial connection is working by
monitoring the COM port input with
any serial terminal application. HyperTerminal (included with Windows)
will do the job, although all you’ll see
when you press a key is a bunch of
strange ASCII characters.
To see the actual key code values,
you’ll need a terminal application that
can display in hexadecimal. Check
out RealTerm, available free from
realterm.sourceforge.net Set it up to
match the chosen COM port, with a
baud rate of 9600bps, 8 data bits, 1
stop bit and no parity.
Note: Girder must be closed before
attempting to access the serial port
from any other application. To do
this, select File -> Exit Girder from the
main menu.
Reassigning remote keys
These are the four remotes recommended for use with this project (left to right):
Sony Playstation remote, Jaycar BC-3000, and Altronics AIFA RA7 & AIFA Y2E.
30 Silicon Chip
If you’re using a different universal
remote to the ones in our list and the
function keys don’t do what you want,
www.siliconchip.com.au
About Infrared
Remote Controls
As mentioned throughout the
article, the infrared receiver module
will work with any “universal” style
remote control. This type of remote
can be programmed to work with
hundreds of different devices. It’s
just a matter of selecting the appropriate device from the supplied
list and punching in the matching
code per the instructions.
The receiver module masquerades as a Philips brand appliance.
Although many different manufacturers use the Philips infrared protocol (RC5), always try the Philips
codes first. In order to work with
the Girder group files that we’ve
provided, you must choose a VCR
code from the device list.
Unfortunately, no two universal
remotes are alike when it comes to
the function keys. Some have more
keys than others and to confuse
matters, key labelling differs even
though the keys might transmit
identical codes.
To make life much easier, we
have preprogrammed the system to
work with several readily available
universal remotes, as follows:
(1) AIFA Y2E (Altronics A-1013)
(use code 379);
(2) AIFA RA7 (Altronics A-1009)
(use code 379);
(3) BC-3000 (Jaycar AR-1710)
(use code 278).
We’ve also included support for
the Sony Playstation remote. These
are available at reasonable prices
(especially the clones) and provide
all the keys necessary to control a
DVD player with ease.
Tables 1 & 2 list the functions
we’ve assigned to the keys on these
remotes. The universal models
don’t have enough keys to control
all possible functions, so we’ve
included a “shift” mode.
To control any function that requires a shifted key (listed with the
“Shift-” prefix), make sure that shift
mode in active (press the “Shift”
key). For WinDVD, the shift state is
toggled each time the “Shift” key is
pressed. By contrast, shift is active
for one key press only in Winamp.
www.siliconchip.com.au
Table 1: WinDVD functions and the associated remote control keys.
Table 2: Winamp functions and the associated remote control keys.
August 2003 31
Fig.14: click in the main Winamp window
and press <Ctrl><P> to bring up this
dialog. Scroll down the list and you
should find a “Girder” entry if you’ve
installed the Winamp plugin correctly.
then it’s not too difficult to change the
key assignments.
To begin, make sure that both
Winamp and WinDVD are closed.
Next, open the Girder window and
load the appropriate group file using
the File -> Open menu command. In
this example, we’re assuming that
you’ve loaded “Winamp3_RC5.GML”
On the left side of the window,
you’ll see a tree structure that looks a
bit like a directory listing in Windows
Explorer (Fig.8). Click on the “+” next
to the “Winamp3” folder (top level
group) to open it. The tree expands
to show a number of folders (groups)
underneath. Open the “Non-shifted”
group to access all commands related
to non-shifted keys.
Under the “Non-shifted” group
WinDVD has a simple easy-touse interface but it’s even
easier via remote control.
32 Silicon Chip
you’ll find the commands further subdivided into “General”, “Volume” and
“Track Select”. Open the “General”
group to see all the keys assigned to
general commands, such as “Play”,
“Pause”, etc.
Now click on the “Stop” command and in the bottom right of the
Girder window, you’ll see the action
performed when this command is
executed. Until you understand how
Girder works, this probably won’t
mean much. However, you don’t actually need to know how the command
works to change the key assignment!
Next, click on the “+” next to the
“Stop” command to open it. Below,
you’ll see an entry named “Eventstring”. This entry contains the actual
key code associated with the “Stop”
key on your remote.
Click on the “EventString” entry to
highlight it and the key code is displayed in large dot-matrix style characters on the right side of the window.
To change this code, first make sure
that the drop-down list at the top right
of the window reads “All”, then click
on the “Learn Event” button.
Point your remote at the receiver
and press the key you want to assign
to the “Stop” command. Girder immediately updates the EventString entry
with the received key code. Now save
the updated group file by selecting the
File -> Save command from the main
menu. All done!
Of course, you probably wouldn’t
want to change the assignment of the
“Stop” key – this was just a convenient
choice for our example. Most other
key assignments can be changed in a
similar fashion. Always save a backup
copy of a group file before modifying
it, just in case!
Other uses
Your new infrared remote receiver is not limited to controlling just
Winamp and WinDVD. If you’re into
programming and like a challenge,
then you can program Girder to perform just about any task via remote
control. Check out the on-line help at
www.girder.nl for more information.
As a bonus, we’ve included support
on the receiver board for applications
that work with the Irman. This commercially available infrared receiver
works with dozens of popular remote-enabled applications. To enable
Irman compatibility, power off the
receiver and install a jumper shunt
on JP3.
For details on Irman and supported software, visit www.evation.com/
irman
Note: jumper JP3 should only be
installed if you specifically require
Irman compatibility. Do not install it
when using the module with Girder.
Also, we have not tested the receiver
with all Irman-enabled applications
and can not guarantee that it will work
in all cases.
The receiver module is also eminently suitable as an add-on to existing
microcontroller projects. A simple
two-wire serial interface is all that’s
required for the connection. Perhaps
you’ll be driving your next PICAXE
project from your armchair!
SC
Enjoy!
www.siliconchip.com.au
|