# How does this circuit read 4-20mA current loop input through Op-amps?

I am a software guy working on coding a control system on a board whose hardware designers are all gone. While i have got everything else working, there is one piece (a 4-20 mA current loop input) which i am not clear enough to start coding for. Attached is the picture.

J12 (pin 2 is not used) is the input from potentiometer. I have this working by reading P1.3 in my code (0-3 V mapped to 0-1023 range via 10-bit ADC). However i don't understand the circuit from J11. Am I supposed to read P1.0? What is the voltage range to which the 4-20 mA is mapped to? I need to know this since i can then configure my MCU (a Silabs c8051F850) appropriately for the 10-bit ADC.

Edit 30/6/17: Multisim simulation of relevant circuit (pointed out by @jonk) below

• The usual "4-20 mA" circuit has a power supply biasing it, but this one just has a two-pin connector (J11) shown, with GND and a resistor to GND. Something is missing. – Whit3rd Sep 7 '16 at 8:09
• I am not clear what you mean. The attached snippet is part of a full schematic of a board. J11 is actually connected to a 2-lead "4-20mA" current source from some sensor subsystem (testing is done with something like this: amazon.com/4-20mA-Simulator-Generator-PLC-Instrumentation/dp/…). – RamanathanR Sep 7 '16 at 15:32
• A "4-20mA" sensor is powered through the same two wires that it delivers its sense data through. If this connector is NOT powered, does that mean the schematic is of a sensor, and not of a controller? – Whit3rd Sep 8 '16 at 5:01
• No, the schematic is of the control board. The 4-20mA has its own power source to generate current. The current is input into our board using the J11 connector. But i still don't understand the schematic. Please see my answer below to "jonk" for my source of confusion. – RamanathanR Sep 9 '16 at 10:04

120E is just $120\Omega$. If you look at J11, it's putting a $120\Omega$ resistor in the current loop. So this means, at $4mA$ the drop will be about $480mV$ and at $20mA$ the drop will be about $2.4V$. This voltage is applied to the (+) input of U4A via a negligibly small $10\Omega$ resistor, so the opamp then attempts to change its output so that the (-) input equals that input voltage. (It follows the input.)

You get to decide how you want to handle these things. If there is no current, then the output will be close to $0V$ and you may care about that. If there is something near to $4mA$ drive, then you will see about $500mV$ present. If $20mA$ then near to $2.4V$. All within range of your converter, I suspect. That's what P1.0 should see.

LATE EDIT:

The relevant circuit for your $4-20\:\textrm{mA}$ subcircuit is the following (and not as you diagrammed it):

simulate this circuit – Schematic created using CircuitLab

I've kept the capacitors in place so that all the details are present and can be used to double-check my work. But you can ignore them for the purposes of figuring out where to put the meter.

One lead of the meter should be attached to ground. This means anywhere that's convenient. Note that J11.1 is attached to ground. So you could use that pin or anything directly connected to it for this purpose. You could use the ground end of $R_{15}$, if that was easier for you. You could use the (-) supply pin of the LM358 if that was easier. If you have a question about some "convenient" bit of metal available to you, then just measure the Ohms from that spot to J11.1. If it is very close to $0\:\Omega$, then chances are you are okay using that convenient spot.

The other lead of the meter should be attached to the place of interest. In this case, I think you want any pin or end of a device that is attached to P1.0. This could be the non-ground end of $C_{18}$ or the non-ground end of $R_{21}$ or the output pin of the LM358 (pin 1) or even its (-) input pin (pin 2.) If you have any question about which end is which, just check again by measuring from the point you aren't sure about to J11.1. If it is very close to $0\:\Omega$, then it is NOT the correct end and you need to consider the other end of it as the one you probably want.

• @RamanathanR: The circuit isn't too complicated. But still simpler might have just used the resistor (it's not a floating input situation) and skipped the opamp, feeding the developed voltage directly to your micro ADC input (with a zener and a few diodes and resistors as input protection.) Or just used an opto isolator. – jonk Sep 7 '16 at 18:07
• Thank you. I got it to work by reading P1.0. 4-20mA over 120ohms gives me 480-2400mv. I configured ADC to range between 0-2.4v and adjusted the lower bound of 10-bit ADC from 0-1023 to 205-1023 in code. However i still don't understand the schematic. Its seems pin1 of J11 is connected to ground and pin2 of J11 also seems to go to ground over 120ohms R15. I am not seeing how it connects to the op-amp U4A whose output is what i am reading. – RamanathanR Sep 9 '16 at 9:59
• There's a lot of extra stuff there that may be a bit confusing. Remove $C_9$ from your vision, for example. Just get rid of it. And ignore the ground symbol for a moment, too. Then I think you might see the loop that goes from pin 1 and through the $120\Omega$ resistor and then to pin 2. This connects to an external thing that is trying to push between 4mA and 20mA through that loop. Doing so causes the resistor to possess a voltage across it. Grounding one side doesn't change that fact. But then the other side will have a voltage referred to that. Which then goes to the opamp input. – jonk Sep 9 '16 at 10:08
• I see it now. Loop circuit from J11-pin1 goes right, down, left and up over R15 to J11-pin2. But just before reaching J11-pin2 the voltage is fed to the op-amp over R14. – RamanathanR Sep 9 '16 at 11:13
• So what is the function of the other op-amp U4B connected to J12-pin2? My guess is that it switches the direction of the potentiometer i.e. when pot is connected to J12-pins1,3,4 you are in ascending direction whereas when pot is connected to J12-pins1,2,4 you are in descending direction. – RamanathanR Sep 9 '16 at 11:23