How to measure the ESP8266 battery?


#1

I am building a circuit using the ESP8266-01 and a temperature sensor. For the final test I am using a 9V battery and I have many questions:

  • The 01 version only have two pins to read, but the GPIO0 should be grounded when programming, therefore how can I connect something to that pin? Putting in the code, placing in ground and then to the other sensor?

  • The other question is related with measuring the battery left in the 9V battery. How can I do it?I am going to explain the situation:

The data of the sensor are uploaded to thingspeak and I thought in show a webserver with the battery left, accessing through the IP of the ESP8266. Can this be done? Also I think that knowing the total voltage (9V) and the current voltage can be know the % left in the battery, isn’t?

Have Anyone tried this and could share what do you think about doing it?


#2

Similar projects:

Low Power Coin Cell Voltage Monitor (Adafruit)

Monitoring Battery Life with a Microcontroller

WiFi Battery Monitor System (Instructables)


#3