Once it was necessary to check the prehistoric (Russian yet) remote control. There were no funds. Rummaging in the Internet, I found several ideas. I was struck by the idea of making a simple IR port from: mice! Computer, of course. We will start with this device.
1.IR port from ball mouse COM.
Stunned by the idea, I went into the closet and dug up a few ball mice, one older than the other. The older one had 6 wires from the computer, the newer had four. She took it. The lines went through four wires: RTS (Request To Send, request to send. Used to power the mouse circuit.), Rx (the computer receives data through it), Tx (the computer sends data through it), and of course GND, ground.
In the photo, the plug of the mouse wire. During the calls, I found that the orange wiring is RX, the green wiring is TX, the white wiring is RTS and the blue wiring is ground. Further, for simplicity, I cut off a piece of plastic and stuck a mouse connector on it (the one that was soldered into the board):
Then a photodiode bridge and an infrared LED fell out of the same mouse. I took a 4.7 kOhm resistor from my stock. The device to the resistor is not critical - you can put from 2 to 7 kOhm, but with a lower resistance, the radius of the receiver decreases. Here is how the details look (from left to right: photodiode bridge, IR LED, resistor):
Here is the device diagram:
After half an hour of soldering and gluing, this is what happened:
The device came out working - a confident radius of reception - 5 cm, transmission - 20 cm. To check the remote control, this turned out to be enough: it does not work.
2. Advanced IR transceiver device.
Since we fled, we must also talk about a more advanced device.
The port consists of a receiver (TSOP chip and body kit) and a transmitter (HL1 LED and current limiting resistor R2). The receiver uses a specialized TSOPXXXX chip. She receives a signal with a certain frequency. This ensures high noise immunity. Since they are available in several versions - for different frequencies of signal filtering, it is necessary to select the right one for a specific remote. Let's look at the datasheet:
As you can see - there is a choice: from 30 to 56 kilohertz. In the datasheet it is written that the maximum speed of the received signal is 2400 bps / s, so it is difficult to judge whether the micra will work, for example, with a mobile phone. This is what TSOP1736 looks like:
Resistor R1 pulls the RX line to the power supply (after all all the COM port signals are inverted), the VD1 diode protects the circuit from polarity reversal during port initialization, and Conder C1 protects the receiver from interference. Well, the 7805 stabilizer certainly drives the IR receiver. I advise you to put in the TO-92 - smaller in size. The transmitter is not particularly advanced, it differs only in a more powerful IR diode. You can put, for example, L-34F3C, L-54F3C. Resistor R2 limits the current through the diode. IR diode looks like this:
This device accepts and transmits well at a distance of up to 5 m. If you want to experiment, here is the pinout of the COM port, common on the Internet:
3. Programs for working with infrared ports.
Now let's talk about the programs. I used the WinLirc program for verification. The device showed pretty good results: the reception radius is 5 cm, the transmission radius is 20 cm maximum. It all depends on the type of photocells. For an example, I will give you an example of working with the remote control from the music center. Talk about customization. We start VINLIRK. She writes: configuration failed, reconfigure. Type the path and name of the configuration file in the Path field and then follow the steps: (note: such settings are only for this device): 1. In the Port field, put the port number where the device is connected 2. We leave the Speed field intact, although you can experiment - old computers don't want to think faster than 115200 bps. 3. In the Receiver type frame, set the RX device, because The IR LED (TSOP) is connected to the RX leg of the COM port. Of course, you can connect to the DTR, but it will be a makeshift cord, and not from a standard mouse, as here. 4. In the Transmitter settings, set TX. You can connect to the DCD - your right.
Next, click Raw Codes. We bring the remote control to the receiver and press the buttons. If there begins to ripple, such as: pulse 200, pulse 400, then all hockey. If not, look at the device for errors.
Now you need to teach a stupid program to science - to recognize the commands of your remote. Close the viewport, and click Learn. And there we are further guided by the English language, for the program is bourgeois. PS: Where the program says "press the button on the remote, and hold until I say", you do not need to hold the button, but poke it as quickly as possible - from personal experience. After studying, click Analyze. The program will check the config, and say OK. Close the window. Look like that's it. Click OK in the main settings window. The program will be minimized to tray. We press the buttons on the remote control - if the program understands the commands, then it responds - the color of the indicator changes from gray to green. For this program, you can find plugins for managing WinAMP, for working with TCP / IP. For advanced computer management, I recommend the uICE program. Anyway, now there are many programs for this matter. I recommend searching the Internet. This program is already for managing the computer from the couch - to it you can also find plug-ins for WinAmp.