Re: Connect a wire to an IR receiver?

Bengt Martensson <[email protected]> Thu, 2 Apr 2020 10:06:17 +0200
Newsgroups gmane.comp.hardware.lirc
Message-ID <[email protected]>
On 2020-04-01 11:26, Anarky wrote:
>>> I would like to control multiple devices with my computer. On the
>>> transmitters page[0] it shows how to use the serial port, so I was
>>> thinking to build something like this:
>>>
>>> DTR >---(1N4148)---(R)---> device's IR cathode
>>>
>>> 1/ would it work?
>>
>> You have to be a bit more precise. Most IR controlled consumer
>> electronic do not have a "cathode" (an IR diode?) but a demodulating
>> chip, TSOPxxx or similar. This removes the modulation from the signal.
>> So most likely what you propose would not work. How to eliminate the
>> modulation from the sent signal has been discussed here before, for
>> example here:
>> https://sourceforge.net/p/lirc/mailman/lirc-list/?viewmonth=202003&viewday=20
> 
> My bad, I misunderstood how an IR receiver worked.
> I thought it only was an IR diode that transmitted the modulated
> signal to some chip for its demodulation.
> 
> Does the serial driver support non-modulated signals?

Not sure, likely no. Possibly there is an option called "external 
modulation" or such? Otherwise, see the quoted thread. Or help us all by 
finding out and posting the result?

>>> 2/ is it dangerous for my PC or my device(s)? I plan to connect 3 on my computer
>>
>> I would recommend deploying opto couplers, like 4N26, to achieve
>> galvanic isolation. Connect the catode of the IR diode (pin 2) to ground
>> of the PC, the anode (1) through a resistor (1k?) to the sender signal,
>> the emitter (4) to the ground of the receiver, leave base (6)
>> unconnected, the collector (5) to where the TSOP was, with a pull-up
>> (10k?) to Vcc.
> 
> Thanks! I guess if I use the USB port for the Vcc it will lose the
> galvanic isolation?

Yes. The left side of the opto coupler should be connected to the PC, 
the right side to the device. If you look at the TSOP-* in the device it 
will have a data pin, a ground pin and a Vcc. Use those.

> Also can I connect the collector (5) to multiple TSOP or each device
> must be isolated from each other?

I recommend using one opto coupler per device. There are chips with 4 
opto coupler in the chip. That will keep galvanic isolation. If you feel 
brave, just connect them together, it *may* work. Disconnect the power 
if you see smoke or detect the smell of burnt electronics...