cancel
Showing results for 
Search instead for 
Did you mean: 

i found the adc of stm32f103ret6 is nonlinearity

eason87lee
Associate II
Posted on May 29, 2014 at 16:56

hi,

i am using stm32f103ret6 to test the voltage from the signal genarator(DG1022 from rigol).

i found the adc of stm32 is nonlinearity.

i found that,when the voltage from DG1022 is less than 1V,the voltage get from adc of stm32 is smaller the 1V,but the volmeter's result is acurrate. Next is the result:

DG1022 (mv)       adc of stm32

3000                    3000.352

2000                    2000.654

1000                    996.415

500                      495.2234

250                     246.88

150                     146.877

60                       57.627

30                       27.982

10                       8.219

#stm32 #adc #stmf1
6 REPLIES 6
Posted on May 29, 2014 at 18:56

Is this a DC measurement, i.e. of a steady input voltage?

Do you switch the ADC's multiplexer during the measurement?

Is the voltmeter connected directly at the ADC input pin and AVSS pin?

Is AVDD/AVSS properly decoupled? Is the supply voltage (namely AVSS) rock stable?

Can't this be some floating-point calculation/rounding issue?

Isn't there any negative current flowing into some of the other pins (i.e. any pin connected to voltage below VSS)?

Do you perform ADC calibration?

JW

eason87lee
Associate II
Posted on May 30, 2014 at 03:28

thank you

yes ,it's a DC measurement, a steady input voltage

no,i don't switch the mux,when measuring,

yes,directly connected

yes,

no,not the floating point problem,we sample 1000 times,and get the average voltage

no negative current, all is positive and gnd

ADC calibration must be performed.

so, i guess the ADC of stm32 is nonlinear.

chen
Associate II
Posted on May 30, 2014 at 10:00

Hi

The datasheet does specify the 'non linearity' of the ADC.

From memory it is not as bad as you have measured.

My colleagues (electronic engineers) tell me that if the measurement

time is increased (rate decreased) the linearity improves. It is because the

ADC is a successive approximation type, it dump the charge from capacitor to capacitor.

I guess this means it has problems with low input drive.

eason87lee
Associate II
Posted on May 30, 2014 at 10:30

my adc sample time is71.5,clock is 9M.i measured 1000 times,and get the average.

so,i don't know,,,

ps:i modified the testing data(this time,it is true.last is from my memeory).

chen
Associate II
Posted on May 30, 2014 at 11:01

''i am using stm32f103ret6 to test the voltage from the signal genarator(DG1022 from rigol).''

Can you try the test with a PSU instead (or a pot across the supply)?

eason87lee
Associate II
Posted on June 03, 2014 at 03:26

OK,I'll try it. thank you