Current leak using a voltage divider with the XIAO ESP32-C6

You can use an NPN transistor or an N-channel MOSFET to connect/disconnect the ground side of the voltage divider.Turn on the transistor only when measuring the battery voltage.

1 Like