The ESP8266 is ideal for making connected objects that run on battery power. In sleep mode, the power consumption does not exceed 20 μA (on the new models ESP-WROOM-02 / ESP8266EX at least). It is possible to manufacture its own solar power circuit but there is an even more practical solution, the solar Powerbank. Place the Powerbank in a brightly lit place, ideally in direct sunlight to ensure a full charge during the day.
Some tips to save battery and ensure a continuous operation of your objects:
- Turn on Deep Sleep mode in your ESP8266 and ESP32 programs. The power consumption will be limited to 20 μA.
- Limit the sending of data to a minimum. Use optimized technology for fast, lightweight data transfer. For example MQTT or the Websocket
- Limit the frequency of sending data to a server (local or remote). The WiFi connection is very greedy in energy.
- Optimize your code by limiting energy consuming calculations.
- Use the interrupts to wake up the module when an actuator is pressed (bell button,
- Use energy-saving sensors. Do not use a physico-chemical sensor of the MQx series (for example the MQ2 or MQ135). They must be hot (permanently) so that pollutant measurement is possible. Instead, use self-calibrating sensors such as the MH-Z19 to measure CO2 content.
- If your project uses energy-consuming actuators (servomotor, Nema motor …), opt for a very big Powerbank (at least 20000mAh)
- The performance of the batteries decreases when the temperature drops (even more below 0°C), isolate the Powerbank to protect the battery.
- Below 0°C, electrolytes (contained in capacitors for example) can freeze. Your projects may not work properly. It is not necessarily the Powerbank that is unloaded.
Read this tutorial to learn how to measure battery voltage using an Arduino or ESP8266.