I have a circuit below, which is the internal circuit of a device that I'm interfacing with via a an ethernet port that is separate from the rest of this discussion. Via the ethernet port, I can see whether the gate from DI0 and DI COM is open or closed. I need to open and close the gate between DI0 and DI COM with a photo interrupter. Unfortunately I don't know the voltage or the circuit to the right of the screw terminals. EDIT: Measuring the voltage from DI COM to DI 0 without anything connected, I see a reading of about 6.6v. The input supply to this device is about 12v, so the resistor in this circuit may be dropping it from 12 to 6.6, we might can hypothesize the load on that circuit that way?
My photo interrupter has 3 pins: 5v, GND, OUT. When the IR beam is interrupted, I get 5v on the OUT pin.
I tried connecting the OUT pin to the base of a TIP120 Transistor, separated by a 2k resistor. To this same transistor, I tied ground to the emitter. To the collector of the TIP120, I tied the base of a TIP42G transistor, separated by a 2k resistor.
I tied the emitter of the TIP42G to the DI COM pin, and the collector to the DI0 pin.
I would expect that when the IR beam is interrupted, the gate would close between DI0 and DI COM. When the IR beam is uninterrupted, the gate would be open. (Maybe I have that backwards?) However, when I check the device, it reports the gate is closed no matter what.
I have tested the function of the device by manually connecting and disconnecting DI0 and DI COM.
What am I doing wrong? I'm in quite a bit over my head.