Deciphering the Nexus 7 Automatic Input Current Limit (for chargers)

Search This thread

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
For the time being this is going to be in Accessories, but eventually it might get moved to Development as I get even more data. It's borderline at the moment.

It's been known for a while that the Nexus 7 is finicky about power supplies. In addition to the usual requirements for a power supply that complies with the USB Battery Charging Standard (D+ and D- shorted by the supply), which makes it VERY hard to find good supplies as most use Apple's nonstandard convention - The Nexus 7 seems to be VERY finicky about supplies which drop their voltage under load. Samsung tablet supplies will charge the N7 faster than the stock supply.

The charger controller chipset in the N7 is a Summit SMB347, same as found in a number of Samsung tablets. No datasheet is available for this chipset, but we do know it has an Automatic Input Current Limiting (AICL) feature - If the power supply "browns out", it will reduce current demand until the supply voltage raises to above the trip threshold.

Previously, I only had the ability to measure battery input current using CurrentWidget, but the top of my Christmas wishlist was an adjustable bench power supply. It has adjustable voltage AND an adjustable current limit - so I can limit the current delivered to the N7 and determine what voltage it settles at. If the voltage kept bouncing between two values, I recorded the voltage as the halfway point. E.g. if it bounced between 5.1 and 5.2, I recorded it as 5.15.

A picture of my setup is at:
https://plus.google.com/u/0/101093310520661581786/posts/gkbHaKKDnj6
Components:
Sinometer HY3005D from Mastech (Adjustable bench supply, 0-30v 0-5A)
22 gauge solid wire (the best USB cables I've seen are only 24 gauge - lower gauge = thicker wire)
Sparkfun MicroUSB breakout with D+ and D- shorted

Here are the results (Bear with me as I try to figure out how to properly format a table here on XDA... The HTML tag doesn't work as expected...):
HTML:
<table border="1">
<tr><td>Amperage Limit</td><td>Voltage</td></tr>
<tr><td>1.85</td><td>5.15</td></tr>
<tr><td>1.80</td><td>5.0</td></tr>
<tr><td>1.70</td><td>4.9</td></tr>
<tr><td>1.60</td><td>4.9</td></tr>
<tr><td>1.50</td><td>4.8</td></tr>
<tr><td>1.40</td><td>4.8</td></tr>
<tr><td>1.30</td><td>4.7</td></tr>
<tr><td>1.20</td><td>4.7</td></tr>
<tr><td>1.10</td><td>4.6</td></tr>
<tr><td>1.00</td><td>4.55</td></tr>
</table>

Below 1A, I think the tablet goes into a more severe AICL mode - it will drop to around 600-650 mA, the power supply will exit current limiting (back up to 5.1 volts), and current will not go up until the device is unplugged and replugged.

One observation here - If the voltage drops 0.2 volts, you lose 400 mA of charge current. Many previous efforts here put an ammeter in series with the power supply - many ammeters drop 0.1-0.2 volts under load! The ammeter used by those previous effort was having SIGNIFICANT effect on the results.
 
Last edited:

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Reserved - future analysis of how various chargers behave under load. Do they REALLY meet their ratings?

May be posted in Hardware Hacking and linked from here instead.
 
Last edited:

gokalp

New member
Sep 30, 2011
3
0
Even if the amperemeter drops 0.1-0.2 V under various loads, you can stick a voltmeter after the amperemeter (i.e. parallel to the device only) and you should have a pretty accurate reading of the voltage on the device alone since voltmeters are pretty high impedance. And to compensate for the loss, just increase the supply voltage a bit.
 

bladebarrier

Senior Member
Jul 8, 2010
216
47

I think you may be trying to read too far into this.

I charge my Nexus 7 off of a generic 2A/5V X4 output charger, and off the stock charger, and off the woman's kindle fire charger, and off a 2A car adapter. All of it works just fine.

I think the real problem comes from people using chargers that aren't able to produce enough current (thus the voltage drop you're trying to measure for). But honestly, this tablet lasts incredibly long on a charge, and takes almost no time to get back to 100%. Aside from if you're using it in your car as a long term audio/gps/hspa unit, all at once, why even bother taking out your meter?

TLDR: Buy a charger that is rated for 5V, 2A, and go back to having a good holiday instead of trying to measure it. Granted, I understand you're interested in finding out the how's and why's, but I haven't found any issue with charging the Nexus 7 on any charger I own, because I only buy ones that are rated for 2A or above draw. I won't get out the Fluke to test what it's pulling on each one, but it seems to charge very quickly on all of the above. 1%-100% in the time it takes me to not care, anyways.
 
Last edited:

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
I think you may be trying to read too far into this.

I charge my Nexus 7 off of a generic 2A/5V X4 output charger, and off the stock charger, and off the woman's kindle fire charger, and off a 2A car adapter. All of it works just fine.

I think the real problem comes from people using chargers that aren't able to produce enough current (thus the voltage drop you're trying to measure for). But honestly, this tablet lasts incredibly long on a charge, and takes almost no time to get back to 100%. Aside from if you're using it in your car as a long term audio/gps/hspa unit, all at once, why even bother taking out your meter?

TLDR: Buy a charger that is rated for 5V, 2A, and go back to having a good holiday instead of trying to measure it. Granted, I understand you're interested in finding out the how's and why's, but I haven't found any issue with charging the Nexus 7 on any charger I own, because I only buy ones that are rated for 2A or above draw. I won't get out the Fluke to test what it's pulling on each one, but it seems to charge very quickly on all of the above. 1%-100% in the time it takes me to not care, anyways.

Except that many chargers, even the ONE THAT COMES WITH THE DEVICE, aren't capable of delivering 5v 2A even if they may claim to do so. They may be capable of 4.8v 2A - but as the data I've taken shows, a charger that can only do 4.8v 2A will only charge the N7 at 1.4-1.5 amps. If the charger drops to 4.7v under load, it'll drop to only 1.2A or so.

More data (taken using CurrentWidget):
Idle load with screen at max brightness: 500 mA drain reported by CW
Current entering battery when screen at max brightness: 900-950 mA with stock Asus charger, giving approx. Since system drain under these conditions is 0.5A, that gives 1.4-1.45A into the device, consistent with a charger that is dropping to 4.8v under load.
Current entering battery with a Samsung Galaxy Tab charger: 1300 mA, giving a total of 1.8A into the device (almost the maximum the device will pull given a solid stiff rail)
Current entering battery with the power supply used in the tests above: 1330 mA, giving a total of 1.83A into the device (power supply itself reported 1.86 in this state).

The stock Asus charger that ships with the device underperforms by 400 mA when used with this device. Many "2.1A" chargers underperform even more (I'll run some tests with the Scosche reVIVE II later, but if memory serves me correctly, it's more appropriately rated 1A...)
 
  • Like
Reactions: Crystawth

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Even if the amperemeter drops 0.1-0.2 V under various loads, you can stick a voltmeter after the amperemeter (i.e. parallel to the device only) and you should have a pretty accurate reading of the voltage on the device alone since voltmeters are pretty high impedance. And to compensate for the loss, just increase the supply voltage a bit.

Yup. If I didn't have a bench supply with an adjustable current limit, I could've done this. Problem is even a few tenths of a volt difference makes a significant current difference - it's easier to adjust the current limit if you've got a supply that allows it.
 

bladebarrier

Senior Member
Jul 8, 2010
216
47
Except that many chargers, even the ONE THAT COMES WITH THE DEVICE, aren't capable of delivering 5v 2A even if they may claim to do so. They may be capable of 4.8v 2A - but as the data I've taken shows, a charger that can only do 4.8v 2A will only charge the N7 at 1.4-1.5 amps. If the charger drops to 4.7v under load, it'll drop to only 1.2A or so.

More data (taken using CurrentWidget):
Idle load with screen at max brightness: 500 mA drain reported by CW
Current entering battery when screen at max brightness: 900-950 mA with stock Asus charger, giving approx. Since system drain under these conditions is 0.5A, that gives 1.4-1.45A into the device, consistent with a charger that is dropping to 4.8v under load.
Current entering battery with a Samsung Galaxy Tab charger: 1300 mA, giving a total of 1.8A into the device (almost the maximum the device will pull given a solid stiff rail)
Current entering battery with the power supply used in the tests above: 1330 mA, giving a total of 1.83A into the device (power supply itself reported 1.86 in this state).

The stock Asus charger that ships with the device underperforms by 400 mA when used with this device. Many "2.1A" chargers underperform even more (I'll run some tests with the Scosche reVIVE II later, but if memory serves me correctly, it's more appropriately rated 1A...)

Interesting.

Are you getting the same readings when the device is turned off, to ensure there isn't a possible software issue? Is this purely on the stock ROM/kernel, or are you using a custom one?

With the Droid X, there were some concerns that it was unable to charge a fully discharged battery if not on a stock ROM, because Moto implemented measures in the "bloat" that allowed it to do so when it would normally not be capable in pure Android. I remember people having to cut wires to charge batteries externally, if they ran out of juice while trying to flash a ROM that was not Moto based. The whole concept seemed absurd to me, yet that was clearly the case. A dead Droid X could charge normally, if on the Moto software, but could not charge at all, if on AOSP if the battery was completely discharged prior to the attempt.

Just throwing out some ideas. I don't have your level of equipment to test it out at home, but I could take mine into the EE lab and see what one of the students can discern.

Is it possible that some of this is because of the pogo connection, and that may not be sorted out well enough, as such causing complications to the circuit?

EDIT: What is the accuracy of Current Widget? I tried it on my Nexus 7, and it was reporting some absurd numbers that didn't appear to be accurate. I would be charging at normal speed, and it would show me as discharging. The Nexus 7 would go back to 100%, and the whole time it would read as if I was losing power. I uninstalled it, figuring there is a compatibility issue with either JB or the device.
 
Last edited:

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
Interesting.

Are you getting the same readings when the device is turned off, to ensure there isn't a possible software issue? Is this purely on the stock ROM/kernel, or are you using a custom one?

With the Droid X, there were some concerns that it was unable to charge a fully discharged battery if not on a stock ROM, because Moto implemented measures in the "bloat" that allowed it to do so when it would normally not be capable in pure Android. I remember people having to cut wires to charge batteries externally, if they ran out of juice while trying to flash a ROM that was not Moto based. The whole concept seemed absurd to me, yet that was clearly the case. A dead Droid X could charge normally, if on the Moto software, but could not charge at all, if on AOSP if the battery was completely discharged prior to the attempt.

Just throwing out some ideas. I don't have your level of equipment to test it out at home, but I could take mine into the EE lab and see what one of the students can discern.

Is it possible that some of this is because of the pogo connection, and that may not be sorted out well enough, as such causing complications to the circuit?

EDIT: What is the accuracy of Current Widget? I tried it on my Nexus 7, and it was reporting some absurd numbers that didn't appear to be accurate. I would be charging at normal speed, and it would show me as discharging. The Nexus 7 would go back to 100%, and the whole time it would read as if I was losing power. I uninstalled it, figuring there is a compatibility issue with either JB or the device.
I can only confirm CW works properly on CM10. It is completely nonoperational in stock (as the code was disabled), and they did something in that area in 4.2 that I haven't taken a look at yet. I know the voltage value was off by a factor of 1000 in stock 4.1.

As to software issues - there are none other than whatever nonvolatile defaults are preprogrammed into the SMB347. If you look at the SMB347 driver for grouper you'll see that it does almost nothing in terms of configuring current limits and such, relying on the internal NV defaults. (Very different from Kindle Fire and Note 10.1, which perform quite a lot of configuration of the chip, not relying on internal NV defaults.) I've seen people report similar behavior on multiple kernels and firmwares.

Based on the Kindle Fire sources, there is at least one AICL setting that can be tweaked. However after looking at them further, I think that's the one that hits when the power supply droops to 4.5 volts. The question is whether the charger circuit is doing limiting before hitting that severe AICL threshold. When I get back from my holiday I'm going to try changing the threshold to 4.2 volts to see how things behave.
 
  • Like
Reactions: Crystawth

bladebarrier

Senior Member
Jul 8, 2010
216
47
I can only confirm CW works properly on CM10. It is completely nonoperational in stock (as the code was disabled), and they did something in that area in 4.2 that I haven't taken a look at yet. I know the voltage value was off by a factor of 1000 in stock 4.1.

As to software issues - there are none other than whatever nonvolatile defaults are preprogrammed into the SMB347. If you look at the SMB347 driver for grouper you'll see that it does almost nothing in terms of configuring current limits and such, relying on the internal NV defaults. (Very different from Kindle Fire and Note 10.1, which perform quite a lot of configuration of the chip, not relying on internal NV defaults.) I've seen people report similar behavior on multiple kernels and firmwares.

Based on the Kindle Fire sources, there is at least one AICL setting that can be tweaked. However after looking at them further, I think that's the one that hits when the power supply droops to 4.5 volts. The question is whether the charger circuit is doing limiting before hitting that severe AICL threshold. When I get back from my holiday I'm going to try changing the threshold to 4.2 volts to see how things behave.

You're way above my pay grade.... Yet I'll speculate further.

If it's hardware based, to drop the amperage draw, based on a voltage drop, and can be replicated in CM, then it could be an intentional protection circuit in the Lion battery itself. There are many Lion batteries that use protection circuitry these days, yet I don't know of anyone using aftermarket replacements for the Nexus 7, and so testing it could very well be basing the tests purely on the battery itself.

Maybe try running the tests directly to the battery, removed from the Nexus itself, and that will at least exclude the software and the hardware of the Nexus.

I could crack open the body and check the manufacturer, but if it's Panasonic or Sony, there's a reasonable chance that there are built in circuits on the Lion itself.

If you get identical readings, while running leads directly to the battery, the issue will be known immediately. If you don't, we can rule out one of the three options (battery, hardware, software). And you already ruled out most of the software.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
You're way above my pay grade.... Yet I'll speculate further.

If it's hardware based, to drop the amperage draw, based on a voltage drop, and can be replicated in CM, then it could be an intentional protection circuit in the Lion battery itself. There are many Lion batteries that use protection circuitry these days, yet I don't know of anyone using aftermarket replacements for the Nexus 7, and so testing it could very well be basing the tests purely on the battery itself.

Maybe try running the tests directly to the battery, removed from the Nexus itself, and that will at least exclude the software and the hardware of the Nexus.

I could crack open the body and check the manufacturer, but if it's Panasonic or Sony, there's a reasonable chance that there are built in circuits on the Lion itself.

If you get identical readings, while running leads directly to the battery, the issue will be known immediately. If you don't, we can rule out one of the three options (battery, hardware, software). And you already ruled out most of the software.
No way it's the battery itself. If you ran straight 5v into a LiIon/LiPo battery you'd blow it up (unless the protection circuitry kicked in). Running 5v straight into even a protected LiIon is an extremely bad idea.

It's something in how the SMB347 behaves - http://www.summitmicro.com/prod_select/summary/SMB347/SMB347.htm - Unfortunately there is no public datasheet, just a 1-2 page "product brief" with little detail, other than it does have some sort of automatic input current limiting. The SMB347 is the chip responsible for charging the battery safely, and basically anything related to charging the battery in the N7 is within that chip. Understand that chip and you understand everything about charging the N7.

The only technical detail we have about this chip resides in kernel source code for devices with the same chip - Samsung Note 10.1 and Kindle Fire both have a 347, and unlike the N7 which appears to use nonvolatile defaults burned into the chip, these devices touch the chip's registers. The KFire source has some info on how to change one of the AICL configurations.
 
Last edited:
  • Like
Reactions: Crystawth

bladebarrier

Senior Member
Jul 8, 2010
216
47
No way it's the battery itself. If you ran straight 5v into a LiIon/LiPo battery you'd blow it up (unless the protection circuitry kicked in). Running 5v straight into even a protected LiIon is an extremely bad idea.

Without a doubt!

I would never suggest someone use the method for normal charging. You would have to be capable of limiting the current, and be very careful, if testing in that manner.
 
Last edited:

FenrirMX

Senior Member
Apr 5, 2012
337
134
Troy, MI
I don't know how useful this comment will be, since there's no technical data, just empirical evidence, but I've used a friend's Nexus 7 charger several times on my Xperia S, that has fast charging enabled by default, and it charges noticeably faster than the charger that was packed with it (850 mA).
So, I'm inclined to think the culprit is the SMB347 chip.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
I don't know how useful this comment will be, since there's no technical data, just empirical evidence, but I've used a friend's Nexus 7 charger several times on my Xperia S, that has fast charging enabled by default, and it charges noticeably faster than the charger that was packed with it (850 mA).
So, I'm inclined to think the culprit is the SMB347 chip.

It's the SMB347 combined with the power supply. The PS is drooping a little bit (not significantly), and the SMB347 is being exceptionally finicky about the droop.

Supplies that don't droop (Samsung Tab chargers - FYI, the Note 10.1 also has an SMB347) are OK, that supply is likely OK with less finicky devices.

Next on my project list:
While the setup used here (22 gauge sold wire that is only a foot or so long) is ideal for eliminating voltage drop in the USB cable, I need to whip up a "universal charging adapter" between my bench supply and a female USB port that uses Samsung tablet resistances (which are also OK for most standard devices). That way I can see how my Note 10.1 behaves with a current limited supply.
A power supply tester - PWM out of an AVR microcontroller into an adjustable constant current load, ramp up the current draw and monitor the supply voltage with the uC to get an output I/V curve for various supplies.
 
  • Like
Reactions: Crystawth

Crystawth

Member
Sep 9, 2011
37
15
Moto X4
LG V40
current widget

My apologies for reviving such an old thread, but I have been searching for information about how the nexus 7 charges and why of acts so different with different chargers. Your posts have been very informative. I have found that my Verizon car charger will charge my nexus considerably faster than any other charger I have, including the one which came with the tablet.

I am curious to know how you were able to use current widget on this device. I am running cm10. Which kernel has support for current widget so that I may flash it? I am using battery widget for the time being and while of does give me a rough estimate, I would really like a real time reading.

Thank you for your time.
 

Crystawth

Member
Sep 9, 2011
37
15
Moto X4
LG V40
My apologies for reviving such an old thread, but I have been searching for information about how the nexus 7 charges and why of acts so different with different chargers. Your posts have been very informative. I have found that my Verizon car charger will charge my nexus considerably faster than any other charger I have, including the one which came with the tablet.

I am curious to know how you were able to use current widget on this device. I am running cm10. Which kernel has support for current widget so that I may flash it? I am using battery widget for the time being and while of does give me a rough estimate, I would really like a real time reading.

Thank you for your time.

I actually stumbled on an answer myself.

Franco Kernel r65 for 4.2.2 on CM 10.1 Provides battery current information =)
 
  • Like
Reactions: V字龍(Vdragon)

SpokaneNexus

Member
Jan 13, 2013
8
3
Here's what I've learned from a hardware perspective...

Posting this in a few places hoping it stimulates an answer to the problem....

We're working on a hardware + firmware + software product that uses an Android tablet, which right now is specifically the Nexus 7. We have found that the standard charge rate of the battery is insufficient to support tablet operation with a few sensors enabled and high screen brightness. Therefore, even if plugged in to a power source, the Nexus 7 discharges during normal use. The charging system cannot keep up with normal power requirements. That is a TERRIBLE hardware design decision.

Rather than guess at what is happening, or jump to conclusions based on various apps that claim to report current, we connected an actual ammeter (current meter) in line with the USB cable plugged in to a 2012-era Nexus 7 and ran a lot of experiments to characterize its behavior.

A few basic things to keep in mind:

* The current rating on a power supply/charger is the max current that device can provide. The device being charged controls how much current is actually drawn from the supply. A higher-current charger cannot, simply by virtue of its higher capacity, force more current into the device.

* USB hardware specs very clearly define the max current that a Portable Device (PD, in this case an N7) can draw from various power sources. Earlier posts in this thread properly referred to the names of the various types of ports including the one that we need, a Charging Downstream Port (CDP), which supports both data and higher charging current. A CDP uses certain voltage levels on its D+ and D- pins to signal the availability of greater current; a "dumb charger" can just short the two data pins together to signal the same thing, but obviously this won't work if you also want to pass data and not just charge the battery. (The "shorted data pins" trick is a documented way to let cheap chargers inform the PD of higher current capacity without having to add intelligence to the charger.)

* USB software specs also define how the PD can negotiate with the upstream port (in our case, a CDP), essentially letting the N7 specify how much current it wants to draw and letting the upstream port respond with approval or disapproval. In this case, the hardware does its thing, and then the software on both ends talks back and forth to agree on a (potentially higher) current rate.

I'll cut to the chase: The N7 never draws more than 440mA. Ever. With any charger, with any cable, with any combination we've tried. This includes the Asus-labeled 5V 2100mA OEM charger and the Asus-labeled OEM cable that came with the tablet. We really, really want it to, but we have not been able to figure out how to convince it to use more current (and thus stop draining the battery while plugged in). Yes, I've read the other comments in this thread that report higher currents and I don't know how to explain what they're seeing. But in a laboratory environment, with real test equipment run by Engineers, 440mA is the number.

On the hardware side, our product has a dedicated 5A 2000mA+ power supply for the N7 connection. This is really clean power - it's a little switching power supply with great filtering that powers nothing but the USB connector. An oscilloscope shows an absolute flat line, no ripple, no noise, nothing, even under load. We have tested its current output capacity and it goes well beyond 2000mA with no degradation of the voltage level nor quality. This power is as clean as its gets. The power is there if the N7 wants it.

On the software side, the N7 does in fact do the "USB software negotiation" for current and we tell the N7 that 2000mA is available. Nevertheless, the N7 always requests 500mA (we've captured and analyzed the USB data), and in reality never draws more than the 440mA mentioned above.

We cannot short D+ and D- since we need to communicate with the N7. But there are other tricks supported by the USB spec, including specific voltage levels on the data lines to indicate that the port to which the N7 is connected is a CDP. Briefly, a PD which takes advantage of a CDP first performs "primary detection" by looking at D- for 0.4-0.8VDC. If a voltage in that range is found, "secondary detection" causes the PD to apply voltage to the D+ pin looking for a pulldown resistance of (nominally) 19.5K.

So we added circuitry to provide this environment, thus indicating we are a CDP. Result: No change at all. The N7 draws 440mA with or without the CDP circuitry.

We kept at it for a long time, because we thought it strange that Asus would ship a 2100mA charger when a 500mA charger would suffice. We figured that was proof the N7 could charge at a higher rate. But after hours and hours of analysis, testing, experiments, etc. we were forced to conclude that the N7 simply never draws more than 440mA. Presumably its onboard charging circuitry cannot handle higher current rates. This is a real shame, because it means the Nexus 7 cannot be used in kiosk mode - it cannot run indefinitely when plugged into external power. It will always require some "down time" to recharge its battery. That's fatal to a lot of applications for this tablet, including ours.

We have not yet tested a 2013 N7, but we're hopeful it has a better charging circuit.
 
  • Like
Reactions: Charles IV

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,088
25,086
Owego, NY
We cannot short D+ and D- since we need to communicate with the N7. But there are other tricks supported by the USB spec, including specific voltage levels on the data lines to indicate that the port to which the N7 is connected is a CDP. Briefly, a PD which takes advantage of a CDP first performs "primary detection" by looking at D- for 0.4-0.8VDC. If a voltage in that range is found, "secondary detection" causes the PD to apply voltage to the D+ pin looking for a pulldown resistance of (nominally) 19.5K.
I never saw this particular post of yours until trying to find this old post of mine. :)

N7 does not support CDP (Charging Downstream Port) detection. Few Android devices do. (N7 2012 most definitely does not, and I'm fairly certain N7 2013 doesn't either). If it sees a downstream port, it assumes it's an SDP (Standard Downstream Port) with 500 mA current limit. This is a fundamental requirement of the USB standard - don't pull more than 500 mA from a host unless you support CDP detection and detect a CDP.

N7 does support DCP (Dedicated Charging Port) detection. N7 will ABSOLUTELY pull more than 500 mA from a DCP (this includes the wall supply) when D+ and D- are shorted.

If you want to communicate with the device and supply more than 500 mA, you need either a device that supports CDP detection (rare) or you need to violate the standard. This can be done with kernel modifications that override the current limit when an SDP is detected - this is usually a HORRIBLE idea but is acceptable in a specific case like yours. (Some kernel hackers refer to this as "USB Fast Charging").
 

Charles IV

Senior Member
Jan 15, 2016
570
180
Sorry for posting on an old thread, but it is still an issue, and i am determined to find a fix.
I bought a thick 20awg cable, and that seems to do the job, but i don't use my n7 enough to see if it really does.
You referenced the kernel a few times in reference to the chip that controls the charging.
I was wondering if it would be possible to modify kernel sources to change the way the chip behaves, although i dont have many hopes, because i imagine it would have already been done
i was thoroughly engaged in this issue, and even resolved to build my own dock, and bought the pogo pins, but have never used them!
Even if there isn't a way the change the chips behaviour, i was wondering if there was another workaround on the kernel/software side, as i am certainly up for the job, even though not very able as a developer, and always needing to be pointed in the right direction.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    For the time being this is going to be in Accessories, but eventually it might get moved to Development as I get even more data. It's borderline at the moment.

    It's been known for a while that the Nexus 7 is finicky about power supplies. In addition to the usual requirements for a power supply that complies with the USB Battery Charging Standard (D+ and D- shorted by the supply), which makes it VERY hard to find good supplies as most use Apple's nonstandard convention - The Nexus 7 seems to be VERY finicky about supplies which drop their voltage under load. Samsung tablet supplies will charge the N7 faster than the stock supply.

    The charger controller chipset in the N7 is a Summit SMB347, same as found in a number of Samsung tablets. No datasheet is available for this chipset, but we do know it has an Automatic Input Current Limiting (AICL) feature - If the power supply "browns out", it will reduce current demand until the supply voltage raises to above the trip threshold.

    Previously, I only had the ability to measure battery input current using CurrentWidget, but the top of my Christmas wishlist was an adjustable bench power supply. It has adjustable voltage AND an adjustable current limit - so I can limit the current delivered to the N7 and determine what voltage it settles at. If the voltage kept bouncing between two values, I recorded the voltage as the halfway point. E.g. if it bounced between 5.1 and 5.2, I recorded it as 5.15.

    A picture of my setup is at:
    https://plus.google.com/u/0/101093310520661581786/posts/gkbHaKKDnj6
    Components:
    Sinometer HY3005D from Mastech (Adjustable bench supply, 0-30v 0-5A)
    22 gauge solid wire (the best USB cables I've seen are only 24 gauge - lower gauge = thicker wire)
    Sparkfun MicroUSB breakout with D+ and D- shorted

    Here are the results (Bear with me as I try to figure out how to properly format a table here on XDA... The HTML tag doesn't work as expected...):
    HTML:
    <table border="1">
    <tr><td>Amperage Limit</td><td>Voltage</td></tr>
    <tr><td>1.85</td><td>5.15</td></tr>
    <tr><td>1.80</td><td>5.0</td></tr>
    <tr><td>1.70</td><td>4.9</td></tr>
    <tr><td>1.60</td><td>4.9</td></tr>
    <tr><td>1.50</td><td>4.8</td></tr>
    <tr><td>1.40</td><td>4.8</td></tr>
    <tr><td>1.30</td><td>4.7</td></tr>
    <tr><td>1.20</td><td>4.7</td></tr>
    <tr><td>1.10</td><td>4.6</td></tr>
    <tr><td>1.00</td><td>4.55</td></tr>
    </table>

    Below 1A, I think the tablet goes into a more severe AICL mode - it will drop to around 600-650 mA, the power supply will exit current limiting (back up to 5.1 volts), and current will not go up until the device is unplugged and replugged.

    One observation here - If the voltage drops 0.2 volts, you lose 400 mA of charge current. Many previous efforts here put an ammeter in series with the power supply - many ammeters drop 0.1-0.2 volts under load! The ammeter used by those previous effort was having SIGNIFICANT effect on the results.
    2
    Reserved - future analysis of how various chargers behave under load. Do they REALLY meet their ratings?

    May be posted in Hardware Hacking and linked from here instead.
    2
    Reserved for work on trying to change the SMB347 AICL behavior.
    1
    I think you may be trying to read too far into this.

    I charge my Nexus 7 off of a generic 2A/5V X4 output charger, and off the stock charger, and off the woman's kindle fire charger, and off a 2A car adapter. All of it works just fine.

    I think the real problem comes from people using chargers that aren't able to produce enough current (thus the voltage drop you're trying to measure for). But honestly, this tablet lasts incredibly long on a charge, and takes almost no time to get back to 100%. Aside from if you're using it in your car as a long term audio/gps/hspa unit, all at once, why even bother taking out your meter?

    TLDR: Buy a charger that is rated for 5V, 2A, and go back to having a good holiday instead of trying to measure it. Granted, I understand you're interested in finding out the how's and why's, but I haven't found any issue with charging the Nexus 7 on any charger I own, because I only buy ones that are rated for 2A or above draw. I won't get out the Fluke to test what it's pulling on each one, but it seems to charge very quickly on all of the above. 1%-100% in the time it takes me to not care, anyways.

    Except that many chargers, even the ONE THAT COMES WITH THE DEVICE, aren't capable of delivering 5v 2A even if they may claim to do so. They may be capable of 4.8v 2A - but as the data I've taken shows, a charger that can only do 4.8v 2A will only charge the N7 at 1.4-1.5 amps. If the charger drops to 4.7v under load, it'll drop to only 1.2A or so.

    More data (taken using CurrentWidget):
    Idle load with screen at max brightness: 500 mA drain reported by CW
    Current entering battery when screen at max brightness: 900-950 mA with stock Asus charger, giving approx. Since system drain under these conditions is 0.5A, that gives 1.4-1.45A into the device, consistent with a charger that is dropping to 4.8v under load.
    Current entering battery with a Samsung Galaxy Tab charger: 1300 mA, giving a total of 1.8A into the device (almost the maximum the device will pull given a solid stiff rail)
    Current entering battery with the power supply used in the tests above: 1330 mA, giving a total of 1.83A into the device (power supply itself reported 1.86 in this state).

    The stock Asus charger that ships with the device underperforms by 400 mA when used with this device. Many "2.1A" chargers underperform even more (I'll run some tests with the Scosche reVIVE II later, but if memory serves me correctly, it's more appropriately rated 1A...)
    1
    Interesting.

    Are you getting the same readings when the device is turned off, to ensure there isn't a possible software issue? Is this purely on the stock ROM/kernel, or are you using a custom one?

    With the Droid X, there were some concerns that it was unable to charge a fully discharged battery if not on a stock ROM, because Moto implemented measures in the "bloat" that allowed it to do so when it would normally not be capable in pure Android. I remember people having to cut wires to charge batteries externally, if they ran out of juice while trying to flash a ROM that was not Moto based. The whole concept seemed absurd to me, yet that was clearly the case. A dead Droid X could charge normally, if on the Moto software, but could not charge at all, if on AOSP if the battery was completely discharged prior to the attempt.

    Just throwing out some ideas. I don't have your level of equipment to test it out at home, but I could take mine into the EE lab and see what one of the students can discern.

    Is it possible that some of this is because of the pogo connection, and that may not be sorted out well enough, as such causing complications to the circuit?

    EDIT: What is the accuracy of Current Widget? I tried it on my Nexus 7, and it was reporting some absurd numbers that didn't appear to be accurate. I would be charging at normal speed, and it would show me as discharging. The Nexus 7 would go back to 100%, and the whole time it would read as if I was losing power. I uninstalled it, figuring there is a compatibility issue with either JB or the device.
    I can only confirm CW works properly on CM10. It is completely nonoperational in stock (as the code was disabled), and they did something in that area in 4.2 that I haven't taken a look at yet. I know the voltage value was off by a factor of 1000 in stock 4.1.

    As to software issues - there are none other than whatever nonvolatile defaults are preprogrammed into the SMB347. If you look at the SMB347 driver for grouper you'll see that it does almost nothing in terms of configuring current limits and such, relying on the internal NV defaults. (Very different from Kindle Fire and Note 10.1, which perform quite a lot of configuration of the chip, not relying on internal NV defaults.) I've seen people report similar behavior on multiple kernels and firmwares.

    Based on the Kindle Fire sources, there is at least one AICL setting that can be tweaked. However after looking at them further, I think that's the one that hits when the power supply droops to 4.5 volts. The question is whether the charger circuit is doing limiting before hitting that severe AICL threshold. When I get back from my holiday I'm going to try changing the threshold to 4.2 volts to see how things behave.