ADC oneshot calibration max 3.114 (5.1.1 is worse) What is going on please?
Posted: Thu Aug 10, 2023 2:54 pm
I was just experimenting with the ADC one shot read and found that reading a pin basically pulled high will max out at 3.114 volts.
The actual measured voltage at the pin is 3.3v.
Is this normal or is there something wrong.
produces
adc_gpio_read: ADC0 Channel[2] Raw Data: 4095
adc_gpio_read: ADC0 Channel[2] Calibrated Data: 3114
Also then doing a resistance calculation on a voltage divider (using the calibrated millivolts) I need to use 3.25 instead of 3.3v as the supply voltage to get reasonable resistance values across the unknown side of the divider.
The actual measured voltage at the pin is 3.3v.
Is this normal or is there something wrong.
- if((adc->error = adc_oneshot_read(adc_handle, adc->adc_channel , &(adc->raw_result))) == ESP_OK)
- {
- ESP_LOGI(TAG, "ADC%d Channel[%d] Raw Data: %d",adc->unit_id, adc->adc_channel, adc->raw_result);
- if (do_calibration == ESP_OK)
- {
- adc->error = adc_cali_raw_to_voltage(adc_cali_handle, adc->raw_result, &(adc->millivolts));
- ESP_LOGI(TAG, "ADC%d Channel[%d] Calibrated Data: %d",adc->unit_id, adc->adc_channel, adc->millivolts);
- }
- }
adc_gpio_read: ADC0 Channel[2] Raw Data: 4095
adc_gpio_read: ADC0 Channel[2] Calibrated Data: 3114
Also then doing a resistance calculation on a voltage divider (using the calibrated millivolts) I need to use 3.25 instead of 3.3v as the supply voltage to get reasonable resistance values across the unknown side of the divider.