cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 Discovery 1-2% Accuracy ADC

jlaufer
Associate II

I am just now moving over from ESP32 to STM32 Discovery. One of the features that I like about the STM32 is that there are 3 ADC and several accessible channels.

In my previous design on the ESP32 I used external ADCs and communicated with them using SPI. I'm hoping I can cut out the external ADCs.

In the STM32F4 Discovery schematic it shows how the VDDA and VREF+ pins are connected so no external (highly accurate) reference voltage can be applied without cutting traces (which is not preferred).

Also I have found recommendations for reading the VREF+ voltage level with software and comparing it to the reading from the ADC. This makes sense in theory and since I'm not concerned about sample rate at this point I think it is a viable option. And if there was noise on VREF+ line or the input I can take an average of many samples.

I'll need to try it out for myself but wondering if anyone has experience and can recommend which method (or a different method) would work best for accurate ADCs readings. Ideally I can get .1-.2% accuracy from the ADC which is right around what the sum of the errors ADC errors, but is it too much to ask to actually achieve this accuracy? If not I will have to stick with external ADCs.

1 ACCEPTED SOLUTION

Accepted Solutions
MasterT
Senior III

Configure adc to read a sequence of 3 channels. One is connected to external reference, V = 2 - 3.2, below 3.3V not to saturate adc full scale), second to divided small fraction of the reference, V = 0.1 - 0.2 same concept not too close to zero. And third is external voltage to measure. Than you can scale X-voltage between two precise and known points in each triplet of the readings. Running adc as fast as possible, low freq. noise below 1/3 of the sampling rate is rejected. Results out of tripplets than averaged  as long as you wish. 16-bits achievable out of 256 samples. Linearity is limiting factor for accuracy, THD -70dBc or so listed in the DS says about 0.03% at the best.

View solution in original post

1 REPLY 1
MasterT
Senior III

Configure adc to read a sequence of 3 channels. One is connected to external reference, V = 2 - 3.2, below 3.3V not to saturate adc full scale), second to divided small fraction of the reference, V = 0.1 - 0.2 same concept not too close to zero. And third is external voltage to measure. Than you can scale X-voltage between two precise and known points in each triplet of the readings. Running adc as fast as possible, low freq. noise below 1/3 of the sampling rate is rejected. Results out of tripplets than averaged  as long as you wish. 16-bits achievable out of 256 samples. Linearity is limiting factor for accuracy, THD -70dBc or so listed in the DS says about 0.03% at the best.