[Nook HD/HD+ CM10.1] Charger control development

Search This thread

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
TN
linuxhacker.ru
There were some requests into forcing the charger controller in the Nooks to allow higher rate charging from non-B&N chargers, I also was constantly annoyed by how my Nooks are always discharging when plugged into my computer with screen on because of only drawing about 500mA, where as the ports would happily provide 1A (development led by Apple).

The work here is experimental and if you decide to try anything, you bear the risk of stuff frying and catching on fire (granted, I did not burn anything here yet, but who knows, this is electricity we deal with here).

The "TRM" is here for anybody interested, sadly it does not match with what the hardware actually does in some important areas (also reflected in the driver comments). It looks like there is no real way to control the charging rate much, as soon as you write into draw rate register, it's two lowest bits are reset to 0 until D+/D- detection is performed, but then the detection resets draw rate back to appropriate defaults, huh? So this leaves us with two settints: 100mA or 1.2A

Plus there's something else going on, e.g. all of my iPhone chargers that I happen to have around only provide about 1.5 Watts of power and the controller refuses to draw more than 500mA from it anyway. All the Android stuff chargers I have on the other hand work out of the box and allow Nook to draw about 1.2A from them (even the native charger does not seem to draw more than this, about 7.5W according to my Kill-a-Watt display and also according to the battery current rate reported by the battery).

Anyway, I am providing two kernels, kernel for Nook HD+ and kernel for Nook HD
Flash the appropriate one for your device.

Then there's the control app: NookChargerControl.apk

Run the app, and it will present you with the main switch at the top (ignore the second switch, it's from the earlier experimentation and currently does not do anything).
If you flip the switch on, the charging is forced at 1.2A rate, no matter where you are connected (but see my earlier note about my iPhone chargers).
In addition to whatever physical measurements you are making, thee are two clues displayed about stuff:
The registers 00 and 08. When register 00 is 0x34 - that's indication of 1.2A, 0x32 = 0.5A, 0x30 = 0.1A, 0x37 should be 3A (When connected to power).
Also a battery-reported current is shown, this is your main clue about how much power does the battery really gets, negative values = discharging.

Tap anywhere on the screen to refresh the values, the battery rate reported sometimes takes several seconds to update, so do not panic if the values appear to be stuck for some time.

If you decide to try this, please report back in the thread with your findings.

In my testing, enabling the switch (while plugged into a computer) results in as much battery charging current as I am getting from B&N charger.
 
Last edited:

dbrickg

Senior Member
Feb 11, 2012
1,303
654
There were some requests into forcing the charger controller in the Nooks to allow higher rate charging from non-B&N chargers.... If you decide to try this, please report back in the thread with your findings.

Flashed new kernel and installed charger app. When I first turned on the charger app, I'm pretty sure it said "Reg00: 0x37". After turning on the "Force USB charger mode", Reg00 went to 0x34, and stays there whether I turn USB charger mode off or on. The "Battery current" started at 476000 and is now at 358000, but I'm pretty sure that's because it was already almost completely charged, and now it says it's at 100%, though the LED is still orange. All of these measurements are on the Nook charger. Haven't tried anything else yet.
 

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
TN
linuxhacker.ru
Flashed new kernel and installed charger app. When I first turned on the charger app, I'm pretty sure it said "Reg00: 0x37". After turning on the "Force USB charger mode", Reg00 went to 0x34, and stays there whether I turn USB charger mode off or on. The "Battery current" started at 476000 and is now at 358000, but I'm pretty sure that's because it was already almost completely charged, and now it says it's at 100%, though the LED is still orange. All of these measurements are on the Nook charger. Haven't tried anything else yet.

Thanks.
Using nook charger with this app is pointless, as it's already working (as are a bunch of other chargers from android devices).
So I guess it's being targeted at people who want to draw more power from their host computer or with incompatible chargers.
 

paaco

Member
Nov 20, 2008
40
7
Tried with a 1amp Samsung charger. It Is showing 1092000 on an HD+
Force power 2
Reg 00 0x34
Reg 08 0xac
 

dbrickg

Senior Member
Feb 11, 2012
1,303
654
Thanks.
Using nook charger with this app is pointless, as it's already working (as are a bunch of other chargers from android devices).
So I guess it's being targeted at people who want to draw more power from their host computer or with incompatible chargers.

Now if you could just write a kernel to make the nook compatible with normal USB cables... heh.
 
Last edited:

dbrickg

Senior Member
Feb 11, 2012
1,303
654
Flashed new kernel and installed charger app. When I first turned on the charger app, I'm pretty sure it said "Reg00: 0x37". After turning on the "Force USB charger mode", Reg00 went to 0x34, and stays there whether I turn USB charger mode off or on. The "Battery current" started at 476000....

I wasn't sure if the Reg00 was originally 0x37 or not, so I reinstalled everything, and yes, it was. And for a better benchmark, when I first started charging it, with the battery at about 70%, using the nook charger, the "Battery current" was around 1670000.
 

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
TN
linuxhacker.ru
Tried with this charger and neither port seems to work. Shows right around 0 for the charge amount on both ports so no charge or discharge. http://www.amazon.com/gp/product/B0088U4YAG/ref=oh_details_o00_s00_i00?ie=UTF8&psc=1
On my nexus 4 and 7 it shows USB charging from apple port and ac from the other.

Also shows this for both ports
Reg00 0x32
Reg08 0x4c

Hope this info is useful.
0x32 is 500mAh, so it tries to draw this much, but if charge current in the battery is 0, that means there's not enough power left after what's used by tablet itself with screen on.
I have this problem with my iPhone chargers, not sure how the charger controller differentiates.

Big win for me is with a computer port, where with the app and a new kernel I can draw much more current and keep battery charging even with the screen on
 

paaco

Member
Nov 20, 2008
40
7
0x32 is 500mAh, so it tries to draw this much, but if charge current in the battery is 0, that means there's not enough power left after what's used by tablet itself with screen on.
I have this problem with my iPhone chargers, not sure how the charger controller differentiates.

Big win for me is with a computer port, where with the app and a new kernel I can draw much more current and keep battery charging even with the screen on

Ahh, I got you. It is nice having it charge from computer. Didn't know if your ultimate goal was to get it to work with as many chargers as possible so was trying to give you more info.

Either way, thanks for all the work you are doing and sharing to make our Nooks more enjoyable.
 
  • Like
Reactions: duytienle

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
TN
linuxhacker.ru
Ahh, I got you. It is nice having it charge from computer. Didn't know if your ultimate goal was to get it to work with as many chargers as possible so was trying to give you more info.
Yes, that was the original goal, but sadly doc does not match with the controller behavior, so current state is the best I could achieve at the moment.
 

Classpro

Senior Member
Jul 25, 2009
180
11
Verygreen: I'm having a really hard time understanding what's happening with Nook charging.

When I plug into the original nook charger (and SOME other charges), the little light is YELLOW and the lightening bolt shows up in Android to indicate it's charging. However, it clearly charges slower in my portable charger (Monster cable charger) than with the nook charger.

It I plug it into apple compatible chargers (including my battery) the little light is GREEN rather than yellow. This is true even if I plug the nook cable into one of these a shorted cable (which will cause my Nexus 7 to go into high power charging mode).

http://www.ebay.com/itm/POWER-ONLY-...67?pt=Camera_Cables_Cords&hash=item58944a169b

Your system has two switches. "Force USB Charger Mode" and "Force 1A when charging". Your notes say ignore the Force 1A (second button)? I can't tell if the force usb charger mode does anything when the light is green. I get various numbers for battery current (seem to be all over the map)

In the monster charger, I get similar numbers whether Force USB is on or off, 100,000 - 200,000 current. I can't tell if it's better or not with Force USB on or off.

In the nook charger, I get around 700,000 current.

So it doesn't appear to be going into high power mode with Force USB in the Monster charger (which supports 1.5 amps).

In a windows usb port I get the green light and low charging current whether I enable or disable FORCE USB.

So, I'm confused.
 
Last edited:

Stevethegreat

Senior Member
Nov 28, 2010
1,199
327
I don't know if it's connected but it is certainly a battery issue which only presents itself on CM10.1 ... I mean I had it before in both stock and other roms but not nearly to that extend. Basically the rom seems to lose battery very fast and when it reaches 0% it simply switches off. If I boot at stock I can see I have around 40% left.

In other words battery is seriously misrepresented on CM and CM alone, other roms have nowhere near this kind of problem and every time I switch to them most of my battery issues solve themselves. It practically halves the battery life of the device for no good reason (ill-reporting). So VG, I guess it's better if you can take a look at it, it's something that I have seen reported by other people too, but it's quite of a hardle.

Your rom (CM) is basically the most complete but I always have to go elsewhere in search of/for battery life. It's the last big thing that needs to be solved and I think we're set. And -no- callibration never helps, it's not 100% that is misrepresented but 0%...

Thanks for your attention.
 

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
TN
linuxhacker.ru
I don't know if it's connected but it is certainly a battery issue which only presents itself on CM10.1 ... I mean I had it before in both stock and other roms but not nearly to that extend. Basically the rom seems to lose battery very fast and when it reaches 0% it simply switches off. If I boot at stock I can see I have around 40% left.

In other words battery is seriously misrepresented on CM and CM alone, other roms have nowhere near this kind of problem and every time I switch to them most of my battery issues solve themselves. It practically halves the battery life of the device for no good reason (ill-reporting). So VG, I guess it's better if you can take a look at it, it's something that I have seen reported by other people too, but it's quite of a hardle.
I am not sure what do you mean by "other ROMs", there are only two roms out there, this and B&N stock. Everything else is based on one of the two kernels and userspaces (or sometimes combinations of thereof).

Also, is there a point in time you can think of when this problem started if it did not happen from the get go? Did 6/24 and prior exhibit premature empty battery detection?

I do not drain battery on my nooks as it takes too long and means I cannot do anything to them in the meanwhile.
 

Stevethegreat

Senior Member
Nov 28, 2010
1,199
327
I am not sure what do you mean by "other ROMs", there are only two roms out there, this and B&N stock. Everything else is based on one of the two kernels and userspaces (or sometimes combinations of thereof).

Also, is there a point in time you can think of when this problem started if it did not happen from the get go? Did 6/24 and prior exhibit premature empty battery detection?

I do not drain battery on my nooks as it takes too long and means I cannot do anything to them in the meanwhile.

By other ROMs I mean SGT7, Carbon and stock. Using any of the three I have misrepresentation of battery life for anything below 15%, on CM I have misrepresentation all the time. It always existed as a problem but not in this level, it only became worse with the latest builds. Maybe it's hardware issue but why is it made whose by CM, basically that's what I'm asking...

I know without logs I'm not much help but for the time being I have reverted to carbon and all is well. In a few days I will retry CM and have my logs sent then. What I can safely say by looking at other people's battery graphs is that it happens to others too' maybe not as dramatically (for someone it went from 50% to 30% in one instant), but it is there...

I'm on HD+ BTW
 

LucaToo

Senior Member
Feb 15, 2013
78
2
UK Car Charger

Being unable to source a B&N car Charger in the UK - I am assuming that this mod allows me to charge from any 1 or 2 amp car charger..?

Also does it only work with CM10.0 as I am currently running CarbonROM - mainly for the improved PIE controls on Expaned screen mode..?
 

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
TN
linuxhacker.ru
Being unable to source a B&N car Charger in the UK - I am assuming that this mod allows me to charge from any 1 or 2 amp car charger..?
I cannot promise "any".
I found that apple (and apple-devices targeting) charges generally don't work.
On the other hand chargers that target android devices seem to be working all by themselves without any tweak. My sample size is not too big, though.

Also does it only work with CM10.0 as I am currently running CarbonROM - mainly for the improved PIE controls on Expaned screen mode..?
depend on if the kernel support for it was added.
 

LucaToo

Senior Member
Feb 15, 2013
78
2
UK Car Charger

I cannot promise "any".
I found that apple (and apple-devices targeting) charges generally don't work.
On the other hand chargers that target android devices seem to be working all by themselves without any tweak.

Sorry to be a pain but do you have any specific make/model car chargers that you could recommend (as most seem to be labelled as 'universal' regardless of whether they are intended for iPhone or Android)..?

Would an HTC or Samsung branded charger work for example..?
 

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
TN
linuxhacker.ru
Sorry to be a pain but do you have any specific make/model car chargers that you could recommend (as most seem to be labelled as 'universal' regardless of whether they are intended for iPhone or Android)..?

Would an HTC or Samsung branded charger work for example..?
I don't have any experience with car chargers.
There's a high chance Samsung charger will work, I think.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 17
    There were some requests into forcing the charger controller in the Nooks to allow higher rate charging from non-B&N chargers, I also was constantly annoyed by how my Nooks are always discharging when plugged into my computer with screen on because of only drawing about 500mA, where as the ports would happily provide 1A (development led by Apple).

    The work here is experimental and if you decide to try anything, you bear the risk of stuff frying and catching on fire (granted, I did not burn anything here yet, but who knows, this is electricity we deal with here).

    The "TRM" is here for anybody interested, sadly it does not match with what the hardware actually does in some important areas (also reflected in the driver comments). It looks like there is no real way to control the charging rate much, as soon as you write into draw rate register, it's two lowest bits are reset to 0 until D+/D- detection is performed, but then the detection resets draw rate back to appropriate defaults, huh? So this leaves us with two settints: 100mA or 1.2A

    Plus there's something else going on, e.g. all of my iPhone chargers that I happen to have around only provide about 1.5 Watts of power and the controller refuses to draw more than 500mA from it anyway. All the Android stuff chargers I have on the other hand work out of the box and allow Nook to draw about 1.2A from them (even the native charger does not seem to draw more than this, about 7.5W according to my Kill-a-Watt display and also according to the battery current rate reported by the battery).

    Anyway, I am providing two kernels, kernel for Nook HD+ and kernel for Nook HD
    Flash the appropriate one for your device.

    Then there's the control app: NookChargerControl.apk

    Run the app, and it will present you with the main switch at the top (ignore the second switch, it's from the earlier experimentation and currently does not do anything).
    If you flip the switch on, the charging is forced at 1.2A rate, no matter where you are connected (but see my earlier note about my iPhone chargers).
    In addition to whatever physical measurements you are making, thee are two clues displayed about stuff:
    The registers 00 and 08. When register 00 is 0x34 - that's indication of 1.2A, 0x32 = 0.5A, 0x30 = 0.1A, 0x37 should be 3A (When connected to power).
    Also a battery-reported current is shown, this is your main clue about how much power does the battery really gets, negative values = discharging.

    Tap anywhere on the screen to refresh the values, the battery rate reported sometimes takes several seconds to update, so do not panic if the values appear to be stuck for some time.

    If you decide to try this, please report back in the thread with your findings.

    In my testing, enabling the switch (while plugged into a computer) results in as much battery charging current as I am getting from B&N charger.
    1
    0x32 is 500mAh, so it tries to draw this much, but if charge current in the battery is 0, that means there's not enough power left after what's used by tablet itself with screen on.
    I have this problem with my iPhone chargers, not sure how the charger controller differentiates.

    Big win for me is with a computer port, where with the app and a new kernel I can draw much more current and keep battery charging even with the screen on

    Ahh, I got you. It is nice having it charge from computer. Didn't know if your ultimate goal was to get it to work with as many chargers as possible so was trying to give you more info.

    Either way, thanks for all the work you are doing and sharing to make our Nooks more enjoyable.
    1
    Very useful to charge it with higher rate when connected to PC.
    However - can this kernel change you mentioned be part of "standard" kernel? With this it is just the app you need and no problem with automatic nightly updates ...
    It is part of standard kernel now, so if you use CM nightlies or any of my recent binary drops, it's already in and you just need to install the app.

    To speak frankly, I didn't test it until now, but would it be good to provide the app with a few buttons with different charge rates (500mA, 1 A, 1.25 .. 1.5) so that user has the choice to select that best matching rate for the charger? (I hope I didn't misunderstand the feature of setting the rate by register values).
    Sadly there's no real choice available here from the controller
    If we do manual control, we can do 100mA or ~1.2A only (and even then some chargers like those targeting iDevices are somehow rejected from any high rate charging access in hardware).
    Then if there's autodetecting, then it's again 500mA or ~1.5A (also iDevices targeting charges are discriminated against and they certainly are not utilized even for 500mA for some reason).
    1
    Is there any chance you could update the app to include the above information on the screen? I can never remember what the register values equate to amperages.

    Also, could you identify some kind of unit for the battery-reported current? Is that miliamperes/hour or what?
    I guess it could be trivially added, though in reality there's this battery-reported current that is the important part and is accurate.
    What good is a 1.5A value in the charger register if you can only draw 300mA anyway? ;)

    Which is not to say I am not going to add it if I remember about it next time I look at these apps.