cyberman54 / ESP32-Paxcounter

Wifi & BLE driven passenger flow metering with cheap ESP32 boards
https://cyberman54.github.io/ESP32-Paxcounter/
Other
1.73k stars 404 forks source link

[Power] Add extra display page showing power consumption #1012

Closed TD-er closed 3 months ago

TD-er commented 3 months ago

Since I have been busy with the AXP192 on this T-beam 1.0 board, I thought why not adding a separate display showing the actual power state.

PAXcounter_power_page_discharge Power page showing discharge current

PAXcounter_power_page_charge Power page showing charge current

PAXcounter_power_page_nocharge Power page showing no charge, but with USB connected

As the display is updated quite often, I had to apply some basic filtering on the USB power stats or else it was hardly readable since the values fluctuate quite a lot.

cyberman54 commented 3 months ago

Thanks for this PR (and the other one). I will look at this soon, test & merge.

TD-er commented 3 months ago

@cyberman54 I just tested with this in the beginning of the setup() function:

  // Reduce power consumption
  setCpuFrequencyMhz(80);

This reduces the power consumption with about 50 mWatt. Typically it uses 660 mWatt when the CPU freq. is set to 80 MHz. When left running at 240 mHz, the power consumption is about 710 - 730 mWatt.

I'm also making the screen layout for this power display page a bit more readable, including the power consumption (or power used for charging)

TD-er commented 3 months ago

Running from battery: PXL_20240613_225943078

Charging from USB: PXL_20240613_225955519

Will append the commit for it in a minute