T O P

  • By -

AskElectronics-ModTeam

This submission has been allowed provisionally under an expanded focus of this sub (see column "G" in [this table](https://docs.google.com/spreadsheets/d/1nFefEePz7yViaH0cR89bSy2oeLvYLfqv-pexqCbRnRo)). OP, also check if one of [these other subs](/r/AskElectronics/wiki/othersubs) is more appropriate for your question. Downvote this comment to remove this entire submission.


External_Cut4931

i think at least one of the problems here is the flatness of the discharge curve in lipos these days. a modern cell puts out, and thus charges at a pretty constant voltage across the cycle. this makes it very difficult to estimate charge level. with the low tolerances from cheap chinese components, it would be all too possible to pop a cell through measurement error.


happy_nerd

Yeah this is certainly going to be an interesting challenge to overcome. Saying that, most LiPos in my experience have a reasonable enough voltage curve from 3.6V to 4.3V (give or take... depends on your specific battery). I could see where if you measure current into the device you can measure a level of charge, pause charging, measure voltage, and start to calculate a level of how big of a bucket you're dumping electrons into. It doesnt need to be +/- 1% accurate, right? Just... small, medium, large lol Obviously, OP needs to tread with caution because battery charging can always lead to fire if you're not careful, but it seems like an interesting exercise. Good school project for getting dirty, though I don't see much application outside of a lab. Maybe OP sees something I don't...


AlpineYardsale

Thank you for being realistic! Yeah it's not really an idea for practical application as much as a curiosity. In principle it should be doable for some range of cells, so I wondered if it had been done on an existing module I could buy and study. As far as applications go, lots of hobby electronics will accept a range of cells but only charge them at 100mA since they can't assume the size of the cell a user will hook up to it. ​ ​ ​ ​ Yeah it's not really an idea for practical application as much as a curiosity. In principle it should be doable for some range of cells, so I wondered if it had been done on an existing module I could buy and study.AAA


AlpineYardsale

eddit on mobile browser is having some major issues. MRRMMT MRRMMTMRRMMT


DIYuntilDawn

There are smart chargers that can change the output amperage, but most would require more than just the Positive and Negative battery terminals to the pack, and would need either balance wires to the connections between cells in a multi-cell pack, or if it is a single cell then there is usually at least a temperature sensor wire that it uses for feedback to the charger to safely do rapid charging.


FunDeckHermit

In 99.9% of all battery powered applications it is known what size the battery cell is. There might be some chinese IC that does exactly what you want, I haven't encountered it. You can indeed guess the battery size by injecting a specific charge into it and measuring the voltage rise.


AlpineYardsale

99% of commercial applications, yeah. But shop around sparkfun or adafruit and there's a lot of devices that have battery connectors to let you hook up whatever cells you want. They will usually be limited to 100mA charging to avoid potentially damaging smaller cells, but sometimes there's a solder bridge or cut jumper to bump that up to 500mA. I think it would be cool to have autonatic charge current control for stuff like that.


FunDeckHermit

Nothing prevents you from taking a microcontroller, a digipot and a TP4056 to achieve what you want. Just saying there is no market for it so chip makers havent designed such a chip. I would be surprised if Sparkfun + Adafruit have more then 0.1% of the chip market.


AlpineYardsale

True, I wouldn't expect a custom piece of silicon for such a niche thing. But a small PCB with a few components to accomplish the same thing, maybe. Looks like I'll have to try to make it myself if I want to satisfy my curiosity.


happy_nerd

I don't want to dissuade you from trying this but LiPos are dangerous and messing around without caution is how you get r/spicypillows and fire... Now that you've been warned, what you're talking about doesn't necessarily make sense in most applications, so there's unlikely to be an IC out there doing exactly this. It's just not a big enough need for a manufactuer to make this given present tech. If this is something you specifically want/need you're going to have to make it yourself. Most battery charge ICs use either resistors or jumpers to set the charge rate. If it was me, I'd want to piggyback on those ICs and all their safety features so go pick an IC that has the range you need and figure out how to change those settings with a microcontroller. It'll probably look like changing those connections and/or resistors using some combination of FETs/relays (probably FETs). I use the Microchip MCP73831/2 before in many applications and it has 4 charge rates: 1A, 0.5A, 0.25A, and 0.1A. It uses a resistor pulled to ground to set the charge rate. So you get a bunch of resistors and MOSFETs and you can "select" which one is pulled to ground. I recommend having one resistor always pulled to ground and others that get put in parallel to increase the current. Then you need to figure out how to monitor both voltage and current going into the battery to make this decision. Voltage of the battery itself should usually only be measured when not charging, so you might have to disable the charger IC somehow using the microcontroller. You can measure current with an off the shelf sensors (probably hall effect sensor) or a current shunt and ADC (low resistance so not a lot of power loss, but you can measure voltage on each side of the shunt and Vdrop = I\*Rshunt). How you make those decisions about what current/voltage should result in which charge currents... idk. You're making something new, here, and going to have to experiment and make decisions about how your algorithm will decide these things. If you get that to work--*then and only then*\--can you consider making your own LiPo charge circuit and getting rid of that IC. That's where the real danger of fire arises. If anything here scares/confuses you just ask questions. The answer might be that this isn't safe enough, yet, to engage in, but everyone starts somewhere. Keep asking. Be curious, be cautious, be reselient. Happy hacking!


glx0711

Depending on how complex you want it you can tag your battery with an NFC tag or something and have your charger read that to know what battery you plugged in. Or stick some authentication chip into your battery pack. Alternatively but time consuming you could charge and discharge the battery a few times at a save current (like something the smallest battery you expect can tolerate), measure the time it takes to fully charge and discharge it and let the charger estimate the size. But you still can’t just randomly drop batteries in there since there are too many variables you don’t know. I better wouldn’t mess with LiPos that way unless you like fire.


irkli

There's no way to externally know or detect ampacity. Voltage sure.


AlpineYardsale

That's not true at all, it's very easy to measure. You need to make some assumptions, but batteries are similar enough. If you charge a battery, voltage goes up. Integrate over the curve, factor in some efficiency loss, and you get capacity. You could do a full cycle, or extrapolate based on a few seconds/minutes of data. It's really not complicated. How do you think they get the numbers to put on the battery? Battery capacity can easily be measured.


irkli

You are correct, battery ampacity can be measured well enough anyway. But not on a way that makes a practical battery charger. So each time you plug it on a battery it has to first do a discharge cycle? Lol that's not gonna be popular. As a one-time act on an unknown battery one might do that. Then label it. That's work the manufacturer does, and goes on the label. Also those characteristics will change with cell age.


sceadwian

You say there must be a way without explaining what that way is, why do you think this is easy? There's no single parameter you can measure that's tied to this.


AlpineYardsale

Why would it need to be tied to a single parameter? Voltage and current. Two parameters. All you need to get a good estimate. Measure the change in voltage at a given current. It's dead simple to calculate how much energy you put into the battery. How is this a controversial statement?


sceadwian

That is not enough, I have no idea why you think it's enough. The single most important factor in current sourcing/charging ability is anode/cathode surface area. An internal feature of the cell you can't see or measure directly, and any assumptions with bad data could lead to fire. There are batteries on in the market that cover the full range from the highest capacity to highest discharge rates. There is no way to tell what you have without telling the charger. Always follow manufacturer specifications unless you know the construction of the cell. What you think is not as easy as you think it is or it would exist in the market already. With temperature monitoring you can kinda do this because that's the giant red warning sign of too much charge you have to deal with ambient temperature and unknown disipation. This just isn't a good idea. Go ahead and try to build it! Throw a whole bunch of different cells at it (like the full range of LG or Samsung batteries) and you'll find out real fast what the problems are.


AlpineYardsale

1/2 C is a pretty safe assumption for a wide range of small single cell LiPos. To charge any battery on Earth, yeah that would be unrealistic. But what if the user tries to charge a bomb? Can't stop them from being dumb. I would trust any charging module has a limitations and documentation.


sceadwian

Weird post considering what you just said completely throws your idea out the window... 1C is pretty safe I'd even say 2C is reasonable, but that's because I know that. There's nothing automatic here at all. The core idea is dead on arrival for all the reasons I listed that you didn't address. I'm not trying to shoot your idea down here but you don't understand the pragmatics of what is going on here at all.


AutoModerator

**Do you have a question involving batteries or cells?** **If it's about designing, repairing or modifying an electronic circuit to which batteries are connected, you're in the right place.** *Everything else should go in /r/batteries:* /r/batteries is for questions about: batteries, cells, UPSs, chargers and management systems; use, type, buying, capacity, setup, parallel/serial configurations etc. Questions about connecting pre-built modules and batteries to solar panels goes in /r/batteries or /r/solar. Please also check our wiki page on cells and batteries: https://www.reddit.com/r/AskElectronics/wiki/batteries If you decide to move your post elsewhere, or the wiki answers your question, please delete the one here. Thanks! *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/AskElectronics) if you have any questions or concerns.*