A One Component LIRC Parallel Port IR Receiver

I wanted to make an IR receiver for use with LIRC with MythTV but all of the projects were complicated and I was lazy. Then I found this page which described a one component IR receiver that hooked up to the parallel port. It was five years old but I figured it should still work in theory and lo and behold, it did.

The theory behind the one component IR receiver is simple. Most remotes use a bit-width coding so the period of the pulse determines the bit being sent (a one or a zero) (see this page). LIRC wants us to be able to detect both rising and falling edges but this is unnecessary! Fortunately for us, the parallel port also has a built-in “rising edge detector”, the ACK pin which will generate an interrupt on a rising edge, allowing us to measure the period of the pulse. We then cheat and tell LIRC that we got a pulse for half of the period and a space for half of the period. Happily, it works for most of the remotes I could find lying around the house.

The original parallel port IR receiver needed an external power supply (groan) but with modern IR receivers drawing less than a single milliamp we can power it off of one of the data pins from the parallel port! The IR receiver I used is the TSOP4838 from Vishay which I was able to get free samples of. I then hooked up the power pin up to pin 2 on the parallel port (data bit 0), the data pin up to pin 10 on the parallel port (the ACK pin), and the ground pin up to pin 19 (ground).

I used the patch from Miguel's webpage as a guide and modified the current LIRC parallel driver to work with my receiver. It works pretty much the same way but I also pruned a lot of unnecessary crap out of the driver that dealt with the receiver/transmitter that it was written for. It also sets the data pins high to power the receiver on. I tested this with lirc-0.8.6 and 8.7 and it works with both!

Total, I only spent $5 on a DB-25 connector and hood from Radioshack and then 10 minutes soldering and heat-shrinking things to make my receiver look nice. Hardware-wise, it can't get any simpler.

Get the patch here: files/lirc-0.8.6-parallel.patch