Skip to content
Guo-Rong edited this page Jan 2, 2025 · 3 revisions

Summary

As a battery operated device, power consumption is critical to extending battery life and usability. The ESP32 has a history of fairly dismal power consumption issues. This is further exposed with furble where we only use the Bluetooth Low Energy component, but wear the cost of a shared WiFi system.

Previously, the Arduino framework was used to rapidly build a working system. However, improvements to the underlying ESP32 power management were unavailable due to a static Arduino configuration of the various ESP-IDF options. As of #148, we now have access to those power management options.

Investigation

To determine the extent of any power consumption improvements, we assume the following:

  • use 2 reference platforms
    • M5StickC Plus
      • note: M5StickC Plus2 not used due to M5Unified always reporting 0 for battery current
    • M5Core2
  • the M5Unified library provides a reasonable value of current throughput from the PMIC
  • configure the ESP-IDF options sensibly
  • run some comparable scenarios

Scenarios

The following scenarios will be tested:

  • using a different framework
    • with Arduino
    • with ESP-IDF and power management enabled
  • with different backlight levels
    • minimum
    • 50%
    • maximum
  • with maximum BLE transmit power
  • with themes
    • dark
    • default (light)
  • in the following modes
    • idle (eg. main menu)
    • with GPS attached
    • scanning
    • connected
    • connected and repeated focus input

Results

Idle

In this scenario the device is idling in the main menu and tested against a matrix of:

  • backlight brightness
  • dark and light themes
  • arduino and ESP-IDF with power management

All values are in milliamps (mA).

M5Core 2

Backlight Arduino (dark theme) Arduino (light theme) ESP-IDF
minimum 38 38 7
50% 70 74 50
100% 122 122 102

From this, we can infer the following:

  • dark/light theme makes minimal difference
    • remove this from the test matrix
  • backlight makes a huge difference
  • ESP-IDF power management can make a huge difference

M5StickC Plus

Backlight Arduino ESP-IDF
minimum 40 25
50% 59 49
100% 78 69

As before:

  • backlight brightness is a large power factor
  • ESP-IDF power management can be quite effective

GPS

The datasheet for the new (v1.1) mini GPS unit states power consumption of:

  • DC5V/31.64mA

For now assume this comparable with the original, which is physically present for testing.

All results are obtained with minimum backlight, GPS unit connected and observing the GPS Data page.

Device Arduino ESP-IDF
M5Core 2 86 65
M5StickC Plus 80 66

Thus we infer:

  • GPS uses between 20-30mA
  • again, ESP-IDF power management appears to work

Actively Connected

An idling device can be pretty to observe, but functionally useless, now we test furble in action.

All results are obtained with the following configuration:

  • minimum backlight
  • no GPS

M5Core 2

Operation Arduino ESP-IDF
Scanning 100 90
Connected 38 20
Repeated Focus 40 30

M5StickC Plus

Operation Arduino ESP-IDF
Scanning 100 99
Connected 47 32
Repeated Focus 46 34

Conclusion

From the very basic (and not really very scientific testing) above:

  • themes make minimal difference
  • GPS can use 30mA
  • lowering backlight brightness can save a lot
    • M5Core 2: ~50mA
    • M5StickC Plus: ~40mA
  • ESP-IDF makes a large difference
  • scanning eats power
    • only used during pairing

For a connected M5Core 2, with 500mAh battery, we can calculate:

  • Arduino
    • 500 / 40 = ~12.5 hours
  • ESP-IDF
    • 500 / 30 = ~16.7 hours

For a connected M5StickC Plus, with 120mAh battery:

  • Arduino
    • 120 / 40 = ~3 hours
  • ESP-IDF
    • 120 / 25 = ~4.8 hours

Assuming the M5StickC Plus2, with 200mAh battery, is comparable to the Plus:

  • Arduino
    • 200 / 40 = ~5 hours
  • ESP-IDF
    • 200 / 25 = ~8 hours

Thus, ESP-IDF power management appears to quite effective, adding hours to the runtime of the devices during operation.