From e05d09f0fed079b5dc643e48f7869d9b1010043b Mon Sep 17 00:00:00 2001 From: Federico Amedeo Izzo Date: Sat, 5 Aug 2023 10:45:08 +0200 Subject: [PATCH] ttwrplus: Set battery charging current to 500mAh to limit PMU heating and max. capacity to 80% to extend lifetime by 2.5x-3x Reference article: https://batteryuniversity.com/article/bu-808-how-to-prolong-lithium-based-batteries --- platform/targets/ttwrplus/pmu.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/targets/ttwrplus/pmu.cpp b/platform/targets/ttwrplus/pmu.cpp index 7c143eb5..a6eb94f3 100644 --- a/platform/targets/ttwrplus/pmu.cpp +++ b/platform/targets/ttwrplus/pmu.cpp @@ -259,13 +259,15 @@ void pmu_init() // Set constant current charge current limit //! Using inferior USB cables and adapters will not reach the maximum charging current. //! Please pay attention to add a suitable heat sink above the PMU when setting the charging current to 1A - PMU.setChargerConstantCurr(XPOWERS_AXP2101_CHG_CUR_1000MA); + // NOTE: Charging current set to 500mAh to remove the need for a heat sink + PMU.setChargerConstantCurr(XPOWERS_AXP2101_CHG_CUR_500MA); // Set stop charging termination current PMU.setChargerTerminationCurr(XPOWERS_AXP2101_CHG_ITERM_150MA); // Set charge cut-off voltage - PMU.setChargeTargetVoltage(XPOWERS_AXP2101_CHG_VOL_4V2); + // NOTE: Target voltage set to 4.00V (80% charge) to extend battery lifespan of 2.5x-3x + PMU.setChargeTargetVoltage(XPOWERS_AXP2101_CHG_VOL_4V); // Disable the PMU long press shutdown function PMU.disableLongPressShutdown();