increase precission?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
eduardo
Posts: 31
Joined: Mon Jan 05, 2015 6:48 pm

increase precission?

Post by eduardo » Fri Jan 09, 2015 8:58 pm

Can I do anything to increase the precission of the ADC?

What is used as voltage reference?

I want to measure weight and do use an analog amplifier to amplify the resistor bridge

I am not sure how stable the internal reference is.
Reading out VREF did not deliver a stable value (it was only just most of the time stable)

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: increase precission?

Post by Damien » Sat Jan 10, 2015 12:37 am

It's a 12-bit ADC (max value 4095). The voltage reference is the A3V3 pin (pin X23 on bottom row), and that's connected to 3V3 by a small inductor to reduce noise. The ground reference is AGND (pin X24) and that has ground shielding around pins X19, X20, X21, X22. So these are the best pins to use for quite ADC input.

Schematics can be found at: http://docs.micropython.org/en/latest/hardware/

There is still a small bit of noise on the ADC inputs. You could try lowering the CPU frequency to eliminate some of it. And/or average a few samples.

There might be some improvements we can make to the code, for example to allow the sample time of the ADC to be increased (it's currently 15 cycles).

User avatar
Tage
Posts: 5
Joined: Wed Sep 24, 2014 2:29 pm
Location: Fremont California

Re: increase precission?

Post by Tage » Sat Jan 10, 2015 2:24 am

my suggestion is to take 30 measurements, sort them from lowest to highest, throw away the ten lowest and the ten highest readings and average the remaining ten readings.

Post Reply