Olimex Support Forum

Microcontrollers => ESP8266 => Topic started by: WimRoose on April 16, 2018, 02:11:40 AM

Title: ESP8266-EVB-Bat battery voltage
Post by: WimRoose on April 16, 2018, 02:11:40 AM
Hi

Is it possible to measure battery voltage via adc on esp8266? ESP.getVcc() gives values around 3v - but that's taken from the output of the voltage regulator?

Wim
Title: Re: ESP8266-EVB-Bat battery voltage
Post by: LubOlimex on April 16, 2018, 10:41:00 AM
It is possible to get the charge of the battery. It is not the simplest task but it is doable. The battery is not connected to ESP8266 (there is no battery voltage sense pin) so you would need to read the internal ADC and perform calculations (taking into account the specific hardware values). We don't have an example but you might use this project as a basis: http://esp8266-projects.org/2015/03/internal-adc-esp8266/