Homebrew homebrew app to stop charging battery before full

foob

Well-Known Member
OP
Member
Joined
Dec 26, 2007
Messages
553
Trophies
0
XP
473
Country
I am looking for a 3DS homebrew app much like Battery Charge Limit on Android
https://forum.xda-developers.com/android/apps-games/root-battery-charge-limit-t3557002

The idea is to greatly increase the working life of the battery by limiting the charge put into the battery to 70% or whatever (Ideally I don't want the cell to charge beyond 3.9V). Because there are only a few 3DS models I wonder if making an app like this might be easier to make on the 3DS than on Android (Battery Charge Limit only works for one Android device I own)

Does an app like this exist for the 3DS?
 

Ryccardo

Penguin accelerator
Member
Joined
Feb 13, 2015
Messages
7,696
Trophies
1
Age
28
Location
Imola
XP
6,917
Country
Italy
I'm not even sure it could be made in theory, for a couple of reasons:

1- regular apps do not run in the background, and even hackjobs would require annoying manual launching every time (adding code directly to a CFW would solve the problem)

2- charging is likely not CPU controllable at all - it may be the MCU which is at least in theory reprogrammable (ask @Sono ;) ), it may be that "power manager" chip alone, hell there's a small chance it may be a simple passive constant-current-until-voltage-limit job!
 
  • Like
Reactions: Sono

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,825
Trophies
2
Location
home
XP
9,344
Country
Hungary
I'm not even sure it could be made in theory, for a couple of reasons:

1- regular apps do not run in the background, and even hackjobs would require annoying manual launching every time (adding code directly to a CFW would solve the problem)

That. You'd have to somehow bake it into the system using a recompiled Luma3DS.

2- charging is likely not CPU controllable at all - it may be the MCU which is at least in theory reprogrammable (ask @Sono ;) ), it may be that "power manager" chip alone, hell there's a small chance it may be a simple passive constant-current-until-voltage-limit job!

I have seen some charging-related code in the MCU, including a timing attack which could allow for a potential overcharge of the cell if I have read it correctly. I'm not sure however if it's actually *controlling* the charging, or if it's only handling a charge finish interrupt sent to the SoC.

Either way, I'd rather not muck with the charge controller code, it's horribly bodged, and the values are hardcoded in multiple instructions. If I were to miss one I could permanently damage the cell, or could make the 3DS not charge if the MCU has too much control over the PMIC.

The best solution would be to make a program which runs on ARM11 and will flash the LEDs to indicate that it's time to take the 3DS off the charger.



Or if battery life is a concern then a custom current-limited charger would be better. I'm not sure how much Nintendo's own charger allows into the battery, but considering that it only heats up while the system is under a heavy load AND charging it shouldn't be too big of a concern.
 

foob

Well-Known Member
OP
Member
Joined
Dec 26, 2007
Messages
553
Trophies
0
XP
473
Country
Thanks for the replies.
I use an ebay USB cable to charge the 3DS. (One of life's mysteries is how/why Nintendo never offered one for the DS range all these years. But I digress.)

Currently I use one of those small USB LCD voltage/current testers to disconnect charging when the charge rate drops from 0.7ish Amps to somewhere around half that.


I was hoping for a more automated cut-off but not to worry.
 

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,825
Trophies
2
Location
home
XP
9,344
Country
Hungary
I use an ebay USB cable to charge the 3DS

<rant>
Now I understand why you want something to compensate your your battery life via software. That USB to 3DS cable is the best way to destroy your battery as quickly as possible, very close to just shorting the terminals out and hoping it doesn't bulge up. I'll be surprised if it'll last a few months with that.
</rant>

On a serious note, putting 5V (or even over 5.3V on some old and/or unregulated power supplies/motherboards) is a good way to damage the cell, because it's not rated for such high voltage.

Sure, yes, the 3DS charger says the secondary output is 4.6V at around 240V, let's assume in the UK at night it'll output at worst 4.8V, but that's still kinda below the worst case 5.3 volts. Sure, it's only a minor difference, but not all batteries are tolerant, some can take the beating with minor damage, but some fail very vigoriously.

Your best bet would be to find a regulated 4.5V power supply and charge your 3DS with that. The slower you charge up the better. But please note if you go this way to always power your 3DS off if you decide to slow charge it!


Note: I'm no electronics expert, but I'm pretty sure with some extra research what I said is somewhat accurate and could be confirmed via maths and papers.
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,324
Trophies
4
Location
Space
XP
13,903
Country
Norway
<rant>
Now I understand why you want something to compensate your your battery life via software. That USB to 3DS cable is the best way to destroy your battery as quickly as possible, very close to just shorting the terminals out and hoping it doesn't bulge up. I'll be surprised if it'll last a few months with that.
</rant>

On a serious note, putting 5V (or even over 5.3V on some old and/or unregulated power supplies/motherboards) is a good way to damage the cell, because it's not rated for such high voltage.

Sure, yes, the 3DS charger says the secondary output is 4.6V at around 240V, let's assume in the UK at night it'll output at worst 4.8V, but that's still kinda below the worst case 5.3 volts. Sure, it's only a minor difference, but not all batteries are tolerant, some can take the beating with minor damage, but some fail very vigoriously.

Your best bet would be to find a regulated 4.5V power supply and charge your 3DS with that. The slower you charge up the better. But please note if you go this way to always power your 3DS off if you decide to slow charge it!


Note: I'm no electronics expert, but I'm pretty sure with some extra research what I said is somewhat accurate and could be confirmed via maths and papers.
There is charging circuitry in the 3DS that does voltage conversion, so that shouldn't really be an issue.
 

foob

Well-Known Member
OP
Member
Joined
Dec 26, 2007
Messages
553
Trophies
0
XP
473
Country
There is charging circuitry in the 3DS that does voltage conversion, so that shouldn't really be an issue.
That was my understanding too. In any case, been using USB cables for years on both DS Lites and New 3DS with no apparent ill effect.

But I try to avoid a full charge whenever I can, and it has nothing to do with charging via USB...except that USB testers make it easy to know when the end part of the charge is approaching so I can disconnect manually.
 
Last edited by foob,

Ryccardo

Penguin accelerator
Member
Joined
Feb 13, 2015
Messages
7,696
Trophies
1
Age
28
Location
Imola
XP
6,917
Country
Italy
That was my understanding too. In any case, been using USB cables for years on both DS Lites and New 3DS with no apparent ill effect.
I believe the "4,6 V" marking is just to discourage 3rd party products, but it's still nominally designed for 5 V (just like you can see standard 1 cell lipo batteries, all performing the same chemical reaction, called [in mostly good faith, too] 3,6, 3,7, or 4,2 V)

Note that the WAP-002, as its model number says, was invented not for the DSi but for the WAP-001 (an access point outsourced to Buffalo)
 
  • Like
Reactions: foob

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
1,362
Trophies
1
XP
3,295
Country
The max input voltage depends on the PMIC's capabilities and what the charging circuit can handle. It's probably rated for up to 5V going by the odd charger voltage. Note though that USB can go up to 5.25V or even more if your USB charger/port on your PC doesn't follow USB spec properly. I would not touch dodgy USB charging cables with a ten foot pole unless they have a step down converter which basically none has.

@Sono
The 3DS charger is a stabilized switching power supply and will deliver the same output on a wide range of input voltages unlike classic transformers.
 

yuyuyup

Well-Known Member
Member
Joined
Apr 30, 2006
Messages
3,810
Trophies
2
Location
USA MTN timezone
Website
Visit site
XP
3,291
Country
United States
<rant>
Now I understand why you want something to compensate your your battery life via software. That USB to 3DS cable is the best way to destroy your battery as quickly as possible, very close to just shorting the terminals out and hoping it doesn't bulge up. I'll be surprised if it'll last a few months with that.
</rant>

On a serious note, putting 5V (or even over 5.3V on some old and/or unregulated power supplies/motherboards) is a good way to damage the cell, because it's not rated for such high voltage.

Sure, yes, the 3DS charger says the secondary output is 4.6V at around 240V, let's assume in the UK at night it'll output at worst 4.8V, but that's still kinda below the worst case 5.3 volts. Sure, it's only a minor difference, but not all batteries are tolerant, some can take the beating with minor damage, but some fail very vigoriously.

Your best bet would be to find a regulated 4.5V power supply and charge your 3DS with that. The slower you charge up the better. But please note if you go this way to always power your 3DS off if you decide to slow charge it!


Note: I'm no electronics expert, but I'm pretty sure with some extra research what I said is somewhat accurate and could be confirmed via maths and papers.
I had a weird USB charging issue years back, USB charging created strange touchscreen side effects (the touch was all over the place, deadzones, etc.) And when I drained that battery and charged normally, the problem went away.
 

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,825
Trophies
2
Location
home
XP
9,344
Country
Hungary
The max input voltage depends on the PMIC's capabilities and what the charging circuit can handle. It's probably rated for up to 5V going by the odd charger voltage. Note though that USB can go up to 5.25V or even more if your USB charger/port on your PC doesn't follow USB spec properly. I would not touch dodgy USB charging cables with a ten foot pole unless they have a step down converter which basically none has.

By the wording of that it sounds like you're not actually using USB voltage to charge the 3DS. What are you hooking up that USB cable to then?

Oh also, the Vref going to the MCU is 5V (approximated from many hardware readings), so I'm pretty sure the PMIC is rated for at most 5V with the tolerance playing for those who experiment with those dodgy USB to 3DS "adapter" cables.

I had a weird USB charging issue years back, USB charging created strange touchscreen side effects (the touch was all over the place, deadzones, etc.) And when I drained that battery and charged normally, the problem went away.

That's probably due to overcharging/overvolting the touch film. When the charger outputs a higher voltage than the battery then the voltage of the entire system increases. You have to measure resistance on two axes alternated very fast to get a two-dimensional reading of where the touch has happened, and probably the increased voltage causes some electrons to jump over the film, and it's probably detected by the CODEC chip.

I'm not sure about the electron part tho', but I'm pretty sure that touch film is not rated for overvoltage.
 
  • Like
Reactions: yuyuyup

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,324
Trophies
4
Location
Space
XP
13,903
Country
Norway
I had a weird USB charging issue years back, USB charging created strange touchscreen side effects (the touch was all over the place, deadzones, etc.) And when I drained that battery and charged normally, the problem went away.
That's an odd issue, but I doubt it has anything to do with overcharging the battery. The battery most likely has internal protection that would cut off power anyway if it was overcharged. I use a USB charger occasionally, but my youngest brother uses it almost exclusively and his battery is still fine.
What it might do is make the charging circuitry itself run a bit hotter as it has to drop more voltage.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BigOnYa @ BigOnYa: With other peoples couches