Battery fuel gauge, no learning needed on Nexus 5, should always be correct - Nexus 5 General

Hi
Looking at the Nexus 5 service manual I found it was using a new type of fuel gauge from Maxim the MAX17048. This works differently to other types in that it doesn't measure coulombs (i.e. current in and current out), but works just by battery voltage. From the datasheet:
The ICs use the sophisticated Li+ battery-modeling algorithm ModelGauge to track the battery relative state-of-charge (SOC) continuously over widely varying charge and discharge conditions. The ModelGauge algorithm eliminates current-sense resistor and battery-learn cycles required in traditional fuel gauges. Temperature compensation is implemented using the system microcontroller.
Click to expand...
Click to collapse
Also this means while other types of battery monitor become less accurate over time and don't correct themselves until a certain event is seen, such as a complete discharge/recharge cycle, this newer system is suppose to become more accurate over time, and also is pretty accurate from the start as no 'learning' is required.
So there is never a need to fully discharge/recharge the battery in the Nexus 5 in order to correct any error in the battery charge monitor. This partners well with the wireless charging which can see lots of small top up charging.
Regards
Phil

PhilipL said:
Hi
Looking at the Nexus 5 service manual I found it was using a new type of fuel gauge from Maxim the MAX17048. This works differently to other types in that it doesn't measure coulombs (i.e. current in and current out), but works just by battery voltage. From the datasheet:
Also this means while other types of battery monitor become less accurate over time and don't correct themselves until a certain event is seen, such as a complete discharge/recharge cycle, this newer system is suppose to become more accurate over time, and also is pretty accurate from the start as no 'learning' is required.
So there is never a need to fully discharge/recharge the battery in the Nexus 5 in order to correct any error in the battery charge monitor. This partners well with the wireless charging which can see lots of small top up charging.
Regards
Phil
Click to expand...
Click to collapse
Nice find! Thanks for sharing that!

wideasleep1 said:
Nice find! Thanks for sharing that!
Click to expand...
Click to collapse
Good news! I made the experience that my battery was draining really fast, however it was just bad calibrated... This should be quick-charging much easier :good:

Related

Battery usage - typical Display values

Given that the display is widely regarded as one of the two biggest drawers of power/battery life on the N1 (the other being the radio/cell standby), and given that my battery usage breakdown *always* has Display at the top (by a large margin), I thought it might be interesting to see what other people's Display usage hovers around so we can build up a "operating range"...
(apologies if anyone has done this before, I did a few searches but nothing significant came up - please point me to previous posts if it has already been covered)
not exactly seeing an option for a Poll...would recommend setting one up before we get 100s of posts to comb through
bloke226 said:
not exactly seeing an option for a Poll...would recommend setting one up before we get 100s of posts to comb through
Click to expand...
Click to collapse
you got there darn quick - cheers for voting though!
it depends on what rom u have. my battery usage for the display was significantly different from cyanogen to desire rom.
nellyspageli said:
it depends on what rom u have. my battery usage for the display was significantly different from cyanogen to desire rom.
Click to expand...
Click to collapse
that was one of the things that prompted me to do the poll, as I'm familiar with a Desire with Sense that reports around 20%
unfortunately I don't think i can also capture the ROM here (kernel would have been nice too), but I wanted to - and think you may have a point...
Moved as not Android Dev.
Yeah, unfortunately if you are getting a low display usage if you use it a lot means that the rest of your system is really hogging the power. Cyanogenmod with a high display usage is great because it means the rest of the system is running very efficiently.
Clarkster said:
Yeah, unfortunately if you are getting a low display usage if you use it a lot means that the rest of your system is really hogging the power. Cyanogenmod with a high display usage is great because it means the rest of the system is running very efficiently.
Click to expand...
Click to collapse
It could mean a few different things, not just that. This is not a very scientific poll, sorry.
Thanks for this Poll. I was beginning to think that maybe my Nexus One was defective because the screen used so much of the battery. Unlike my HTC Magic, where the Cell Standby/Phone Idle was king.
The screen is supposed to be the highest drain. That means that the OS and all your apps are very efficient and not out of control.
just FYI, it seems on the bleeding edge kernels that a couple of kernel authors are producing at the moment, that Display usage is down. I am typically seeing no more than 40% in the stats now (down from around 60%) - will update once the kernel dust settles!
this poll isnt really effective, i have seen my screen usage from 10% all the way up to 89%, from what ive seen the percentage is based off of how long since the phone has been unplugged from a charger to the amount of time you were actually using it(had the screen on)
i can run my battery life into the ground in 6 hours or i can make it last 34 hours(max from full charge to shut down with all the fancy stuff turned off)

[Q] Tweaks to extend battery life?

I am sitting here, testing my battery drain in "nothing going on" mode. Phone is on but asleep, WIFI/GPS/3G all turned off. I'm actually having trouble getting the battery to lose charge - wish we always had THAT problem. Anyway, it's not of much use in this fashion, but I did want to establish a baseline.
My specific question is about processor modes. I have a kernel (I assume, not the ROM) with an associated voltage control app. In that app, I can manage my clock speeds. The question is: would I theoretically get better battery life by limiting my clock to lower speeds? And if no one has done this test, or knows the answer in theory, can we discuss the best way to provide a constant processor drain on the phone (although one that isn't tied to speed like I assume many of the tests would be) so that I can make the observations in a reasonable time span - a sixty minute test that drains 20-30% of the battery would seem to be about what I'm looking for. As I said above, with nothing going on, I haven't drained a single % off the battery in 90 minutes.
I do a lot of backpacking and hiking, and the ability to use the phone and its GPS over a period of 5 days without carrying 5 spare batteries would be a real godsend.
There is a thread on here somewhere that lowering the clock speed actually increases battery consumption under load, as the processor has to work longer to do a task.
nickm50 said:
There is a thread on here somewhere that lowering the clock speed actually increases battery consumption under load, as the processor has to work longer to do a task.
Click to expand...
Click to collapse
+1
Don't lower too much for any reason. For e.g., if u have a overclocked kernel at 1280, u could scale it down to 1000, but don't go beyond that. Values over 800 are used very less unless there is a task demanding that much CPU.
Plus, by math, a task that takes 5 seconds at 1280 speed would take 8-9 seconds at 600-800 levels. So I wouldn't recommend reducing clock speed to such levels, even in standby mode.
I haven't found the thread about underclocking increasing battery drain, but it seems most people believe that canceling overclocking, and also undervolting, will extend battery life. I'll fool around with that for a while.
Soccer_Dad said:
I haven't found the thread about underclocking increasing battery drain, but it seems most people believe that canceling overclocking, and also undervolting, will extend battery life. I'll fool around with that for a while.
Click to expand...
Click to collapse
Yes. Cancelling overclocking means setting at 1000 from 1200 and 1280 or other speeds over 1000.
Under-volt to some extent, but not too much, esp at higher speeds.
diablo009 said:
Under-volt to some extent, but not too much, esp at higher speeds.
Click to expand...
Click to collapse
Yea, in theory, if you under-volt too much, it's going to stress the device to meet the action requirements for the required action. Right now, everything on the phone is calibrated to run on around 3.7v or just a little bit lower, so if a certain process doesn't acquire enough voltage or suck enough amperage from the battery, you'll get one of the common results: 1)Random shutdowns or 2)Battery drain.
vunuts said:
Yea, in theory, if you under-volt too much, it's going to stress the device to meet the action requirements for the required action. Right now, everything on the phone is calibrated to run on around 3.7v or just a little bit lower, so if a certain process doesn't acquire enough voltage or suck enough amperage from the battery, you'll get one of the common results: 1)Random shutdowns or 2)Battery drain.
Click to expand...
Click to collapse
It would lead to stress on CPU too 'cos it would be like putting regular gas and expecting peak hp out of a sports car. I can notice a difference in pickup and power between regular and premium gas in my car when I need quick pickup. For normal use it performs good, but u never know when u need that optimum power. Same with our phone CPU too.
diablo009 said:
Like putting regular gas and expecting peak hp out of a sports car.
Click to expand...
Click to collapse
Great analogy..... But..... You can just disable the knock sensor in the car and bypass the OBDII codes that pop up Yes, I am a gearhead lol. But in a sense, this is exactly what we are doing to our phones, trying to run with the minimum and expect the maximum.
And that brings me to this quick fix: Undervolt as much as possible, install a Nitrous Express kit for those times when you're in need of optimal power
I just don't mess with the OC and UV personally. I'm running everything based off of jk4 with Setiron's kernel with the standard lag-fix that's pre-applied with it, and I got rid of any... hmmm, I don't want to say "useless" apps, but I guess unnecessary or unproductive for me. If I show off my phone, people see how quick it is and like the customization of my launcher and how cool it looks, that's about the flashiest thing on my phone, but once you open the app drawer, it's all business.

[MOD][KERNEL] Battery Life eXtender (BLX)

Older types of rechargable batteries exhibited a 'memory effect' which made it neccessary to completely charge/discharge the battery when using to prevent degradation of the capacity. Modern Lithium-Ion batteries like in the Nexus S do not show this problem and thus it is not necessary to use the battery in complete (dis)charge cycles. In fact on the contrary, it is commonly accepted that both very low and very high charge states accelerate the degradation of the battery capacity (that is why you should store Li-Ion batteries at around 40% charge).
While a low charge state can be simply avoided by charging the device more often, the battery in the Nexus S by default is charged to around 95% capacity and I could not find any app or tweak to stop the charging at a lower capacity. Thus the only way was to use the manual override and pull the cable which is annoying since one had to monitor the charge state.
So I implemented a simple tweak I called Battery Life eXtender (BLX) which can be used to set a limit for the capacity to which the battery will be charged by passing a value between 0 and 101 to 'charging_limit' in '/sys/class/misc/batterylifeextender' (101 by default).
Changes to the source code: http://www.pastie.org/2516542
BUGFIX:
The battery status is set to 'full' once the user defined charging limit is reached.
Bug fix: http://www.pastie.org/2534319
BUGFIX #2:
The charging limit is set to 96 by default which will mimic the behaviour of the stock kernel. Also, the maximum value accepted by 'charging_limit' is set to 96.
Bug fix: http://www.pastie.org/2560599
BUGFIX #3:
1. Made BLX compatible with the 100% charging 'fix'.
2. If the charging limit is set to the maximum charging limit, charging will not be stopped until the interrupt signal is received from the MAX8998 chip.
Bugfix: http://www.pastie.org/2751140
No further patches will be published here. I have set up a git repo for all my tweaks. Each mod has its own branch to keep the tweaks cleanly separated and one can simply pull the latest patches from the corresponding branch.
https://github.com/Ezekeel/GLaDOS-nexus-s/tree/blx
I do not accept donations and since I reached my 50GB limit of free space on SpiderOak, thanks to all of you kind people who got an account using my referral link, I could not ask for more.
Instead if you really want to donate your hard earned money to someone who deserves and needs it, consider donating to the Free Software Foundation at fsf.org: These guys are at the frontline when it comes to keeping Linux free and fighting these greedy bastards who think they are entitled to collect royalties and other fees from Linux users due to some silly patents - and if Linux falls, Android will be next.
Can't wait for Trinity to include this!
Sent from my Nexus S using XDA App
i charge my ns to 100% all the time, i wish that i could charge it even more. lol!
Wow! I am waiting for this for long time!
Sent from my Google Nexus S using XDA Premium App
simms22 said:
i charge my ns to 100% all the time, i wish that i could charge it even more. lol!
Click to expand...
Click to collapse
Yeah, the drawback of course is the shorter battery runtime. If even a fully charged battery still is not enough for you to get over the day, this tweak is not for you. However, I mostly use the Nexus for internet, email and music and for me a fully charged battery last for about 3 days. So in my case when setting the charging limit to let's say 80% that is still plenty of reserves.
Before I wrote this tweak I thought about if it actually makes sense to try and prolong the lifetime of these batteries because they can be easily replaced and are also pretty cheap. However it seemed like a good idea purely from an environmental point of view (even if there is no climate change like Rick PArry totally has convinced me).
Ezekeel said:
Yeah, the drawback of course is the shorter battery runtime. If even a fully charged battery still is not enough for you to get over the day, this tweak is not for you. However, I mostly use the Nexus for internet, email and music and for me a fully charged battery last for about 3 days. So in my case when setting the charging limit to let's say 80% that is still plenty of reserves.
Before I wrote this tweak I thought about if it actually makes sense to try and prolong the lifetime of these batteries because they can be easily replaced and are also pretty cheap. However it seemed like a good idea purely from an environmental point of view (even if there is no climate change like Rick PArry totally has convinced me).
Click to expand...
Click to collapse
i thought about the need to prolong the batterys life too. i thought about how long id be using my phone as a primary device before i get a new one vs the actual life of the battery. i figured id replace the phone before the battery actually died. of course, there is that odd random chance that the battery will die much quicker than expected. my original g1 battery from 2008 is still good, and i abused that phone for a long time. but, there is something else that i didnt think about. there are lots of people in the world that are less fortunate than i am. and they need their devices to last them as long as the devices can because they cant afford getting new ones. and that includes the battery too. they would appreciate something like this. of course, there is that envirenmental thing that you touched upon. less crap destroying our wonderful planet
Ezekeel said:
Yeah, the drawback of course is the shorter battery runtime. If even a fully charged battery still is not enough for you to get over the day, this tweak is not for you. However, I mostly use the Nexus for internet, email and music and for me a fully charged battery last for about 3 days. So in my case when setting the charging limit to let's say 80% that is still plenty of reserves.
Before I wrote this tweak I thought about if it actually makes sense to try and prolong the lifetime of these batteries because they can be easily replaced and are also pretty cheap. However it seemed like a good idea purely from an environmental point of view (even if there is no climate change like Rick PArry totally has convinced me).
Click to expand...
Click to collapse
so it is not for hardcore user? I have to recharge the phone every evening *argh* !
Sent from my Google Nexus S using xda premium
Sounds like Simms is waiting for the Nexus Prime?
simms22 said:
i charge my ns to 100% all the time, i wish that i could charge it even more. lol!
Click to expand...
Click to collapse
Sry for the noob question, but how do u charge it to 100%?
I appreciate your work Ezekeel.
I have one suggestion: Can you make one thread with all your MODs included so that it is not fragmented all over the Android Development forum?
That would be very kind of you.
Fantastic...waiting for this!!
Inviato dal mio Nexus S usando Tapatalk
dinuvali said:
Sry for the noob question, but how do u charge it to 100%?
Click to expand...
Click to collapse
You have to charge the phone with the screen on.
I'd rather wait for this mod to be implemented in kernels, or roms.
W00T ! This is THE mod I was waiting for since I got my Nexus S ! Thanks a lot Ezekeel for all your work !
WOW! Very nice. I'm waiting)
We want it fast!!!!
Accidentally sent from my Nexus S using XDA Premium App
Ezekeel said:
Yeah, the drawback of course is the shorter battery runtime. If even a fully charged battery still is not enough for you to get over the day, this tweak is not for you. However, I mostly use the Nexus for internet, email and music and for me a fully charged battery last for about 3 days. So in my case when setting the charging limit to let's say 80% that is still plenty of reserves.
Before I wrote this tweak I thought about if it actually makes sense to try and prolong the lifetime of these batteries because they can be easily replaced and are also pretty cheap. However it seemed like a good idea purely from an environmental point of view (even if there is no climate change like Rick PArry totally has convinced me).
Click to expand...
Click to collapse
What kind of battery you are using, why my battery can only last 1 day with few calls, message and a couple of hours internet.
brainmaster said:
I appreciate your work Ezekeel.
I have one suggestion: Can you make one thread with all your MODs included so that it is not fragmented all over the Android Development forum?
That would be very kind of you.
Click to expand...
Click to collapse
Totally agreeing to that.
I concur.
nice - but not something I see myself using so one little question in advance: If I use a kernel that has this and I just delete this config file - will my ns behave as if it had never been there?
brainmaster said:
I appreciate your work Ezekeel.
I have one suggestion: Can you make one thread with all your MODs included so that it is not fragmented all over the Android Development forum?
That would be very kind of you.
Click to expand...
Click to collapse
You mean joining all the thread in a single one or creating an additional thread as an index which links to the individual threads?
jaoyina said:
What kind of battery you are using, why my battery can only last 1 day with few calls, message and a couple of hours internet.
Click to expand...
Click to collapse
The stock battery with 3G disabled and CPU freq limited to 800GHz.
gotjazz said:
nice - but not something I see myself using so one little question in advance: If I use a kernel that has this and I just delete this config file - will my ns behave as if it had never been there?
Click to expand...
Click to collapse
The charging limit is set to 101 by default, so as long as you do not set a different limit this tweak will do nothing at all.

The Note 4 has live battery current monitoring, but no apps seem to take advantage

I just found out that there is a live, by the second precise battery current stat on the Note 4:
Code:
/sys/class/power_supply/battery/batt_current_ua_now
But all the battery current monitoring apps I've tried on my Note 4 don't work, they can only use the "estimate" value that measures how long it takes for your battery to drop 1%. So far the only app I've been able to find that can monitor this stat is Cool Tool, but that's just because I can manually enter it in as a custom field. If anyone knows of any others that can take advantage of this, and perhaps log it (I'm a data nerd), please let me know.
Does this work on CyanogenMod?
Sent from my SM-N910C using Tapatalk
Estimate what? Apps that run the battery the battery to 1% are the only way to actually and precisely measure the battery life of a device, since the batter capacity is at best an estimate and can be wildly different from the stated capacity depend on source and age.
'Current now' is a decent method of seeing current power draw, but in no way does it really provide any meaning indication of total battery life. What method of taking advantage of it are you looking for? It only has a few implementations where the data is of use. For most real world tasks, the data would be just an interesting nerd fact and nothing more really and cool tool can already provide what you're looking for.
not to sound like an asshat, but who cares? idk how or why but the note 4 by far has the crappiest battery life ever.

Battery life test

Can someone who actually has the phone post real world battery life test results with full res on, Bluetooth WiFi and GPS on, and without running YouTube to run down the battery.
I saw the video from the YouTube tech guy (thanks for all those btw), but these devices are optimized for video so running down the battery with a long Youtube playlist isnt "actual useage" if you know what I mean.
gingi999 said:
Can someone who actually has the phone post real world battery life test results with full res on, Bluetooth WiFi and GPS on, and without running YouTube to run down the battery.
I saw the video from the YouTube tech guy (thanks for all those btw), but these devices are optimized for video so running down the battery with a long Youtube playlist isnt "actual useage" if you know what I mean.
Click to expand...
Click to collapse
I don't think anyone here actually has the phone yet And to be honest if your not happy with the current reviews I don't think you will be with future ones either because it will never be 'your' usage and no one else can replicate that except you.
MrAshMan said:
I don't think anyone here actually has the phone yet And to be honest if your not happy with the current reviews I don't think you will be with future ones either because it will never be 'your' usage and no one else can replicate that except you.
Click to expand...
Click to collapse
Yea a lot of people get the devices before the consumer release date to review them. Like this guy I know that it wont be "my usage", but I did stipulate a few conditions that would make it close to my use case and I wanted to make sure that streaming video on loop wasn't part of the test.
gingi999 said:
Yea a lot of people get the devices before the consumer release date to review them. Like this guy I know that it wont be "my usage", but I did stipulate a few conditions that would make it close to my use case and I wanted to make sure that streaming video on loop wasn't part of the test.
Click to expand...
Click to collapse
Understand completely.. i do not see the point in strategically getting high SoT or battery usage stats.. I just don't think it would help you someone else posting there usage for you to make a decision on. I assume you would be comparing it with your current phone with your usage
I've seen a video on YouTube that claims the screen on time is 6 hours and 45 minutes during normal use. That would be incredible
Found a great video on battery life
gingi999 said:
Found a great video on battery life
Click to expand...
Click to collapse
Seeing that video gives me hope. But seeing no updates to improve S8+ Is bull.
Just remember to look after your battery initially. When you first get your device charge it without using it. Once charged you'll be doing a lot of transfers and updates which will heat up the battery and device because of the load - I always do this initial set-up in a cool room or outside if cooler and without a case to keep the battery cool. Once set-up and you've played with it and the battery is drained, don't charge it . Switch off the device and let it cool down. Following this initial care procedure should give you better long term battery life.
Izvid said:
Seeing that video gives me hope. But seeing no updates to improve S8+ Is bull.
Click to expand...
Click to collapse
Yep me too. I was very concerned. But looks like they softwared a solution to my fears
jah said:
Just remember to look after your battery initially. When you first get your device charge it without using it. Once charged you'll be doing a lot of transfers and updates which will heat up the battery and device because of the load - I always do this initial set-up in a cool room or outside if cooler and without a case to keep the battery cool. Once set-up and you've played with it and the battery is drained, don't charge it . Switch off the device and let it cool down. Following this initial care procedure should give you better long term battery life.
Click to expand...
Click to collapse
I really thought Li-ion batteries don't need any initial formatting. Am I wrong?
pedmond said:
I really thought Li-ion batteries don't need any initial formatting. Am I wrong?
Click to expand...
Click to collapse
Most manuals say charge fully prior to first use. Keeping the battery cool super important. Battery also better if charged with device off.
pedmond said:
I really thought Li-ion batteries don't need any initial formatting. Am I wrong?
Click to expand...
Click to collapse
They don't need any initial conditioning, like NiCd or (to a lesser extent, NiMh), but ...
jah said:
Most manuals say charge fully prior to first use. Keeping the battery cool super important. Battery also better if charged with device off.
Click to expand...
Click to collapse
As @jah says, heat is the enemy of Li-Ion batteries. The cooler you can keep them, the better. Don't charge them when they're warm to the touch, and don't fast-charge them unless you really need to. I don't think charging them with the device off provides a significant enough benefit to go to the trouble of shutting down your phone before and turning it on after, though.

Categories

Resources