Training your PC with IR


Introduction

If you look closer, you will find at least over half a dozen remote controllers lying around at home. Starting from the 70s we were all pampered with the ease of remote control. The most common ones are infrared. I bet you that some of them are just sitting somewhere gathering dust. What I would like to do in this article is to help you to find some values in these units and explore their applications in computer control.

Infrared (IR) Transmission

Infrared remote control is an old but widely used technology. On the sending end, commands are modulated in the form of IR pulses. During the transmission, the pulses would lose some of the energy and pick up noise in the medium. The level of distortions varies inversely to the frequency of the pulses. Realistically we will try to transmit high frequency pulses to reduce loses. To achieve this, we put the information pulses (envelop) on top of a high frequency wave (called the carrier). By the way the standard carrier frequency lies between 20-40Khz. On the receiving side, before the codes could be interpreted, the carrier would be first filtered out. The Block Diagram I depicts the whole process in concept. A typical IR code in its entirety is illustrated as shown. The prefix section initializes the decoder whereas the suffix section signifies end of transmission. The repeating section provides validation of data for accuracy. Different manufacturers will have different length and patterns of coding. Notwithstanding all codes follow parts, if not all, in form as shown.

Circuit & Parts

It is possible to build a pair of IR remote controller/receiver from scratch. Personally I do not think it is worth the effort. One not only has to shop for infrared leds, timers, opamps and various capacitor/resistor parts, but also worry about amplifications, frequency and timings, as well as reception alignment. Nowadays it is much easier ,not to mention environmental friendly, to scavenge old parts. In this project I made use of an surplus Samsung TV converter. I simply tapped off signal directly from the converter IR sensor. The beauty of it is that the sensor unit, as the same with most IR controlled appliances, contains both amplification and carrier filter circuits complete housed inside. Identifying connections to the sensor unit is very straightforward. Whereas the negative terminal is obviously the one connected to the casing, the positive terminal will show a steady 5V reading (for most sensors) when power is on, leaving the last connection to be the signal terminal. Feeding the signal terminal to the PC printer port, you now have an IR sensor unit ready-made at your disposal! The connections between the IR sensor and the computer printer port are given in the schematic diagram. Outputs from the printer port are control signals only and should not be used for driving the robot motors. Therefore a relays control panel is used for the interface between the computer and the robot arm.

Parts List

Resistors: 4 x 1k; 4k7;
IR sensor from appliances (GPIU52X,SFH506,TSOP17 etc)
Relays control board.

About the Program

As an illustrating application, I made use of the converter to control an robot arm I did years ago. The controlling program is divided into 3 parts: waveform analysis, PC training and control application. The beginning section of the program provides graphical study of IR signals on screen. It allows users to zoom in waveforms discarding unnecessary information and repetitions. Once a waveform is defined, the PC will prompt for controller button activations to learn and record. Finally the computer will wait for execution commands from the remote controller. In my case, pressing channel arrow buttons on the controller will move the arm up and down correspondingly. Since my program is open-source, you could easily modify the routine to suit your application.

Applications & Conclusion

There are many application softwares for remote control available in the market. Unfortunately most of them work in a black box and might not satisfy all our needs. This article demonstrates a practical approach to harness infrared computer control in robotics. The scheme is equally applicable in home automation such as lighting, appliances or security control. It costs almost nothing and it takes no engineers to make the circuit. Most important of all, it puts you in control! Formally or informally we all take computer trainings. Don't you think it is about time, for a change, that we train our computer instead?

Email Contact
keensd@hotmail.com











1