Page 1 of 1

Different ADC readings with different ESP32 chips

Posted: Mon Apr 08, 2019 2:36 pm
by vasu1234
We are having ESP32 in 3 different boards. We are measuring 1.16 volt with all three hardware.

ESP IDF version : V3.1beta1

ADC details : ADC1/channel6, ADC_ATTEN_DB_11 (VREF 3.3V)

We are getting different ADC count with same firmware for 1.16V.
ADC count we are getting : 1332, 1325, 1215.

Code snippet we are using:

Code: Select all

adc1_config_width(ADC_WIDTH_BIT_12));
adc1_config_channel_atten(ADC1_CHANNEL_6, ADC_ATTEN_DB_11));
adc1_get_raw((adc1_channel_t)ADC1_CHANNEL_6);
Any suggestion for this issue?

Re: Different ADC readings with different ESP32 chips

Posted: Tue Apr 09, 2019 3:44 am
by ESP_Sprite
The ESP32 has a fairly large variation in ADC bias voltage, so the raw value you get back differs a bit from chip to chip. You can use calibration (as well as e.g. oversampling to reduce noise) to improve your resulta.

Re: Different ADC readings with different ESP32 chips

Posted: Tue Apr 09, 2019 6:39 am
by vasu1234
ESP_Sprite wrote:
Tue Apr 09, 2019 3:44 am
The ESP32 has a fairly large variation in ADC bias voltage, so the raw value you get back differs a bit from chip to chip. You can use calibration (as well as e.g. oversampling to reduce noise) to improve your results.
Thanks for the quick reply. We are already taking multiple samples for noise reduction. It seems we need to implement calibration. Is there any method to perform ADC calibration by firmware only?

executed below cmd
$IDF_PATH/components/esptool_py/esptool/espefuse.py --port /dev/ttyUSB0 adc_info
getting below prints
ADC VRef calibration: None (1100mV nominal)