Skip to main content
Benjamin Brammer
Senior II
June 9, 2018
Question

low accuracy for ADC1 on STM32F030R8-Nucleo

  • June 9, 2018
  • 14 replies
  • 2022 views
Posted on June 09, 2018 at 14:28

Hey Guys,

I am using the ADC1 to sample A0 as a voltage input and A17 and A18 as temperature and VrefInt for Temperature and exact Vdda calculaion. So far my implementation works fine. I also calibrate the ADC everytime before I start the ADC. Datahandling is done via DMA in circular mode, so continous.

I also want to use the analog WatchDog to check wether my voltage on A0 is inside a specified range (0,8V - 3V). Sadly when I programm the lower and upper threshold value for the watchdog and try to test it with my laboratory power supply, The watchdog triggers from 2,7V not 3. When I compare the converted values I see some overshots in reading. As I am avagering my calculated values this is not bothering me, but for the accuracy of the WatchDog this is a problem.

Has anybody seen this kind of behaviour before? Am I doing something wrong, or forgot something? Or is this inherent since the integrated ADC is simply not very accurate?

For the thresholds I used the following formula: HT = 3V * 4095/3,3V and LT = 0,8V * 4095/3,3V

So I would be happy for any help

best regards

Benjamin

#analog-watchdog #adc #adc-accuracy
This topic has been closed for replies.

14 replies

T J
Senior III
June 10, 2018
Posted on June 11, 2018 at 01:14

After a calibrate cycle it should be better.

Benjamin Brammer
Senior II
June 11, 2018
Posted on June 11, 2018 at 08:18

Hello TJ,

I allready wrote, that I calibrate before every start of the ADC, so I doubt that this could better the situation.

best regards

Benjamin

T J
Senior III
June 11, 2018
Posted on June 11, 2018 at 08:52

you are using 12bit data I guess,

   otherwise you would have to translate through Table 47 Analog watchdog comparison

    6 - 12Bit decoder RM 0091 p249

did you see app note AN4195 ?

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&ved=0ahUKEwi7vtuOgsvbAhXLh1QKHSFeA0MQFghJMAM&url=http%3A%2F%2Fwww.st.com%2Fresource%2Fen%2Fapplication_note%2Fdm00069390.pdf&usg=AOvVaw2DdtS7MDE7Iy4wN6aqJbsh

 
AvaTar
Senior III
June 11, 2018
Posted on June 11, 2018 at 09:25

How about your input circuitry, you have proper impedances ?

The datasheet specifies VDDA must be >= than VDD, is this satisfied ?

Is your VDDA stable ?

Benjamin Brammer
Senior II
June 11, 2018
Posted on June 11, 2018 at 23:04

Hello AvaTar,

I use a laboratory power supply..so I have only a neglegible output impedance, but you are right, his could be perhaps a problem with my long sampoling time, I will check on that tomorrow.

I am using a Nucleo board, so I think, hope that Vdda is stable, but I will also check on that tomorrow.

Vdda >= Vdd?? This is wrong. and makes no sense to me. Even the datasheets don't cover this statement.

best regards

Benjamin

AvaTar
Senior III
June 12, 2018
Posted on June 12, 2018 at 08:03

Vdda >= Vdd?? This is wrong. and makes no sense to me. Even the datasheets don't cover this statement.

en.DM00088500.PDF, section 3.5.1, page 13:

The VDDA voltage level must be always greater or equal to the VDD voltage level and must be provided first.

The same in section 3.5.2.

Section 6.2, page 42:

VDD–VDDA,  Allowed voltage difference for VDD > VDDA : max. 0.4 V

Section 6.3.1, page 44:

VDDA, Analog operating voltage, Must have a potential equal to or higher than VDD ,  2.4 ... 3.6 V

But without actually checking it, I believe VDDA is directly connected to VDD on the Nucleo board, so this condition is fulfilled.

But have you measured VDD/VDDA ?

And have you checked the ADC with reference input voltages, especially in the 2,5 ... 3,0 V range ?