0

I want to make some precise measurements with Arduino Due. Although I'm using very good external voltage reference (LTC6655) measured data is still jumping around, especially significant when I'm trying to measure low voltages (0.1-0.05V). Can I improve ADC accuracy by changing it's settings?

The default Arduino Due ADC settings are:

// Initialize Analog Controller
pmc_enable_periph_clk(ID_ADC);
adc_init(ADC, SystemCoreClock, ADC_FREQ_MAX, ADC_STARTUP_FAST);
adc_configure_timing(ADC, 0, ADC_SETTLING_TIME_3, 1);
adc_configure_trigger(ADC, ADC_TRIG_SW, 0); // Disable hardware trigger.
adc_disable_interrupt(ADC, 0xFFFFFFFF); // Disable all ADC interrupts.
adc_disable_all_channel(ADC);

So, with adc_init we can configure frequency and startup time. And with adc_configure_timing we configure tracking time, settling time and transfer time. But how to select those values? Does increasing of that times improves precision?

Useful links:

Datasheet - ADC description starts on page 1317.

Atmel Software Framework - see adc.h and adc.c.

  • What are you measuring? Is it possible that it's intrinsically variable (jumping around)? – Squats Sep 11 '17 at 5:26
  • @Squats, I'm measuring battery voltage. – kelin Sep 11 '17 at 22:09
  • How much your measurement fluctuate? 0.1V? 0.01V? – user31481 Nov 10 '17 at 8:08
  • @LookAlterno, It's an old question and I don't remember exactly. Something about 10-20%. – kelin Nov 10 '17 at 15:25
1

Generally speaking the input BandWidth of the analog signal is a major cause of noise in a ADC circuit as well as improper ground and reference generation and layout techniques. Be very careful that ALL of the analog paths do not have any digital current return paths. Remember that at 12 bit for a 1.25V reference an LSB is ~300uV. I have not ever measured the SNR of the SAM ADC but I doubt that it is the specified ~60db (i.e. 10bit) unless absolute care is taken during the layout/routing. Recommend: 1) Limit input BW to the correct channel ground. (well below Nyquist BW if possible to avoid alliasing) 2) Oversample if possible. 3) Insure low digital I/O of peripherals during sample period.

0

Default resolution is 10b because of backward compatibility, so you can start with setting analogReadResolution(12); as stated on Arduino analogReadResolution Refference page.

If it's still not enough you can use GAIN setting for used ADC channel. For single ended input GAIN can be set up to 4. But it means you can mesaure voltages up to 1/4 of Uref

  • I think increasing the resolution will not improve actual precision. It just will add more trashy bits which has nothing common with real measured value. I decided to use external ADC. – kelin Sep 20 '16 at 19:07
  • @kelin - the degree to which increasing resolution increases precision depends a lot on how clean the analog circuit design is, of the board and the source, and even on how much "is going on" digitally at the time of reading - sophisticated designs often shut a lot of the chip down while taking sensitive readings. Also, even "noisy" bits can yield precision if evaluated statistically, for example putting many readings into a filter. – Chris Stratton Oct 15 '16 at 17:44
0

measured data is still jumping around

it will always jump around -> that's why adc modules are such a great random number generators (using its lsb). jumping around 8 - 9 lsb isn't that rare. anything beyond that should be investigated.

a few things to watch for:

  1. use a good reference;
    1. allow sufficient time;
    2. pay attention to layout;
    3. make sure that the source impedance isn't too great;
    4. put a signal conditioning circuit on the input. a 1k/.1uf filter can do wonders;
    5. pick the right oscillator for the adc module - see some c8051f350 code for example;
    6. write the right code;
    7. oversampling.
  • Thanks for broad answer, but my question is about ADC setup on SAM3X8E. – kelin Feb 13 '17 at 15:21
  • I've found sim.okawa-denshi.jp/en/CRlowkeisan.htm to be useful for designing a low pass filter but make sure you're not sampling more frequently than the design of the filter. – Squats Sep 11 '17 at 22:34

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.