Electronic – What kind of circuit do I need with a 6N138 optocoupler to get proportional output

opto-isolator

I have 0-5V input that I need to isolate and still output ~ 0-5V to an isolated circuit. I purchased some 6N138 optocouplers to do this but I'm not getting a voltage output with a 5V input. There are some transistors built into the optocoupler that are complicating things. How do I create a circuit with the transistors to get an output of approximately the same magnitude to the input?

Best Answer

It's not easy to do with a simple optocoupler, because the CTR is not well-controlled.

The usual solution is use a "precision optocoupler" like TIL300 or HCNR200. These have one transmitting LED and two matched receiving photodiodes. You use one photodiode to deliver the signal to the isolated side, and the other one to provide feedback to an op-amp circuit on the sourcing side to enable the signal amplitude to be controlled accurately.

enter image description here

This may look like a lot of circuit complexity, but it's likely to be simpler in the long run than calibrating a single-receiver optocoupler, compensating for temperature variation, etc.