An optocoupler circuit includes first and second resistors, an optocoupler, a reference circuit, and a comparator. The optocoupler includes a light source and a phototransistor. The light source is connected to form a first voltage divider with the first resistor. The phototransistor is connected to form a second voltage divider with the second resistor. The optocoupler transitions an output of the second voltage divider between first and second levels. Magnitudes of the first and second levels are greater than zero. The reference circuit is configured to output a reference voltage. The comparator includes a first input and a second input. The first input receives an output of the first voltage divider. The second input receives the reference voltage. An output of the comparator transitions between a third level and a fourth level based on a comparison between the output of the first voltage divider and the reference voltage.
展开▼