With this calibration at 3.7V the error in the whole measured range (2.8V-4.2V) is around +- 2mV - should be more than enough accuracy for my projects battery or so) this will have no impact on the input signal (level) however the signal will be so linear that I completely abandoned the "in range" calibration (multi points) 3- the only calibration for my sensors I do is at 3.7V - the middle-like of the measured voltage - I use ADC to measure battery level, that is anything between 2.8V (minimum voltage for ESP32) and 4.2V (maximum voltage on charging battery) - ok, maybe 3.7V is not really in the middle but I rather stay with battery above this point. If you consider attenuation 11db then voltage shall not reach more than 2.1V on GPIO so for 4.2V max measured voltage the divider can be 50/50 - for battery operated devices I use resistor in the range of 200k Ohm each so that current drawn when devices sleeps is minimal - around 10uA due to the resistors - that should be ok considering that ESP32 consumes in deep sleep anything between 8uA (ESP32) and 22uA (ESP32-S2) - I am using only bare modules - not development modules with tons of components on them 2- CRUCIAL: add ceramic capacitor - range between 100nF - 1uF - if the voltage you measure is DC-like (i.e. I have struggled with calibration of ADC of ESP32 and ESP32-S2 - many methods - and I ended up with 3 things: 1- install voltage divider calculated this way, that input voltage on GPIO is inside the most linear range.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |