espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.24k stars 7.18k forks source link

[TW#12287] ESP32 ADC accuracy #164

Open nassks opened 7 years ago

nassks commented 7 years ago

Hi,

I'm testing the ESP32's ADC on the SparkFun ESP32 Thing. Currently my measure seems very noisy, it constantly varies on the 5 first bits, and the zero value is around 90mV. Is there a way to achieve better accuracy?

My test code :

adc1_config_width(ADC_WIDTH_12Bit);
adc1_config_channel_atten(ADC1_CHANNEL_7, ADC_ATTEN_0db);

while (true) {
        vTaskDelay(300 / portTICK_PERIOD_MS);
        printf("ADC value : %x\n", adc1_get_voltage(ADC1_CHANNEL_7));
}

Thank you in advance for your help.

androidcho commented 6 years ago

Well, that's some very good news! Thanks for the reply!

zhivko commented 6 years ago

Would it be possible to make calibration routine using DAC and ADC? Both from esp32?

elFallino commented 6 years ago

Should the characteristics returned by esp_adc_cal_get_characteristics() be valid for all channels of ADC1?

I have 234mV at Channel 7 (GPIO 35) and 3010mV at Channel 0 (GPIO36) (measured with a multimeter). Resolution is set to 12Bit, attenuation is set to 11dB.

Trial 1 When I play around with the vref parameter passed to _esp_adc_cal_getcharacteristics() so that the voltage at Channel 7 (GPIO35) measured correctly by the ESP32, the voltage for Channel 0 (GPIO 36) is off by ~+230mV. The determined Vref value here is 1163mV.

Trial 2 When I do it vice versa, passing a Vref parameter to _esp_adc_cal_getcharacteristics() so the voltage at Channel 0 (GPIO 35) is measured correctly by the EPS32, the voltage for Channel 7 (GPIO 35) is off by ~-70mV. The determined Vref value here is 1056mV. When I connect GPIO35 with GPIO36 so that both do get the same voltage, measurements on both channels are equal.

So it seems that even with the linearisation tables in use, its not getting that good. What should be the the optimal voltage connected to an ADC Channel determine ones Vref voltage that way? Maybe 0.5xVmax?

In my case, the three Pins where I could route the internal Vref to for measurement are not available due to already connected components on my prototype board so I can not measure it directly (and I could not ask the customer to do so at all).

My initial idea was to connect a well-known voltage to a free ADC Channel, manipulating the Vref parameter in a loop until the measured value is equal to the well-known one and use that for all channels.

jan-bozelie commented 6 years ago

@ESP32DE i will leave my finger from the ESP32 until the problem is hardware solved to ESP if you cant do it right , dont make such a product !!!

to the rest of the world , is there an other product out there we can use , and will do better this esp32 we will never get it working right ,

negativekelvin commented 6 years ago

@elFallino if you are going to try that you should pick the value of vref that has the smallest max error at both voltages. You should not try to get zero error.

elFallino commented 6 years ago

That's not easy to implement as it would require to switch between two stable, well-known voltages with hardware. That would also require to generate a second voltage.

One of the voltages I need to measure is the output of a hall sensor for current measurement with a resolution with 33mV/Ampere. So even some few mV's error would be a big off in current measurement.

What a pain in the ass:(

rojer commented 6 years ago

question about linearization. i see that 0 raw reading is not actually 0 in voltage after linearization, it's actually 110 mV. similarly, max raw reading (4095 in 12-bit mode) is interpolated to 3160 mV when vdd is set to 3.3. what is the reason for this?

negativekelvin commented 6 years ago

@rojer check the graph posted above https://github.com/espressif/esp-idf/issues/164#issuecomment-326476297

tcsaba101 commented 6 years ago

Nonlinearity could be handled. The main problem is the ambiguity. The input voltage stays within uV precise (2.9967V), while the display readings swinging in a 1,6% range what is averaged from 15 measurements! This ADC is unusable. And not forget I have put a 68nF capacitor on the input, but almost no effect. This looks a serious mistake or I have to do something very different. Maybe I have to use a separate ADC for most of the analog projects with ESP32. measured

rajkovicbojan commented 6 years ago

Hi people, Have any solution for ambiguity? I am trying to measure voltage from current transformer via 22omh resistror. And I get always different measurment for input current of 0A. Can someone give me advice how to calibrate my ADC and get right measeurment?

Here is my piece of code for ADC initailization and for measuring:

void init_adc(void) {

// ADC capture width is 12Bit
adc1_config_width(ADC_WIDTH_12Bit);
// ADC1 channel 6 is GPIO34, full-scale voltage 3.9V
adc1_config_channel_atten(ADC1_CHANNEL_6,ADC_ATTEN_11db);
// ADC1 channel 7 is GPIO35, full-scale voltage 3.9V
adc1_config_channel_atten(ADC1_CHANNEL_7,ADC_ATTEN_11db);
// ADC1 channel 4 is GPIO32, full-scale voltage 3.9V
adc1_config_channel_atten(ADC1_CHANNEL_4,ADC_ATTEN_11db);

// Calculate ADC characteristics i.e. gain and offset factors
esp_adc_cal_get_characteristics(V_REF, ADC_ATTEN_DB_11, ADC_WIDTH_BIT_12, &characteristics);

} void ADC_Task(){

results[0] = adc1_to_voltage(ADC1_CHANNEL_6,  &characteristics); // ADC1 channel 6 is GPIO34
results[1] = adc1_to_voltage(ADC1_CHANNEL_7,  &characteristics); // ADC1 channel 7 is GPIO35
results[2] = adc1_to_voltage(ADC1_CHANNEL_4,  &characteristics); // ADC1 channel 4 is GPIO32

}

tcsaba101 commented 6 years ago

I have the same problem.

I will make a comparative ADC test soon to find the answer. (ESP32, ADS1115, voltage reference, OpAmp buffers, 6,5 digit DMM).

I need some spare time.

I am afraid the ESP32 inside ADC is unusable, or maybe at 8,9 bit resolution.

I will refer, when I have finished.

From: rajkovicbojan [mailto:notifications@github.com] Sent: Thursday, February 08, 2018 1:20 PM To: espressif/esp-idf Cc: tcsaba101; Comment Subject: Re: [espressif/esp-idf] [TW#12287] ESP32 ADC accuracy (#164)

Hi people, Have any solution for ambiguity? I am trying to measure voltage from current transformer via 22omh resistror. And I get always different measurment for input current of 0A. Can someone give me advice how to calibrate my ADC and get right measeurment?

Here is my peace of code for ADC initailization and for measuring:

void init_adc(void) {

// ADC capture width is 12Bit adc1_config_width(ADC_WIDTH_12Bit); // ADC1 channel 6 is GPIO34, full-scale voltage 3.9V adc1_config_channel_atten(ADC1_CHANNEL_6,ADC_ATTEN_11db); // ADC1 channel 7 is GPIO35, full-scale voltage 3.9V adc1_config_channel_atten(ADC1_CHANNEL_7,ADC_ATTEN_11db); // ADC1 channel 4 is GPIO32, full-scale voltage 3.9V adc1_config_channel_atten(ADC1_CHANNEL_4,ADC_ATTEN_11db);

// Calculate ADC characteristics i.e. gain and offset factors esp_adc_cal_get_characteristics(V_REF, ADC_ATTEN_DB_11, ADC_WIDTH_BIT_12, &characteristics);

} void ADC_Task(){

results[0] = adc1_to_voltage(ADC1_CHANNEL_6, &characteristics); // ADC1 channel 6 is GPIO34 results[1] = adc1_to_voltage(ADC1_CHANNEL_7, &characteristics); // ADC1 channel 7 is GPIO35 results[2] = adc1_to_voltage(ADC1_CHANNEL_4, &characteristics); // ADC1 channel 4 is GPIO32

}

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/espressif/esp-idf/issues/164#issuecomment-364095139 , or mute the thread https://github.com/notifications/unsubscribe-auth/AXFYFgy1qZmFwPnUzUZAkIfYHbGM6Z2_ks5tSuZTgaJpZM4LNbPn . https://github.com/notifications/beacon/AXFYFhnP26KP-pqFJBchdkDoElZ6c9dPks5tSuZTgaJpZM4LNbPn.gif

elFallino commented 6 years ago

You may want to use an external ADC. I am using the already mentioned ADS1115 as well. It's cheap, connects via i2c, has 4 Channels and 16Bit. It's very accurate.

michapr commented 6 years ago

You may want to use an external ADC. I am using the already mentioned ADS1115 as well.

Yes, right. I use it a long time with ESP without any problems. Can also suggest it ...

tcsaba101 commented 6 years ago

Thanks Michael!

I know the ADS family is good and cheap, but I have changed to ESP32, because of wide combination of pheripherals.

I was able to solve all my ideas on ESP32, but this ADC is disappointing.

I want to see the test result with my eyes, before I switch to ADS1x15 ADC.

Best Regards, Csaba

From: Michael P. [mailto:notifications@github.com] Sent: Thursday, February 08, 2018 5:39 PM To: espressif/esp-idf Cc: tcsaba101; Comment Subject: Re: [espressif/esp-idf] [TW#12287] ESP32 ADC accuracy (#164)

You may want to use an external ADC. I am using the already mentioned ADS1115 as well.

Yes, right. I use it a long time with ESP without any problems. Can also suggest it ...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/espressif/esp-idf/issues/164#issuecomment-364170691 , or mute the thread https://github.com/notifications/unsubscribe-auth/AXFYFuJPiGsRfjGLoaKqmi218k8PrGXaks5tSyMdgaJpZM4LNbPn . https://github.com/notifications/beacon/AXFYFpXL9LKx110p0NunIk7Wdb1eLCQ4ks5tSyMdgaJpZM4LNbPn.gif

krzychb commented 6 years ago

The input voltage stays within uV precise (2.9967V), while the display readings swinging in a 1,6% range what is averaged from 15 measurements!

Hi @tcsaba101,

Do you mean the raw readings or the averages from 15 measurements are swinging in a 1,6% range?

Below is a sample of measurements where I tried to do a similar test using generic ESP-WROVER-KIT V1 and slightly modified peripherals/adc example. The average of the last column is 3829.575. The values from the last column are within -0.09% to +0.2% from the average. This is for a test setup as on a picture at the end using short leads between the board and calibrator to minimize induced noise. If instead I use standard 1.5m multimeter leads, then the variations increase more than twice.

I am sure the test results will vary depending on the board type and where measurements are taken, if the board is not designed to reduce noise of analog measurements.

3811 / 3831 / 3839 / 3823 / 3847 / 3823 / 3825 / 3823 / 3835 / 3831 / 3827 / 3839 / 3855 / 3829 / 3839 / Sum:57477 / Avg: 3831
3823 / 3823 / 3839 / 3851 / 3819 / 3835 / 3821 / 3838 / 3831 / 3831 / 3823 / 3827 / 3813 / 3811 / 3823 / Sum:57408 / Avg: 3827
3831 / 3831 / 3825 / 3827 / 3827 / 3819 / 3831 / 3827 / 3823 / 3819 / 3829 / 3839 / 3823 / 3827 / 3835 / Sum:57413 / Avg: 3827
3839 / 3826 / 3827 / 3835 / 3831 / 3831 / 3835 / 3839 / 3839 / 3823 / 3825 / 3823 / 3839 / 3819 / 3846 / Sum:57477 / Avg: 3831
3831 / 3813 / 3831 / 3837 / 3839 / 3839 / 3835 / 3829 / 3831 / 3839 / 3829 / 3839 / 3837 / 3839 / 3821 / Sum:57489 / Avg: 3832
3815 / 3835 / 3823 / 3825 / 3839 / 3831 / 3823 / 3839 / 3825 / 3819 / 3827 / 3837 / 3827 / 3835 / 3823 / Sum:57423 / Avg: 3828
3839 / 3831 / 3823 / 3823 / 3831 / 3829 / 3837 / 3825 / 3830 / 3839 / 3831 / 3839 / 3847 / 3825 / 3825 / Sum:57474 / Avg: 3831
3837 / 3839 / 3825 / 3831 / 3823 / 3839 / 3835 / 3823 / 3827 / 3836 / 3835 / 3837 / 3831 / 3823 / 3823 / Sum:57464 / Avg: 3830
3831 / 3827 / 3835 / 3845 / 3826 / 3839 / 3825 / 3823 / 3827 / 3835 / 3823 / 3827 / 3834 / 3839 / 3829 / Sum:57465 / Avg: 3831
3835 / 3835 / 3826 / 3835 / 3823 / 3839 / 3831 / 3813 / 3847 / 3831 / 3826 / 3838 / 3833 / 3818 / 3839 / Sum:57469 / Avg: 3831
3823 / 3830 / 3838 / 3831 / 3837 / 3839 / 3823 / 3835 / 3825 / 3839 / 3831 / 3823 / 3847 / 3819 / 3839 / Sum:57479 / Avg: 3831
3839 / 3847 / 3831 / 3823 / 3831 / 3819 / 3824 / 3835 / 3839 / 3837 / 3825 / 3826 / 3824 / 3825 / 3825 / Sum:57450 / Avg: 3830
3835 / 3823 / 3833 / 3825 / 3823 / 3821 / 3819 / 3823 / 3831 / 3831 / 3847 / 3847 / 3825 / 3835 / 3811 / Sum:57429 / Avg: 3828
3827 / 3838 / 3825 / 3839 / 3815 / 3839 / 3834 / 3815 / 3814 / 3825 / 3834 / 3822 / 3835 / 3823 / 3829 / Sum:57414 / Avg: 3827
3831 / 3837 / 3826 / 3839 / 3835 / 3839 / 3827 / 3827 / 3827 / 3831 / 3839 / 3825 / 3839 / 3825 / 3837 / Sum:57484 / Avg: 3832
3831 / 3839 / 3821 / 3831 / 3827 / 3830 / 3839 / 3831 / 3821 / 3827 / 3839 / 3839 / 3830 / 3839 / 3839 / Sum:57483 / Avg: 3832
3839 / 3839 / 3825 / 3845 / 3818 / 3823 / 3827 / 3839 / 3831 / 3823 / 3839 / 3825 / 3827 / 3824 / 3829 / Sum:57453 / Avg: 3830
3823 / 3823 / 3834 / 3823 / 3837 / 3829 / 3839 / 3831 / 3831 / 3839 / 3821 / 3819 / 3831 / 3819 / 3831 / Sum:57430 / Avg: 3828
3822 / 3839 / 3846 / 3839 / 3851 / 3835 / 3823 / 3827 / 3835 / 3826 / 3835 / 3825 / 3829 / 3822 / 3827 / Sum:57481 / Avg: 3832
3805 / 3831 / 3827 / 3829 / 3822 / 3826 / 3824 / 3825 / 3807 / 3839 / 3839 / 3815 / 3825 / 3825 / 3835 / Sum:57374 / Avg: 3824
3819 / 3853 / 3827 / 3835 / 3839 / 3831 / 3827 / 3839 / 3819 / 3823 / 3825 / 3825 / 3839 / 3831 / 3831 / Sum:57463 / Avg: 3830
3839 / 3821 / 3819 / 3839 / 3837 / 3839 / 3827 / 3825 / 3831 / 3824 / 3839 / 3823 / 3823 / 3826 / 3823 / Sum:57435 / Avg: 3829
3839 / 3839 / 3827 / 3839 / 3824 / 3839 / 3839 / 3815 / 3825 / 3845 / 3839 / 3831 / 3837 / 3839 / 3831 / Sum:57508 / Avg: 3833
3839 / 3831 / 3839 / 3834 / 3821 / 3835 / 3827 / 3824 / 3819 / 3835 / 3837 / 3851 / 3831 / 3827 / 3831 / Sum:57481 / Avg: 3832
3835 / 3823 / 3823 / 3839 / 3831 / 3839 / 3835 / 3837 / 3831 / 3835 / 3839 / 3827 / 3827 / 3827 / 3829 / Sum:57477 / Avg: 3831
3839 / 3837 / 3827 / 3807 / 3833 / 3823 / 3839 / 3837 / 3819 / 3825 / 3839 / 3827 / 3815 / 3827 / 3823 / Sum:57417 / Avg: 3827
3839 / 3819 / 3826 / 3831 / 3815 / 3839 / 3827 / 3826 / 3839 / 3837 / 3835 / 3823 / 3823 / 3819 / 3827 / Sum:57425 / Avg: 3828
3839 / 3827 / 3839 / 3823 / 3839 / 3835 / 3827 / 3839 / 3826 / 3839 / 3823 / 3826 / 3830 / 3835 / 3837 / Sum:57484 / Avg: 3832
3823 / 3835 / 3847 / 3821 / 3827 / 3813 / 3831 / 3823 / 3839 / 3831 / 3839 / 3839 / 3839 / 3857 / 3835 / Sum:57499 / Avg: 3833
3824 / 3823 / 3822 / 3839 / 3823 / 3835 / 3823 / 3839 / 3839 / 3839 / 3823 / 3823 / 3827 / 3837 / 3838 / Sum:57454 / Avg: 3830
3835 / 3831 / 3827 / 3855 / 3813 / 3831 / 3819 / 3824 / 3854 / 3835 / 3825 / 3839 / 3823 / 3815 / 3817 / Sum:57443 / Avg: 3829
3831 / 3839 / 3830 / 3837 / 3831 / 3824 / 3826 / 3826 / 3827 / 3826 / 3822 / 3823 / 3851 / 3825 / 3827 / Sum:57445 / Avg: 3829
3819 / 3827 / 3823 / 3825 / 3815 / 3823 / 3827 / 3825 / 3819 / 3815 / 3823 / 3826 / 3839 / 3819 / 3817 / Sum:57342 / Avg: 3822
3821 / 3835 / 3819 / 3839 / 3837 / 3825 / 3827 / 3825 / 3827 / 3819 / 3831 / 3829 / 3814 / 3815 / 3827 / Sum:57390 / Avg: 3826
3827 / 3821 / 3823 / 3831 / 3827 / 3839 / 3855 / 3839 / 3819 / 3826 / 3851 / 3837 / 3819 / 3839 / 3822 / Sum:57475 / Avg: 3831
3824 / 3839 / 3807 / 3829 / 3839 / 3834 / 3839 / 3835 / 3839 / 3839 / 3835 / 3834 / 3823 / 3827 / 3835 / Sum:57478 / Avg: 3831
3815 / 3827 / 3847 / 3831 / 3831 / 3825 / 3823 / 3826 / 3829 / 3839 / 3815 / 3813 / 3826 / 3825 / 3811 / Sum:57383 / Avg: 3825
3823 / 3821 / 3839 / 3819 / 3833 / 3839 / 3831 / 3827 / 3827 / 3839 / 3835 / 3839 / 3821 / 3835 / 3835 / Sum:57463 / Avg: 3830
3833 / 3831 / 3824 / 3839 / 3835 / 3824 / 3829 / 3839 / 3826 / 3839 / 3827 / 3815 / 3831 / 3835 / 3834 / Sum:57461 / Avg: 3830
3825 / 3827 / 3839 / 3829 / 3831 / 3839 / 3831 / 3815 / 3839 / 3831 / 3839 / 3839 / 3839 / 3823 / 3839 / Sum:57485 / Avg: 3832

img_3855

tcsaba101 commented 6 years ago

Krzysztof, probably you are right with the cable. This is a Vegetronix Soil Moisture sensor measure on about a 1 m cable and the output impedance 10k so it is definitely not identical. I connected the UNI-T U71D on the input and the read value was within 1-2 uV, while the displayed data you see in my post. I also tried with an 1k helipot using a V-ref and was the same fluctuations on the display by visual analysis. I didn't made a report on that.

The first should be to put an OpAmp to the input of the ADC. I still have more serial problems with the firmware development, and i still haven't looked for an OpAmp solution.

What and how you connected to the ADC input, and what was on the display? What hw you use?

krzychb commented 6 years ago

What and how you connected to the ADC input, and what was on the display? What hw you use?

Csaba, All connections and h/w I used are on the picture above. The FLUKE calibrator is set in voltage source mode to provide 2.997V. It is connected to GPIO34 (ADC1_CHANNEL_6 / ADC_WIDTH_12Bit / ADC_ATTEN_11db) and GND pins of the ESP-WROVER-KIT.

tcsaba101 commented 6 years ago

Ok, now I see. But what you have read from the ADC? I made stable voltage on the inputs, but reading from ADC was what you have seen in my post.

krzychb commented 6 years ago

Readings from the ADC are copy-and-pasted above the picture in a format similar what you used.

tcsaba101 commented 6 years ago

Slowly I see your example. I would be happy with your readings. I use Arduino, the same setup, on Pin39. Same Wroom on Lolin32 board adcAttachPin(PIN_VEGETRO); analogReadResolution(12); analogSetWidth(12); analogSetAttenuation(ADC_0db); analogSetPinAttenuation(PIN_VEGETRO, ADC_11db);

Do you use Ext Reference? Version of ESP32? I don't see any special noise reduction on the Wrover-Kit board!

Now I have done again the v-ref and helipot experiment, short wires. Output impedance approx 400ohm. Value on input is 100nV stable. No real change in readings: +- 1% variation. If I connect the Vegetronix sensor using a non inverting MCP6021 OpAmp the variation decreased to +- 0,5%. But this is still hardly reaching the 8 bit precision.

This is quite strange. I have used breadboard with Arduino, PIC boards, there was no problem. Any ideas to solve it?

20180218_113122

tcsaba101 commented 6 years ago

I have EVB board from Olimex, I try on that too.

tcsaba101 commented 6 years ago

I have tried EVB. Mdev: max deviation of samples from the average, also in %. At 3 V input: evb_adc

At 1V input evb_adc2

I give it up now. This ADC is unusable for measurement. This I can call "guess", if this is enough I can use ESP32 ADC.

negativekelvin commented 6 years ago

@tcsaba101 did you try a pin other than 36 or 39?

tcsaba101 commented 6 years ago

negativekelvin: no only those two in three different projects.

I can try, in the present project I have free ADC pins.

tcsaba101 commented 6 years ago

just to be sure I made the same test on Arduino-Uno, Due, Chipkit Uno32. Chipkit very good, Uno acceptable. The same hw and firmware. Those ADCs are woorking our ESP32 is not.

UNo 1V uno_adc_1v Uno 3V uno_adc_3v Uno 5V uno_adc_5v

DUe 1V due_adc_1v DUE 3V due_adc_3v

Chipkit UNO32 1V uno32_adc2 UNO32 3V uno32_adc_3v

All acceptable.

tcsaba101 commented 6 years ago

I have tried pin34 ADC1_CH6 what Krzysztof used in his test, no real change. I have to put an ADS1x15 chip on i2c bus.

krzychb commented 6 years ago

Csaba,

I like you have introduced other boards to compare the noise of the ADC readings. :+1:

To substitute your analysis, below are results of couple of my tests for different ESP32 boards and silicon revisions. It looks like ESP-WROVER-KIT board design is more immune to noise of the ADC readings comparing to other boards I have.

I made the tests using latest master of esp-idf and the following code - https://gist.github.com/krzychb/37076b52ee90a34bb59d32c1a8407beb

If you post your Arduino code I can test my boards with Arduino as well to have a complete picture.

With the data you posted I do not expect breaking news but would like to indicate that results may depend on design of particular board with the ESP32 chip.

Olimex ESP32-EVB, GPIO34 = 1.000V, ADC_ATTEN_0db, Silicon Rev 0

3795 3983 3943 3819 3771 3775 3839 3839 3797 3743 3811 3807 3799 3851 3879 Avg: 3830 Dev:  4.0%
4023 3835 3935 3775 3921 3975 3915 3921 3871 3939 3789 3711 3755 3891 3831 Avg: 3872 Dev: -4.2%
3839 3851 3807 3826 3903 3823 3824 3823 3907 3759 3791 3871 3835 3783 3806 Avg: 3829 Dev:  2.0%
3727 3919 3915 3915 3743 3831 3941 3760 3839 3699 3855 3796 3839 3941 3795 Avg: 3834 Dev: -3.5%
3920 3787 3839 3767 3871 3815 3919 3895 3951 3850 3863 3871 3837 3781 3839 Avg: 3853 Dev:  2.5%
3859 3915 3915 3763 3923 3919 3838 3947 3811 3887 3803 3797 3823 3783 3919 Avg: 3860 Dev: -2.5%
3919 3879 3875 3949 3919 3667 3759 3767 3799 3760 3807 3831 3711 3897 3822 Avg: 3824 Dev: -4.1%
3951 3791 3743 3889 3814 3751 3829 3799 3875 3875 3947 3823 3787 3915 3823 Avg: 3840 Dev:  2.9%
3927 3807 3787 3933 3863 3829 3856 3789 3907 3919 3879 3862 3831 3805 3765 Avg: 3850 Dev: -2.2%
3859 3747 3824 3727 3855 3851 3923 3875 3797 3792 3953 3774 3943 3837 3895 Avg: 3843 Dev: -3.0%
3919 3935 3831 3839 3751 3835 3839 3767 3882 3824 3999 3837 3919 3759 3759 Avg: 3846 Dev:  4.0%
3954 3894 3901 3903 3743 3867 3839 3879 3859 3811 3825 3839 3891 3883 3791 Avg: 3858 Dev: -3.0%
3839 3789 3878 3839 3885 3895 3871 3879 3889 3822 3763 3751 3871 3981 3807 Avg: 3850 Dev:  3.4%
3767 3795 3802 3815 3919 3863 3823 3789 3963 3779 3935 3826 3789 3855 3907 Avg: 3841 Dev:  3.2%
3827 3790 3781 3571 3623 3927 3826 3793 3888 3907 3959 3847 3939 3783 3750 Avg: 3814 Dev: -6.4%
3765 3795 3863 3903 3887 3879 3811 3861 3824 3779 3699 3877 3913 3775 3855 Avg: 3832 Dev: -3.5%
3889 3810 3821 3903 3903 3871 3925 3923 3877 3894 3861 3763 3835 3827 3770 Avg: 3858 Dev: -2.5%
3867 3883 3951 3739 3855 3839 3847 3785 3891 3859 3765 3869 3934 3870 3967 Avg: 3861 Dev: -3.2%
3871 3839 4011 3935 3883 3855 3775 3921 3825 3871 3889 3891 3851 3807 3887 Avg: 3874 Dev:  3.5%
3815 3895 3903 3885 3939 3935 3822 3858 3851 3903 3779 3859 3815 3735 3782 Avg: 3851 Dev: -3.0%
3715 3794 3831 3859 4095 3791 3954 3839 3931 3735 3863 3947 3839 3871 3761 Avg: 3855 Dev:  6.2%
3955 3813 3865 3867 3951 3890 3718 3815 3823 3839 3823 3910 3879 3879 3879 Avg: 3860 Dev: -3.7%
3823 3761 3838 3831 3755 3957 3923 3862 3895 3791 3925 3774 3733 3987 3847 Avg: 3846 Dev:  3.7%
3955 3927 3857 3779 3707 3807 3934 3793 3921 3835 3799 3891 3919 3887 3893 Avg: 3860 Dev: -4.0%
3811 3931 3826 3827 3739 3819 3795 3761 3891 3772 3869 3719 3879 3727 3815 Avg: 3812 Dev:  3.1%
3699 3753 3920 3735 3871 3856 3735 3826 3731 3893 3887 3761 3802 3803 3831 Avg: 3806 Dev:  3.0%
4015 3811 3728 3893 3783 3857 3943 3863 3807 3926 3875 3807 3939 3853 3879 Avg: 3865 Dev:  3.9%
3787 3839 3941 3935 3835 3887 3958 3833 3839 3903 3943 3886 3887 3871 3803 Avg: 3876 Dev: -2.3%
3855 3921 3725 3963 3863 3857 3911 3962 3903 3773 3787 3869 3901 3901 3887 Avg: 3871 Dev: -3.8%
3839 3871 3911 3863 3919 3767 3781 3883 3887 3815 3935 3903 3799 3885 3895 Avg: 3863 Dev: -2.5%

Olimex ESP32-EVB, GPIO34 = 3.000V, ADC_ATTEN_11db, Silicon Rev 0

3671 3695 3677 3741 3687 3675 3657 3647 3618 3651 3679 3739 3663 3669 3703 Avg: 3678 Dev:  1.7%
3583 3679 3699 3607 3735 3709 3728 3723 3747 3655 3743 3743 3759 3747 3723 Avg: 3705 Dev: -3.3%
3675 3679 3751 3627 3743 3711 3655 3697 3677 3677 3655 3759 3703 3717 3679 Avg: 3693 Dev:  1.8%
3633 3671 3775 3653 3642 3690 3733 3647 3711 3683 3687 3703 3685 3677 3675 Avg: 3684 Dev:  2.5%
3750 3711 3699 3695 3711 3615 3679 3702 3695 3651 3701 3723 3703 3629 3623 Avg: 3685 Dev: -1.9%
3661 3707 3631 3735 3652 3664 3693 3687 3721 3665 3643 3697 3695 3709 3677 Avg: 3682 Dev:  1.4%
3683 3706 3687 3735 3723 3695 3727 3721 3813 3687 3695 3749 3667 3711 3707 Avg: 3713 Dev:  2.7%
3741 3663 3607 3760 3695 3775 3723 3659 3719 3669 3693 3671 3696 3693 3677 Avg: 3696 Dev: -2.4%
3671 3629 3723 3721 3747 3709 3695 3727 3783 3729 3639 3679 3675 3699 3696 Avg: 3701 Dev:  2.2%
3718 3739 3695 3739 3731 3685 3711 3674 3600 3698 3723 3751 3663 3755 3743 Avg: 3708 Dev: -2.9%
3711 3701 3727 3695 3671 3691 3735 3663 3697 3701 3653 3711 3655 3655 3631 Avg: 3686 Dev: -1.5%
3649 3691 3664 3711 3664 3615 3735 3743 3735 3718 3735 3695 3751 3679 3687 Avg: 3698 Dev: -2.2%
3647 3639 3727 3711 3691 3675 3770 3695 3686 3711 3727 3665 3639 3638 3735 Avg: 3690 Dev:  2.2%
3701 3699 3707 3665 3664 3647 3633 3685 3701 3655 3671 3747 3711 3706 3661 Avg: 3683 Dev:  1.7%
3727 3649 3673 3711 3743 3698 3686 3699 3678 3742 3711 3643 3743 3707 3697 Avg: 3700 Dev: -1.5%
3791 3757 3690 3632 3703 3670 3699 3723 3763 3638 3679 3719 3651 3707 3695 Avg: 3701 Dev:  2.4%
3760 3727 3637 3731 3647 3663 3664 3659 3702 3723 3743 3664 3683 3759 3695 Avg: 3697 Dev:  1.7%
3711 3623 3691 3711 3770 3667 3711 3709 3715 3757 3721 3751 3675 3643 3707 Avg: 3704 Dev: -2.2%
3719 3655 3671 3685 3679 3723 3718 3647 3600 3675 3667 3651 3663 3696 3679 Avg: 3675 Dev: -2.0%
3762 3677 3723 3757 3671 3651 3735 3645 3647 3663 3667 3671 3695 3733 3703 Avg: 3693 Dev:  1.9%
3699 3670 3700 3699 3711 3696 3663 3639 3663 3683 3663 3743 3694 3699 3703 Avg: 3688 Dev:  1.5%
3639 3695 3605 3699 3675 3665 3707 3699 3679 3673 3735 3751 3729 3655 3685 Avg: 3686 Dev: -2.2%
3647 3623 3715 3694 3723 3638 3669 3664 3707 3702 3735 3755 3678 3671 3635 Avg: 3683 Dev:  2.0%
3631 3650 3583 3699 3659 3761 3755 3759 3783 3638 3703 3649 3611 3683 3721 Avg: 3685 Dev: -2.8%
3707 3664 3678 3759 3729 3661 3703 3751 3684 3683 3787 3759 3659 3743 3759 Avg: 3715 Dev:  1.9%
3633 3667 3669 3701 3735 3733 3691 3696 3647 3696 3685 3687 3647 3697 3679 Avg: 3684 Dev:  1.4%
3783 3717 3701 3723 3671 3671 3735 3615 3742 3743 3691 3739 3643 3679 3683 Avg: 3702 Dev: -2.4%
3741 3643 3711 3659 3655 3687 3671 3647 3698 3728 3703 3723 3729 3687 3645 Avg: 3688 Dev:  1.4%
3691 3647 3691 3711 3659 3635 3677 3607 3671 3669 3727 3667 3691 3651 3699 Avg: 3672 Dev: -1.8%
3631 3679 3699 3751 3679 3703 3742 3711 3643 3614 3727 3666 3677 3623 3715 Avg: 3684 Dev: -1.9%

ESP32 DevKitC V2, GPIO34 = 1.000V, ADC_ATTEN_0db, Silicon Rev 0

4083 4078 4011 4015 4077 4016 4049 4039 4011 4087 4027 4071 4043 4031 4031 Avg: 4044 Dev:  1.1%
4083 4051 4067 4051 4063 4061 4071 4055 4079 4051 4071 4062 4027 4011 4022 Avg: 4055 Dev: -1.1%
4031 4022 4081 4067 3990 4015 4093 4017 3990 4061 4030 4055 3999 4003 4063 Avg: 4034 Dev:  1.5%
3999 4080 4063 4023 4023 4023 4049 4006 4021 4007 4047 4031 4015 4031 4071 Avg: 4032 Dev:  1.2%
4083 4016 4079 4080 4031 4039 4079 4017 4063 4015 4027 4039 4045 4023 4003 Avg: 4042 Dev:  1.0%
4047 4039 3995 4031 4035 4079 4027 4007 3979 4045 4022 4007 4037 4095 4031 Avg: 4031 Dev:  1.6%
4019 3991 3987 4053 3966 4017 4075 4063 4017 4023 4063 3986 4071 4087 4063 Avg: 4032 Dev: -1.6%
3983 4071 4079 4079 4010 4023 3983 4071 4083 4081 4016 4016 4059 4031 4031 Avg: 4041 Dev: -1.4%
4039 4087 4015 4086 4050 4047 4067 4007 4055 4031 4055 4011 4015 4043 4035 Avg: 4042 Dev:  1.1%
4031 4043 4083 4037 4071 4039 4071 4015 4035 4055 4030 4019 4095 4031 4059 Avg: 4047 Dev:  1.2%
4047 4059 4049 4071 4039 3999 4047 4079 4003 4035 3990 4080 4019 4063 4087 Avg: 4044 Dev: -1.3%
4059 4047 4043 4059 4013 4063 4079 4019 4018 4009 4027 4015 4031 4051 4063 Avg: 4039 Dev:  1.0%
3986 4007 3991 4059 4031 4031 4016 4051 4031 4059 4019 4075 4061 4023 4043 Avg: 4032 Dev: -1.1%
4017 4063 4063 4027 4043 3991 4049 4087 4047 4017 4067 4015 4049 4047 3998 Avg: 4038 Dev:  1.2%
4003 4019 4047 4031 4031 4035 4062 4043 4031 4059 4021 4047 4077 4043 3995 Avg: 4036 Dev:  1.0%
4046 4035 4050 4017 4038 4015 4016 3989 4047 4031 4047 4079 4063 4047 4015 Avg: 4035 Dev: -1.1%
4015 4061 4063 4031 4045 4047 4015 4055 4079 4017 4087 4061 4023 4067 4063 Avg: 4048 Dev:  1.0%
4059 4031 4019 4063 4083 4031 4080 3989 4019 4031 4095 4041 4074 4027 4079 Avg: 4048 Dev: -1.5%
4071 4039 4035 4031 3999 4031 4071 4063 4031 3995 4071 4091 4031 4035 4022 Avg: 4041 Dev:  1.2%
4087 4063 3999 4071 4047 4023 4039 4049 4011 4059 4022 4062 3995 4079 4063 Avg: 4044 Dev: -1.2%
4087 4039 4029 4025 4079 4048 4063 3991 4055 4063 4031 4022 4045 4051 4049 Avg: 4045 Dev: -1.3%
4047 4063 4063 4021 3999 4059 4031 4011 4027 4081 4031 4029 4014 4015 4070 Avg: 4037 Dev:  1.1%
4048 4031 4047 4094 4031 4062 4007 4055 4003 4077 4063 4019 3995 4007 4070 Avg: 4040 Dev:  1.3%
4031 4071 4023 4023 4031 4031 4023 4083 4055 3986 4061 4067 4031 4035 4037 Avg: 4039 Dev: -1.3%
4015 4039 4079 4043 4049 4003 4071 3987 4087 4055 4087 4031 4017 3995 4031 Avg: 4039 Dev: -1.3%
4051 4023 4007 4051 4007 4031 4037 4083 4051 4047 3999 4063 4051 4047 4063 Avg: 4040 Dev:  1.1%
4079 4011 4015 3999 4055 4019 4085 4087 4075 4082 4027 4015 4007 4067 4035 Avg: 4043 Dev:  1.1%
4055 4061 4063 4035 4015 4027 4007 4063 4059 4047 4095 4049 4059 4011 4037 Avg: 4045 Dev:  1.2%
4043 4018 3997 4031 4051 4031 4035 4039 4023 4017 4061 4017 4053 4007 4059 Avg: 4032 Dev: -0.9%
4070 4092 4049 4006 4047 4083 4079 4050 4050 3999 4068 4051 4035 4045 4019 Avg: 4049 Dev: -1.2%

ESP32 DevKitC V2, GPIO34 = 3.000V, ADC_ATTEN_11db, Silicon Rev 0

3792 3798 3790 3793 3819 3803 3792 3789 3793 3792 3807 3827 3795 3795 3824 Avg: 3800 Dev:  0.7%
3799 3827 3799 3775 3775 3793 3794 3813 3815 3781 3811 3794 3811 3831 3801 Avg: 3801 Dev:  0.8%
3789 3807 3823 3827 3813 3814 3802 3829 3797 3831 3811 3807 3798 3807 3805 Avg: 3810 Dev:  0.6%
3787 3793 3791 3821 3807 3807 3793 3823 3799 3807 3811 3815 3807 3793 3775 Avg: 3801 Dev: -0.7%
3811 3797 3819 3791 3783 3791 3824 3803 3823 3807 3819 3799 3787 3793 3827 Avg: 3804 Dev:  0.6%
3826 3838 3775 3803 3818 3821 3823 3827 3807 3819 3779 3775 3827 3823 3823 Avg: 3812 Dev: -1.0%
3803 3830 3791 3823 3825 3827 3831 3824 3838 3827 3819 3793 3802 3773 3803 Avg: 3813 Dev: -1.0%
3802 3803 3807 3839 3821 3799 3823 3793 3803 3791 3795 3795 3783 3787 3795 Avg: 3802 Dev:  1.0%
3791 3790 3791 3821 3815 3799 3803 3791 3825 3822 3791 3815 3782 3795 3797 Avg: 3801 Dev:  0.6%
3779 3831 3803 3795 3825 3811 3793 3799 3791 3779 3799 3799 3803 3811 3799 Avg: 3801 Dev:  0.8%
3815 3827 3795 3815 3815 3783 3793 3815 3795 3815 3793 3815 3815 3797 3823 Avg: 3807 Dev: -0.6%
3786 3791 3827 3797 3787 3795 3799 3807 3830 3819 3799 3822 3825 3793 3831 Avg: 3807 Dev:  0.6%
3798 3815 3787 3791 3815 3780 3799 3795 3821 3799 3793 3792 3819 3823 3807 Avg: 3802 Dev: -0.6%
3774 3829 3827 3791 3813 3807 3799 3814 3798 3787 3831 3795 3823 3798 3823 Avg: 3807 Dev: -0.9%
3799 3823 3803 3819 3775 3787 3789 3829 3814 3819 3791 3795 3825 3823 3793 Avg: 3805 Dev: -0.8%
3807 3815 3775 3799 3831 3819 3827 3807 3793 3787 3795 3830 3783 3792 3794 Avg: 3803 Dev:  0.7%
3827 3807 3791 3785 3805 3807 3783 3823 3815 3807 3791 3783 3779 3803 3787 Avg: 3799 Dev:  0.7%
3799 3839 3823 3783 3791 3823 3774 3767 3815 3791 3773 3798 3807 3791 3831 Avg: 3800 Dev:  1.0%
3805 3792 3793 3783 3823 3795 3803 3795 3799 3798 3823 3823 3791 3815 3794 Avg: 3802 Dev:  0.6%
3827 3792 3819 3819 3815 3791 3793 3803 3815 3779 3782 3795 3815 3783 3795 Avg: 3801 Dev:  0.7%
3790 3799 3795 3791 3794 3787 3792 3791 3787 3793 3821 3822 3783 3794 3775 Avg: 3794 Dev:  0.7%
3807 3782 3807 3803 3779 3807 3783 3787 3823 3798 3807 3802 3791 3807 3797 Avg: 3798 Dev:  0.7%
3811 3811 3799 3819 3799 3795 3799 3811 3803 3789 3779 3797 3811 3792 3813 Avg: 3801 Dev: -0.6%
3794 3811 3787 3823 3783 3783 3779 3819 3813 3799 3829 3839 3807 3815 3791 Avg: 3804 Dev:  0.9%
3839 3807 3815 3815 3807 3835 3794 3823 3787 3791 3775 3799 3822 3791 3799 Avg: 3806 Dev:  0.9%
3783 3787 3815 3797 3815 3799 3793 3823 3789 3815 3799 3821 3807 3781 3798 Avg: 3801 Dev:  0.6%
3807 3793 3814 3783 3807 3830 3814 3826 3807 3795 3821 3783 3795 3819 3827 Avg: 3808 Dev: -0.7%
3825 3807 3831 3813 3795 3791 3787 3803 3793 3807 3779 3799 3803 3815 3815 Avg: 3804 Dev:  0.7%
3813 3797 3815 3795 3819 3813 3795 3789 3807 3815 3827 3807 3793 3807 3807 Avg: 3806 Dev:  0.6%
3829 3795 3822 3821 3825 3793 3807 3807 3802 3791 3815 3815 3779 3803 3799 Avg: 3806 Dev: -0.7%

ESP-WROVER-KIT V1, GPIO34 = 1.000V, ADC_ATTEN_0db, Silicon Rev 0

3957 3967 3967 3983 3959 3984 3985 3959 3987 3983 3967 3967 3959 3984 3975 Avg: 3972 Dev:  0.4%
3967 3959 3986 3979 3967 3975 3963 3987 3981 3991 3975 3987 3967 3983 3955 Avg: 3974 Dev: -0.5%
3991 3984 3990 3975 3982 3967 3967 3999 3979 3955 3983 3967 3967 3959 3967 Avg: 3975 Dev:  0.6%
3973 3963 3967 3965 3965 3959 3981 3986 3975 3974 3983 3983 3959 3955 3967 Avg: 3970 Dev:  0.4%
3979 3983 3971 3967 3959 3963 3967 3975 3979 3967 3965 3979 3959 3983 3979 Avg: 3971 Dev:  0.3%
3967 3963 3953 3959 3971 3967 3979 3975 3966 3967 3979 3975 3987 3967 3971 Avg: 3969 Dev:  0.5%
3967 3967 3959 3991 3967 3995 3974 3947 3973 3958 3967 3991 3985 3973 3959 Avg: 3971 Dev:  0.6%
3985 3983 3967 3967 3984 3991 3967 3963 3983 3979 3979 3967 3975 3983 3967 Avg: 3976 Dev:  0.4%
3967 3953 3967 3973 3991 3995 3967 3983 3978 3999 3979 3974 3991 3983 3979 Avg: 3978 Dev: -0.6%
3975 3959 3975 3983 3982 3983 3974 3979 3991 3967 3987 3979 3967 3999 3979 Avg: 3978 Dev:  0.5%
3967 3951 3967 3979 3953 3951 3975 3983 3967 3985 3983 3975 3963 3979 3959 Avg: 3969 Dev: -0.5%
3981 3981 3953 3967 3954 3959 3967 3967 3967 3959 3979 3983 3965 3967 3971 Avg: 3968 Dev:  0.4%
3951 3967 3995 3973 3983 3967 3967 3967 3967 3995 3966 3959 3975 3985 3980 Avg: 3973 Dev:  0.6%
3983 3959 3999 3967 3967 3959 3975 3951 3967 3979 3984 3959 3958 3959 3975 Avg: 3969 Dev:  0.8%
3967 3983 3975 3975 3967 3983 3967 3967 3983 3979 3967 3975 3963 3975 3975 Avg: 3973 Dev:  0.3%
3967 3985 3975 3957 3967 3967 3967 3985 3963 3955 3985 3981 3957 3967 3967 Avg: 3969 Dev:  0.4%
3967 3974 3975 3981 3989 3967 3995 3975 3963 3957 3967 3979 3967 3965 3983 Avg: 3973 Dev:  0.6%
3954 3983 3967 3955 3985 3987 3955 3959 3967 3975 3989 3986 3963 3967 3975 Avg: 3971 Dev:  0.5%
3979 3979 3975 3983 3975 3967 3973 3991 3963 3975 3979 3965 3985 3979 3967 Avg: 3975 Dev:  0.4%
3975 3973 3963 3963 3975 3963 3979 3953 3981 3985 3979 3966 3953 3975 3981 Avg: 3970 Dev: -0.4%
3967 3967 3967 3979 3979 3975 3967 3979 3985 3955 3984 3975 3963 3983 3971 Avg: 3973 Dev: -0.5%
3975 3983 3967 3982 3975 3983 3955 3955 3975 3991 3975 3998 3999 3979 3959 Avg: 3976 Dev:  0.6%
3987 3963 3967 3967 3979 3990 3963 3977 3957 3963 3987 3975 3957 3979 3959 Avg: 3971 Dev:  0.5%
3975 3955 3983 3959 3966 3975 3959 3975 3967 3983 3963 3975 3971 3979 3967 Avg: 3970 Dev: -0.4%
3981 3986 3983 3967 3967 3985 3953 3967 3985 3967 3974 3951 3983 3952 3943 Avg: 3969 Dev: -0.7%
3985 3967 3955 3983 3947 3967 3979 3975 3975 3974 3983 3979 3979 3975 3983 Avg: 3973 Dev: -0.7%
3963 3975 3983 3959 3957 3958 3967 3967 3967 3967 3967 3963 3974 3967 3983 Avg: 3967 Dev:  0.4%
3963 3999 3959 3975 3979 3981 3995 3963 3981 3983 3983 3967 3975 3963 3967 Avg: 3975 Dev:  0.6%
3981 3967 3971 3963 3963 3983 3967 3959 3967 3959 3987 3951 3974 3959 3967 Avg: 3967 Dev:  0.5%
3983 3983 3967 3967 3959 3991 3975 3987 3959 3973 3991 3963 3967 3989 3973 Avg: 3975 Dev:  0.4%

ESP-WROVER-KIT V1, GPIO34 = 3.000V, ADC_ATTEN_11db, Silicon Rev 0

3845 3834 3823 3829 3831 3827 3839 3847 3835 3839 3825 3824 3839 3838 3839 Avg: 3834 Dev:  0.3%
3827 3839 3823 3831 3827 3839 3827 3839 3824 3831 3847 3831 3835 3837 3847 Avg: 3833 Dev:  0.4%
3827 3825 3834 3851 3838 3829 3839 3851 3831 3839 3823 3839 3835 3847 3831 Avg: 3835 Dev:  0.4%
3831 3835 3827 3839 3827 3853 3839 3846 3819 3855 3851 3823 3839 3827 3839 Avg: 3836 Dev:  0.5%
3831 3831 3853 3839 3825 3829 3825 3838 3827 3829 3847 3837 3847 3831 3831 Avg: 3834 Dev:  0.5%
3830 3831 3835 3829 3823 3827 3847 3839 3835 3827 3831 3835 3839 3829 3831 Avg: 3832 Dev:  0.4%
3831 3835 3839 3837 3839 3847 3839 3830 3839 3839 3827 3847 3837 3851 3827 Avg: 3837 Dev:  0.4%
3824 3819 3839 3839 3839 3823 3839 3831 3839 3827 3839 3839 3831 3837 3831 Avg: 3833 Dev: -0.4%
3821 3839 3827 3835 3835 3823 3839 3823 3839 3835 3831 3839 3839 3829 3831 Avg: 3832 Dev: -0.3%
3822 3849 3838 3831 3839 3831 3829 3823 3839 3835 3835 3839 3827 3826 3827 Avg: 3832 Dev:  0.4%
3827 3819 3839 3853 3827 3839 3839 3847 3827 3839 3829 3839 3825 3831 3831 Avg: 3834 Dev:  0.5%
3827 3835 3831 3827 3831 3827 3839 3847 3831 3838 3835 3839 3839 3839 3838 Avg: 3834 Dev:  0.3%
3831 3837 3839 3837 3834 3839 3839 3825 3831 3839 3831 3827 3847 3835 3819 Avg: 3834 Dev: -0.4%
3826 3851 3823 3829 3837 3839 3831 3823 3830 3831 3838 3839 3839 3839 3826 Avg: 3833 Dev:  0.5%
3831 3839 3831 3839 3831 3831 3823 3835 3839 3831 3827 3839 3831 3839 3831 Avg: 3833 Dev: -0.3%
3831 3847 3847 3839 3823 3827 3823 3839 3834 3839 3831 3839 3823 3827 3839 Avg: 3833 Dev:  0.4%
3839 3835 3847 3847 3839 3839 3839 3839 3855 3839 3838 3839 3839 3838 3826 Avg: 3839 Dev:  0.4%
3823 3839 3839 3831 3839 3839 3839 3839 3835 3839 3838 3851 3823 3825 3831 Avg: 3835 Dev:  0.4%
3851 3839 3821 3829 3839 3834 3831 3839 3835 3837 3839 3831 3854 3839 3835 Avg: 3836 Dev:  0.5%
3837 3839 3822 3827 3823 3839 3839 3824 3825 3821 3847 3839 3831 3835 3831 Avg: 3831 Dev:  0.4%
3823 3825 3823 3838 3835 3839 3839 3839 3835 3839 3835 3831 3823 3815 3827 Avg: 3831 Dev: -0.4%
3829 3847 3831 3847 3839 3831 3831 3851 3839 3823 3835 3831 3827 3839 3823 Avg: 3834 Dev:  0.4%
3831 3830 3839 3829 3839 3845 3839 3834 3839 3827 3829 3823 3839 3839 3839 Avg: 3834 Dev:  0.3%
3827 3839 3839 3839 3825 3829 3837 3826 3845 3837 3835 3831 3823 3827 3839 Avg: 3833 Dev:  0.3%
3831 3839 3827 3839 3839 3831 3824 3847 3829 3847 3831 3839 3839 3839 3824 Avg: 3835 Dev:  0.3%
3835 3824 3831 3851 3827 3855 3839 3823 3847 3839 3821 3847 3839 3825 3847 Avg: 3836 Dev:  0.5%
3837 3823 3835 3839 3839 3831 3839 3847 3835 3839 3845 3847 3847 3829 3827 Avg: 3837 Dev: -0.4%
3839 3839 3831 3822 3825 3839 3822 3839 3839 3855 3847 3830 3835 3831 3839 Avg: 3835 Dev:  0.5%
3835 3831 3831 3851 3847 3839 3839 3831 3831 3846 3835 3830 3825 3839 3839 Avg: 3836 Dev:  0.4%
3825 3824 3826 3830 3822 3851 3839 3833 3851 3839 3839 3839 3827 3831 3835 Avg: 3834 Dev:  0.4%

ESP-WROVER-KIT V3, GPIO34 = 1.000V, ADC_ATTEN_0db, Silicon Rev 1

3863 3859 3863 3855 3855 3859 3863 3863 3863 3857 3856 3853 3853 3853 3855 Avg: 3858 Dev:  0.1%
3855 3855 3862 3839 3839 3847 3855 3856 3851 3863 3855 3855 3851 3847 3863 Avg: 3852 Dev: -0.3%
3855 3863 3871 3867 3855 3863 3855 3859 3859 3855 3857 3853 3855 3855 3855 Avg: 3858 Dev:  0.3%
3857 3857 3857 3861 3855 3855 3854 3857 3859 3855 3867 3855 3854 3862 3857 Avg: 3857 Dev:  0.3%
3858 3858 3869 3859 3851 3855 3851 3867 3855 3870 3855 3851 3855 3853 3855 Avg: 3857 Dev:  0.3%
3847 3855 3859 3861 3857 3859 3839 3867 3863 3857 3854 3847 3859 3857 3856 Avg: 3855 Dev: -0.4%
3857 3856 3859 3855 3856 3879 3855 3857 3858 3855 3851 3856 3859 3856 3860 Avg: 3857 Dev:  0.6%
3855 3861 3862 3855 3855 3869 3859 3855 3859 3859 3855 3823 3859 3863 3854 Avg: 3856 Dev: -0.9%
3859 3857 3856 3847 3855 3859 3859 3859 3855 3857 3859 3858 3859 3855 3847 Avg: 3856 Dev: -0.2%
3856 3854 3857 3857 3859 3853 3861 3863 3854 3855 3863 3862 3855 3859 3855 Avg: 3857 Dev:  0.2%
3863 3863 3856 3855 3857 3858 3859 3863 3856 3855 3871 3856 3859 3853 3869 Avg: 3859 Dev:  0.3%
3854 3855 3859 3863 3862 3858 3847 3857 3855 3855 3857 3855 3839 3879 3853 Avg: 3856 Dev:  0.6%
3857 3857 3839 3861 3867 3855 3855 3855 3863 3857 3847 3855 3862 3855 3859 Avg: 3856 Dev: -0.4%
3855 3831 3855 3847 3853 3854 3859 3851 3855 3855 3870 3862 3861 3855 3853 Avg: 3854 Dev: -0.6%
3847 3853 3847 3855 3855 3839 3869 3847 3863 3857 3863 3871 3823 3859 3851 Avg: 3853 Dev: -0.8%
3859 3867 3855 3855 3847 3855 3847 3856 3855 3855 3855 3851 3855 3851 3839 Avg: 3853 Dev:  0.4%
3857 3859 3851 3855 3847 3855 3851 3845 3859 3859 3859 3859 3853 3858 3855 Avg: 3854 Dev: -0.2%
3851 3857 3861 3858 3859 3855 3859 3856 3839 3855 3863 3871 3879 3859 3863 Avg: 3859 Dev:  0.5%
3839 3847 3855 3854 3855 3855 3859 3855 3855 3859 3863 3859 3867 3867 3860 Avg: 3856 Dev: -0.4%
3861 3862 3851 3857 3862 3847 3850 3851 3858 3857 3856 3853 3863 3863 3855 Avg: 3856 Dev: -0.2%
3855 3859 3863 3855 3863 3854 3867 3856 3867 3853 3859 3858 3847 3867 3855 Avg: 3858 Dev: -0.3%
3853 3855 3855 3855 3855 3853 3847 3847 3860 3855 3871 3855 3847 3839 3863 Avg: 3854 Dev:  0.4%
3855 3855 3859 3851 3861 3856 3861 3847 3855 3855 3861 3851 3857 3847 3851 Avg: 3854 Dev:  0.2%
3863 3861 3859 3856 3855 3863 3861 3861 3858 3859 3845 3857 3859 3862 3847 Avg: 3857 Dev: -0.3%
3857 3857 3863 3862 3857 3855 3855 3851 3855 3851 3856 3857 3863 3856 3857 Avg: 3856 Dev:  0.2%
3859 3856 3863 3853 3839 3861 3851 3854 3856 3863 3847 3855 3871 3859 3851 Avg: 3855 Dev:  0.4%
3853 3859 3851 3867 3855 3859 3857 3857 3851 3855 3855 3855 3855 3849 3859 Avg: 3855 Dev:  0.3%
3857 3855 3871 3870 3855 3859 3857 3859 3855 3855 3857 3856 3859 3887 3855 Avg: 3860 Dev:  0.7%
3847 3855 3859 3857 3858 3863 3867 3855 3861 3855 3839 3851 3863 3867 3863 Avg: 3857 Dev: -0.5%
3855 3851 3851 3853 3847 3867 3855 3851 3858 3878 3886 3851 3859 3855 3856 Avg: 3858 Dev:  0.7%

ESP-WROVER-KIT V3, GPIO34 = 3.000V, ADC_ATTEN_11db, Silicon Rev 1

3738 3727 3731 3734 3729 3731 3739 3730 3741 3731 3739 3739 3735 3735 3733 Avg: 3734 Dev:  0.2%
3728 3733 3739 3731 3735 3733 3743 3731 3735 3731 3728 3739 3737 3731 3735 Avg: 3733 Dev:  0.3%
3731 3728 3731 3735 3735 3731 3743 3739 3731 3735 3728 3739 3729 3733 3739 Avg: 3733 Dev:  0.3%
3739 3743 3728 3739 3739 3728 3739 3735 3742 3735 3738 3735 3734 3741 3737 Avg: 3736 Dev: -0.2%
3719 3735 3747 3725 3735 3741 3729 3733 3731 3743 3731 3729 3739 3731 3735 Avg: 3733 Dev:  0.4%
3731 3733 3731 3730 3739 3741 3729 3741 3731 3741 3739 3735 3735 3733 3729 Avg: 3734 Dev:  0.2%
3739 3731 3738 3741 3743 3738 3731 3729 3731 3735 3738 3729 3735 3735 3743 Avg: 3735 Dev:  0.2%
3735 3743 3739 3743 3731 3733 3739 3733 3734 3731 3731 3729 3739 3739 3735 Avg: 3735 Dev:  0.2%
3739 3731 3739 3743 3735 3735 3727 3731 3733 3735 3739 3733 3731 3735 3735 Avg: 3734 Dev:  0.2%
3731 3739 3733 3734 3735 3735 3738 3732 3735 3729 3727 3741 3743 3731 3739 Avg: 3734 Dev:  0.2%
3729 3731 3734 3731 3742 3737 3735 3733 3735 3735 3746 3739 3735 3739 3739 Avg: 3736 Dev:  0.3%
3731 3735 3735 3728 3741 3727 3735 3735 3729 3735 3738 3741 3733 3739 3727 Avg: 3733 Dev:  0.2%
3739 3739 3727 3735 3735 3733 3739 3727 3741 3735 3739 3739 3735 3731 3739 Avg: 3735 Dev: -0.2%
3729 3735 3731 3733 3735 3739 3735 3738 3733 3731 3743 3735 3741 3735 3735 Avg: 3735 Dev:  0.2%
3735 3735 3731 3735 3743 3731 3731 3750 3743 3735 3735 3731 3735 3733 3734 Avg: 3735 Dev:  0.4%
3741 3735 3731 3731 3743 3731 3735 3735 3735 3727 3743 3735 3729 3731 3731 Avg: 3734 Dev:  0.2%
3735 3743 3731 3725 3741 3735 3739 3743 3733 3746 3739 3743 3728 3735 3739 Avg: 3737 Dev: -0.3%
3731 3735 3731 3749 3729 3731 3733 3743 3743 3739 3733 3731 3739 3731 3743 Avg: 3736 Dev:  0.3%
3733 3731 3731 3731 3728 3743 3739 3739 3735 3735 3735 3735 3741 3743 3739 Avg: 3735 Dev:  0.2%
3743 3735 3735 3733 3743 3751 3743 3739 3743 3743 3719 3739 3729 3727 3733 Avg: 3737 Dev: -0.5%
3731 3739 3733 3731 3741 3735 3735 3735 3731 3729 3739 3735 3731 3729 3738 Avg: 3734 Dev:  0.2%
3731 3735 3730 3741 3742 3729 3742 3743 3733 3743 3735 3735 3733 3731 3731 Avg: 3735 Dev:  0.2%
3739 3733 3729 3739 3731 3729 3731 3735 3731 3733 3735 3735 3730 3735 3739 Avg: 3733 Dev:  0.2%
3731 3733 3731 3729 3739 3734 3730 3727 3735 3729 3731 3731 3743 3730 3733 Avg: 3732 Dev:  0.3%
3751 3731 3743 3739 3735 3738 3747 3733 3731 3739 3739 3732 3739 3743 3735 Avg: 3738 Dev:  0.3%
3731 3751 3739 3733 3733 3739 3735 3743 3731 3739 3743 3729 3739 3731 3731 Avg: 3736 Dev:  0.4%
3731 3731 3731 3742 3739 3741 3743 3739 3733 3728 3733 3735 3735 3730 3729 Avg: 3734 Dev:  0.2%
3731 3739 3743 3735 3741 3742 3743 3731 3728 3731 3731 3729 3729 3739 3743 Avg: 3735 Dev:  0.2%
3731 3735 3731 3743 3733 3731 3741 3734 3731 3735 3731 3735 3739 3739 3738 Avg: 3735 Dev:  0.2%
3731 3733 3731 3735 3735 3731 3735 3735 3731 3735 3731 3729 3735 3731 3739 Avg: 3733 Dev:  0.2%
jan-bozelie commented 6 years ago

@krzychb super results , and nice work , complements with the results of <0.5% of 1V input Did you compare also for the other ports as GPIO34 , one of the complains was that we had to calibrate for each port individual , what will kill the case , but overall the fun are you still capable to do multiple AD channels with an 0.1 sec refresch ?

tcsaba101 commented 6 years ago

This editor is not supporting to attach xxx.ino file. I am not expert of github, and I have no time to play at the moment. I attach as an txt. Chip_EVB_ADC_Test.txt

I have studied a bit of wrover kit, I don't see any specific what would validate the result.. All wrover-kit boards give this good result?

krzychb commented 6 years ago

Csaba,

Below are sample results for three ESP-WROVER-KIT boards using your sketch. This is to give some indication what variation of measurements to expect. I would not judge for other wrover-kit boards. My general observation is that ADC measurements perform better on ESP-WROVER-KIT comparing to e.g. ESP32-DevKitC or ESP32-EVB. This is likely related to layout of power distribution, overall layout of traces and components on PCB, selection of decoupling capacitors, etc.

ESP-WROVER-KIT V1, GPIO34 = 3.000V, ADC_ATTEN_11db, Silicon Rev 0

esp-wrover-kit-v1_3v_11db

ESP-WROVER-KIT V2, GPIO34 = 3.000V, ADC_ATTEN_11db, Silicon Rev 0

esp-wrover-kit-v2_3v_11db

ESP-WROVER-KIT V3, GPIO34 = 3.000V, ADC_ATTEN_11db, Silicon Rev 1

esp-wrover-kit-v3_3v_11db

ESP-WROVER-KIT V1, GPIO34 = 1.000V, ADC_ATTEN_0db, Silicon Rev 0

esp-wrover-kit-v1_1v_0db

ESP-WROVER-KIT V2, GPIO34 = 1.000V, ADC_ATTEN_0db, Silicon Rev 0

esp-wrover-ki-v2_1v_0db

ESP-WROVER-KIT V3, GPIO34 = 1.000V, ADC_ATTEN_0db, Silicon Rev 1

esp-wrover-ki-v3_1v_0db

tcsaba101 commented 6 years ago

Thanks Krzysztof! At least we see there is possible to make close reach to 10 bit ADCs (Chipkit, Arduino boards) with ESP32. There is some light at the end of the tunnel.

We could use the ESP32 ADC in other application too, if the real secret of Wrover-Kit would be revealed. I have no idea how to make it!

jan-bozelie commented 6 years ago

Thanks Krzysztof! , im reading your results with interest i will buy one of these and see if that really make the difference however if layout an powersuply would be the problem, expected , the manufacturer , would have give out pcb instructions , for sure i checked the rimple on the power supply before we published the ADC problems i did not see reactions of the manufacturer in these one question did you also use multiple analog inputs at the same time ?

jack0c commented 6 years ago

@igrr Maybe we can try to close this issue.

negativekelvin commented 6 years ago

@jack0c expectations of accuracy/precision should be documented

tcsaba101 commented 6 years ago

The issue has not been solved! I hope somebody will present a reproducible solution, at least to reach the Arduino 10 bit performance, what was not an issue with any board I tried. Should we close the issue, when the problem still exist?

jan-bozelie commented 6 years ago

pls leave it open , as it is a real problem in using this chip as it was intended the worst was that you have to calibrate for each chanel seperatly , which is undoable

i hope the manufacturer will solve this with a newer version

rin67630 commented 6 years ago

I have here following settings with a chip ESP32D0WDQ6 (revision 1) (WROOM32) powered by exactly 3,3V Vcc:

analogSetWidth(10); // 10Bit resolution analogSetAttenuation((adc_attenuation_t)0); // 0=0db (0..1V) 1= 2,5dB; 2=-6dB (0..2V); 3=-11dB

I expected to get a reasonable linearity and ADC=512 upon applying 0,5V on pin SVP.

In fact I get 459. That is about 10% error!

tobymurray commented 6 years ago

I'm trying to use the ADC on an ESP-WROOM-32, and I'm not quite understanding where this issue left off.

the worst was that you have to calibrate for each chanel seperatly , which is undoable

Acknowledging that this is a massive pain, for what I'm doing right now, that seems feasible. I've read the documentation for ADC Calibration, but I'm not quite understanding the process. Can someone lay out how to get usable values out of the ADC today given a single channel on a single chip?

With the chip I'm using I don't have the two point values or reference voltage stored in eFuse, so I understand it's using the default Vref. While the values coming out of the ADC are not particularly close, I've applied a non-linear compensation and it seems to be working reasonably well - this says to me that it's likely usable if I do the right thing. How do we find a more accurate Vref?

shivankgarg98 commented 6 years ago

Can we use external ADC chip like MCP3008 or something else to get better results? Actually, I am working on LoPy modules which are based on ESP32. And I need to get the correct reading of soil moistures. Please, someone, help. Novice here.

elFallino commented 6 years ago

Sure you can. I am using ADS1115 ADC's and they are working fine. Library and sample code are available.

Am 4. Juni 2018 11:20:27 MESZ schrieb shivankgarg98 notifications@github.com:

Can we use external ADC chip like MCP3008 or something else to get better results? Actually, I am working on LoPy modules which are based on ESP32. And I need to get the correct reading of soil moistures. Please, someone, help. Novice here.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/espressif/esp-idf/issues/164#issuecomment-394289570

tcsaba101 commented 6 years ago

Yes, we can use ADS, but for Arduino and other MCUs you don't need it, if 10 bit precision is enough, what works reasonably many times (STM32 12 bit, Teensy 11bit). The ESP32 ADC has not only calibration problem. Huge noise too. Calibration problem could be handled with some effort. Noise makes the internal ADC usable at about 8 bit precision, what is a big disadvantage on the comparison with other MCUs.

markterrill commented 6 years ago

8 bit precision is like knowing its hot but not knowing the temperature

SmoothWifi commented 6 years ago

Hello all,

I am quite new with ESP32 and I am facing an issue I can't solve: I want to get a TFT Touch (resisitv) working and I have the 4 wires (X+,X- and Y+,Y-). Working with the ADC I can get the X position or the Y position alone but no way that I get both of them simultaneously. I have put some delays, combine them in different functions but something is crashing when I combine the two: gpio_set_direction(GPIO_NUM_33, GPIO_MODE_OUTPUT); //X+ gpio_set_level(GPIO_NUM_33, 1); gpio_set_direction(GPIO_NUM_26, GPIO_MODE_OUTPUT); //X- gpio_set_level(GPIO_NUM_26, 0); gpio_set_direction(GPIO_NUM_25, GPIO_MODE_OUTPUT); //Y- gpio_set_level(GPIO_NUM_25, 0); gpio_set_direction(GPIO_NUM_32, GPIO_MODE_INPUT); //Y+ adc1_config_width(3); adc1_config_channel_atten(ADC1_CHANNEL_4, ADC_ATTEN_11db); //3v3 signal from TFT X=adc1_get_raw(ADC1_CHANNEL_4)/(4096/240);//Reads X axis touch position gpio_set_direction(GPIO_NUM_32, GPIO_MODE_OUTPUT); //Y+ gpio_set_level(GPIO_NUM_32, 1); gpio_set_direction(GPIO_NUM_33, GPIO_MODE_INPUT); //X+ adc1_config_width(3); adc1_config_channel_atten(ADC1_CHANNEL_5, ADC_ATTEN_11db); //3v3 signal from TFT Y=adc1_get_raw(ADC1_CHANNEL_5)/(4096/320);//Reads Y axis touch position printf("X=%d Y=%d\r\n", X, Y);

I only get 0. Has one of you already face that problem?

flodmotorgrodan commented 5 years ago

Hardware revision required!

There is no need for reference voltage calibration and crap. The process of making a ADC is to deliver a product ready to use. If calibration is needed is has to be made in the manufacturing process and not made a software issue.

The hardware issue should not be fixed by customers spending time calibrating.

The biggest problem is it has an offset error so any voltage below ~100mV will return 0.

Secondly it has reference voltages worse than a two resistor voltage divider. On top of that it is so unlinear it can not possibly be made properly using the simplest ADC principles.

Tested a few ESP-WROOM-32 and an early Lolin 32 Lite with a PWM output sweep heavily filtered using both a 1k and 10k resistor charging 1000µF//220nF capacitors close to ADC input.

The ADC ranges 0..3 tested and all have a starting offset, but the highest ADC range is really bad.

esp32_adc_vs_pwm_dac_2

Unacceptable

Espressif - Fix the hardware!

flodmotorgrodan commented 5 years ago

A closer look at the offset at which each ADC attenuation range produces a reading. The PWM high side is 3.4 Volts so PWM filtered DC voltage is 3.4/4096 = 0.83 mV/tick

In my case ADC readings starts ticking from: Range 0 & 1 = 85 0.83 = 71mV Range 2 = 110 0.83 = 91 mV Range 3 = 148 * 0.83 = 123 mV

adc_sweep_2018-11-21_215115 Chart - The offsets makes it harder to read smaller voltages in the 100mV range out of the box.

adc_sweep_2018-11-21_162935 Chart - Range 3, gray curve is more than unlinear.

Alteregoxxx commented 5 years ago

@projectgus Hi, are there planned hardware revisions aiming at correcting the adc's offset and non linearity issues? I say hardware because, unlike the non linearity problem that can be "masked" by using the inverse of a "custom" fitting curve (I say "masked" because you're losing resolution anyway in the non linear zone of the adc characteristic), the offset problem can not be corrected via software, neither by the user nor by the manufacturer, hence an hardware review is the only possible solution.

Our small company would really really like to adopt your ESP32 Wroom as "core" for all our present and future projects, still this adc issues makes such a choice really impratical and risky, unless one can be assured that, in the immediate future, hardware revisions aiming at solvinh those issues are planned. And I guess that our small company is not alone in this feeling. You have already one of the best quality/price SOIC on the market, but having it with tha adc issues corrected, in my humble opinion, would automatically make you not one of the best, but THE best.

virajgite commented 5 years ago

I'm wondering how products from particle.io are using the A2D on ESP32. trying to use it with a temp sensor, with the readings being completely unusable.

jan-bozelie commented 5 years ago

on an other case we discovered the origing of the non liniarity was an overvoltage protection zener already conducting , could that here also the case inthe esp32 , nothing we can change ourselves

negativekelvin commented 5 years ago

@Alteregoxxx would you switch to a different soc/module before adding an external adc? Which one? Just curious.

srini1948 commented 5 years ago

I am also seeing serious issues with the ADC. Tests on a 1 kHz sine wave input show significant variations from one period to the next. On the WROOM version achieving 12-bit resolution is impossible. By the way particle.io uses ESP32 only for WiFi. They have a separate STM microcontroller with an excellent ADC.