Incorrect ADC Voltage After Calibration
Posted: Sat May 19, 2018 11:46 am
I have been reading and learning how to calibrate my ESP32 ADC for the last few days now. I finally seem to have done it using the following steps, but I still have a problem.
1. Route VREF to GPIO using function: adc2_vref_to_gpio
2. Measure this voltage using my multimeter (it was not too off, measured 1098 against expected 1100).
3. Set the characteristic curve using: esp_adc_cal_characterize. I am using width of 10 bits and attenuation of 6db.
4. Reading the ADC voltage using: esp_adc_cal_get_voltage.
The problem is that when the input voltage is 0 (and reading the ADC directly also confirms the ADC value is 0), the function esp_adc_cal_get_voltage returns a value of about 107mV. This seems very strange and I cannot understand why.
To crosscheck, I also manually tried getting the voltage using: esp_adc_cal_raw_to_voltage and entering 0 for the ADC value. Result is the same.
Other then this problem, the results from are usable (specially with the addition of a 0.1uF cap).
Can somebody please help!
Thanks.
1. Route VREF to GPIO using function: adc2_vref_to_gpio
2. Measure this voltage using my multimeter (it was not too off, measured 1098 against expected 1100).
3. Set the characteristic curve using: esp_adc_cal_characterize. I am using width of 10 bits and attenuation of 6db.
4. Reading the ADC voltage using: esp_adc_cal_get_voltage.
The problem is that when the input voltage is 0 (and reading the ADC directly also confirms the ADC value is 0), the function esp_adc_cal_get_voltage returns a value of about 107mV. This seems very strange and I cannot understand why.
To crosscheck, I also manually tried getting the voltage using: esp_adc_cal_raw_to_voltage and entering 0 for the ADC value. Result is the same.
Other then this problem, the results from are usable (specially with the addition of a 0.1uF cap).
Can somebody please help!
Thanks.