In order to estimate battery life for both active use and deep sleep, the Nordic PPK came in very handy! It provides power to the ItsyBitsy ESP32 and can very accurately measure the current used.
To profile your project, follow this guide page.
Active Current Draw
In active use with the BLE connection and buttons being pressed, the controller draws ~123mA, you can see this in the selected average in the Nordic PPK graph below.
This translates to about three hours of play from the 350mAh LiPo battery.
Deep Sleep Draw
After 30 seconds of inactivity, the controller is programmed to go into deep sleep. Here it draws an impressively low current, about 0.077mA. This translates to an impressive six months of deep sleep time!
Initial Not-So-Deep Sleep
When I first profiled the power I was seeing pretty high power consumption during what should have been deep sleep -- around 1.8mA.
After many attempts at cutting out code sections and scouring the documentation, I discovered I needed to not only send the esp_deep_sleep_start()
command, but also explicitly turn off the WiFi radio with esp_wifi_stop()
With this magical combo in place the ItsyBitsy fell into a wonderful slumber, sipping a mere 0.077mA as it slept 😴.
Text editor powered by tinymce.