Local time: 2024-12-03: 4:46:47 PM © Copyright 2003–2013 Darkhorse WinterWolf

winterwolf.co.uk

Universal InfraRed Receiver

A few details on the UIR in use here at winterwolf.co.uk

Update

It has become apparent that the source I found the schematic for the UIR circuit on no longer exists. I have recently wanted to build a new UIR for my mate, so I have taken a look at my current one and jotted down some notes on how to build it. You can find these notes towards the end of this page.

General information

Quite some time ago whilst talking to my mate, I started to think about the possibility of using LIRC with my MA-600 Ir-DA transceiver to receive and transmit commercial infra-red signals. This isn't currently possible, and doesn't look like it'll ever be possible because of the weird initialisation required for the MA-600 to function.

Just recently, however, I started to look at the LIRC website and some of the DIY receiver and transmitter projects. Originally, I was planning on having a go at the simple serial receiver and transmitter, and went down to Maplin later that day to but the components. Unfortunately they didn't have any appropriate receivers, so I started to have a look around Farnell's web site.

That proved to be much more productive, and as usual for Farnell, much cheaper. The downside is the £10 minimum order charge, but that was quickly sorted out by asking if anyone else needed anything getting. Before I put the order in, though, I had a quick look at the alternative projects

The one that really caught my eye was the Universal InfraRed Receiver. This one required a PIC, but was also magically transformed into a PIC programmer by just removing a jumper. I'd been considering building a PIC programmer for quite some time, so this seemed like the ideal solution.

Here are a couple of photos of the resulting UIR circuit:

Monitor Side ViewMonitor Front View
The side of my monitor with the UIR mountedThe front of the monitor should the UIR receiver on the right hand side

It's actually turned out to be quite useful. I can now control my copy of XMMS by remote control, which is very useful if normal control is not practical (eg. playing GL/SDL games like Frozen Bubble and BZFlag). I've also set up certain buttons to start applications such as Mozilla and Eterm. Not only that, using lircmd I've set up what is effectively a remote control mouse using the arrow keys on the remote control.

I have currently trained LIRC to understand my primary remote control, an Akai RC-V204E, as well as a remote control from an Apple Mac Performa 630 and a Sony HandyCam. If it's of any use to use, the configuration file for these remotes is in the Linux software section.

Networked LIRC configuration

I have recently moved the UIR from Scrat to Jesmos since getting a new I/O card for Jesmos. This has given quite a few benefits, since Jesmos is (almost) always on, meaning that I can now set up LIRC clients on my other computers and not have to have a specific workstation on for it to work. Another useless but nevertheless interesting outcome is that I can now combine LIRC, irexec and etherwake to allow me to turn Scrat on by remote control! No more wearing the power button out on my Lian Li PC-60 (Mk I) for me!

The thing is, isn't not immediately obvious when configuring the Debian LIRC package for use as a network client how to go about it. When asked for hardware type, I instinctively chose UDP, which caused the lircd process to exit almost immediately. What you in fact have to do is choose none, and then tweak your /etc/lirc/hardware.conf file by hand. For reference, at the time of writing, mine looks like this:

# /etc/lirc/hardware.conf       
#                               
# Arguments which will be used when launching lircd
LIRCD_ARGS="-c jesmos:8765"     

#Dont start lircmd even if there seams to be a good config file
START_LIRCMD=true

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="null"
DEVICE="/dev/lirc"
MODULES=""

# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""

You'll also need to tweak the hardware.conf file on the server to get it to listed for UDP requests from other lircd processes. For reference, the one on jesmos currently looks like this:

# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS="-l"

#Dont start lircmd even if there seams to be a good config file
START_LIRCMD=false

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="irman"
DEVICE="/dev/tts/0"
MODULES=""

# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""

Building a UIR

As mentioned aboce, the site I originally used to build by UIR with integral PIC programmer seems to have disappeared. I've recently jotted down a diagram of a slightly improved stripboard layout for the UIR. Unfortunately, I don't currently have a proper circuit diagram, but if someone wants to build one from the stripboard layout, please do send it over and I'll put a copy up here (with full credits to you, of course).

Please remember that this is not my own work, it's taken from elsewhere, but I cannot for the life of me find that site again or remember who it was. The same applies to the software I've put up here.

Anyway, there are two stripboard layout diagrams. One is in colour, which is probably the easiest to understand but it quite large (500k for the high quality one if your browser supports PNG, or a >100k JPEG if not), and the other is black and white, which is more difficult to read as there are no guide lines for the strips, but is around 10k in size. Both are shown from the non-conducting side with the strips running horizontally along the back:

The components used in this version are as follows:

Using this layout, the finished circuit looks a bit like this (or at last the one for Darac did, anyway). This is the picture before the cable has been attached to connect the UIR to the host computer's serial port. Note that I had some 20-pin DIL sockets available, which is why the PIC looks too short!

Finished UIR Circuit

UIR Software

I've collected a few bits of software for the UIR. There is a Windows PIC programmer which I know works with this circuit layout, and a file containing three PIC hex files along with their source code. I've previously used the UIRII code on my PICs, which seems to work well for me with LIRC under Linux, but by all means play around.

I've also been told about PonyProg, which is a PIC programmer for various operating systems including i386 Linux. I'll be needing to program the new UIR soon, so I'll post an update here to say how things went.

Valid XHTML 1.0Valid Screen CSSValid Printable CSS