Page 1 of 1

how do you protect the ADC pin from battery reverse polarity?

Posted: Mon Sep 14, 2020 4:15 pm
by RMandR
I use the ESP32 ADC to measure the battery voltage. The board has a battery boost ic which takes the voltage of the two AAs to 3.3V for ESP32.

The issue is that if the batteries are inserted backwards, the VCC will not be connected, but the ADC input pin which is connected to the battery terminal will see -3V against GND.


How does one protected ADC pin without affecting the measurements?

Re: how do you protect the ADC pin from battery reverse polarity?

Posted: Mon Sep 14, 2020 9:38 pm
by tommeyers
Use a diode and in your code adjust for the drop of the diode which I believe is constant over varying voltages.

Pretty easy.

Or, use a diode bridge and get correct polarity voltage regardless of connection.

Tom