power saving: enable DCDC, reduce clock speeds and voltage#1539
power saving: enable DCDC, reduce clock speeds and voltage#1539thomasabbott wants to merge 2 commits intomeshcore-dev:devfrom
Conversation
|
@thomasabbott Just a quick question: Where does |
Removed the DCDC regulator definition for SX1262. It's not used, not passed to Radiolib. DCDC is the default.
|
I'm sorry, it seems to be completely unused. DCDC is the default in Radiolib and this parameter isn't passed to it. I thought I saw a modest power reduction when adding this, but I was in the middle of fighting a different (hardware) problem, and the radio wasn't starting successfully, and I didn't isolate this change.
Now measuring just this change by forcing useLDO=true: the board uses 23.6 mA before clocks are adjusted, 5.8 mA afterwards. As the radio starts it jumps up to 9.4 mA (DCDC) or 13 mA (LDO). So Meshcore's wrapper doesn't support the parameter, and Radiolib defaults to using DCDC. I'll remove it. |
|
Looks good as experimental/sample code, but not ready to push into production/dev branch yet. There should be configuration options in .ini file to disable this and run normally without power saving or other detection stuff. |
|
@JDat We can share the same CLI "powersaving on/off" among MCUs. |
Exactly! There are common things for all platforms/variants and at the same time totally different hardware details (display/no display; BT/no BT etc). Things. I would like to see that hardware/platform/variant code stay in variants and meshcore specific code stay in src folder. Power saving command in example repeater or companion, that commands call functions/classes for variants and detailed implementations stay in variants or platforms. |
Power saving for the waveshare Pico hat. In my tests this reduces the Rx current into the pico Vsys from 32 mA to about 10 mA, and Tx current from 99 mA to 85 mA. (Measured at Vsys = 5 V. At 3.6 V all the currents are higher)
use the lower power PFM mode of the pico SMPS.
enable the SX1262 switching DC-DC converter. The board has the necessary inductor fitted. (rpi_picow circuit)
detect USB power present and lower clock to 48 MHz.
Otherwise, if on battery:
system clock to 18 MHz
move ADC to system PLL
disable USB clock and PLL
lower core voltage to 0.95 V
Futher possible savings:
The waveshare_rp2040_lora variant would also benefit from some of these changes, but it lacks USB power detection, so we couldn't go below 48 MHz. (waveshare_rp2040_lora circuit)