Analog-To-Digital Converter (ADC) - Input Voltage Is Drifting Slightly - Not Sure How or Why?

Thread Starter

Mahonroy

Joined Oct 21, 2014
406
Hello, I have a circuit that has an analog-to-digital converter onboard, and is taking 2x voltage measurements from 2 sensors circuits. I have used the PT1000 circuit for some time now and never noticed an issue like this. The flow-meter circuit is new, the ADC128 is new, and the 24V power is new.

The flow-meter is basically generating pulses, which goes through an RC filter to turn it into an analog signal and then continues to the ADC.

When there is no flow/pulses, the analog flow signal is supposed to be 0.00 volts. Some of the time it is. But often the problem I am having is it begins to drift.... e.g. it will start to creep up to 0.050 to 0.080 volts, which yields a significant ADC reading, which shows there is flow when there is not. At the same time when this happens, I notice the temperature voltage also creeps up about the same amount, so those readings get thrown off too. They both drift together.

At one point I had the oscilloscope probe ground connected to the circuit boards ground, and the instant I disconnected the probe the problem went away for both signals. So I thought the scope must have been inducing a small voltage or interference or something. It didn't last long though, it eventually over about 10 minutes creeped back up. It almost seems like a charge or something is building up, and when I discharge it the problem is temporarily fixed. I don't know if that's actually whats going on, but that's kind of what it seems like.

Any help or advice would be greatly appreciated! I definitely want to build a better understanding on what is going on that's for sure.

Some things I have tried and noticed:
  • Looking at resistor R76 on the flow meter portion: I can see the drifted 0.080 volts on the right side, but I see 0.00 volts on the left. Does this mean the voltage is coming out of the ADC input pins?
  • At one point I accidentally shorted the 24VDC to ground (luckily it has short circuit protection). This emit a spark, and removed the problem. It took almost 30 minutes for the problem to come back after I did this.
  • I can see exactly 3.3 volts across the ADC's ground, and reference with the scope. This always stays at 3.3V no matter if its working or not working properly.
  • For testing the temperature, I have a 1K ohm resistor connected up to the PT1000 input. 1K reads 32 degrees F. (it reads 25 F when the voltage drifts). For testing the flow meter, I have a short wire connected to ground, and I tap it on pin 2 to generate pulses. I wanted to let you know that I don't have long sensor wires running around the room potentially picking up interference or anything like that, its contained close to the board for troubleshooting.
  • It seems like I occasionally move some wires or touch something on the circuit board, and this resets the problem. It will then work for a period of time but will eventually drift back up to the incorrect voltages.
  • All of the power rails read exactly the voltage that they are supposed to, when the circuit is working and has not drifted yet, as well as when its drifted and has incorrect voltages.

adc128.jpg
 

ci139

Joined Jul 11, 2016
1,898
biasing your temp. sensor like that makes it dependent on the op amp output -- ? is that the goal/correct
 

Thread Starter

Mahonroy

Joined Oct 21, 2014
406
biasing your temp. sensor like that makes it dependent on the op amp output -- ? is that the goal/correct
I'm not sure I'm following. The purpose of that circuit is to amplify the voltage to get more resolution/precision to the ADC before taking a ADC reading.
 

Veracohr

Joined Jan 3, 2011
772
When there is no flow/pulses, the analog flow signal is supposed to be 0.00 volts. Some of the time it is. But often the problem I am having is it begins to drift.... e.g. it will start to creep up to 0.050 to 0.080 volts, which yields a significant ADC reading, which shows there is flow when there is not. At the same time when this happens, I notice the temperature voltage also creeps up about the same amount, so those readings get thrown off too. They both drift together.
Sounds like the inputs are floating a bit. Check section 7.3.3 of the ADC128 datasheet regarding source impedance recommendations.
 

Thread Starter

Mahonroy

Joined Oct 21, 2014
406
It would appear the bias supply to the temp sensor varies with the sensor signal.
I would think you would want the bias voltage to be constant.
Its just a voltage divider. The PT1000 is basically a 1K resistor that changes resistance depending on the temperature. 3.3V goes out of the board, through the sensor, back into the board, then goes through the op-amp to be transformed. 3.3V is also used for part of the voltage divider on the op-amp.
 

Veracohr

Joined Jan 3, 2011
772
I looked up the datasheet, but I don't see that information here under section 7.3:
Oh, I had just searched for ADC128 and apparently came up with a different version. The ADS128S102 datasheet recommends a source impedance of less than 100 ohms. Assuming the converter is the same between these two parts, I'd go with that. You should buffer the filtered signals before applying them to the ADC inputs.
 

Thread Starter

Mahonroy

Joined Oct 21, 2014
406
It would appear the bias supply to the temp sensor varies with the sensor signal.
I would think you would want the bias voltage to be constant.
Oh, I had just searched for ADC128 and apparently came up with a different version. The ADS128S102 datasheet recommends a source impedance of less than 100 ohms. Assuming the converter is the same between these two parts, I'd go with that. You should buffer the filtered signals before applying them to the ADC inputs.
Thanks for that info! Where do you see source impedance of less than 100 ohms? So in that case, R76 needs to be 100 ohms or less? 100 ohms is a really low impedance requirement for an ADC isn't it? On a side note, how would you buffer the filtered signals?
 

Veracohr

Joined Jan 3, 2011
772
Thanks for that info! Where do you see source impedance of less than 100 ohms? So in that case, R76 needs to be 100 ohms or less? 100 ohms is a really low impedance requirement for an ADC isn't it? On a side note, how would you buffer the filtered signals?
On the ADC128S102 datasheet that I linked at the section I mentioned. Buffer it with an opamp voltage follower.
 

ebeowulf17

Joined Aug 12, 2014
3,307
Where does 3V3_TEMPERATURE_SENSOR come from? How is it different from the other 3.3V supply nodes?

My question probably doesn't matter, as I suspect @Veracohr has already found the real problem. I'm just curious.
 

Thread Starter

Mahonroy

Joined Oct 21, 2014
406
Oh, I had just searched for ADC128 and apparently came up with a different version. The ADS128S102 datasheet recommends a source impedance of less than 100 ohms. Assuming the converter is the same between these two parts, I'd go with that. You should buffer the filtered signals before applying them to the ADC inputs.
It looks like you were looking at a different part #'s datasheet. I'm using the ADC128D818, the datasheet you looked at is ADC128S102. I looked through the correct datasheet but still don't see how to determine the max impedance for input pins.

I found this example however, it shows R2 and mentions it can be between 10K and 100K, which I don't necessarily have. It does not mention what R1 might be which would suggest input impedances:

1588525133816.png

Thanks again for the help!!
 

Veracohr

Joined Jan 3, 2011
772
It looks like you were looking at a different part #'s datasheet. I'm using the ADC128D818, the datasheet you looked at is ADC128S102. I looked through the correct datasheet but still don't see how to determine the max impedance for input pins.
I assumed they used the same converter since they both started with ADC128, but I see now that one's SAR and one's delta sigma so I'm wrong there.

Regardless, most ADC datasheets that I've looked at have recommended low source impedance for the inputs. I don't know for sure that buffering it will solve the problem, but it's worth a try if you can afford the circuit revision.
 

MisterBill2

Joined Jan 23, 2018
18,170
That is indeed a fair amount of drift, the rising output. So my first question is how are you measuring this voltage? What device are you using and just where are the measurement points located? I ask this because I have seen folks chase errors and drift that were not there when the measurement system was disconnected. If the rising voltage actually appears in the A/D count then it matters a lot more. Another important question is: Does the indicated voltage increase when the signal connections to the A/D are replaced by a 1K ohm resistor? In the flowmeter circuit is a block with six leads, and no information at all. Is that a passive device with no power conected to it? Or does it contain Some active device that is powered? If it is only an RC filter then I would point at the opto isolator, since it is DC coupled to the A/D through the filter circuit. So there are some questions to answer and checks to do. Those answers will be useful to all readers here.
 
Last edited:

Thread Starter

Mahonroy

Joined Oct 21, 2014
406
That is indeed a fair amount of drift, the rising output. So my first question is how are you measuring this voltage? What device are you using and just where are the measurement points located? I ask this because I have seen folks chase errors and drift that were not there when the measurement system was disconnected. If the rising voltage actually appears in the A/D count then it matters a lot more.
I am using an oscilloscope to take measurements, between ground of the ADC, and the input pin. The drift still happens with and without the scope connected, and I can see the drift reflected in the ADC values.
 

Thread Starter

Mahonroy

Joined Oct 21, 2014
406
I assumed they used the same converter since they both started with ADC128, but I see now that one's SAR and one's delta sigma so I'm wrong there.

Regardless, most ADC datasheets that I've looked at have recommended low source impedance for the inputs. I don't know for sure that buffering it will solve the problem, but it's worth a try if you can afford the circuit revision.
Yeah I still don't see this information in the datasheet. I'm not understanding how to figure this out.
 

ci139

Joined Jul 11, 2016
1,898
I'm not sure what this is supposed to mean?
your thinking/setup/biasing is "technically" correct - you can reference both inputs to the same reference point no matter would the reference point be static or varying in time . . . exept the common mode sensitivity varies ... a bit with your reference point changing + the Op Amp has an offset error . . . those two can lead to nonlinear output

other than that -- some Op Amps may have 10s of minutes . . . yes it's minutes of the "warm up time" -- so you should read the docs if the one you are using is such
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,170
I am using an oscilloscope to take measurements, between ground of the ADC, and the input pin. The drift still happens with and without the scope connected, and I can see the drift reflected in the ADC values.
OK, what about the other questions? If there are no active components in the pulse filtering system then one possibility is that the off-current in the opto-isolator is changing with temperature. So one more test would be to leave the system powered for 24 hours and see if the voltage stops changing. You would check that by reading the A/D converter output, so as to avoid any influence the scope connection might have.
 
Top