Using
Multiple
IR Transmitters with the LIRC Homebrew Parallel Port
I've been using an
LIRC serial
homebrew transmitter to control a
DirecTV receiver for quite a while.
It
works well, but
I recently decided that I also
wanted to control a second, identical
receiver.
Because
these receivers are identical and
DirecTV didn't think to add remote codes to these
models, I needed
2
unique IR transmitters. Rather
than compiling a second LIRC serial driver, I
decided to modify the
homebrew parallel port homebrew hardware so that it can support multiple IR
transmitters.
The latest CVS version of lirc_parallel.c and lirc_parallel.h are all the additional software required to make this
modification work. These can grabbed individually and added to the stock LIRC version 0.8.1 soruce tree in the
drivers/lirc_parallel directory. You must then build lirc.
The hardware
modification is
based on the LIRC Parallel homebrew design. The "Transmitter circuit" section
should be replace with the circuit shown below. I created this rough drawing by reverse engineering the circuit
I designed on the back of an envelope that I then threw away. It should work, but I haven't actually built to this
drawing so I can't say for sure. I can say this: USE IT AT YOUR OWN RISK!
Transmitter
Circuit:
GND GND
o
o
|
|
|
|
---
---
/ \
D1
/
\ D1
---
IRLED
--- IRLED
|
TX4
| TX5
|
|
---
---
|
|
| |
|
R7|
| R7|
R7:
220ohm
|
|
| | o
38KHz
D1: LN65 (Panasonic SSG)
---
38KHz
--- |
|
o |
_| oD4
GND |________ | D3 |
| _____|
o
|
| o | | |
|________ | | |
| | |
| | | | | |
|
+-+--+--+--+--+--+--+-+
| 7 6 5 4 3
2 1 |
|
|
|
74ACT08
|
|
|
| 8 9 10 11 12 13 14 |
+-+--+--+--+--+--+--+-+
________| | | | |
| |_____
|
|
| | |
|
|
|
o
| | |
o
o
|
D1
| | o 38KHz
Vcc
|
o | D2
|
38KHz |
---
---
|
|
| |
|
R7|
| R7|
|
|
| |
---
---
|
|
|
|
---
---
\
/
D1
\ / D1
---
IRLED
--- IRLED
|
TX2
| TX3
|
|
o
o
GND
GND
For
systems
requiring LED current over 50mA, additional current (I) drive circuitry
should be added
for each transmitter
LED.
There are
several ways to do this including replacing each of the R7/D1 pairs
shown above with the drive circuit shown in the original homebrew transmitter design.
The D1-D5 pins on
the parallel data port
become enable signals that gate the 38KHz signal from the
NE556.
I'm using a standard AND gate to do this. The
following circuit
replaces the "Transmitter circuit"
shown in the
homebrew parallel port design, it adds four transmitter
diodes, but can be expanded to add up to seven.
I have enough
transmitters to
make dedicated connection to each receiver, so I just attach the IR
LEDs directly onto the IR receiver
lens (IR
Blaster style),
and I connect the IR LEDs to the transmitter
circuits
using a short
(24") cables. Not
only does this eliminate the risk of a physical obstruction interfering
with the IR signal, it also allows
me to run the IR LED at a much lower power. I'm running the
100mA
LEDs
at under 15mA. Since
the AND gate can source 50mA, the low transmit power simplifies the
drive circuit
to only a
current
limiting resistor. I'm using LIRC with a
Mythtv backend,
and have the entire system hidden
away in a confined space, so this all works out very well for me.
I'm still using D0 as the clock enable for the "Frequency generator" section of the original schematic. This may
not be necessary, but it "feels" safer (truthy?). Another approach is to modify Pin10 of the NE556 in
the "Frequency generation" circuit: Disconnect Pin10 from D0 and pull it up to VCC. This will force the
Frequency Generator to run freely. This approach would "reclaim" TX1 and allow for up to 8 transmitter (256
if you use a mux!). I don't know if the phase relationship between the 38KHz clock and the transmitter
enable signals are important, perhaps someone can enlighten me here. In any event, I like the idea of that clock
only running when needed, and I don't need that many transmitters.
To select a transmitters, use the "irsend SET_TRANSMITTERS" command. The arguments correspond to
D[0:7] pins on the parallel port:
SET_TRANSMITTERS 1 => Activates D0 => Global Clock Enable
SET_TRANSMITTERS 2 => Activates D1 => TX2 Enabled
SET_TRANSMITTERS 3 => Activates D2 => TX3 Enabled
SET_TRANSMITTERS 4 => Activates D3 => TX4 Enabled
SET_TRANSMITTERS 5 => Activates D4 => TX5 Enabled
Because I use "TX1" as a global clock enable, I pass SET_TRANSMITTERS two arguments to select a transmitter:
irsend SET_TRANSMITTERS 1 2
This enables both the Global Clock Enable and TX2 as LIRC sends the remote command code.
To
integrate with MythTV, I have written a separate script for transmitter 2 and transmitter 3. I just attach each
of these scripts to the correct tuner in the "external script" portion of the MythTV setup program. I don't know if
its necessary or not, but I use the lockfiles to protect against the possibility of MythTV attempting to change
both tuners at once. These lockfile tools are part of the Debian lockfile package. Most distribution seem to
have similar programs.
Disclaimer:
The multiple LED Transmitter Circuit, is provided by Freelance Logic, Inc. under the Creative
Commons Attribution 2.5 License.
If you aren't
familiar with it, please read the license in its entirety, particularly sections 5 & 6 regarding liability. If you would like to
share or build upon this, it would be appreciated, but not required, to mention Freelance Logic, Inc. or this web page as the source.
Creative Commons Attribution 2.5 License.

Updated Jan 25, 2007, 21:47 PST by Mike Karasoff