Different ADC readings with different ESP32 chips

vasu1234
Posts: 3
Joined: Mon Apr 08, 2019 2:17 pm

Different ADC readings with different ESP32 chips

Postby vasu1234 » Mon Apr 08, 2019 2:36 pm

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?

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: Different ADC readings with different ESP32 chips

Postby ESP_Sprite » 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 resulta.

vasu1234
Posts: 3
Joined: Mon Apr 08, 2019 2:17 pm

Re: Different ADC readings with different ESP32 chips

Postby vasu1234 » Tue Apr 09, 2019 6:39 am

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)

Who is online

Users browsing this forum: No registered users and 148 guests