Several ESP32 design utilize a stable Z level to accurate voltage reading. Frequently, a easy solution utilizes a one-kilohm resistor linked to the Z reference pin and ground. This provides a known voltage, usually https://hyperbookmarks.com/story21885343/esp32-s3-projects-utilizing-a-1k-resistor-for-z-voltage