Maker Pro
Maker Pro

Battery check circuit with power save for Feather Huzzah and ESP8266?

smitthhyy

Apr 16, 2013
11
Joined
Apr 16, 2013
Messages
11
I've got myself one of the Adafruit Feather HUZZAH with ESP8266 boards. It's got a single ADC and I want to use it to monitor the battery capacity. The ADC can handle a maximum of 1 volt. The solution on Adafruit is a voltage divider between the battery and ground with the ADC in the middle and then some maths to calculate what the voltage is. It works but adds to the drain on the battery as it's always there.

What I've seen in other solutions is connect the GND side of the voltage divider to a digital pin and when I want to take a reading, set the pin to 0V, take the reading and set it back to VCC. The HUZZAH VCC is 3.3V so when I turn the pin high, it will drive the ADC over 1V and destroy itself.

Can I use a diode somehow as part of the voltage divider along with a digital pin switchable between 0V and VCC but when it's at VCC, it doesn't actually have voltage at the ADC? The idea is to be able to check the battery but not have that circuit be a drain on the battery except for the couple of milliseconds each minute that we do the battery check.

Thanks for your help.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Use a MOSFET to connect/disconnect the upper resistor on he voltage divider. You will probably need a bjt to control the gate of the p channel MOSFET.

This will draw no current until you want to take a reading.
 
Top