Different circuits are available. The easiest is maybe to take an infrared sensor and to connect it on the serial port, with just a resistor between RX and the ground. This works very well for me.
C (10uF) GND o-------------+-----------+----+ | | | +-------------------------+ ---GND--- ----- | | SIEMENS 444 | 1N4148 +-+IN OUT+-+ ----- +----+ - SFH 506-36 | | | | 78L05 / | | | ______________ | RTS o-| >|--+ ------- +---------------+ + | |/ | | | ) | | | | ______________/ | | | R2 (10K) +----+ Nota : I have used an old sensor different from the SIEMENS.
Pin numbers indicated are for SUB-D9. See this table for SUB-D25.
Name SUB-D25 SUB-D9 Used for RTS 4 7 Power source GND 7 5 Ground DCD 8 1 Signal
Common replacements :
This one is probably the best, it works merely always.
C (10uF) GND o-------------+-----------+----+ | | | +-------------------------+ ---GND--- ----- | | SIEMENS 444 | 1N4148 +-+IN OUT+-+ ----- +----+ - SFH 506-36 | | | | 78L05 / | | | ______________ | RTS o-| >|--+ ------- +---------------+ + | |/ | | | ) | | | | ______________/ | | | R2 (10K) +----+
GND o-----------------------+------+ | | +-------------------------+ C (10uF) ----- | | SIEMENS 444 | e.g. 1N4148 R1 (5K) ----- +----+ - SFH 506-36 | | | _____ + | | ______________ | RTS o-| >|-----|_____|------------------+ + | |/ | | | ) | | | | ______________/ | | | R2 (10K) +----+
A 78L05 regulator has the following pins :
1 2 3 _______ / Pin1 = OUT ( o o o ) Pin2 = GND / Pin3 = IN -___-
The sensor makes the most of the decoding process, by demodulating the ir signal..
Many IR protocols exist, like RC5, RCA,… , and that make the decoding not an easy task.
Here are some useful links :
- RCA code request form
- Universal Remote Control Codes
- An analysis of IR signals used by a remote control
- A Serial Infrared Remote Controller
- IR Remote System
- Systems Internals
- Quelques infos sur les télécommandes IR
- Universal Infrared Receiver
I have summarised information about decoding protocols stored in these documents in this file.
Here is an example of codes : TV Philips.
Under windows, an excellent program is WinLIRC. This software decodes data of the serial port, according to a configuration file, and puts the result on a TCP/IP port. This is based on LIRC, that we will see later.
The configuration is very easy : you just have to enter the name of the configuration file and which serial port is it. If you do not have the configuration file, you can record it by pushing the keys one after the other.
Once launched, WinLIRC stays in the TrayBar and send data to the TCP/IP port. Yellow means configuration, green a good code, and red a bad code.
The use of these data is done program by program. A plugin has been developed for WinAmp. You can find it on the WinLirc home page or here.
The configuration is very easy :
- Ensure WinLIRC is working properly.
- Copy gen_ir.dll in the plugin directory of winamp.
- Configure this plugin (tab General Purpose), with matching names of the keys with actions to do.
- Activate the plugin
The problem is that a plugin is required for each application. Girder is a wonderul freeware that allows to send keys to windows or to move the mouse, … a must !
I am developping a program capable of sending a keystoke or a message to a window by the remote controller. But nothing relevant has been done yet and I will not have many time to continue.
Under Linux, you have the possibility to do approximatively everything you want with your remote controller, from controlling an application to emulating a mouse. All this is possible owing to this software : LIRC (Linux Infra Red Control). A version is available here.
This program set up a module allowing decoding the IR signals, and putting the results in a device (/dev/lircd). LIRC has several parts :
- lircd : the daemon, converting the IR signals.
- irexec : to launch a command when a key has been pressed.
- irrecord : to record yourself the codes of your remote.
- irw : to see the key pressed.
- First you have to compile LIRC, what is very easy typing ./configure, selecting the correct serial port number, then typing
make install(with root rigths).
- Then you have to load the module if is not automaticaly made :
- You have then to record a configuration file with irrecord, except if you had it already : you can find some on the homepage of LIRC.
- Launch the daemon
- Check your configuration with
irwand pressing a key of your remote controller. The name of the key should print. If not, check /var/log/lircd.
You can now configure irexec. The documentation of LIRC is brief and well doneto create the file lircrc. You can also adapt my configuration file.
You have then to compile it and install it. The installation process have sometimes problems with shared libraries. A solution is to copy this file :
cp /usr/local/lib/liblirc_client.so.0.0.0 /usr/lib/liblirc_client.so.0.0.0
Then launch xmms from a terminal in order to see any problem. Do not forget to activate the plugin.
This plugin is used through the lircrc configuration file. You will need irexec to be running to use this plugin. Just see in my configuration file what to add in it to make this plugin work properly.
That’s it ! You can now enjoy your IR remote.