Many ESP32 application need a accurate Z reference in correct analog reading. Typically, a simple approach utilizes a 1k component associated across the Z level pin and earth. The creates a well-defined potential, https://compoden.com/collections/robotics-motion