Author Topic: Running Device While Charging Battery  (Read 1382 times)

0 Members and 1 Guest are viewing this topic.

Offline Max HoldcroftTopic starter

  • Contributor
  • Posts: 35
  • Country: au
Running Device While Charging Battery
« on: May 14, 2024, 01:32:04 am »
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  :)
 

Online Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1746
  • Country: ca
Re: Running Device While Charging Battery
« Reply #1 on: May 14, 2024, 02:17:16 am »
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.
 

Online radiolistener

  • Super Contributor
  • ***
  • Posts: 4048
  • Country: ua
Re: Running Device While Charging Battery
« Reply #2 on: May 14, 2024, 02:43:00 am »
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.
 

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: ie
    • LinkedIn
Re: Running Device While Charging Battery
« Reply #3 on: May 15, 2024, 10:35:00 am »
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.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5140
  • Country: ro
  • .
Re: Running Device While Charging Battery
« Reply #4 on: May 15, 2024, 11:26:13 am »
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=N4IgTCBcDaIDYFsBsSwAY0gLoF8g

Up 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/52pwqr98

MAX40200 is another example of ideal diode that you could use : https://www.digikey.com/en/products/detail/analog-devices-inc-maxim-integrated/MAX40200AUK-T/7392218

So 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/11610986

The 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/5292187

This 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


 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2156
  • Country: us
Re: Running Device While Charging Battery
« Reply #5 on: May 15, 2024, 02:42:01 pm »
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.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5140
  • Country: ro
  • .
Re: Running Device While Charging Battery
« Reply #6 on: May 15, 2024, 03:37:57 pm »
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.

 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2156
  • Country: us
Re: Running Device While Charging Battery
« Reply #7 on: May 15, 2024, 03:48:08 pm »
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.
 

Offline Max HoldcroftTopic starter

  • Contributor
  • Posts: 35
  • Country: au
Re: Running Device While Charging Battery
« Reply #8 on: May 16, 2024, 12:17:32 am »
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 :)
 

Offline Max HoldcroftTopic starter

  • Contributor
  • Posts: 35
  • Country: au
Re: Running Device While Charging Battery
« Reply #9 on: May 16, 2024, 12:20:04 am »
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 :)
 

Offline Max HoldcroftTopic starter

  • Contributor
  • Posts: 35
  • Country: au
Re: Running Device While Charging Battery
« Reply #10 on: May 16, 2024, 12:21:38 am »
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 :)
 

Online Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1746
  • Country: ca
Re: Running Device While Charging Battery
« Reply #11 on: May 16, 2024, 12:55:39 am »
Hey Kim Christensen,
Can you explain to me why running C1 and C2 in series is wrong? Do I only need one of them?

Capacitors 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.
« Last Edit: May 16, 2024, 12:57:14 am by Kim Christensen »
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 2052
  • Country: au
    • Halestrom
Re: Running Device While Charging Battery
« Reply #12 on: May 16, 2024, 01:03:52 am »
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.

Quote
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.

Counterpoint: 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.

Quote
Can you explain to me why running C1 and C2 in series is wrong? Do I only need one of them?

A capacitor works completely different to how you're imagining.  I recommend reading up on how they charge up and how they can block current.

Offline Max HoldcroftTopic starter

  • Contributor
  • Posts: 35
  • Country: au
Re: Running Device While Charging Battery
« Reply #13 on: May 16, 2024, 11:50:31 pm »
A capacitor works completely different to how you're imagining.  I recommend reading up on how they charge up and how they can block current.

Thank 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 :)
 

Offline Max HoldcroftTopic starter

  • Contributor
  • Posts: 35
  • Country: au
Re: Running Device While Charging Battery
« Reply #14 on: May 16, 2024, 11:53:08 pm »
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.

Thank you for your help! Is there a way I can implement this while using the USB port for power instead of the power pins on the front of the board?
Thanks,
Max :)
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2156
  • Country: us
Re: Running Device While Charging Battery
« Reply #15 on: May 17, 2024, 01:25:19 am »
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.

Thank you for your help! Is there a way I can implement this while using the USB port for power instead of the power pins on the front of the board?
Thanks,
Max :)

Well, 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.
 

Offline Max HoldcroftTopic starter

  • Contributor
  • Posts: 35
  • Country: au
Re: Running Device While Charging Battery
« Reply #16 on: May 17, 2024, 04:21:55 am »
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.

Thank you for your help! Is there a way I can implement this while using the USB port for power instead of the power pins on the front of the board?
Thanks,
Max :)

Well, 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.

Hey, thanks for your response
I 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 :)
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2156
  • Country: us
Re: Running Device While Charging Battery
« Reply #17 on: May 17, 2024, 04:06:26 pm »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf