-1
\$\begingroup\$

I'm testing ADC and quantization noise on a microcontroller (dsPIC33EP64GS506), but I've realized that I have a static error in a digital signal.

I measure a DC voltage on a voltage divider and my multimeter measures \$2.267~\text{V}\$, while the analog voltage reference is \$3.297~\text{V}\$. Considering 12-bit converter this should be converted to \$2816\$, but I get a DC value at approximately \$2809\$. This is way more than a simple quantization error.

I tried with longer sample times for an SH capacitor, but without any luck. I even tried with an oversampling filter and although I do get a better SNR, the digital signal mean value is not improved.

Can you please point out some reasons for this?

enter image description here

\$\endgroup\$
  • 4
    \$\begingroup\$ So you have some hardware and software that we have no idea how it works, what the schematic is, how it is laid out and what parts are involved, but we should point out the error you made in any of these things? \$\endgroup\$ – PlasmaHH Jul 14 '17 at 13:47
1
\$\begingroup\$

Can you please point out some reasons for this?

For the ADC: -

  1. Zero offset error as specified in the data sheet
  2. Gain error as specified in the data sheet
  3. Integral non-linearity error as specified etc..
  4. Differential non-linearity error as specified etc..

enter image description here

enter image description here

enter image description here

Plus you have a resistor tolerance in your potential divider and you have a measurement accuracy in your meter. There are also leakage currents to consider that flow into and out of your ADC input - these can add errors if the resistors you are using are quite large in value.

And, if you are multiplexing the ADC among several inputs you need to provide enough settle-time between successive readings or you might get a bit of residual charge on the sampling capacitor that may not have settled down.

You should also consider that many ADCs inputs take a several-milli-amp surge when reading from an input and this can have a significant effect on accuracy due to the resistors in your potential divider.

It's also possible that you have inadvertently set the ADC to operate at a lower resolution. However, 7 least significant bits error in 4096 LSb total range is a 0.17% full-scale-error. Could you really expect much better than this (about 4 mV)?

\$\endgroup\$
  • \$\begingroup\$ thank you for your detailed explanation. In the device datasheet, Table 26-43 on page 344, I've found a parameter called Offset Error (Shared core), which is 2-15 LSb, typically 8 LSb. I wasn't able to find what does this "offset error" mean - is this a static error I'm worried about? \$\endgroup\$ – Marko Gulin Jul 14 '17 at 14:48
  • 1
    \$\begingroup\$ @MarkoGulin it means that there can be typically a static error of 8 least significant bits. If there is no gain or other errors then that pretty much says that all ADC readings can be inaccurate by typically 8 least significant bits. As you have a 7 LSb error then this is within the typical tolerance for this ADC. The shared core means that there is one ADC that is shared by other inputs via (typically) the use of a multiplexer. Offset error = zero error and applies throughout the range. See my first picture. The red line has an offset error but no gain error. \$\endgroup\$ – Andy aka Jul 14 '17 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.