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

Search This thread

kn100

Senior Member
Oct 6, 2008
56
27
Bridgend
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/details?id=com.rootuninstaller.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...487076?pt=PDA_Accessories&hash=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/details?id=com.manor.currentwidget&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/details?id=com.manor.currentwidget&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.
 
Last edited:

kzoodroid

Senior Member
Jun 27, 2010
1,355
264
Kalamazoo
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.
 

-Mindroid-

Senior Member
Dec 3, 2012
162
53
New York
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

Senior Member
Jun 27, 2010
1,355
264
Kalamazoo
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://xdaforums.com/showthread.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.
 
Last edited:

aznbb4l

New member
Feb 13, 2013
2
1
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

Senior Member
Feb 9, 2012
353
44
San José
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

Senior Member
Jun 27, 2010
1,355
264
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.
 

kzoodroid

Senior Member
Jun 27, 2010
1,355
264
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/1...allows-your-device-to-charge-up-to-40-faster/
 
Last edited:

omrij

Senior Member
Mar 5, 2009
627
148
How do you measure how much mA the device draw from the charger?

Sent from my Nexus 4 using Tapatalk 2
 

kn100

Senior Member
Oct 6, 2008
56
27
Bridgend
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/1...allows-your-device-to-charge-up-to-40-faster/

Bit of a late reply but please bear in mind the Nexus will NOT draw anything more than about 800mAh from the wall for charging alone. That is the absolute max and is a hardware limit - If the cable is transmitting that and it's showing in current widget you've got a good setup. See the added section in OP for more info on higher amperage chargers.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    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/details?id=com.rootuninstaller.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...487076?pt=PDA_Accessories&hash=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/details?id=com.manor.currentwidget&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/details?id=com.manor.currentwidget&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.