I have an optocoupler circuit that is used to accept 24V input (100 ms pulses) and interfaced to a microcontroller.
The schematic is as follows:
Opto: BL817C or TLP621.
As per my calculations, the LED forward current and emitter current are well within range (i.e. do not violate the CTR limits).
The circuit behaves as expected initially, but after some time the emitter voltage is stuck at ~2.65 V.
What could be the reason for this? I know I am making some fundamental mistake, but haven't been able to debug yet.
Adding output waveforms.
Green: Input signal. (24V pulses 10x attenuated)
Yellow: Pin 3 of optocoupler (marked as "uC" in the schematic).
So I have tried the following to debug.
Made a small protoboard with the optocoupler and 2 resistors. Fed the circuit with 24V input signal and everything works as expected. (Tested for 2-3 hours.)
I have then wired the protoboard to the controller PCB. The circuit works for some time (40-50 min) and then the output is stuck at 2.7V.
The output voltage is 3.3-0.7V i.e. ~2.6V, so my hypothesis is that the phototransistor gets damaged and remains always on. This happens only after interfacing with the controller and working for some time.
The controller pin is defined as input pulldown. Any ideas as to what might be going wrong?
So I pulled another optocoupler out and wired the phototransistor end only: 3.3 V to the collector and the emitter pulled down to ground with a 5.2k resistor. The LED end had nothing connected.
Emitter voltage as probed:
This could only happen if the transistor is leaking current. Dark current cannot be this high, unless it's damaged?