The ELM622 by ELM Electronics is a preprogrammed PIC that converts commands from a Sony infrared remote control into a serial data stream. An IR receiver utilizing the ELM622 does not require kernel modifications. This project demonstrates how to construct a Linux IR receiver based on the ELM622 and how to use the receiver to control an X application such as xmms. The software presented in this article converts the IR codes from the ELM622 into X-Window keycodes and transmits these keycodes to any specified X application. The IR codes can also be transformed into a string of keycodes for more complex commands triggered by a single IR remote keypress. The X IR Remote Control (xirrc) can function as a secondary, specialized keyboard. The ELM622 outputs an asynchronous serial character for each keypress on the remote, transmitting serial data at 9600 baud with 8, N, 1 framing. A comprehensive data sheet is available in PDF format. The ELM622 features eight pins, including power, ground, IR data input, and serial data output. It also has an input for CTS, an output for RTS, a reset output, and an output to drive an LED indicating received data. The block diagram of the ELM622, taken from the data sheet, illustrates its components. The five-volt supply is composed of diode D2, capacitor C1, and Zener diode D1. Diode D1 is a 1N4733 5.1-volt Zener, obtainable from Radio Shack as Catalog Number 276-565. C1 is a 25-volt 0.1 microfarad capacitor. Diodes D2, D3, and D4 are all 1N4002 or equivalent. The TTL to RS-232 converter includes the op-amp, resistors R1 and R2, and the +/- 10-volt power supply formed by diodes D3 and D4. The Tx data from the computer serves as the negative supply. The resistors bias the non-inverting input to approximately 2.2 volts. As the inverting input fluctuates above or below 2.2 volts, the output varies between about -9 volts and +9 volts, sufficient to be recognized as an RS-232 signal. The IR receiver module contains an infrared photodiode, a 38 kHz bandpass filter, automatic gain control (AGC), and a demodulator. The IR receiver utilized in this project is the Siemens SFH506, which appears to be out of production; however, a more common 38 kHz IR receiver from Radio Shack should work equally well. Any construction technique can be applied since the circuit operates at relatively low frequencies. The depicted unit was constructed using wire-wrap. It is advisable to build the power supply components of the circuit first and test it independently before integrating the other parts. The program provided here is a C program that reads the serial characters from the ELM622, converts the IR characters into X keycodes, and sends these keycodes to a designated X application. The program can be modified to transmit a string of characters, rather than just one. X-Windows is event-driven and includes a subroutine, XSendEvent(), allowing one program to send an event (such as a key press) to another program. The xirrc program operates by reading characters from the serial port, converting them to the appropriate keycode, and invoking XSendEvent() to transmit the keycode to the target application. Upon starting the program, it opens the serial port to the ELM622 receiver and prompts the user to select a target window (X application) to receive the keycodes. Prior to using the program, mapping of the serial characters from the IR receiver to the keyboard keycodes controlling the X application is necessary. The ELM622 converts certain IR commands into ASCII characters while leaving others unconverted. The simplest approach is to acquire a Sony remote or program a universal remote for Sony, pressing each button on the remote and documenting the output from the IR receiver. An example mapping of a Sony remote to the keyboard commands controlling xmms is provided.
The ELM622 circuit is designed to facilitate the integration of infrared remote control functionality into Linux-based systems, enabling users to leverage existing hardware for enhanced interactivity. The asynchronous serial output from the ELM622 is particularly significant for applications requiring real-time data transmission, as it ensures minimal latency between the remote control input and the corresponding action on the computer.
The circuit's design incorporates robust power management features, utilizing a combination of diodes and capacitors to maintain a stable five-volt supply necessary for reliable operation. The use of a Zener diode for voltage regulation ensures that fluctuations in the power supply do not adversely affect the performance of the ELM622.
The TTL to RS-232 conversion stage is essential for interfacing the ELM622 with standard serial ports, allowing for compatibility with a wide range of computer systems. The output swing of -9 volts to +9 volts generated by the op-amp configuration is well within the acceptable range for RS-232 communication, ensuring that signals are accurately transmitted and received.
The inclusion of an infrared receiver module enhances the versatility of the system, enabling it to respond to a wide array of remote control commands. The choice of a 38 kHz bandpass filter is critical in rejecting unwanted noise and ensuring that only relevant IR signals are processed.
Furthermore, the software component of the project exemplifies the seamless integration of hardware and software, showcasing how data from the ELM622 can be effectively utilized to control X applications. The ability to map IR commands to specific keycodes provides users with the flexibility to customize their experience, making it a valuable addition to any Linux environment.
This comprehensive system not only demonstrates the capabilities of the ELM622 but also serves as a foundation for further exploration into the realm of remote control technologies, paving the way for more advanced applications in home automation, media control, and interactive computing.The ELM622 by ELM Electronics is a preprogrammed PIC which converts commands from a Sony infrared remote control into a serial data stream. An IR receiver using a ELM622 requires no kernel modifications. This project shows how to build a Linux IR receiver based on the ELM622 and how to use the receiver to control an X application such as xmms.
The software presented in this article converts the IR codes from the ELM622 into X-Window keycodes and sends the keycodes to any X application you specify. The IR codes could as easily be converted into a string of keycodes for more complex commands from a single IR remote keypress.
The X IR Remote Control (xirrc) could be used as a second, specialized keyboard. The output of the ELM622 is an asynchronous serial character for every keypress on the remote. The serial data is sent at 9600 baud with 8, N, 1 framing. A very nice data sheet is available in PDF format. The ELM622 has eight pins including power, ground, IR data in, and serial data out. There is also an input for CTS, an output for RTS, a reset output, and an output to drive an LED to indicate received data. The following block diagram of the ELM622 is taken from the data sheet. The five volt supply consists of diode D2, capacitor C1, and the Zener diode D1. Diode D1 is a 1N4733 5. 1 volt Zener available from Radio Shack as Catalog Number 276-565. C1 is a 25 volt 0. 1 micro-farad capacitor. Diodes D2, D3, and D4 are all 1N4002 or equivalent. The TTL to RS-232 converter is the op-amp, resistors R1 and R2, and the +/- 10 volt power supply formed by diodes D3 and D4.
Note that we use the Tx data from the computer as the negative supply. The resistors bias the non-inverting input to about 2. 2 volts. As the inverting input swings above or below 2. 2 volts the output swings between about -9 volts and +9 volts. This swing is more than enough to be recognized as an RS-232 signal. The IR receiver module has the infrared photodiode, a 38 kHz bandpass filter, automatic gain control (AGC), and a demodulator. The IR receiver used in this project is the Siemens SFH506 (which seems to be out of production). The more popular 38 KHz IR receiver from Radio Shack should work equally well. Any construction technique can be used since the circuit operates at fairly low frequencies. The unit pictured was built using wire-wrap. You may want to build the power supply parts of the circuit first and test it without the other parts installed.
The program presented here is a C program which reads the serial characters from the ELM622, converts the IR characters into X keycodes, and sends the keycodes to a specified X application. You can modify the program to send a string of characters, not just one. X-Windows is event driven and has a subroutine, XSendEvent(), which allows one program to send an event, (like a key press) to another program.
The xirrc program operates by reading characters from the serial port, converting them to the apropriate keycode, and calling XSendEvent() to send the keycode to the target application. When the program is started it opens the serial port to the ELM622 receiver and then prompts the user to pick a target window (X app) to receive the keycodes.
Before using the program you will need to map the serial characters from the IR receiver to the keyboard keycodes which control your X application. The ELM622 converts some IR commands into ASCII characters and does not convert others. The easiest thing to do is the get a Sony remote or program a universal remote for Sony, and press each button on the remote and record the output from the IR receiver.
For example, here is the mapping of a Sony remote to the keyboard commands which control xmms. 🔗 External reference
If you have old electronic equipment that has been around for many years, it is beneficial to build a good electronic project. Guidance is requested regarding a pre-tone control circuit for this purpose.
A pre-tone control circuit is an essential...
The transmission circuit for inductive wireless headsets must be securely mounted on a wall or ceiling, limiting its outdoor usability, which is a significant disadvantage of inductive wireless headphones. In contrast, infrared wireless headsets utilize a compact infrared transmitter...
This project utilizes a 555 timer to control the speed of a 6-volt DC motor. Speed adjustment is achieved by rotating a 50 kΩ potentiometer either to the left or right.
The circuit employs a 555 timer configured in astable...
The circuit diagram for the automatic control of drinking fountains is presented below.
The automatic control circuit for drinking fountains typically employs a combination of sensors and control elements to manage the operation of the fountain efficiently. The main components...
Long-distance infrared transmitter circuit diagram. This simple circuit offers a considerable range by utilizing three infrared transmitting LEDs (IR1 through IR3) in series to enhance the radiated power. To further improve directivity and power density, the IR LEDs can...
This application note demonstrates a simple 8-direction digital compass application utilizing Zilog's Z8 Encore!® MCU and an external compass sensor hardware. Communication ports are provided for the digital compass to receive commands and send status via the I2C bus...
We use cookies to enhance your experience, analyze traffic, and serve personalized ads.
By clicking "Accept", you agree to our use of cookies.
Learn more