Running Device While Charging Battery - Page 1
Forum section: electronics / beginners

author: Max Holdcroft
author_rank: Contributor
timestamp: May 14, 2024, 01:32:04 am
content: Hey All,I'm very new to PCB design so this is probably a very easy question, but I'm making a small piece of wearable tech with a battery, so to save space I've moved the battery charging module, a TP4056, into the charger itself. I'm going to use contact charging to charge the device, but I've connected the charge_in pin to the positive battery pin, and I'm not sure how the charging module is going to take the device running while it's plugged in. Is this even an issue I should be worried about? Is the easiest fix just to shut off the device while charging? I've included a screenshot of my current schematic. Thank you all for your help!Max

author: Kim Christensen
author_rank: Super Contributor
timestamp: May 14, 2024, 02:17:16 am
content: First off, your schematic makes no sense with C1 and C2 in series with the DC supply...The TP4056 will not shut off when the battery is full if the circuit is drawing too much current. It could fool the TP4056 into thinking that the battery was still accepting charge current, when in reality it's the load drawing the current. This could cause the charger to float the battery at 4.2V for an extended period of time which will damage it.

author: radiolistener
author_rank: Super Contributor
timestamp: May 14, 2024, 02:43:00 am
content: This is a bad idea to discharge battery during charge process, because it makes impossible proper battery charge. Proper UPS should disconnect load from battery during charge. It can be done with using mosfet switches. When input voltage is present it switch load to input voltage and disconnect from battery. When input voltage disappears, it switch load from input voltage to the battery. In that way battery charge process didn't affected with load and extends battery life.

author: xvr
author_rank: Frequent Contributor
timestamp: May 15, 2024, 10:35:00 am
content: Take a look at TI chargers with "Power Path" feature.https://www.ti.com/battery-management/charger-ics/products.html#1152=1%3B1&2192=Power%20Path&This is exactly what you need - split path for charging battery and powering device itself.

author: mariush
author_rank: Super Contributor
timestamp: May 15, 2024, 11:26:13 am
content: For something super simple, use a couple ideal diodes to auto switch between highest voltage.For example LM66200 is a package with two ideal diodes, and automatically outputs highest voltage :https://www.digikey.com/en/products/detail/texas-instruments/LM66200DRLR/15856663?s=N4IgTCBcDaIDYFsBsSwAY0gLoF8gUp until a few days ago, it was in stock in thousands of units, someone probably bought a few reels.LM66100 is the single diode version, but you can combine two to reproduce the LM66200 functionality :https://www.digikey.com/short/52pwqr98MAX40200 is another example of ideal diode that you could use :https://www.digikey.com/en/products/detail/analog-devices-inc-maxim-integrated/MAX40200AUK-T/7392218So you could use an ideal diode or a regular schottky diode on the 5v input , and an ideal diode after the battery ... their cathodes join together to feed your switching regulator or linear regulator.When you plug the charge cable, the 5v - voltage drop on diode will be higher than 4.2v (minus ideal diode drop) so it will "win" and your regulator will be powered by the dc input.There's also more expensive chargers that have built in power output, but they're more expensive than tp4056 chips.For example MCP73871 has an output voltage pin, when the DC input is present an ideal diode inside connects the input to output, when DC is gone it connects the battery to output.MPS makes similar charger chips, but a lot of them put on the output the voltage used to charge the battery, not the 5v on input. So for example depending on how charged the battery is, you'll get a minimum of 3.6v on the output pin and up to around 4.4v when the battery is fully charged, and when the input is disconnected the chip connects the battery to the output pin.For example see MP2667 :https://www.digikey.com/en/products/detail/monolithic-power-systems-inc/MP2667GG-0000-P/11610986The i2c on the chip is optional, but you can use it to program certain parameters of the chip once (they're saved in internal memory) and then it will run on its own, without i2c connection.There's also MP2637 :https://www.digikey.com/en/products/detail/monolithic-power-systems-inc/MP2637GR-Z/5292187This one has a built in boost regulator and will boost the battery voltage to 5v before it puts it on output pin - if your microcontroller doesn't need 5v it won't be a good choice from an efficiency point of video (no sense boosting to 5v and then bring it back to a low voltage like 1.8v/2.5v/3.3v etc

author: Peabody
author_rank: Super Contributor
timestamp: May 15, 2024, 02:42:01 pm
content: It's called a "load sharing" or "power path" circuit. Lets you power the device and charge the battery at the same time, and charge termination will take place normally. No voltage drop in the battery line.

author: mariush
author_rank: Super Contributor
timestamp: May 15, 2024, 03:37:57 pm
content: Well, technically there is some voltage drop, but it's very small - it's the Rds(on) of the p-channel mosfet, which could be under 100mOhm depending on what mosfet you choose or it's inside the ideal diode.That's pretty much what those ideal diodes are... a p-channel mosfet with very low Rds(on) and some glued logic for the enable and current limit/thermal protection if there's any.The LM66100 specifies a 79 mOhm Rds(on) up to 1.5A , MAX40200 doesn't but claims 85mV drop at 1A, so we're looking at under 100mOhm there as well.

author: Peabody
author_rank: Super Contributor
timestamp: May 15, 2024, 03:48:08 pm
content: I think the ideal diodes have some operating current draw, although it's not very much. And some are only available in hobbyist-unfriendly packages. I've always just used the mosfet, schottky and resistor, but I suspect use of ideal diodes is becomming more typical.

author: Max Holdcroft
author_rank: Contributor
timestamp: May 16, 2024, 12:17:32 am
content: Hey Kim Christensen,Can you explain to me why running C1 and C2 in series is wrong? Do I only need one of them?Thanks,Max

author: Max Holdcroft
author_rank: Contributor
timestamp: May 16, 2024, 12:20:04 am
content: Hey @radiolistener,Thank you so much for this response! That makes a lot of sense. How exactly would I implement this in my schematic?Thank you,Max

author: Max Holdcroft
author_rank: Contributor
timestamp: May 16, 2024, 12:21:38 am
content: Hey radiolistener,Thank you so much for your response! Could you explain to me how I could implement this in my schematic? I don't have much experience with this kind of thing.Thanks,Max

author: Kim Christensen
author_rank: Super Contributor
timestamp: May 16, 2024, 12:55:39 am
content: Quote from: Max Holdcroft on May 16, 2024, 12:17:32 amCapacitors block DC current. So why would you put them in series with a DC supply? It won't work. C1 and C2 should be replaced with a piece of wire.

author: Whales
author_rank: Super Contributor
timestamp: May 16, 2024, 01:03:52 am
content: Welcome to the forums Max.You don't need to write multiple reply posts, this isn't a nested site like reddit or twitter. You can merge them into one using the quoting features and/or copy and paste.QuoteCounterpoint: many phones do it this way (you can test by trying to boot them with no battery installed, some will refuse whilst others will crash when the voltage sags). They treat the lithium battery like a giant capacitor and the charger as a power supply.I like Peabody's 4-wire connection to the charging IC:That should avoid small overcharging of the battery.Really though "overcharging" isn't a black and white thing around the commonly cited 4.2V cutoff. Some manufacturers spec their batteries to go higher. You can get more cycle life by charging to a lower max voltage. YMMV.QuoteA capacitor works completely different to how you're imagining. I recommend reading up on how they charge up and how they can block current.

author: Max Holdcroft
author_rank: Contributor
timestamp: May 16, 2024, 11:50:31 pm
content: Quote from: Whales on May 16, 2024, 01:03:52 amThank you so much for your detailed reply! I'll definitely do more research into capacitors, but I'm a little confused about how I should implement capacitors for noise filtering. If you could give me some pointers I'd really appreciate it. Thank you for your help!Max

author: Max Holdcroft
author_rank: Contributor
timestamp: May 16, 2024, 11:53:08 pm
content: Quote from: Peabody on May 15, 2024, 02:42:01 pm

author: Peabody
author_rank: Super Contributor
timestamp: May 17, 2024, 01:25:19 am
content: Quote from: Max Holdcroft on May 16, 2024, 11:53:08 pmWell, the advantage of using the TP4056 module is that it has a USB connector on it. But you said you're moving that circuit to your board, so you would need to provide for a USB socket on your board.

author: Max Holdcroft
author_rank: Contributor
timestamp: May 17, 2024, 04:21:55 am
content: Quote from: Peabody on May 17, 2024, 01:25:19 amHey, thanks for your responseI don't quite understand what you're saying. I've moved the TP4056 module out of the wearable and instead put it in the charger the wearable sits on. I want to be able to use the built-in usb port to power the charger, instead of using the additional power pins on the board. But in the schematic for power path, it uses these power pins. I was wondering if there's a way I can use this schematic without using the power pins?Thank you!Max

author: Peabody
author_rank: Super Contributor
timestamp: May 17, 2024, 04:06:26 pm
content: I don't understand either. Does your module look like the one below? It has a USB socket on it. If yours is different, please post a picture of it.