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.
Incorrect ADC Voltage After Calibration
Incorrect ADC Voltage After Calibration
Last edited by ankgt11 on Sat May 19, 2018 12:46 pm, edited 1 time in total.
Re: Incorrect ADC Voltage After Calibration
Adc cannot measure below ~0.1v
Re: Incorrect ADC Voltage After Calibration
I understand that, but then why does the 'esp_adc_cal_raw_to_voltage' function return a voltage when the adc is reading 0?
Re: Incorrect ADC Voltage After Calibration
Because the adc value will hit zero at ~0.1v so it can only tell you the voltage is ≤0.1
Re: Incorrect ADC Voltage After Calibration
If you look at the example graph under "ADC Calibration" here . . . .
http://esp-idf.readthedocs.io/en/latest ... s/adc.html
. . . . . . you will see that as the input voltage changes from zero volts to about +0.1V (not -0.1V) there is no change in the digital reading: it remains at 0000000000.
If you need to measure right down to zero volts, it is possible to use two resistors to provide a small voltage offset.
http://esp-idf.readthedocs.io/en/latest ... s/adc.html
. . . . . . you will see that as the input voltage changes from zero volts to about +0.1V (not -0.1V) there is no change in the digital reading: it remains at 0000000000.
If you need to measure right down to zero volts, it is possible to use two resistors to provide a small voltage offset.
Who is online
Users browsing this forum: Bing [Bot] and 147 guests