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. |