Are you tired of getting out of your seat every time you want to pause your movie, increase the volume etc. ?
If so, this is the guide for you. It will explain everything you need to know on how to remote control your computer.
This guide will explain how to build your own infra red receiver and how to set up the software.
It focusses on BSPlayer because that's my favourite movie player.
Once you've got the hang of this, you can use the knowledge here to control other programs.
The Receiver
Building a receiver is not that hard. It only requires a handful of components and a bit of soldering.
All information and schematics are taken from the [URL="http://www.lirc.org/"][U]http://www.lirc.org/[/U][/URL] and [URL="http://winlirc.sourceforge.net/"][U]http://winlirc.sourceforge.net/[/U][/URL] pages. You can check there for additional information.
The circuit looks like this :
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/schematics-small.png[/IMG]
The pinouts of the components is more clear on the figure below :
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/components-color-small.png[/IMG]
What do you need ?
The heart of it all is the infrared receiver IC. Personally I used a Vishay TSOP 1738., but other ICs can be used as well. Here is a small list of ICs that have been successfully used to build a serial port receiver. Be aware that not all of them have the same pin-out !
Vishay TSOP 1738, Vishay TSOP 1838, Vishay TSOP 11xx series, Siemens SFH 5110, Radio Shack 276-0137, Mitsumi IR Preamp KEY-COOSV (0924G), Toshiba TK19 444 TFMS 5360, Temic TFMS 5380 by Telefunken Semiconductors, Sharp IS1U60, Everlight IRM-8601S, Sony SBX 1620-12, Sharp GP1U271R
Additional to the receiver you will need the following parts :
C1 - 4,7 uF capacitor
D1 - 1N4148 diode
R1 - 4k7 resistor
IC2 - 78L05, 100 mA, voltage regulator (TO-92 casing)
9-pin or 25 pin SUB-D connector
The total cost of the components is below 5 euros. It all depends on your finishing touch. Since it was the first time I was building such a device I decided to go for a bigger casing. I added a LED and a resistor between DCD and GND to have an indication that the device is turned on and working properly. I also added a switch to turn it on/off and a transmitter circuit, but untill today I have never used the transmit function (except for the initial tests).
The remote
This is the beauty of it all : you can use almost any remote control.
I am using the word "almost" because there might be problems with certain remotes, but I have tested a few and all of them were compatible with the receiver.
Setting up BSPlayer to work with the remote
Here you have 2 options : you can go with BSPlayer's built-in support for WinLIRC or you can use Girder.
Both programs have their own (dis)advantages, but I will go into that later.
Personally I prefer Girder, but I will explain them both. Starting with the easiest of the 2, WinLIRC.
WinLIRC
At first I started out with WinLIRC. The main advantage of WinLIRC is that BSPlayer has built in support.
Goto the WinLIRC homepage, which is located at _http://winlirc.sourceforge.net[/url]
Download the lastest version and while you are at it grab a config file four your remote over here_http://lirc.sourceforge.net/remotes
And this is the biggest disadvantage of WinLIRC : if your remote is not in the list, you will have great difficulties in making your own config.
Personally I never succeeded in making my own, so I'm not going to explain how to do this.
If your remote isn't supported, I suggest you skip this part and go for Girder.
WinLIRC doens't need a setup. Unzip the files to a directory of your choice.
For the ease of use I suggest you make a shortcut to the main program "winlirc.exe".
The first time you start WinLIRC it will give you an error. This is normal. Just press OK to continue.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/winlirc1.jpg[/IMG]
You are now in the WinLIRC configuration window.
Choose your COM port and browse for your remote config file. (in my case a Philips VR510).
Leave the other settings to their default.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/winlirc2.jpg[/IMG]
If you already want to test your remote (or the receiver) at this point, press the "Raw Codes" button.
Once the window "Learn Remote" is open, press a button on your remote and you should see pulses coming in.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/winlirc3.jpg[/IMG]
If this is OK, close the window and press OK to start using WinLIRC.
You will now see a grey button in the taskbar.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/winlirc4.jpg[/IMG]
From now on WinLIRC acts as a server on port 8765, waiting for commands from its client (BSPlayer).
Therefore you always need to start WinLIRC before you start BSPlayer.
Start BSPlayer. Goto the preferences and in the general tab, uncheck "Don't use WinLIRC".
Close the preferences and restart BSPlayer. (because of the client / server thing)
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/winlirc5.jpg[/IMG]
All that is left now is mapping the WinLIRC commands to the BSPlayer commands.
Open the preferences again and goto to the last tab "Key definitions and WinLIRC"
Select the command you want to train (eg. play) and then click on the bar below "WinLIRC button name".
When the cursor is in that bar, press the button on your remote that you want to assign.
The name of the button will appear in the bar (it is taken from the WinLIRC config file).
Press ENTER to confirm
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/winlirc6.jpg[/IMG]
Repeat this for all the commands you want to use and you are all set.
I suggest you try this for a while.
Note : also Winamp has support for WinLIRC, but I consider this out of the scope of this article.
Girder
Girder is very powerful program which can control basicly every program. The program doesn't even have to be written to interface with Girder (unlike WinLIRC).
I have a feeling that I haven't discovered all the features of Girder yet, but more than enough to convince me to use it.
This guide will not explain you how to make command groups (maybe I will do that in another article). Check the out the documentation that comes with it instead.
Goto the Girder homepage, which is located at [URL="http://www.promixis.com/"][U]http://www.promixis.com/[/U][/URL]
Download the latest version and the Igor Plugin as well.
Install Girder, but do not run it yet.
First unzip the Igor Plugin to the Girder plugin directory.
Once that is done, you can run Girder.
The first thing you have to do is configure the Igor Plugin.
Goto File / Settings, in the tab "plugins" select the Igor SFH-56 Device and check "Auto Enable Input Device".
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/girder1.jpg[/IMG]
When the boxes are checked press "Apply". This enables the "Settings" button.
Press the "Settings" button. Choose your COM port and put the Input Signal to "DCD".
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/girder2.jpg[/IMG]
Press OK and Girder is ready for action.
The only thing left to do is tell Girder what to do when a button is pressed on your remote control.
To keep things simple I already made a so called "command group" to interface with BSPlayer.
You can download the gml file for version 1.0 and above over [URL="http://users.skynet.be/RafkeP/tutorials/remote/BSplayer100.805.gml"][U]http://users.skynet.be/RafkeP/tutorials/remote/BSplayer100.805.gml[/U][/URL] (right click / save target as)
The gml file for older versions is over [URL="http://users.skynet.be/RafkeP/tutorials/remote/bsplayer.gml"][U]http://users.skynet.be/RafkeP/tutorials/remote/bsplayer.gml[/U][/URL] (right click / save target as)
Since I'm not a Girder expert this command group is not perfect and it will need some adjusting.
Feedback is always appreciated.
You can put this group anywhere you want, but I think it's a good idea to put it in the Girder directory.
If you want this group to load when you start Girder, goto File / Settings and in the General Tab browse to the command group and check "Auto Load".
In case you want Girder to start with your windows also check "Launch Girder on windows startup" and uncheck "Show Splashscreen"
Press OK to return to Girder.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/girder3.jpg[/IMG]
The next time you start Girder the group will be loaded automaticly, but for now you will need to do it manually.
Goto File / Open and load the command group.
You will see a tree structure, just like the windows explorer. Expand the folders and you will see the commands.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/girder4.jpg[/IMG]
Now you need to train Girder to work with your remote control.
From the tree on the left select the command you want to train (eg. Play) and press the "Learn Event" button on the top right.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/girder5.jpg[/IMG]
The button will change into "Cancel Learn" and at the bottom of the window you will see "Waiting for IR code".
Now press the button on your remote that you wish to assign to the play command.
When Girder receives a valid IR command it will fill in a code on the led display beneath "Igor SFH-56 Device".
Also notice the "EventString" in the Command Tree.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/girder6.jpg[/IMG]
Remote controls will keep on sending their commands as long as you press the button. If you only press the button for a very short while, you will probably have sent the IR command a few times. Since you only want the command to be executed once, you will need to set an "Antirepeat wait time".
For me an antirepeat time of 200 ms works just fine.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/girder7.jpg[/IMG]
epeat this for all commands you plan to use. Save the command group and you are done.
You can now enjoy BSPlayer with remote control.
If so, this is the guide for you. It will explain everything you need to know on how to remote control your computer.
This guide will explain how to build your own infra red receiver and how to set up the software.
It focusses on BSPlayer because that's my favourite movie player.
Once you've got the hang of this, you can use the knowledge here to control other programs.
The Receiver
Building a receiver is not that hard. It only requires a handful of components and a bit of soldering.
All information and schematics are taken from the [URL="http://www.lirc.org/"][U]http://www.lirc.org/[/U][/URL] and [URL="http://winlirc.sourceforge.net/"][U]http://winlirc.sourceforge.net/[/U][/URL] pages. You can check there for additional information.
The circuit looks like this :
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/schematics-small.png[/IMG]
The pinouts of the components is more clear on the figure below :
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/components-color-small.png[/IMG]
What do you need ?
The heart of it all is the infrared receiver IC. Personally I used a Vishay TSOP 1738., but other ICs can be used as well. Here is a small list of ICs that have been successfully used to build a serial port receiver. Be aware that not all of them have the same pin-out !
Vishay TSOP 1738, Vishay TSOP 1838, Vishay TSOP 11xx series, Siemens SFH 5110, Radio Shack 276-0137, Mitsumi IR Preamp KEY-COOSV (0924G), Toshiba TK19 444 TFMS 5360, Temic TFMS 5380 by Telefunken Semiconductors, Sharp IS1U60, Everlight IRM-8601S, Sony SBX 1620-12, Sharp GP1U271R
Additional to the receiver you will need the following parts :
C1 - 4,7 uF capacitor
D1 - 1N4148 diode
R1 - 4k7 resistor
IC2 - 78L05, 100 mA, voltage regulator (TO-92 casing)
9-pin or 25 pin SUB-D connector
The total cost of the components is below 5 euros. It all depends on your finishing touch. Since it was the first time I was building such a device I decided to go for a bigger casing. I added a LED and a resistor between DCD and GND to have an indication that the device is turned on and working properly. I also added a switch to turn it on/off and a transmitter circuit, but untill today I have never used the transmit function (except for the initial tests).
The remote
This is the beauty of it all : you can use almost any remote control.
I am using the word "almost" because there might be problems with certain remotes, but I have tested a few and all of them were compatible with the receiver.
Setting up BSPlayer to work with the remote
Here you have 2 options : you can go with BSPlayer's built-in support for WinLIRC or you can use Girder.
Both programs have their own (dis)advantages, but I will go into that later.
Personally I prefer Girder, but I will explain them both. Starting with the easiest of the 2, WinLIRC.
WinLIRC
At first I started out with WinLIRC. The main advantage of WinLIRC is that BSPlayer has built in support.
Goto the WinLIRC homepage, which is located at _http://winlirc.sourceforge.net[/url]
Download the lastest version and while you are at it grab a config file four your remote over here_http://lirc.sourceforge.net/remotes
And this is the biggest disadvantage of WinLIRC : if your remote is not in the list, you will have great difficulties in making your own config.
Personally I never succeeded in making my own, so I'm not going to explain how to do this.
If your remote isn't supported, I suggest you skip this part and go for Girder.
WinLIRC doens't need a setup. Unzip the files to a directory of your choice.
For the ease of use I suggest you make a shortcut to the main program "winlirc.exe".
The first time you start WinLIRC it will give you an error. This is normal. Just press OK to continue.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/winlirc1.jpg[/IMG]
You are now in the WinLIRC configuration window.
Choose your COM port and browse for your remote config file. (in my case a Philips VR510).
Leave the other settings to their default.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/winlirc2.jpg[/IMG]
If you already want to test your remote (or the receiver) at this point, press the "Raw Codes" button.
Once the window "Learn Remote" is open, press a button on your remote and you should see pulses coming in.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/winlirc3.jpg[/IMG]
If this is OK, close the window and press OK to start using WinLIRC.
You will now see a grey button in the taskbar.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/winlirc4.jpg[/IMG]
From now on WinLIRC acts as a server on port 8765, waiting for commands from its client (BSPlayer).
Therefore you always need to start WinLIRC before you start BSPlayer.
Start BSPlayer. Goto the preferences and in the general tab, uncheck "Don't use WinLIRC".
Close the preferences and restart BSPlayer. (because of the client / server thing)
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/winlirc5.jpg[/IMG]
All that is left now is mapping the WinLIRC commands to the BSPlayer commands.
Open the preferences again and goto to the last tab "Key definitions and WinLIRC"
Select the command you want to train (eg. play) and then click on the bar below "WinLIRC button name".
When the cursor is in that bar, press the button on your remote that you want to assign.
The name of the button will appear in the bar (it is taken from the WinLIRC config file).
Press ENTER to confirm
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/winlirc6.jpg[/IMG]
Repeat this for all the commands you want to use and you are all set.
I suggest you try this for a while.
Note : also Winamp has support for WinLIRC, but I consider this out of the scope of this article.
Girder
Girder is very powerful program which can control basicly every program. The program doesn't even have to be written to interface with Girder (unlike WinLIRC).
I have a feeling that I haven't discovered all the features of Girder yet, but more than enough to convince me to use it.
This guide will not explain you how to make command groups (maybe I will do that in another article). Check the out the documentation that comes with it instead.
Goto the Girder homepage, which is located at [URL="http://www.promixis.com/"][U]http://www.promixis.com/[/U][/URL]
Download the latest version and the Igor Plugin as well.
Install Girder, but do not run it yet.
First unzip the Igor Plugin to the Girder plugin directory.
Once that is done, you can run Girder.
The first thing you have to do is configure the Igor Plugin.
Goto File / Settings, in the tab "plugins" select the Igor SFH-56 Device and check "Auto Enable Input Device".
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/girder1.jpg[/IMG]
When the boxes are checked press "Apply". This enables the "Settings" button.
Press the "Settings" button. Choose your COM port and put the Input Signal to "DCD".
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/girder2.jpg[/IMG]
Press OK and Girder is ready for action.
The only thing left to do is tell Girder what to do when a button is pressed on your remote control.
To keep things simple I already made a so called "command group" to interface with BSPlayer.
You can download the gml file for version 1.0 and above over [URL="http://users.skynet.be/RafkeP/tutorials/remote/BSplayer100.805.gml"][U]http://users.skynet.be/RafkeP/tutorials/remote/BSplayer100.805.gml[/U][/URL] (right click / save target as)
The gml file for older versions is over [URL="http://users.skynet.be/RafkeP/tutorials/remote/bsplayer.gml"][U]http://users.skynet.be/RafkeP/tutorials/remote/bsplayer.gml[/U][/URL] (right click / save target as)
Since I'm not a Girder expert this command group is not perfect and it will need some adjusting.
Feedback is always appreciated.
You can put this group anywhere you want, but I think it's a good idea to put it in the Girder directory.
If you want this group to load when you start Girder, goto File / Settings and in the General Tab browse to the command group and check "Auto Load".
In case you want Girder to start with your windows also check "Launch Girder on windows startup" and uncheck "Show Splashscreen"
Press OK to return to Girder.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/girder3.jpg[/IMG]
The next time you start Girder the group will be loaded automaticly, but for now you will need to do it manually.
Goto File / Open and load the command group.
You will see a tree structure, just like the windows explorer. Expand the folders and you will see the commands.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/girder4.jpg[/IMG]
Now you need to train Girder to work with your remote control.
From the tree on the left select the command you want to train (eg. Play) and press the "Learn Event" button on the top right.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/girder5.jpg[/IMG]
The button will change into "Cancel Learn" and at the bottom of the window you will see "Waiting for IR code".
Now press the button on your remote that you wish to assign to the play command.
When Girder receives a valid IR command it will fill in a code on the led display beneath "Igor SFH-56 Device".
Also notice the "EventString" in the Command Tree.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/girder6.jpg[/IMG]
Remote controls will keep on sending their commands as long as you press the button. If you only press the button for a very short while, you will probably have sent the IR command a few times. Since you only want the command to be executed once, you will need to set an "Antirepeat wait time".
For me an antirepeat time of 200 ms works just fine.
[IMG]http://users.skynet.be/RafkeP/tutorials/remote/images/girder7.jpg[/IMG]
epeat this for all commands you plan to use. Save the command group and you are done.
You can now enjoy BSPlayer with remote control.
Comment