I'm designing a simple circuit where I intercept and read an open collector pulse signal from an external machine and let it pass through to an optocoupler. In addition to that, I can also output a pulse signal through my MCU. The external machine's optocoupler is set in a normally open configuration. My circuit is as follows.
simulate this circuit – Schematic created using CircuitLab
This circuit works most of the time but currently, I'm facing some instability issues that are inconsistent.
- The voltage across the external machine's collector and emitter read 0.6V instead of 3.3V. When a pulse is sent through, the voltage will pulse between 0.6V and 0V which is too low to trigger the XOR gate.
- The idle voltage is 3.3V but when a pulse comes through, it drops to zero and slowly rises over a period significantly longer than the pulse. (eg. pulse is 50ms, it drops for 3s)
These issues do not happen consistently but when it does it prevents the input signal from passing through to the output optocoupler. Can anyone help explain what is happening in this situation?