Open farbefreak opened 3 years ago
Seems like issue: #1640 mentions it.
I do have a work around, however it still does not work right:
1,75V is read by the ADC if 1,65V are actually present.
So filtering it this way fixes it sort of. Sort of because this linear scale would mean it should measure 3,5V with 3,3V present. However as tested before, it measures >3,9V with 3,3V present. So the error is not linear. only adding 0.0 -> 0,0 and 3,9V -> 3,3V also screws up the temperature value. (because its not linear..) Something seems wrong with the ESP32 ADC code.
I could measure many different values and calibrate the ADC this way, however this does not seem right.
adc source adc issues adc recent changes (message by IssueLinks)
The analog inputs on the esp's (both 82xx and 32) are well known to not be very accurate. Specially results on the start and the end of range tent to drift a lot.
Could you try what measurements you get when using a ads1115 for example?
I do have a ads1115 connected to a esp8266 but i didn't check the accuracy because i only have moisture sensors connected that are calibrated as a complete system (add -> sensor -> earth moisture). But i will check if it measures right, however it will take a while to do.
I didnt know that the ADC could be off by this much. Thats >100mV in the middle of the range and > 600mV! on the end of the range, unusable in my opinion.
Do you know if the offset is at least stable? Or does it move?
I will check the ADC of my board by connecting a power supply and drawing a curve, this will be interesting.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This was fixed in https://github.com/esphome/esphome/pull/2574 :smiley:
Also, I'm adapting the documentation to remove the misleading 3.9V (https://github.com/esphome/esphome-docs/pull/1592)
Operating environment/Installation (Hass.io/Docker/pip/etc.): PIP ESP (ESP32/ESP8266, Board/Sonoff):
ESP32
ESPHome version (latest production, beta, dev branch) both with: Firmware: 1.15.2 (Dec 22 2020, 20:34:32) and Firmware: 1.15.3 (Dec 22 2020, 20:47:35)
Affected component:
ADC and therefor NTC
Description of problem:
ADC mesures wrong values. I connected a NTC and calibrated it. However the value that is reported does not match the calibrated values, so i tried to investigate. (shows 19,5C, should be 25C)
Shorting the NTC leads to a ADC value of 0V -> all good. However disconnecting the NTC shows:
Indicating it measured 3,90V (the maximum possible with ESP32 and the 11db setting)
So i edited the yaml to measure the voltage going in the ADC pin (with still disconnected NTC but connected 10k Pullup): 3,27V -> everything fine, a little lower than the Vcc supply voltage but i assume its lower because of my DMM impedance in conjunction with the 10k pullup that's used.
Seems like the ADC is mesuring 3,9V even if it should be measuring 3,3V.
Problem-relevant YAML-configuration entries:
Logs (if applicable):
Additional information and things you've tried: