4-20 mA to 0-3.3 V Conversion

I am trying to convert 4-20 mA current loop signal to 0-3.3/0-3 V output for my 10 bit ADC IC that is connected to a Raspberry pi 3B+.

Schematic:

The input sensor is a 12 V loop powered 4-20 mA output humidity sensor. The op-amp is an MCP6002 rail to rail. The output of the op-amp is connected to a 10 bit ADC-MCP3008 (SPI enabled connected to RPi.)

The output voltage only varies from 0.6 to 2 V and I don't know where exactly the voltage drops.

The circuit works fine if I read the voltage using only a 150 Ω resistor (0-3 V.)

I can't understand what's wrong in this circuit.

• Using 20 mA, record the reading on all op-amp pins. Add those voltages to the circuit. Repeat when the input is 4 mA. Jun 5 at 10:49
• where should i add those voltages in the circuit Jun 5 at 11:34
• Sketch them on close to the nodes they pertain to. Jun 5 at 11:37
• Is MCP6002 the correct choice or should I opt for another rail to rail CMOS opamp IC ? Jun 5 at 11:56
• Measure and annotate the schematic first before jumping ship on the 6002. Jun 5 at 11:57

You've got a gain of +1.25 so the 16mA of input span results (theoretically) in 3V change, which is fine (if that's what you really want - the op-amp can't get all the way to the rails but maybe you don't care about the exact extremes with a humidity sensor - for example, you could assume humidity less than 5% is a broken sensor).

For 0V out, the voltage at the non-inverting pin will be 3.3*2.5k/12.5 = 0.66v so the current in must be 4.4mA, so you will have a -0.4mA (-2.5%) error over the span.

The resistor values are a bit low.

So if you change R60 to 25k, change R43 to 111k and add a resistor of 1MΩ from the inverting input to ground it should be accurate.

However, your numbers suggest a more serious problem, perhaps a resistor that is far off value, or a short.

• So should I do these 2 major changes and retest the circuit ? Jun 5 at 11:37
• No, first try to find the main problem. double-check the two resistors R60/R43 values and look for shorts. Jun 5 at 11:39
• Should I replace with a pair of resistors valued 110k and 24k I got? Jun 5 at 11:51
• Can you check the values of the ones you have? General philosophy is to alter as little as possible at a time, so as not to potentially cause additional problems. Jun 5 at 12:11
• Yes, you could, and it would solve the problem I alluded to above- distinguishing a broken sensor from "zero". Most humidity sensors are not accurate enough to require 10 bits anyway. Removing R43 should do that. Jun 5 at 12:53