Communication with an engineer is only slightly more difficult than communication with the dead. ~Rus Stiles Sr
Remote-Controlling PC ApplicationsJayant Dhawan (3rd Yr, ECE)
Ever wondered if you could play or pause the music playing on your computer or even some other tasks while the mouse wasn’t within your reach? With a very simple circuit and the required software, you can do just that. A program known as WinLIRC allows you to receive and decode the infra-red signals from many standard remote controls. You can use your TV remote to send IR signals to a receiver circuit that you’ll build yourself. This receiver would be connected to your PC through the serial port.
Making the hardware
The circuit is quite a simple one to build. You’ll need the following components:
- One Serial-port connector (also known as a DB-9 female connector)
- One TSOP-1738 receiver IC
- 78L05 Voltage Regulator IC
- Capacitor (4.7 μF)
- Diode (1N4148)
- Resistor (4.7 K-Ohms)
- A bread-board
- and some wire

An introduction to the various components and the reason why we need to use them: The serial port of a computer has 9-pins, each having a function to perform. For this receiver circuit, we need to use just 3 pins: DCD (pin-1), RTS (pin-7) and GND (pin-5). The circuit gets the power from the RTS line of the port. A negative voltage may exist on this line, so the diode ‘blocks’ the negative voltage from reaching the circuit.
|
|
Female DB-9 - Front view of pin outs |
TSOP-1738 pin outs |
TSOP-1738 is a receiver IC for infrared remote control systems, and has 3 pins: GND, Vs (supply voltage) and OUT (the output pin). When the IC detects an IR signal, it gives 0V at the OUT pin, otherwise the voltage remains at the same level as Vs. The IC needs voltage up to +6V on Vs pin but the serial port operates at a voltage range of 6-15V, generally about 10V. So a voltage regulator IC 78L05 is used. It gives an output of +5V when a voltage in the range from about +7V to +35V is provided at its input terminal. So the 78L05 makes the power supply from the serial port suitable to be applied to the receiver IC. The resistor pulls-up the DCD line to a default logic-1 level and the capacitor ensures that the output voltage remains stable in case of minor voltage variations.
IMPORTANT:
-
Make sure to search for and check the datasheets of the IC components used in the circuit! Datasheets contain important information such as their maximum ratings that must be followed for the circuit to work.
-
Make the circuit first on the bread-board or the PCB and only then connect the serial port cable to the PC.
You might have got a basic idea of what the circuit would do. When you’ll press a button on your remote control, the IR signals from the IR led inside the remote, that will essentially be ON-OFF signals, will cause the output of the receiver IC to go ON-OFF as well, thus in a way converting invisible IR signals into electrical signals. These will then be sent to the computer and processed.
The Software
WinLIRC can be downloaded from: http://prdownloads.sourceforge.net/winlirc/winlirc-0.6.5.zip?download .
A remote control transmits a different Pulse Code Modulated IR signal corresponding to each of its buttons. So when a particular button is pressed, the IR signal for that button is transmitted continuously until it is released.
When you run WinLIRC for the first time, it will give a “WinLIRC failed to initialize…” error. Click “OK”. Select the COM port being used, generally it is COM1; and speed as 115200. Select ‘DCD device’ in the ‘Receiver Type’. Then click the ‘Learn’ button on the right to make it learn the codes of your remote and just follow the instructions to configure it using your remote control. A description of the various functions of WinLIRC is given here: http://winlirc.sourceforge.net/overview.html
It’ll create a configuration file ending with .cf that contains a listing of various codes it detected for the different buttons.
Next download a plug-in for Winamp from http://winlirc.sourceforge.net/gen_ir-0.4.zip and use it to control the basic Winamp functions from WinLIRC. See its Readme file for a description on how to go about using it. The WinLIRC website http://winlirc.sourceforge.net/, lists some more excellent plug-ins that let you control more than just Winamp!
