How I avoid fully charging my phone every night
Channel: bornach
Date: 10/05/2020

Every night I would plug my phone into a USB charger which would charge the internal lithium polymer battery to 100% before morning. This is not ideal for the overall longevity of the battery which is often being held above 80% for several hours every the day.


See https://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries



This wasn't such a a big issue with my previous phones which had replaceable batteries -- I could have prolonged the usable life of my smartphone by buying a new battery. This is not the case with my current phone (a phablet). Tablets also have non-swappable batteries.


I tried plugging the phone charger into a timer relay, but setting how much time to allow for charging was pure guesswork. What I really needed was a device what could switch off power to the phone based not on a preset duration, but on a preset count of milliamp-hours that have passed through the charge cable.


In this video I describe a project build that uses a MAX471 and ATTiny85 to measure current passing through a USB charge cable to count mAh charging a phone. An N-channel MOSFET switches off power after a preset limit has been reached. A modified TM1637 is used to display the current mAh count, the measured current, and to set the mAh limit.