Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,771,111 Members 47,621 Now Online
XDA Developers Android and Mobile Development Forum

Want faster charging/Device discharging while charging/not charging? Read within!

Tip us?
 
kn100
Old
(Last edited by kn100; 27th May 2013 at 05:27 PM.) Reason: Updates and improvements
#1  
Member - OP
Thanks Meter 24
Posts: 56
Join Date: Oct 2008
Location: Bridgend
Plug Want faster charging/Device discharging while charging/not charging? Read within!

Background
Hi all, I, for a very short period of time was suffering from the problem of my phone DISCHARGING while it was charging. This made no logical sense to me until I did some research, which I will detail below.


How USB Power works (Roughly)

Firstly let's discuss USB power provisioning. Strictly speaking, the specifications say that any given USB port should provide a maximum of 500mA (or 0.5A) at 5 volts. *Don't shoot me electronics guys, I'm simplifying for ease of explanations sake*. Imagine that ampage as the actual force of the charger, how quickly it can ram power into your phone. Like the rate of flow on a pipe.

The beginning of the problem
This was all fine and dandy when all USB was really used for was Keyboards, Mice, Memory, etc, low current draw devices. Something else I should mention here is that the Ampage that a port CAN provide is not the Ampage it DOES provide - the device draws a certain Ampage and if the USB controller agrees it outputs said Ampage. Later, when USB was beginning to be used for more power hungry applications, ie External hard drives, these required more power than the port could (In theory) provide. However, most more modern motherboards/USB controllers were more than capable of supplying plenty more Ampage if it was requested. This was breaking the specification but not in any massively dangerous way so as such nothing bad happens.

This is where we get to the actual issue people are experiencing here. The Nexus 4 is a standards compliant device in the respect that it seems to only draw 500mA from any USB port no matter what it's potential, unless it's an AC Wall wart. If you're experiencing problems with wakelocks (see XDA) and other things, this causes your phone to draw more than 500mA which means your phone actually discharges while it's charging! Terrible!

This is quite easy to get around, but again I'm going into detail so let's explain how the phone tells the difference between a dumb wall wart and a USB controller. Easily! The USB controller obviously makes use of the data pins found within the USB cable, whereas a wallwart just (almost always) shorts them out. The Nexus 4 can detect this short, and as such draw more power *While still in quotation marks staying in spec*.

The root problem is not with how the N4 is charging, it's with the wakelock you're experiencing which is causing the phone to draw so much power while the screen is off. While the screen is off and the phone is in Deepsleep (A CPU state where it uses very little power) - it should draw no more than 50mA leaving 450mA for charging the battery, but you guys are probably experiencing a wakelock of some sort.

Solutions to the problem or How to break a specification for the good of mankind
The simple solution is to install this app: https://play.google.com/store/apps/d...ller.batrsaver
This forces the device into a Deep sleep when the screen goes off by killing applications and turning off all internal chipsets that have wakelock capability, most commonly networking on the Nexus 4. This will allow your phone to charge (slowly) off USB without an issue. Another common wakelock is when the device is picked up by your desktop as a media device. The USB controller inside the Nexus 4 forces a wakelock which keeps it from charging. Stupid design, I know.

* A more hackish solution is to install Francos kernel, buy his app, and tick the Fast charging option in the kernel settings dialog. This will force the phone to think that everything is an AC adaptor and will force the phone to draw as much current as it can from the USB port (which on most modern motherboards is fine, and results in extremely quick charging).

* An even simpler solution than all this is to just use a 'USB Charging cable' - this is simply a cable that does not have the Data pins, and as such does exactly the same as what enabling USB fast charge above does. http://www.ebay.co.uk/itm/Micro-USB-...item51a465d124
If you live near a Poundland store here in the UK they sell a 4 in one USB cable type thing which turns 1 USB port into Ipod sync connector, Nokia connector, MicroUSB and MiniUSB, and this doesn't have the data pins and as such is excellent.

One final point, an excellent app for monitoring whether your device is actually charging or not and how quickly is Current widget: https://play.google.com/store/apps/d...ntwidget&hl=en
This widget will tell you how much Ampage is going into or leaving your battery. If the battery icon is green, then it's discharging, if it's black/white then it's charging. The bigger the number, the faster the discharge/charge. This is an extremely easy way to test speed of chargers too.

Recommendations

Another solution, just use an AC Wall wart - they're cheap as hell and the one supplied with the Nexus 4 is an extremely fast charging one. Shame I've gone and lost mine.

A way to roughly monitor charging current draw
I'd also recommend you install https://play.google.com/store/apps/d...ntwidget&hl=en and monitor, if the battery is green while charging it's discharging and you need a more powerful charger/to figure out what's causing your phone to use so much power.

General good values in Current Widget
I generally saw a max draw of about 750mA for charging (not including draw for powering the device, the Nexus 4 can draw more power to charge and power the device) on my old Rev10 first generation Nexus 4. On my new Rev12 board I'm noticing this increase to about 850mA.

Are higher amperage chargers any benefit to anyone?
Yes and no. You will not notice faster charging unless you use your device while charging. Your nexus will draw as much power as it needs to power the phone while charging at the fastest rate. For example on the stock 1.2a charger
1200mA | 800mA goes to charging 400mA goes to powering the phone idling
Let's say you start a stability test. Your phone will obviously be using a lot more power so this will happen
1200mA | -600mA goes to charging and 1800mA goes to powering the phone stability testing
That minus value above may look strange! Let me explain. If the phone needs more power than the charger can supply, it will draw from the battery. That's the minus number.

If you have a higher ampage charger like for example a 2.5a charger
2500mA | 800mA goes to charging 400mA goes to powering the device
Stability testing
2500mA | 700mA goes to charging 1800mA goes to powering the device
Can you see the difference?


DISCLAIMER: I am not an electronics engineer nor do I claim to be, I am simply a hobbyist and this is what I've found to be the case. Please correct me if I've made any mistakes, I want to learn.
The Following 13 Users Say Thank You to kn100 For This Useful Post: [ Click to Expand ]
 
carrot34
Old
#2  
Senior Member
Thanks Meter 14
Posts: 301
Join Date: May 2007
Default Thanks!

Thanks so much for this post. It's very helpful.
 
kzoodroid
Old
#3  
kzoodroid's Avatar
Senior Member
Thanks Meter 263
Posts: 1,340
Join Date: Jun 2010
Location: Kalamazoo
Quote:
Originally Posted by kn100 View Post
Another common wakelock is when the device is picked up by your desktop as a media device. The USB controller inside the Nexus 4 forces a wakelock which keeps it from charging. Stupid design, I know.
This isn't true for everyone then as mine connects and charges just fine off of my laptop and desktop when connected as a media device. In fact its on my laptop right now charging, gone from 68% to 81% in about 30 minutes and it shows connected as a portable media player.
Moto X GSM Dev. Ed.- 4.4.3, Stock w/ Xposed GEL; Nexus 4 - Stock 4.4.4, Rooted; Galaxy Tab 7 Plus - Stock 4.2
 
-Mindroid-
Old
#4  
Senior Member
Thanks Meter 45
Posts: 140
Join Date: Dec 2012
Great info! Thanks for writing this!
In certain use cases the Nexus4 discharges faster than it charges and this is a very useful guide.
I use my phone for navigation in my car and having the GPS on and the screen at high brightness
drains the battery faster than the 0.5A car chargers can supply. Car chargers rated for 2.0A work well.

I haven't tried a 'USB charging cable' with the data pins shorted, it may work as well.
 
kzoodroid
Old
(Last edited by kzoodroid; 13th February 2013 at 09:09 PM.)
#5  
kzoodroid's Avatar
Senior Member
Thanks Meter 263
Posts: 1,340
Join Date: Jun 2010
Location: Kalamazoo
Quote:
Originally Posted by -Mindroid- View Post
Great info! Thanks for writing this!
In certain use cases the Nexus4 discharges faster than it charges and this is a very useful guide.
I use my phone for navigation in my car and having the GPS on and the screen at high brightness
drains the battery faster than the 0.5A car chargers can supply. Car chargers rated for 2.0A work well.

I haven't tried a 'USB charging cable' with the data pins shorted, it may work as well.
was over in Nexus 7 forums and the 4.2.x kernel should have solved the problem at least for having to use shorted cables. have to wait and see if 4.2.2 brings any more changes.

http://forum.xda-developers.com/show....php?t=1984838

Section 6 in this link is about power supplied through USB

http://en.wikipedia.org/wiki/Universal_Serial_Bus

I can't tell if we have an updated kernel allowing faster usb charging as I'm limited by the power output of the usb port in my laptop. The output (5V at 500mA max) is controlled by the laptop (USB Standards) and it doesn't matter what the phone or cable is capable of as that's the max it will give out and that's about what I'm charging at. If I had a dedicated charging port in my laptop then it would be different and I could see if its able to draw more power. I have a 1.0 amp port in my car and it does charge at the higher amperage, I would assume it would do the same thing if I had a 2 amp usb port in the car. So I think the stock kernel has the fast usb charge built in it just depends upon if you have a usb port capable of providing a faster charger, it has nothing to do with the cable as I'm using a standard unmodified micro usb cable and its able to draw the max a usb device is able to put out.
Moto X GSM Dev. Ed.- 4.4.3, Stock w/ Xposed GEL; Nexus 4 - Stock 4.4.4, Rooted; Galaxy Tab 7 Plus - Stock 4.2
 
aznbb4l
Old
#6  
Junior Member
Thanks Meter 1
Posts: 2
Join Date: Feb 2013
Default thanks

thanks for a great detailed post!!!

I have the same trouble with my N4 when I was charging while using my phone...
I find it very slow... I guess I've been spoiled by my previous iPhone (which charges fairly fast)....

i might be stating the obvious but I find the phone charged "a lot" faster when it's OFF
if you are running low with your battery and need a quick 10 min charge, just do yourself a favour by turning off your phone...
the difference is quite significant!
 
danfalcas
Old
#7  
danfalcas's Avatar
Senior Member
Thanks Meter 40
Posts: 310
Join Date: Feb 2012
Location: San Josť

 
DONATE TO ME
Default Re: Want faster charging/Device discharging while charging/not charging? Read within!

Quote:
Originally Posted by kzoodroid View Post
This isn't true for everyone then as mine connects and charges just fine off of my laptop and desktop when connected as a media device. In fact its on my laptop right now charging, gone from 68% to 81% in about 30 minutes and it shows connected as a portable media player.
Yup, me too. It only discharges while charging when I am playing like NFS most wanted.

Sent from my Nexus 4 using xda app-developers app
 
kzoodroid
Old
#8  
kzoodroid's Avatar
Senior Member
Thanks Meter 263
Posts: 1,340
Join Date: Jun 2010
Location: Kalamazoo
The issue with cables is with the LG usb wall charger as the one supplied isn't capable of getting the 5 volts at 1.2 amps that the charger is rated at, mine is getting around 300 - 400 mA. The micro usb cable I have in my car and use with my laptop (for charging and data transfer) is able to handle the higher amperage, it gets around 1 amp with the LG plug. There are no specs on these cables so I can't list a definitive difference and I would assume that the cable mod in the OP might help with the LG cable. It also might just be simpler to only buy those cables capable of handling higher amperage as obviously they are out there from my experience.
Moto X GSM Dev. Ed.- 4.4.3, Stock w/ Xposed GEL; Nexus 4 - Stock 4.4.4, Rooted; Galaxy Tab 7 Plus - Stock 4.2
 
kzoodroid
Old
(Last edited by kzoodroid; 14th February 2013 at 09:11 PM.)
#9  
kzoodroid's Avatar
Senior Member
Thanks Meter 263
Posts: 1,340
Join Date: Jun 2010
Location: Kalamazoo
The cable I'm using is an RCA coiled charging/syncing cable model AH732CBR (has data pins). The maximum I'm getting from this is about 870 mA regardless of the amperage of the usb port, I've tried a 1.0, 1.2 and 2.1 and they are all around 870 mA on current widget. I would suppose if I could find a strictly charging cable I could get higher (link to ebay in OP is outdated) but this is still 2x that which I'm getting from the LG cable supplied with the phone which only puts out 300-400 mA. Our phone also has Qualcomm's quick charge which is supposed to improve battery charging times by 40%.

http://www.droid-life.com/2013/02/14...-to-40-faster/
Attached Thumbnails
Click image for larger version

Name:	2013-02-14 15.29.11.jpg
Views:	316
Size:	246.6 KB
ID:	1730185  
Moto X GSM Dev. Ed.- 4.4.3, Stock w/ Xposed GEL; Nexus 4 - Stock 4.4.4, Rooted; Galaxy Tab 7 Plus - Stock 4.2
 
omrij
Old
#10  
Senior Member
Thanks Meter 58
Posts: 304
Join Date: Mar 2009
Default Re: Want faster charging/Device discharging while charging/not charging? Read within!

How do you measure how much mA the device draw from the charger?

Sent from my Nexus 4 using Tapatalk 2

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Calc+ is a Smart and Beautiful Android Calculator

As we’ve said inthe past, there are quite a few calculators available on Android. … more

Get Better Debug Data with Crash Report SDK

Developing an application is a hard and often times ungratifying task. It also requires quite a … more

Navigate to Your Favorite Places with LocationDetector

If you’re enjoying an active way of life, you probablytravel a lot, go fishing, … more

LifeStats Automatic Journal Keeps Tabs of Your Day

Most of us live very active lives. This is after all why we’re fans of mobile … more