ADS1115 Accuracy Over Frequency - Page 1
Forum section: electronics / projects

author: aw_rw1
author_rank: Contributor
timestamp: March 15, 2022, 09:44:09 pm
content: I am trying to read the min and max of a sinusoidal signal with the Adafruit ADS1115 ADC board on an Arduino. This does well with frequencies of 4Hz and and 12Hz but not 22Hz. For 4 and 12Hz, the % difference is less than 0.6%. However for 22Hz, the % difference is as much as 2.1%.I think the error is caused by capacitance in the front end. The read voltage min is always above the actual voltage, and the read voltage max is always below the actual voltage. Also as the amplitude is increased, the % difference is increased.How could I lower the % difference at 22Hz?I tried lowing the VDD from 5VDC to 3.3VDC. Contrary, the % difference went up by 0.1%.

author: Kleinstein
author_rank: Super Contributor
timestamp: March 15, 2022, 10:15:45 pm
content: The ADC1115 ADC can run at different speeds. The maximim speed is supposed to be 860 SPS, which is not very fast, but should still be ok. It may still need a substantial number of readings to actually get close to the min and max value, as this can change with the exact timing / phase.It should still get reasonable close to the actual maximum after some time (e.g. ~-0.2 %).So chances are the SW is running the ADC at a rather low speed - 128 SPS is the default and that is about expected to get you -4.8 % of maximum.So chances are a faster sampling rate setting should fix the problem.

author: nctnico
author_rank: Super Contributor
timestamp: March 15, 2022, 10:22:57 pm
content: Another pitfall is the capacitive loading from the inputs. A higher samplerate can also make things worse. OTOH this chip has an internal anti-aliasing filter so 22Hz may be attenuated by that filter if the samplerate is too low. Without knowing what the circuitry around the ADS1115 looks like, what the source impedance of the 22Hz signal is and what samplerate is being used, it is hard to guess what is wrong.

author: Kleinstein
author_rank: Super Contributor
timestamp: March 15, 2022, 11:23:35 pm
content: The anti aliasing filter for the ADS1115 is not for the 860 or 128 Hz extrnal sampling rate, but for the SD converter internal sampling rate that is more in the low MHz range. So this filter should not effect the frequency response very much. There is a sin(x)/x type refquency response from the ADCs internal filtering (integrating over the conversion time) and this contributes to the loss in amplitude.The module photos show no extra capacitance at the inputs.

author: aw_rw1
author_rank: Contributor
timestamp: March 16, 2022, 06:38:03 pm
content: QuoteKleinstein - Awesome! The faster sample rate worked. Quite amazing.. With 860SPS, the % difference went to as low as 0.1% with frequency at 22.3Hz. Do you know why this is? Is this because this ADC is a delta-sigma type not a sample-and-hold type?The Adafruit board with a ADS1015 has faster sampling rates up to 3300SPS. Would this higher sample rate lower the % difference even more?Quotenctico - There could be capacitance from the input setup. But the setup is just a function generator going directly to the ADC board.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 16, 2022, 06:43:28 pm
content: What was the sampling rate set to initially?

author: Kleinstein
author_rank: Super Contributor
timestamp: March 16, 2022, 07:00:15 pm
content: The default sampling rate of the ADS1115 should be 128 Hz.The ADS1115 is integrating the input signal over some time ( 1/ sampling rate minus a little overhead). This naturally gives some attenuation at the peaks. If I did the math right the peaks should be reduced by a factor sin (x) / x with x = pi * frequency*integration time.A similar factor also applies to the RMS amplitude.The peaks can be smaller, depending on the exact phase and thus some time needed to really hit the peak.If the frequency is known the attenuation could be taken into account.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 16, 2022, 07:32:04 pm
content: Yep!

author: aw_rw1
author_rank: Contributor
timestamp: March 16, 2022, 10:04:04 pm
content: QuoteThanks Kleinstein. Very interesting..