Stumped on a 4-20mA analog input design issue

I have been working on this one for several months now, and I am officially stumped. This is a subset of a larger project (industrial interface boards for the Raspberry Pi), and this bug has been plaguing my progress on the greater project for quite some time.

The basic circuit design is as follows:
Circuit Diagram

Basically, the signal comes in from the field through a front end offering protection and filtering (the jumper selects either 4-20mA or 0-10V operation), and is buffered by a AD8220 Diff Amp. The output from the AD8220 goes to a MCP3424 ADC. The -5V for the AD8220 is provided by ICL7660S charge pump IC. The result is a fully isolated and well-protected industrial analog input.

For a few seconds (I will explain a second), it works. On the output of the Diff Amp, I see 1.99V at 20mA, which is about what I would expect to see given the cumulative error of my components, etc.
But, here is the issue. I only see 1.99V for a couple of seconds, and then it "discharges* down to 0V. If I move my volt meter probe to the negative side of the input, that side “discharges”, and then if I move my probe back to the output of the Diff Amp, it is back at 1.99V…just for a few seconds.

Sounds confusing, right? Here is a video showing what I just described:
YouTube Video

I have removed any component I thought would maybe cause current leaks - the TVS diode, the input zener…and, no change.

So, I am officially stumped. Oh collective wisdom of the Internet, what sayeth you?

So I watched the video, first question: Have you tried another DMM?

Yep, I have used two that are known to be working. Also, if I actually have the ADC attached and communicating with the Pi over I2C, I observe the same effect there.

So the other thing I’d normally look into is the protection diodes on the input the the diff amp activating. The voltages don’t seem like they’d necessarily trigger them, but that’d be more dependent on the datasheet.

Unrelated, have you put a scope onto it instead of a DMM? It’s possible there are spikes you’re not seeing and this is very dynamic in nature. having a scope will allow you to see the behavior over time.

Not a bad idea (the scope). Across TP105 and TP106?

Yep, definitely that. But also check out between GND and TP106, to make sure your input isn’t shifting somehow. If you have a 4 channel scope, I would ground reference everything and then put TP105, TP106, V+ and V- on screen.

Oh and later TP104, obviously.

This is why having 4 channels scopes can help. Having more info on screen is awesome.

How are you feeding in the differential signal on pins AIN(-), AIN(+)?
And how are these referenced to the ground of the AD8220?

What I think is happening is that both AIN pins can move up and down w.r.t. ground because you’re feeding your circuited in a floating manner, i.e. only the differential mode voltage is determined by the current going through R111 or R112.

Nothing in your circuit seems to set the bias of the AD8220 inputs. The biasing will have to come from the device you’re connecting to your board, it seems.

When the absolute voltage of the AD8220 w.r.t. its own ground is undefined, your multimeter will charge up the gates of both input JFETs until one of the input clamping diodes internal to the AD8220 starts working and saturates the AD8220, resulting in a 0V output, i.e. both inputs will end up at either -V or +V.

What do you think?
Regards,
Niels.

3 Likes

A fix would probably be to have a large resistor, e.g. 1Mohm, going from TP105 to 0V/ground.

/Niels.

2 Likes

Okay, this is an interesting thought. @ChrisGammell’s suggestion to hook-up a scope also got me thinking.

When I went to hook up my scope, I noticed that the “draining” issue went away. I also watched Dave’s OpAmp input bias video and I think you are on to something, @n.a.moseley.

I took some data, and this is what I found:

(All pulldowns are referenced to GND, NOT the A- input):

No pull downs/ no load - 574mV at TP104
No pull downs/ 4mA load - 573mV at TP104
1M pulldown at TP105, 4mA load - 814mV at TP104
1M pulldown at TP105, 20mA load - 2.002V at TP104

With the pulldown, the output is stable! It even shows 1V at a 10mA load. This is good.

On a Reddit thread I started, a user commented the following:

Look at the AD8220 Datasheet, page 22: “The AD8220 input bias current is extremely small at less than 10 pA. Nonetheless, the input bias current must have a return path to common. When the source, such as a transformer, cannot provide a return current path, one should be created.” I see no such return path in your circuit diagram.

My data collection, plus this comment/ data sheet notation all point to an input biasing problem. This makes sense now given that my power supplies really weren’t offering a ground, so the inputs were floating. I can see how tying the input to GND with a high value resistor helps.

However, on the low end of my scale, where a 4mA load should read 400mV at TP104…I have an obvious error. Not sure what to do about this.

Oof. If this is indeed an input bias issue, I am a bit worried as in Dave’s video, he points out that these type of things are quite tricky to figure out.

Any ideas on where to proceed from here?

Thank you for all of the help!

Hi John,

Good that the problem is starting to reveal itself!

Given that 20mA results in 2V and 10mA results in 1V, but 4mA does not give 400mV, it looks like your circuit is not working in the expected linear region. My guess is that one or both of the input pins are outside the allowable common mode region when you apply a low current.

Looking at the datasheet of the AD8220, in figure 27, it shows the input common mode range over which the AD8220 operates in its linear region. Luckily, it uses the exact operating conditions you’re using: +/-5V supply and VREF=0V. Your circuit operates correctly when +IN and -IN are below 3V and above -5.3V, approximately.

Measuring the voltage on the +IN and -IN when you apply 4mA should let you know if the AD8220 is misbehaving because of a common mode biasing problem at low currents.

The 1M resistor alone should not cause this measurement error. The non-ideal properties of the AD8220 are involved somehow.

Regards,
Niels.

John, any updated after another day of testing?

Hey! Short story is I fixed it :slight_smile: I am leaving for a business trip, but as soon as I get to a place that I can write, I will pul together a long form response. The suspense!

1 Like

Finally back from my trip - sorry all for the delay.

As it turns out, the issue was twofold. Take a look at the following data and then read below:
Google Sheets

When I was taking data, there were a handful of observations that helped me diagnose the issue:

  1. At the inputs right before the diff amp (measured at TP105 and TP106), the measured voltage was within spec and stable. (Columns A & B)

  2. When measured on the output of the diff amp (TP104 and GND), the voltage was within spec until the input dropped below 7mA. (Columns D & E)

Observation 2 led me to check the V-, which should be -5V. As it turns out, it was 500mV, which wasn’t right.

A bit of inspection with my charge pump revealed that a poor solder connection on one of the 10uF caps was the culprit.

Once I fixed the solder connection and retested… it works!

Actually, it works great. Measuring 4-20mA, my average error is 0.45%. For 0-10V, it is 0.11%.

Summary of the Problem

  1. The “draining” problem was caused by not having a path to ground for the input bias current. Without this return path, the bias current is “leaking” back through AIN-, causing the diff amp to drift towards 0 as the inputs become equal. I am not sure if this explanation is correct - what do you all think?

  2. V- voltage was incorrect, causing range issues with the output of the diff amp.

Fixes

  1. Added a 1M resistor to GND at TP105.
  2. Fixed the poor solder connection at charge pump to supply -5V to the diff amp

Board Changes

  1. Remove 10K resistor in series with ADC output (not needed)
  2. Add AGND input on board and tie 1M resistor from AIN- to AGND

Thank you all for the help!!!

2 Likes

Though shalt check the power rails :smiley:

Maybe i’ll make that into a t-shirt

2 Likes