ADC lag at specific values
ADC lag at specific values
(OP)
Hello,
I have an odd issue and am welcome to any ideas. My ADC seems to lag at specific values and I would like to know why, or better yet, how to fix it. Lags are shown in attached pic.
Occurrence:
Unit 1 lags at ADC value 1638.
Unit 2 lags this at ADC value 1365.
Hardware:
Analog sensor ~10mV full scale
op amp - amplifies sensor output
ADC - ADS1110 reads output of op amp
MCU - reads ADC value
PC - reads and graphs MCU data
http://files.engineering.com/getfile.aspx?folder=7...
I have an odd issue and am welcome to any ideas. My ADC seems to lag at specific values and I would like to know why, or better yet, how to fix it. Lags are shown in attached pic.
Occurrence:
Unit 1 lags at ADC value 1638.
Unit 2 lags this at ADC value 1365.
Hardware:
Analog sensor ~10mV full scale
op amp - amplifies sensor output
ADC - ADS1110 reads output of op amp
MCU - reads ADC value
PC - reads and graphs MCU data
http://files.engineering.com/getfile.aspx?folder=7...





RE: ADC lag at specific values
Looks like it, and the image file named o2Flats...
RE: ADC lag at specific values
Your flat spots appear to in be the milliseconds.
RE: ADC lag at specific values
The lag time varies, in the pic there it is ~100ms, ~5 MCU samples and that is pretty typical.
RE: ADC lag at specific values
Specifically:
Differential Nonlinearity (DNL) No Missing Codes
Figure 1a, the gap or delay in the red line
Perhaps looks like this sort of issue.
Maybe...
RE: ADC lag at specific values
TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers
RE: ADC lag at specific values
Keith Cress
kcress - http://www.flaminsystems.com
RE: ADC lag at specific values
The resolution appears to be about 0.05 units on the graph's Y scale, making the flattened peak at 3772 sec look like normal data, if it weren't for the blips in the rest of the data.
To diagnose the software, we need the ADC resolution (bit rate) the sampling rate, and the formula that generates the output value.
Knowing the types of variables (floating, double, etc.) specified in the program would be important, too.
STF
RE: ADC lag at specific values
VE1BLL, I had a feeling it might be something like that but I think every unit would have lags at the same points if that was the case.
IRstuff, these lags do happen at other values but the values I listed are the majority. Most of the MCU processing happens at peaks and valleys shown in the graph. While the lag is happening, the MCU still saves the data at the expected time intervals. In the data file when there is a lag, there are about 5 points with the same value. '5' is not fixed though, sometimes it's 3, sometimes it's 10.
itsmoked, chemical reaction causes sensor to output analog voltage which is amplified by op amp. Op amp output is read by ADC. ADC is read by MCU with I2C. MCU is read by PC over USB in real time. PC saves data in csv and graphs it. Csv shows multiple points with same values.
RE: ADC lag at specific values
TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers
RE: ADC lag at specific values
Attached new pic which is zoomed in on 3775s with y-axis = ADC value
Attached csv to show times and ADC values.
http://files.engineering.com/getfile.aspx?folder=9...
http://files.engineering.com/getfile.aspx?folder=f...
RE: ADC lag at specific values
Dan - Owner
http://www.Hi-TecDesigns.com
RE: ADC lag at specific values
What triggers the MCU to actually read a new value from the ADC?
What paces/triggers the ADC to make each conversion?
Is this the only thing the ADC is measuring?
BTW what ADC is it?
Keith Cress
kcress - http://www.flaminsystems.com
RE: ADC lag at specific values
" I am assuming the sensor is not the cause because I find it hard to imagine a chemical reaction acting like that."
I dunno, I can think of two, and it took me about 30 seconds.
RE: ADC lag at specific values
Keith Cress
kcress - http://www.flaminsystems.com
RE: ADC lag at specific values
TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers
RE: ADC lag at specific values
RE: ADC lag at specific values
RE: ADC lag at specific values
Thanks again for the help everyone.
IRstuff, good catch, I missed that.
RE: ADC lag at specific values
I think you might be right. It does seem to be the op amp causing this.
Replaced the o2 sensor with a capacitor and charged it slowly to test different parts of the circuit today.
Replaced MCU with Arduino.
Added 2nd ADC to measure same net as ADS1110 (original ADC).
ADC1: ADS1110 being read by Arduino I2C.
ADC2: Arduino ADC
Signal: Voltage across cap. Voltage increases slowly over time.
Test 1:
Signal location: ADC input
Result: no flat spots in either ADC
Test 2:
Signal location: op amp input
Result: same flat spots in both ADCs
Result shown here:
http://files.engineering.com/getfile.aspx?folder=8...
Note: op amp output is connected to ADC input.
Conclusion: I think the op amp is causing the problem. Now to figure out how to solve the problem...
RE: ADC lag at specific values
TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers
RE: ADC lag at specific values
This is the op amp:
OPA330
http://www.digikey.ca/product-detail/en/OPA330AIDB...
Another thing to add is that the lag time is related to the rate of change of the signal. If the signal is changing quickly the lag doesn't last long, if it changes slowly, the lag lasts a while. Got the lag over 10 seconds with a signal that was changing very slowly.
RE: ADC lag at specific values
Given the symptoms, it would appear that there's a back-to-back diode structure that's being current starved for some reason.
TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers
RE: ADC lag at specific values
RE: ADC lag at specific values
Keith Cress
kcress - http://www.flaminsystems.com
RE: ADC lag at specific values