cancel
Showing results for 
Search instead for 
Did you mean: 

ADC Noise : too much

ingwmeier
Senior
Posted on January 03, 2012 at 09:36

ADC Tests with stm32value eval board.

PC4 as AD Input, conversion all 20msec, 20turn Pot with 22k u1 RC Filter to PC4.

Software looks for max and min adc values. I let it run for 30000 conversions:

I get errors up to 16count at Zero, up to +16 / -40cnt at about half scale, -52count at full scale.

Sometimes the values are stable for some hundred conversions, then extremes hit.

I did the same tests with an old Keil STM32 board about 3 years ago with same results (but different software). The conversion is initialised with the slowes ADC conversion to minimize input impedance effects.

Has anybody found a solution (except filtering/averaging) / has anybody found similair behaviour.

Regards Werner
10 REPLIES 10
emalund
Associate III
Posted on January 03, 2012 at 15:02

the most likelu cause is the return of your filter capacitor/the return of your input

Erik

emalund
Associate III
Posted on January 03, 2012 at 15:03

I forgot to mention

ground is not ground

a wire is not a wire

Erik

flyer31
Senior
Posted on January 03, 2012 at 17:38

My new Keil MCBSTM32F400 board has a 10k poti directely connected to port PF9, with a 100nF capacitor in between. Just this of course is very rudimentary, ok for a demo board, but in any ''real world'' application I would recommend to buffer the poti with a fast and precise OP.

ingwmeier
Senior
Posted on January 04, 2012 at 09:45

Thank you for your inputs. >> see STM application note AN2668 page 9!

''Improving STM32F101xx and STM32F103xx ADC resolution by oversampling''

STM has done a similar thing: 1.65V gave 2050count, min was 2034 max 2076

my conclusion is: never rely on a single AD result in your application if you need more than 8bit of precision. (PID control / if else decision etc)

Werner

ingwmeier
Senior
Posted on January 04, 2012 at 09:56

Thank you Erik. I made more investigations:

0805 100nF condenser between GND plane / PC4 Resistor Divider w. 2x 330Ohm

Average value: 2048 max 2077 min 2011

330R Pull up to 3V3: Average 4094 min 4058

330R Pull down to GND: max 26

so the results are much better than using >22k Source impedanceThen using PC5 without 100nF:

Average value: 2048 max 2070 min 2030

330R Pull up to 3V3: Average 4094 min 4084

330R Pull down to GND: max 30 (still quite high)

My conclusion is this: there must be spurious charge shots out of the ADinputs. Quite rare, but if they hit the right timing, an attached condenser stores it, and corrupts the result.

1) With averaging / digital filtering you can eliminate these spurious results. Extreme values are very rare.

2) Do not use condensers on STM AD inputs.

I have more than 20years experience with embedded measuring systems / analogue front ends. These effects are not there in 8051 derivates that I know, ATMEGA, PICs, also not on Stellaris Cortex M3 devices.

Werner

emalund
Associate III
Posted on January 04, 2012 at 16:05

you, evidently believe the ground plane is ground IT IS NOT.

make the input (or experimental resistors) connect no more than 0.5 cm from Agnd.

your readings of 3V3 are correct, it jives with typical jitter on a supply rail.

Erik
ingwmeier
Senior
Posted on January 04, 2012 at 16:32

I tried to verify how AGND is routed on the eval board, unfortunately I would have to unsolder the uController. I doubt that on 3 different types of eval boards the reason is always poor grounding. I rather suspect a poor silicon mask design on the F100 family. Maybe the ones with an external reference pin show better results.. I will get some information through an STM application engineer, for now, I have to concentrate on other issues.

emalund
Associate III
Posted on January 04, 2012 at 17:16

I doubt that on 3 different types of eval boards the reason is always poor grounding.

 

 

if you believe that eval boards arev ''top quality design'' you may as well believe the earth is flat

Erik

ingwmeier
Senior
Posted on January 12, 2012 at 07:56

Others seem to have come across this issue:

>

ADC glitches

  (2nd page), they could actually see glitches with the scope.

I had done more tests by changing the return path of the condenser directly to AVSS, instead 26counts, I achieved 20counts. Still way too much. Because it is a rare coincidence, in most applications it will go unnoticed.. Werner