Battery life extender - Nexus 7 (2013) Original Android Development

I have developed a kernel patch that allows controlling the charge voltage of the battery. Lowering the charge voltage will typically increase battery cycle life by 2x for 0.1V and potentially much more at high temperatures. The default charge voltage is 4.3V, so with 4.2V you can expect 2x the battery life; with 4.1V 4x the battery life (the battery won't be fully charged).
The patch adds a new sysfs control: '/sys/devices/i2c-0/0-006a/float_voltage'. The setting is in milli-Volt; 3800mV - 4300mV is allowed. The charger supports 20mV increments.
For setting the charge voltage permanently, you can add something like:
echo 4100 > /sys/devices/i2c-0/0-006a/float_voltage
to an init script.
For my N7:
4.0V -> 73% charge
4.1V -> 83% charge
4.2V -> 93% charge
4.3V -> 100% charge
(The patch is against the stock kernel.)
The patch is included in the ElementalX kernel:
http://forum.xda-developers.com/showthread.php?t=2389022
and the Glitch kernel:
http://forum.xda-developers.com/showthread.php?t=2449919

anyone care to try first? is it any different than undervolting with custom kernel?

adichandra said:
anyone care to try first? is it any different than undervolting with custom kernel?
Click to expand...
Click to collapse
This is very different. It isn't supposed to increase battery runtime, it's supposed to decrease it.
It allows allows to not completely charge the battery. In return, the battery won't deteriorate as quickly. Making up numbers here: if the battery would normally survive 300 charge cycles (charged to 4.3V); if you only charge to 4.2V (or about 93% capacity), the battery would last for 600 charge cycles before it's dead.

ah i thought this tweak was about to give double battery life in one single charge. might be usef for others but not me though since i never use a gadget more than 18 months. thanks

adichandra said:
ah i thought this tweak was about to give double battery life in one single charge. might be usef for others but not me though since i never use a gadget more than 18 months. thanks
Click to expand...
Click to collapse
No it extends your battery life as in the longevity. The battery life that we usually think of is how long the battery will last on a charge like you were thinking. That's not what this mod is for. Such a mod that you were hoping for doesn't exist.

tiny4579 said:
No it extends your battery life as in the longevity. The battery life that we usually think of is how long the battery will last on a charge like you were thinking. That's not what this mod is for. Such a mod that you were hoping for doesn't exist.
Click to expand...
Click to collapse
Oh how they can wish though. Though still good work regardless, and very useful.

Anyone know the actual estimate for the amount of charge cycles the battery can handle before giving up the ghost?
I tend to agree with adichandra.. In today's consumer market, most gadjets are usually obsolete after 18 months..
Sent from my Nexus 7 using XDA Premium 4 mobile app

So charge cycles are extended by never allowing the battery to charge to 100%? Sounds similar to a feature on my thinkpad laptop that let's you set the charge and discharge thresholds.
Thank you for posting this!

OJ in Compton said:
So charge cycles are extended by never allowing the battery to charge to 100%? Sounds similar to a feature on my thinkpad laptop that let's you set the charge and discharge thresholds.
Click to expand...
Click to collapse
Yes. Same idea. Some Samsung laptops have this as well.

How can we apply this patch? Sorry for such a noob question...

marcus6999 said:
How can we apply this patch? Sorry for such a noob question...
Click to expand...
Click to collapse
If you are not building your own kernel, there will hopefully be a few kernels in this section that will include this.
If you are building your own kernel, you can take the posted 'smb345-charger.c' and replace 'drivers/power/smb345-charger.c' in your kernel tree. It's based on the stock kernel.

tni.andro said:
This is very different. It isn't supposed to increase battery runtime, it's supposed to decrease it.
It allows allows to not completely charge the battery. In return, the battery won't deteriorate as quickly. Making up numbers here: if the battery would normally survive 300 charge cycles (charged to 4.3V); if you only charge to 4.2V (or about 93% capacity), the battery would last for 600 charge cycles before it's dead.
Click to expand...
Click to collapse
Most kernels on all my phones have ability to set precisely the % you want battery charged up too. Haven't seen it for flo/razor
Sent from Pimped N7 (2013) XDA PREMIUM

Hmm that's a good suggestion. Truly to increase the battery charge cycle life by almost 2x you just have to charge it until 90%.
So basically you don't charge it to max voltage and you don't let the charger begin the high voltage stabilization.
So with normally (good Lithium batteries these days) 500 charge cycles you go for 1000 and so on.
I was searching for something like that, because it's a tablet that can last through many years.
I think it's a great feature and all kernels should implement and have it at stock. And let the user decide and choose voltage with an easy script if he wants it.
Battery life year extender
Thank you

tni.andro said:
If you are not building your own kernel, there will hopefully be a few kernels in this section that will include this.
If you are building your own kernel, you can take the posted 'smb345-charger.c' and replace 'drivers/power/smb345-charger.c' in your kernel tree. It's based on the stock kernel.
Click to expand...
Click to collapse
I'm going to add this in the next update to ElementalX

CTCaer said:
Hmm that's a good suggestion. Truly to increase the battery charge cycle life by almost 2x you just have to charge it until 90%.
So basically you don't charge it to max voltage and you don't let the charger begin the high voltage stabilization.
So with normally (good Lithium batteries these days) 500 charge cycles you go for 1000 and so on.
Click to expand...
Click to collapse
There is no good reason to use battery percentage to terminate the charge, instead of using a lower charger float voltage. Likely the only reason a percentage cutoff was used in other cases is that the charger chip didn't support setting the voltage.
The voltage setting is also much more predictable - the battery gauge can be quite unreliable in terms of charge estimate and easily jump 10% when it recalibrates itself.

Can anyone post the source of info for 2x battery cycle if only charge up to 4.2v? I read that not charging lithiums to full charge can help extended life but never seen anyone give estimates like 2x at 4.2v and 4x for 4.1v. Estimates seem a bit high to me. I agree with others here that this tablet can last a few years if the battery holds up so I was planning on replacing the battery after a year or two but if lowering the battery voltage really works this well then I will try it. There is a pretty big downside of having almost 10% less battery life all the time.

neotekz said:
Can anyone post the source of info for 2x battery cycle if only charge up to 4.2v?
Click to expand...
Click to collapse
http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries
http://macomp.ru/wp-content/uploads/2012/04/1607542.pdf
http://www.eetasia.com/STATIC/PDF/200806/EEOL_2008JUN16_POW_TA_01.pdf

tni.andro said:
There is no good reason to use battery percentage to terminate the charge, instead of using a lower charger float voltage.
Click to expand...
Click to collapse
Of course there is. The last 10% to 20% are causing the most aging of a lithium ion battery.
If you really want to prolonge the live of your battery charge it only up to 80%.
There is no real reason to limit the voltage as the stock hardware and drivers handles this already really good by adopting the charging voltage dynamically.

There's no reason to change charger's voltage. The only thing there's meaning in changing in the charger side is output current.
For example with the size of Nexus battery you can use a 1A one or 800mA. It will charge slow but you can maintain some more charge cycles.
Still the most important is to not let the battery reach it's maximum voltage (100%) and let the charger do it's voltage stabilization.
As also said from others before that's what takes the battery charge life away.
The best for good juice and year protection is 90%.
The best for year extension and low juice is 60%.
And of course, when you really need 100% juice (trip, flight, beach, whatever) you just charge it full and don't care for some cycles.
Good batteries have -+500 Full charge cycles. So almost one and a half year if you go from 100->0->100 everyday, before the capacity (mAh) of battery drops.

tni.andro said:
There is no good reason to use battery percentage to terminate the charge, instead of using a lower charger float voltage.
Click to expand...
Click to collapse
TDO said:
The last 10% to 20% are causing the most aging of a lithium ion battery.
Click to expand...
Click to collapse
That's correct.
If you really want to prolonge the live of your battery charge it only up to 80%.
Click to expand...
Click to collapse
That's exactly what lowering the charger float voltage can do. The original post has numbers for different voltages. E.g. with a 4.1V charger float voltage, the charger will stop charging at 83% charge.
There is no real reason to limit the voltage as the stock hardware and drivers handles this already really good by adopting the charging voltage dynamically.
Click to expand...
Click to collapse
The stock driver sets the charger float voltage to 4.3V. Given that there is current limiting (1200mA input current limit), the voltage will be lower initially, but the voltage regulation is 4.3V once the current is low enough.
Like I mentioned, using the battery percentage as cutoff isn't great, since the battery gauge can be pretty inaccurate (can be off by >10%). Setting the float voltage lower results in the same charge cuttoff every time, even if the battery gauge makes an inaccurate estimate.

Related

[DISCUSSION] TouchPad Charging Recommendation & Battery Issues

So I have had mine sitting here all packaged up since tuesday.
And im looking to now actually open it and play with it,
Do you recommend I charge to full when off, or on? Perhaps run it dry and then charge it up?
You used to be told, Charge it for 8 hours before you use it...
That surely can't be true of todays rechargeable battery technology?
[Q] charging and battery damage
If I leave my touchpad on the touchstone charger for long periods and the touchpad is switched on will this damage the battery?
I know I have had laptops and always ran them of the mains and the battery has stopped holding a charge.
Cheers.
I assume that the touchpad has a charging circuit that stops it charging when the battery is full, but batteries will always fail after a while regardless. Lithium batteries are best charged often and not let run down too much in between.
Also, dson't let a lithium battery run down completely, you can significantly shorten its life doing that.
Troute said:
Also, dson't let a lithium battery run down completely, you can significantly shorten its life doing that.
Click to expand...
Click to collapse
source? I thought lithium battery had no memory.
It's not a memory issue, running a lithium battery flat (deep discharging) has a physical effect on it where it will lose it's ability to recharge to as high a level as the previous charge. Each time this happens the battery loses more of it's ability to reach an effective voltage.
Don't take my word for it, do your own research, there's plenty of information out there it internet land.
alexhayuk said:
If I leave my touchpad on the touchstone charger for long periods and the touchpad is switched on will this damage the battery?
I know I have had laptops and always ran them of the mains and the battery has stopped holding a charge.
Cheers.
Click to expand...
Click to collapse
The dev for Dr.battery's has a thread that states that leaving your Touchpad on the touchstone for long periods of time should not impact the battery. Due to it switching to powering the unit after its charged. Though he is doing some testing on that. Also his app should be updated soon for the Touchpad (available through preware). I am still going to contact HP to discuss this as well. I would hate to damage a non replaceable battery. Will update if I have any new info.
Sent from my HTC Sensation Z710e using xda premium
Troute said:
It's not a memory issue, running a lithium battery flat (deep discharging) has a physical effect on it where it will lose it's ability to recharge to as high a level as the previous charge. Each time this happens the battery loses more of it's ability to reach an effective voltage.
Don't take my word for it, do your own research, there's plenty of information out there it internet land.
Click to expand...
Click to collapse
I have done my own research. That's why i don't think this is accurate.
If you have some proof please share.
Besides common aging, a Li-ion battery can also fail because of undercharge. This occurs if a Li-ion pack is stored in a discharged condition. Self-discharge gradually lowers the voltage of the already discharged battery and the protection circuit cuts off between 2.20 and 2.90V/cell.
Click to expand...
Click to collapse
http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries
Basically through normal use you can probably expect around 250-300 full charge cycles (partial charges only count as partial and add up with other partial charges to be a full cycle) in an average battery pack before it has degraded to 80% of it's original capacity. I don't see anything that point to full discharges being damaging. However storing it for longer periods of time fully discharged can affect life.
ambivalent-one I think the figure of 250-300 charge cycles you've pulled from that page refer to deep discharge cycle tests done by them, personally I'd be very unhappy with that kind of lifespan in a battery in regular usage. The same page you've posted http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries shows a chart of charge cycles versus depth of discharge.
Table 2: Cycle life and depth of discharge
A partial discharge reduces stress and prolongs battery life. Elevated temperature and high currents also affect cycle life.
Charges - Depth of Discharge
500 - 100% DoD
1500 - 50% DoD
2500 - 25% DoD
4700 - 10% DoD
Click to expand...
Click to collapse
As you can see a L-ion battery can be made to last nearly ten times longer by keeping the charge level up near max.
Quote from http://www.batterieswholesale.com/damaging_batteries.htm
The Li-Ion cell should never be allowed to drop below about 2.4V, or an internal chemical reaction will occur where one of the battery electrodes can oxidize (corrode) through a process which can not be reversed by recharging. If this occurs, battery capacity will be lost (and the cell may be completely destroyed)
Click to expand...
Click to collapse
karan1203 if you reckon the information about deep discharge not accurate, can you provide the results of your own research that shows this?
Just let it die the first time, then charge when under 5%.
karan1203 said:
I have done my own research. That's why i don't think this is accurate.
If you have some proof please share.
Click to expand...
Click to collapse
Your research must've been incredibly basic in that case. The 2nd result I get when Googling "lithium batteries" gives me the wikipedia page which has a small amount of into on it:
http://en.wikipedia.org/wiki/Lithium-ion_battery
Look at the "Safety requirements" section for a start.
Also Google "lithium batteries discharge" returns some useful links.

Maximum Battery Life?

The manual states: "The battery reaches it's maximum capacity after a few full charging and discharging cycles."
So, does this mean you should fully charge and then fully discharge the battery a few times to get maximum battery life?
If so, should you do this the first few times only or every time after that as well?
IOW, after the few initial times, would you get the best battery life fully discharging or topping off? Does it matter?
I think what it may mean is that the device needs full charging cycles to learn how to read the battery status accurately (so it doesn't say 2% when a fifth of the battery life remains). Other than that, lithium ion batteries are usually happy with top-up charges and only need to be deep-cycled occasionally to keep the OS' battery meter in sync.
OK, thanks. I didn't even know it used a Lithium-Ion battery. Based on that info. I did a quick search and found this: http://www.blackberryfaq.com/index.php/Maximum_Battery_Life
Interesting.
Mithent said:
I think what it may mean is that the device needs full charging cycles to learn how to read the battery status accurately (so it doesn't say 2% when a fifth of the battery life remains). Other than that, lithium ion batteries are usually happy with top-up charges and only need to be deep-cycled occasionally to keep the OS' battery meter in sync.
Click to expand...
Click to collapse
Agreed, that is an intelligent assessment.
Sent from my Transformer Prime TF201 using xda premium

Double Battery Life

I will edit the post as other suggestions come in.
This is what I am doing and it works very well for me. Keeping all things equal... meaning keeping your screen brightness the same, keeping you live wallpaper if you have it you should see major improvement in battery life.
Draining a new battery to 0 and charging to 100 percent several times will help extend the battery life.
Anker 1930mah I find add 20 percent better life.
I have stock HTC 1 by 1 widgets on my home screen that allow me to easily manage wifi, mobile data, sync and airplane mode. I suggest turning off backround data and auto sync.
New Energy ROM and stock videotron kernel is the best battery life by far and it a awesome Rom.
OC_daemon comes with energy rom.. i use it to drastically reduce your cpu speeds when screen is off and even can reduce when the screen is on if you do not run a lot of widgets / high demand apps...
Let me know how it works for you...
Preaak said:
I will edit the post as other suggestions come in.
This is what I am doing and it works very well for me. Keeping all things equal... meaning keeping your screen brightness the same, keeping you live wallpaper if you have it you should see major improvement in battery life.
Draining a new battery to 0 and charging to 100 percent several times will help extend the battery life.
Anker 1930mah I find add 20 percent better life.
I have stock HTC 1 by 1 widgets on my home screen that allow me to easily manage wifi, mobile data, sync and airplane mode. I suggest turning off backround data and auto sync.
New Energy ROM and stock videotron kernel is the best battery life by far and it a awesome Rom.
OC_daemon comes with energy rom.. i use it to drastically reduce your cpu speeds when screen is off and even can reduce when the screen is on if you do not run a lot of widgets / high demand apps...
Let me know how it works for you...
Click to expand...
Click to collapse
for the last time, lithium ions have been out for over a decade now...they do not have memory so there is no need to cycle these batteries...draining the battery and overcharging it is actually bad for lithium ions...lithium ion batteries must be in a constant state of charge and discharge to extend battery life...draining to 0 and 100 only recalibrates the accuracy of how much battery that your phone shows that is actually left in your battery. also draining the battery and overcharging lithium ions is a very bad idea and will significantly decrease the life of the battery...
the other points are absolutely true and valid and recommended
seansk said:
for the last time, lithium ions have been out for over a decade now...they do not have memory so there is no need to cycle these batteries...draining the battery and overcharging it is actually bad for lithium ions...lithium ion batteries must be in a constant state of charge and discharge to extend battery life...draining to 0 and 100 only recalibrates the accuracy of how much battery that your phone shows that is actually left in your battery. also draining the battery and overcharging lithium ions is a very bad idea and will significantly decrease the life of the battery...
the other points are absolutely true and valid and recommended
Click to expand...
Click to collapse
I never suggest overcharging your battery and battery memory is not the reason for a full charge and discharge.
Fully charging battery helps the phone properly read your battery and use the battery output evenly. The batteries drains at a more constant rate.. I would say it settled down.
According to Anker... to reach the best performance, full charge and discharge your new battery for 4 to 5 times.
I know you do not agree but that is my experience and that is what the maker of the battery suggest. So this should be done.
Preaak said:
I never suggest overcharging your battery.
According to Anker... to reach the best performance, full charge and discharge your new battery for 4 to 5 times.
After doing this the batteries drained at a more constant rate.. I would say it settled down. I know you do not agree but that is my experience and that is what the maker of the battery suggest. So this should be done.
Click to expand...
Click to collapse
I know what you're talking about. It's an old mentality that refuses to Die form years of using Ni-Cd batteries. I have a post about this somewhere I just can't find it. search up battery university lithium ion on google. It'll tell you lots more. If this was true all companies with lithium ions would tell you to charge and discharge multiple times...but newer companies like samsung and sony don't even recommend this and they just ell you to charge until full, on many of their products with lith ion now.
http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries
Li-ion does not need to be fully charged, as is the case with lead acid, nor is it desirable to do so. In fact, it is better not to fully charge, because high voltages stresses the battery. Choosing a lower voltage threshold, or eliminating the saturation charge altogether, prolongs battery life but this reduces the runtime. Since the consumer market promotes maximum runtime, these chargers go for maximum capacity rather than extended service life.
there are more articles in other places just got lazy lol
seansk said:
I know what you're talking about. It's an old mentality that refuses to Die form years of using Ni-Cd batteries. I have a post about this somewhere I just can't find it. search up battery university lithium ion on google. It'll tell you lots more. If this was true all companies with lithium ions would tell you to charge and discharge multiple times...but newer companies like samsung and sony don't even recommend this and they just ell you to charge until full, on many of their products with lith ion now.
http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries
Li-ion does not need to be fully charged, as is the case with lead acid, nor is it desirable to do so. In fact, it is better not to fully charge, because high voltages stresses the battery. Choosing a lower voltage threshold, or eliminating the saturation charge altogether, prolongs battery life but this reduces the runtime. Since the consumer market promotes maximum runtime, these chargers go for maximum capacity rather than extended service life.
there are more articles in other places just got lazy lol
Click to expand...
Click to collapse
Those test mean very little because in the real world those batteries have to work our phones and not a artificial charge / discharge cycle... Meaning fully charging and discharging you battery allows your phone to properly read your battery and use the battery output evenly.
I would also point out that in that article does not say that a full charge and discharge of only 4 or 5 times will reduce service life. Yes doing this habitually will...
Preaak said:
Those test mean very little because in the real world those batteries have to work our phones and not a artificial charge / discharge cycle... Meaning fully charging and discharging you battery allows allows your phone to properly read your battery and use the battery output evenly.
Click to expand...
Click to collapse
correct...the only thing that cycling a lithium ion does it to read the battery life properly...it will not affect battery life at all, unlike older ni-cd. its a race between getting a longer battery life or a longer runtime...if you want you battery to last...then i suggest you don't charge to 100 percent and you don't let you phone die...if you want more runtime which is what everyone wants, then you have to charge to 100...but as many people notice...going from 80 to 100 takes a long time while going from lets say 20 to 80 takes the same amount of time...also battery drains very quickly from 100 to around 80 percent..
my only point was that you do not need to cycle your battery multiple times. Once time should be enough for you phone to get a good handle on your calibration...besides you can always recalibrate the readout using an app.
If I have lots of widgets, can that suck more battery, also, my network is off all day, turn it on whenever I need it, and sync is off too.
Sent from my HTC_Amaze_4G using Xparent Green Tapatalk

How to prevent my battery from getting full charge?

This question seems a little (a lot) odd. because naturally we want our battery to get fully charged to get the most stamina out of it.
but i read a while ago that for Li-Io batteries the most efficient charge range are 10%-90% so basically that means the full charge -discharge cycles aren't good for the battery but harmful as it cause them to die faster..
anyway i considered this reading as a good theory until i bought a sony vaio laptop which had a battery preservation feature (it limits the maximal charge to 80% or 50% depending on the option) and for more that a year and a half my battery still performed well (less than 4% degradation) so i thought this was a real deal after all.
still the use cases for a laptop and smartphone are vastly different (the laptop can sit with 50% charge just fine since it will be on charge most of the time while the smartphone has to get the maximum amount of energy to last without a charger)
so is there (or can it be made) an app that can limit the charge (to 80% or 90%)
any help is really welcome
That sounds like an odd theory..
well it sure is
but i read it out a battery maker sheet
if i could find the link i will post it
here's a paper that's not the same as the one i read one year ago
but it hold essentially the same information
http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries
A partial discharge reduces stress and prolongs battery life
Click to expand...
Click to collapse
If at all possible, avoid full discharges and charge the battery more often between uses. Partial discharge on Li-ion is fine; there is no memory and the battery does not need periodic full discharge cycles
Click to expand...
Click to collapse
Lithium-ion suffers from stress when exposed to heat, so does keeping a cell at a high charge voltage
Click to expand...
Click to collapse
==> this is the critical information for me: it means that it's not good to get the battery charge to 100% & more to keep at this level; that's why most phones prompt you to remove your charger after full charge
i hope this gets a little bit interesting for suspicious people..
This thread could be of interest: http://forum.xda-developers.com/showthread.php?t=1257497

[Q] Are there any downsides to charging at a faster rate than stock?

I've noticed many roms provide options to charge at a faster rate, many have by default now.
Just looking at CheckRom, I see that it states "(for AC: up to 1200mA, for USB: up to 900mA)". Is there any real downside to using these? Such as shortening battery life.
I have been wondering about this for awhile. Thanks.
I'm sure I read somewhere that it will only use the milliamp that is supported by the battery. Also if it charges faster it shouldn't be a problem since its using the correct power input
Sent from my GT-I9300 using xda premium
Faster charging equivalents more strain on the battery and thus a shorter life in terms of charge/discharge cycles.
Since the battery is replaceble, it may well be worth the few dollars to you to have it charge faster, but that's personal preference.
Quick-charging batteries leads to additional heat, I would thus not recommend it if you plan to leave it charging in a car in the summer
since that will cause even further strain. (It's very unlikely the battery could go in self-heat mode due to charging)
Actually NO, but charging with more than 1A which is stock/default will add more heat to your phone. Heat which is HOT not WARM will reduce battery life of rechargeable batteries.
Oh right, very neat. I plan to get one of those high capacity batteries (tad over twice of original) for $15.
Does anyone know if it can also reduce battery life leaving it on charge all night? I think it discontinues charging.
krisando said:
Oh right, very neat. I plan to get one of those high capacity batteries (tad over twice of original) for $15.
Does anyone know if it can also reduce battery life leaving it on charge all night? I think it discontinues charging.
Click to expand...
Click to collapse
As every one said charging at higher rate will reduce battery life and also reduce back up time.
Secondly, leaving charger ON all night will not effect battery, because charging is cut off by internal circuit once battery is fully charged.

Categories

Resources