ADC calibration: how understand if chip is calibrated and how correct if not

gpezzella
Posts: 52
Joined: Sun Jan 27, 2019 8:04 pm

ADC calibration: how understand if chip is calibrated and how correct if not

Postby gpezzella » Mon Oct 04, 2021 2:22 pm

Hi
with this code I can know if two point calibration and Vref calibration are supported:

Code: Select all

#include <driver/adc.h>
#include <esp_adc_cal.h>

//...............................................................................................
void setup() {

  Serial.begin(115200);
  delay(3000);
  Serial.println("--------------------------");
  Serial.println(" ADC CALIBRATION ");
  Serial.println("--------------------------");
  Serial.println("");
  
  

    //Controllo se i due punti di calibrazione sono presenti
    if (esp_adc_cal_check_efuse(ESP_ADC_CAL_VAL_EFUSE_TP) == ESP_OK) 
       {
        Serial.println("eFuse Two Point: Supported");
       } 
    else 
       {
        Serial.println("eFuse Two Point: NOT supported");
       }


       //Verifico se il reale VREF è stato misurato
    if (esp_adc_cal_check_efuse(ESP_ADC_CAL_VAL_EFUSE_VREF) == ESP_OK)
       {
        Serial.println("eFuse Vref: Supported");
       } 
    else 
       {
        Serial.println("eFuse Vref: NOT supported");
       }

}
//...............................................................................................



void loop() {
  // put your main code here, to run repeatedly:

}
In my case
eFuse Two Point: NOT supported
eFuse Vref: Supported

This means that real Vref value (not 1100) will be used to do calculation but caratteristic is still non linear?

Are value use in this article useful for all when your chip don't have two point calculation?
If not someone know this value?

Thanks

ESP_Dazz
Posts: 308
Joined: Fri Jun 02, 2017 6:50 am

Re: ADC calibration: how understand if chip is calibrated and how correct if not

Postby ESP_Dazz » Sat Oct 09, 2021 7:00 am

This means that real Vref value (not 1100) will be used to do calculation but caratteristic is still non linear?
For Atten 0, 1, and 2, they are mostly linear (except for the very head and tail of the curve). The real VREF value stored in efuse is used to adjust the slope and offset of the linear curve. For atten 3, approximately the last third to last quarter of the curve is non-linear, so the real VREF is used to adjust for the linear part, and also used to adjust the value from the Look Up Table (LUT) that is used to compensate for the non-linear portion of atten 3.
Are value use in this article useful for all when your chip don't have two point calculation?
Yes, both VREF and Two-Point calibration will significantly improve accuracy compared to not using calibration. However, two point calibration as a slight increase in accuracy compared to VREF (but no by much).

Who is online

Users browsing this forum: Google [Bot] and 82 guests