Help on battery saving with ESP8266, battery info
Posted: Thu Mar 10, 2016 11:44 am
Hello,
I'm developing a very simple device based on an Adafruit Huzzah ESP8266 (developing on the Feather version), that should connect via wifi every n seconds (probably 60) to my server and send some data about the connection (BSSID, RSSI, status of the battery). The unit will move around in a building roaming between various access points.
I use a 3,7V 500mAH battery to power it, and will charge it with an inductive charger.
The very first draft of the Arduino code, based on the wificlient sample in the Adafruit webpage, works, connects in the setup function and stays in the loop.
I did a test with communication every 5s and battery lasted 12 hours.
I'd like to optimize now, and I'm asking what are my options.
Is the deepSleep like ESP.deepSleep(s*1000000, WAKE_RF_DEFAULT) a possibility?
I read that there's some wiring to do, is there any detailed explanation or picture for both Huzzah and Deather Huzzah? is always RST to GPIO16?
Sorry but I'm quite new to this kind of electronic, I'm a programmer, quite scared to burn things.
In the deepSleep case all the code whould have to go in the setup function, right?
Any other suggestion on how to optimize power consumption?
More help:
1) to get battery status I use "float vdd =readvdd33();", it starts at 3.5 and slowly moves down to 2.x until it turns off
Is this a good way to measure battery status?
In this sample https://learn.adafruit.com/using-ifttt- ... -io/wiring
a different way is used, why?
2) I'd like the unit to be sealed, so how would you suggest to configure it (change SSID and password of AP to connect to, timing of pings, etc) without having to open it?
I was thinking of something like, when it turns on, it tries to connect first to a "config" SSID, and later to the "configured" SSID AP
If it founds "config" AP, connects to it and to the config server and downloads the new configuration, otherwise if "config" is not present it goes to its normal work by connecting to the "configured" AP.
Any other suggestion? Using it as a webserver and configure it by accessing it from a PC client?
Just remember that I can't touch it, it's inside a sealed case, so maybe running a webserver all the time for when it has to be configured is not good for the battery.
Thanks!
I'm developing a very simple device based on an Adafruit Huzzah ESP8266 (developing on the Feather version), that should connect via wifi every n seconds (probably 60) to my server and send some data about the connection (BSSID, RSSI, status of the battery). The unit will move around in a building roaming between various access points.
I use a 3,7V 500mAH battery to power it, and will charge it with an inductive charger.
The very first draft of the Arduino code, based on the wificlient sample in the Adafruit webpage, works, connects in the setup function and stays in the loop.
I did a test with communication every 5s and battery lasted 12 hours.
I'd like to optimize now, and I'm asking what are my options.
Is the deepSleep like ESP.deepSleep(s*1000000, WAKE_RF_DEFAULT) a possibility?
I read that there's some wiring to do, is there any detailed explanation or picture for both Huzzah and Deather Huzzah? is always RST to GPIO16?
Sorry but I'm quite new to this kind of electronic, I'm a programmer, quite scared to burn things.
In the deepSleep case all the code whould have to go in the setup function, right?
Any other suggestion on how to optimize power consumption?
More help:
1) to get battery status I use "float vdd =readvdd33();", it starts at 3.5 and slowly moves down to 2.x until it turns off
Is this a good way to measure battery status?
In this sample https://learn.adafruit.com/using-ifttt- ... -io/wiring
a different way is used, why?
2) I'd like the unit to be sealed, so how would you suggest to configure it (change SSID and password of AP to connect to, timing of pings, etc) without having to open it?
I was thinking of something like, when it turns on, it tries to connect first to a "config" SSID, and later to the "configured" SSID AP
If it founds "config" AP, connects to it and to the config server and downloads the new configuration, otherwise if "config" is not present it goes to its normal work by connecting to the "configured" AP.
Any other suggestion? Using it as a webserver and configure it by accessing it from a PC client?
Just remember that I can't touch it, it's inside a sealed case, so maybe running a webserver all the time for when it has to be configured is not good for the battery.
Thanks!