Battery charge while powered "off"


They turn on, running a micro kernel to control the charge. When you hit the power switch the micro kernel just continues the boot process. As said, if someone wants to write the micro kernel and make it work they are more than welcome to.

The problem Notaz points out is that there's no way to detect a soft reset: Nintendo handhelds aren't full blown computers, you can't SSH into them and issue a reboot command. If the Pandora were rebooted and the charger is plugged in it would have no way of knowing that it was rebooted so it would just go into microkernel and start charging. It's just a real pain to make work without breaking things so would need to be a labour of love for whoever gets around to doing it.
 
OK. Making a work around for the Pandora is obviously a lot of work (but I did actually say Pyra). Could the Pyra have this ability built in from the off or would it still be the same problem?
 
Wouldn't it be possible to detect a softreboot by writing some file to nand on reboot and checking for it's existance on next boot?


If it exists continue to boot and delete it.
 
Last edited by a moderator:
There is barely any difference between lid-closed-idle and suspend-to-ram,
With the lid closed, my Pandora loses about 2% per hour. In suspend to RAM it only loses about 1/2 a percent per hour. At least in my tests, that's a difference of a few days vs a full week before it needs to charge.
Your tests are inaccurate. I measured about 65-70 mW in suspend to RAM, versus about 90-95 mW when just idle. That was on my ReBirth unit, measured by reading the battery energy just before and just after the suspend or lid-close-idle, with many hours of suspension/idling between the two measure points. On the 1GHz model it is probably about the same.

So with those numbers, suspend to RAM should give you 9-10 days, while lid-closed-idle gives about 7 days. That difference is not significant enough for me to make the effort of flicking the switch and having a somewhat slower resume.

If you're losing 2% per hour with the lid closed, there's probably still something eating cpu (or maybe wifi and/or usb are enabled or something like that). It should be more like 0.6% per hour, versus maybe 0.45% per hour in suspension.

Suspend to RAM is useful only to make sure that nothing is still eating cpu, e.g. if you're playing a game that does not have a pause button (or that still uses cpu when paused). Although some programs might not react well to it.
 
Last edited by a moderator:
If you're losing 2% per hour with the lid closed, there's probably still something eating cpu
I'll have to find that then, thanks. Yeah, if it's really that good while idle and the Pyra can be just as efficient then there's really no point to anything further. There's argument about a proper sleep mode so that everything including RAM can be shut down and get weeks if not months of down time, but if it's really going to be unused for more than a few days wouldn't it make sense to just turn it off completely?
 
I'm completely ignorant about such things so be gentle! How do Nintendo handhelds (GBA, DS, 3DS etc.) cope with charging while turned off and booting while plugged in? Could the Pyra not do something similar?

They turn on, running a micro kernel to control the charge. When you hit the power switch the micro kernel just continues the boot process. As said, if someone wants to write the micro kernel and make it work they are more than welcome to.


The problem Notaz points out is that there's no way to detect a soft reset: Nintendo handhelds aren't full blown computers, you can't SSH into them and issue a reboot command. If the Pandora were rebooted and the charger is plugged in it would have no way of knowing that it was rebooted so it would just go into microkernel and start charging. It's just a real pain to make work without breaking things so would need to be a labour of love for whoever gets around to doing it.
Why can't the Pyra be charged while completely off like any modern laptop, or any other full blown semi-portable computer? What is done differently in their case? I understand how Smartphones and Nintendo do it for their handhelds, but it seems weird to have to leave the Pyra in some sleep or suspend mode for such a basic thing as charging when a laptop doesn't require it. 
 
A laptop has dedicated charging hardware that monitors the process instead of the cpu.


It might also be a size problem as notebooks are quite big. They also don't consume 0 energy while charging and mayve the microkernel in smartphones doesn't even consume more power than the chargingcircuit in a notebook/notebookbattery.
 
If you're losing 2% per hour with the lid closed, there's probably still something eating cpu
I'll have to find that then, thanks. Yeah, if it's really that good while idle and the Pyra can be just as efficient then there's really no point to anything further. There's argument about a proper sleep mode so that everything including RAM can be shut down and get weeks if not months of down time, but if it's really going to be unused for more than a few days wouldn't it make sense to just turn it off completely?
Suspend to disk does not look like an attractive option. Even if you can read/write at 100MB/s, it takes 20 seconds to store/restore the RAM to/from disk. If the OS is kept as light-weight as on the Pandora, and more up to date (so it can parallelize booting better), I expect booting to be faster than that. And 40 seconds of full-speed SD card activity probably eats quite a bit of power (compared to just idling), so even if you don't mind the wait and you really want to keep the state, it may still not be worth it. And of course you would need to keep 2GB of SD card space unused, and every suspend-to-disk cycle wears your card a little.

I don't really understand why people want to charge with the device "off". I don't understand why you would ever want to turn the device off at all. Unless of course you're not planning to use it for a long, long time (weeks), but then why would you charge it? It's not very good for a battery to be completely full while not being used for weeks.
 
I don't really understand why people want to charge with the device "off". I don't understand why you would ever want to turn the device off at all. Unless of course you're not planning to use it for a long, long time (weeks), but then why would you charge it? It's not very good for a battery to be completely full while not being used for weeks.
I guess to save a little more battery life outside of the normal cell discharge rate. I'm not sure of the reason why laptops can be completely powered off by the user if it wasn't because of that advantage.
 
I've never seen one being fully powered off unless AC *and* battery were removed.
 
I don't see why a microkernel or any software is needed to charge a battery. Thousands of cheap chinese chargers do it with a few electronic components.
 
Thousands of cheap chinese chargers do it with a few electronic components.
Did these cheap chargers like to explode batteries? If it was so easy and simple every phone out there would use that method. most likely the few electronic components you speak of would take up a ton of PCB real-estate.
 
Last edited by a moderator:
Thousands of cheap chinese chargers do it with a few electronic components.
One of three things1) Not lithium batteries. Lithium batteries tend to explode when charged incorrectly which includes "trickle charge", while NiCad and NiMH have no such problems.

2) Not active use devices: it's actually really easy to charge a lithium battery with a few components, the problem is when that battery is simultaneously plugged into something. This includes even a single LED to indicate charge status.

3) They just don't care. Even the Pandora can happily charge a battery without any sort of software control for a few weeks, maybe even a few months. That's what it was doing when it first shipped. There was more than one example of a ballooned battery before we figured out there was a problem.

Although I'm not sure what you mean by "charger" in this case. Do you have an example?
 
Thousands of cheap chinese chargers do it with a few electronic components.
One of three things
1) Not lithium batteries. Lithium batteries tend to explode when charged incorrectly which includes "trickle charge", while NiCad and NiMH have no such problems.


2) Not active use devices: it's actually really easy to charge a lithium battery with a few components, the problem is when that battery is simultaneously plugged into something. This includes even a single LED to indicate charge status.


3) They just don't care. Even the Pandora can happily charge a battery without any sort of software control for a few weeks, maybe even a few months. That's what it was doing when it first shipped. There was more than one example of a ballooned battery before we figured out there was a problem.


Although I'm not sure what you mean by "charger" in this case. Do you have an example?
EDIT

Thanks for the reply

I don't know how to better specify a battery charger than "charger". Here is one for Lithium batteries. http://lygte-info.dk/review/Review%20Charger%20Xtar%20WP2%20II%20UK.html

Maybe it really is an issue of fitting the electronics on a tiny board... Standalone battery chargers indeed do not need to cope with simultaneous power draw and charging.
 
Last edited by a moderator:
Oh yeah, stand alone chargers are different kettles of fish. There's nothing running off the battery while it's charging so it's actually pretty easy to just measure voltage until it's almost full and measure battery resistance as it is topped up.

The TWL in the Pandora can do this too but even when the Pandora (and most other such devices) is off there's still something using power (I know the clock for sure, probably some other stuff that we're not aware of) so the charge is never exactly right.

Super secret: I actually wrote a script to reconfigure the TWL so that it would charge while off, but with no indicator of when it was full or if it was still charging, and the fact that a difference of just a few ohms resistance from rusty contacts can apparently mean the difference between proper calibration and exploded battery, I just didn't trust it. Also if my estimates of what the powered down usage was were off by just a few mA it could similarly lead to danger. The CPU is needed to make extra double damn sure it's doing what it's supposed to be doing. Also it required disabling the "poweron when plugged in" trigger, meaning that if the switch broke it could leave your Pandora in a completely unusable state.

I've actually been thinking about this now: with two batteries you could charge them one at a time in a completely off state and just swap duties back and forth until they're both full. I'm pretty sure there's a reason this isn't done though, if it were as easy as I'm imagining then it would have been done a long time ago. Smarter people than us have been at this problem for years.
 
id wish it'd go into sleep mode automatically I've list battery charge by leaving it and grabbing it.. finding out it never went into sleep mode


Sent from my Z665C using Tapatalk
 
Back
Top