PC IR Remote Control Xcvr

This is a simple little circuit I put together to experiment with sending and receiving IR remote control signals with a PC. The intent of this circuit is to allow experimenting with a Linux PC running LIRC to send and receive remote control codes.

The circuit attaches to serial port. LIRC reads the DCD line to receive the pulses of received IR, while DTR is pulsed by LIRC to transmit. The circuit also provides a 1Vp-p output to feed to a sound card. This is used to attach to a sound card so one can capture the pulses and look at them in a wave file editor. As the circuit was meant for experimenting and debugging, LEDs are also provided to indicate when IR is being received and when it's being transmitted.

The circuit is not original, borrowed pieces of various circuits on the web.

Warning: I do not suggest building this circuit and connecting it to any PC you care about. As this is experimental hardware, damage to your PC may result. I cannot take responsobility if you damage your PC with this circuit.

The heart of the receive circuit is U1 which is a IR Receiver/Demodulator. It receives and demodulates 38 khz IR pulses. The IC contains a photodetector, filtering and AGC circuit. It is low when a 38 khz IR pulse is detected, high otherwise.

The output of IR Receiver/demodulator feeds Q1 which is setup as a buffer. Q2 is configured as an inverter to drive LED D2 (38 khz IR detected LED) and the soundcard output. The sound card output is divided across R4 and R5 to provide an approimate 1v peak signal.

The Transmitter is also pretty simple. LIRC drives a 38khz signal on DTR which is divided across R7 and R8. Q3 is a buffer to drive Q4 which is a medium power transitor to driver the IR LED D4. The particular transistor I used is probably overkill as the IR led only pulls about 100ma when on. Unlike the receiver where demodulation of the signal is performed by U1, LIRC provides the 38 khz modulation on the transmit side. LED D3 is a visible LED to show when the circuit is transmitting.

Built the circuit on a little prototype board from Radio Shack.

Circuit has worked well with some breif experimenting I've done with it and LIRC. Was able to get LIRC to recognize the 5 remote controls I had around and sending has worked well. Range on send and receive has proven to be good, easily covering the 12x10 foot room I have it setup in.

Being able to use the soundcard to capture and view the IR pulses has worked well. Below is a capture of a single command from a Sony Remote control for a portable radio.

One issue I have noticed is the computer time of day clock loses time when sending is used extensively. This is to be expected as LIRC suspends interrupts when it is sending since generating the 38 khz waveform to drive the transmitter is time critical. I may modify the circuit to provide the 38khz modulation itself using a 555 timer. This will keep LIRC from spending so long with interrupts disabled.


Comments to: Bill Tracey (kd5tfd@ewjt.com)

Last Updated: 1 Aug 2004

Copyright © Bill Tracey 2004