I have a PLC that is powered with 3.3 V and a sensor powered with 12 V that outputs a 4-20 mA signal. In order to allow the signal to be readable by my PLC while isolating the current in the 12 V loop from the 3.3 V loop I need to use an opto-isolator which I have never used before. I am hoping for some help figuring out the appropriate circuit.
The isolator I am looking at is the HCNR201.
In the datasheet there is a bunch of rather confusing wiring diagram examples that are not clear about where the optocoupler is in the diagram.
I am wondering how I could hook it up in reality so that the circuit connected to my PLC is producing the same current as is going through the LED on the 12 V side. My thinking is that the LED would be driven by my 4-20 mA, 12 V loop (pins 1 and 2) and pins 5 and 6 I would connect to a 3.3 V source that runs through the optocoupler and is then connected to a resistor with an ADC measuring the voltage drop across as seen in my diagram below:
Does my thinking make sense? It seems overly simple compared to the example circuits I was looking at in the datasheet and I am thinking I may need to use an op-amp with the 4-20 mA loop to even turn on the LED and then down-regulate it back to 4-20 mA on the other side before passing it through the resistor.