Sunteți pe pagina 1din 19

Remote Control 18/11/2001 21:29:11 http://www.heatseekerz.net/index.php?page=articles&articleid=4 -------------------------------------------------------------------------------1. Introduction 2. How It Works 3. Building The Sensor 4. Step 1-7 5.

Step 8-15 6. The Software 7. WinLirc 8. IRAssistant 9. Comments -------------------------------------------------------------------------------By: Tom De Keninck

Introduction -------------------------------------------------------------------------------You can watch some movies from DVD, listen to music and if you own a TV-adapter you are even able to watch TV on your computer. Then why do you still have all those other equipment like TV's, stereo, ... The answer to this question is rather simple and obvious: practical use! Without the desired comfort, the pc will never aside the standard entertainment equipment. Remote controls are nowadays very common. In almost every house there are 5 or 6 present to help us, lazy people in being even more lazy :-). Actually it's very strange why PC's aren't equipped with a standard remote control interface. A lot of motherboards are equipped with an IRDA port but this isn't compatible with the frequencies (38 kHz) used in regular remote controls. But Heatseekers to the rescue: with just a few components and a little bit of software we can make our own IR-receiver. We will be able to control every application on our pc from a distance up to 30 meters. And this with a unit from an old TV or stereo.

How It Works -------------------------------------------------------------------------------The serial port of your pc provides an alternating signal between -12V and 12V. We need a stable 5V to provide our sensor with the necesarry power. I'll explain how we can fix this, its a bit techical, but quite easy to understand. Of course you can skip this part and just use the thing but if youre interested into electronics, this will be a fun example with a lot of basics explained. The diode D1 blocks the negative voltages. This means that when the input-voltages go below zero we lose our power-suply, which isnt a good thing, but we need the diode to prevent damage to the other components. C1 is used to deliver the necessary voltages during the negative alternation of the input signal. The capacitor charges during the positive, and discharges during the negative alternation. In this case we use it as a battery. A capacitor is a very useful thing, and has a lot of functions. C2 for example has another purpose; we use it to flatten the output signal of the voltage regulator. The voltage regulator, IC2, assures a stable 5V output, but it needs at least 7.2V at the input. Of course the output of the voltage-regulator isnt stable, else we wouldnt need C2. Our IR-sensor has an active-low output. Ill try to explain this concept with a little example. There are 2 logics conventions: active-high and active-low. 1. Active-high: A 2 input AND port produces a 1 at the output, only if both inputs are asserted. 2. Active-low: A 2 input AND port produces a 1 at the output, only if both inputs are negated. So when the sensor isnt receiving any signals, the output will be high. To assure this high output we will use a pull-up resistor (R3). By placing the resistor the output-line wont start floating between a high and low signal.

Building The Sensor -------------------------------------------------------------------------------The sensor is quite easy to build, and is very cheap. The parts are all very common and can be bought at your local electronics shop. These are the parts needed for the sensor: - Capacitor (C1): 10F, 16V - Capacitor (C2): 100nF - Resistor (R1): 4,7kOhm - Diode (D1): 1N4148 - IR-Receiver (IC1): TSOP1838 (by Vishay) - Voltage-Regulator (IC2): 78L05, 100mA, TO-92(package) - Connector: RS232, female, 9pins - Case: suitable for the connector - Shrink Sleeve: As tin as possible - Copper wire
Here are the ELFA Part Numbers: 44-055-02 Connector: RS232, female, 9pins 44-093-55 Case for the connector 60-730-43 Resistor (R1): 4,7kOhm 65-741-80 Condenser (C2): 100nF 67-002-49 Condenser (C1): 10F, 16V 70-005-57 Diode (D1): 1N4148 73-264-08 (Voltage-Regulator (IC2): 78L05, 100mA 75-303-89 IR-Receiver (IC1) IRM-8601S 38kHz The receiver is listed on http://www.lirc.org/receivers.html as compatible and works Total prise is about 7$ www.elfa.se

Other stuff needed: - Soldering iron (I suggest one witch temperature can be regulated (280C) - Solder (40% lead, 60% tin) - Some other equipment to get the job done

Step 1-7 -------------------------------------------------------------------------------1st step: Locate the positive and negative pole of the diode. The negative pole is marked by a black circle. Cut the wire at the positive pole so it just fits in pin 7 of the connector. Dont forget: youve got to solder it so dont cut too much.

2nd step: Repeat the first step for the resistor, but now you dont have to worry about a positive or negative pole. The resistor should be connected with pin 1.

3rd step: Now we will connect capacitor C1, witch is actually an elco. This means we have to be careful because this component has a negative and positive pole as well. The negative pole is marked. The positive pole has the longest pin. Connect the negative pole of the elco with pin 5.

4th step: Connect all the lose pins together.

5th step: Cut the remaining wires as short as possible, they will just annoy us further in the process.

6th step: Now we'll check our work. It still has to fit in the case! Looks perfect to me.

7th step: Preparing the voltage-regulator: use some shrink sleeve to isolate pin3. I used some extra wires to make sure the sleeve stayed at his place.

Bottom-view: 1. In 2. GND 3. Out

Step 8-15 -------------------------------------------------------------------------------8th step: Pin 1 has to be connected with the junction of the diode, resistor and elco. Pin 2 with the negative pole of the elco. Make sure Pin 3 doesnt create a short circuit.

9th step: C2 is an ordinary capacitor, witch means it has no negative and positive pole. Connect one pin with pin 3 of the voltage-regulator, and the other pin to ground (the junction of already the negative pole from the elco and pin 2 from the voltage-regulator).

10th step: Check your work again! You cant be careful enough. If it doesnt fit, make it fit! And again some great organizing by me, couldnt be better (send me a picture if you managed to make it look better)

11th step: Preparing the IR-receiver: first bend the pins as shown on the picture. Then isolate the 3 pins with some shrink sleeve.

12th step: Preparing the case: We have a serious problem as you can see. Our IR-receiver is rectangular, while our case has a round hole (normally for the cable). You can use a cutter to

13th step: Now we will connect the last component: the IR-receiver. Connect pin1 with pin 3 from the voltageregulator. Pin 2 with GND. Pin 3 with pin 1 of the connector (RS232). Notice the extra wire at pin 1.

Bottom-view: 1. In 2. GND 3. Out

14th step: Install the sensor in the case, and see if everything fits. Make sure you dont create any short circuits when you cram it into the case. Of course my sensor glides in.

15th step: The end-result:

The Software -------------------------------------------------------------------------------We will need 2 programs for using our remote control. The first piece of software will assure the cooperation of the sensor and the remote-control unit. This software was originally created for Linux (lirc) but was distributed to windows by Jim Paris (WinLirc). Although lirc has a few more features, Winlirc will satisfy all our needs. The windows-version needs a better pc but the minimum requirements are only to be found in musea, so that won't be a problem. When youve finished the soldering, and downloaded the software you will have to configure the RC-unit that you are planning to use. This will probably take up most of your time. If you are lucky you can download the config file from the internet, there's a growing database of existing RC-units. The second program is IRAssistant. This piece of software will make us able to control any program. (useful for media-player, winamp, DVD-software,... . I don't see the purpose of controlling your word, or excel, but hey, everything is possible). With IRAssistant we can define our own macro's and assign them to a button on the RC-unit. IRAssistant is compatible with other interfaces as well (joystick, ...). We just have to download the winlirc driver (dll) and place it in the proper directory. IRAssistant has a nice interface, and some nice features. For example it's possible to create groups of buttons: you can reserve 3 or 4 buttons to call up the different groups. All the other buttons can then have there own function in each group. This means that a button can have more then 1 function, dependent on the chosen group. We can place both programs in the startup menu, so that they will start at startup (duh!) The software can be found at the following URLs: http://winlirc.sourceforge.net http://www.irassistant.com

WinLirc -------------------------------------------------------------------------------The main screen:

The configuration screen: Here we can specify the serial port and the name of the config file that we will use.

The learn screen: To create a new config file for a particular RC-unit, press the learn-button in the main screen. Follow the instructions to complete the process. Some RC-units arent compatible with the automatic learn-process. Try another unit or search the internet for a config-file.

Defining the buttons:

-------------------------------------------------------------------------------IRAssistant -------------------------------------------------------------------------------The main screen: Here you can see all created groups and macros. Notice the red explanation points, this means that those macros havent got a button assigned to them.

The configuration screen: The Lirc driver option is only available when you add the necessary dll-files after the installation of IRAssistant. Additional help can be found on the net.

Adding a group: Here you can specify a name for the new group. By using groups, you can use the same buttons for different actions, depending on what group is activated.

Adding a macro to a group: Here you can specify a name for a macro. You can select some actions in the left-window to compose a macro. An overview will be generated in the right window. Its also possible to specify a window-name as target.

Adding a specific button to a macro or group: To define a button to a macro or group select the learn option.

Last note: Well this should do the trick, have fun and!!!

S-ar putea să vă placă și