Author Topic: Switching between battery charger and the circuit  (Read 6653 times)

0 Members and 1 Guest are viewing this topic.

Offline fencluTopic starter

  • Regular Contributor
  • *
  • Posts: 121
  • Country: pl
Switching between battery charger and the circuit
« on: October 13, 2013, 01:52:48 pm »
Well, this is embarrassing...I have a circuit that's powered from a Li-Po battery. It's going to be charged from USB using MCP73831. The thing is I need some circuitry to switch the battery between the charger and the rest of the circuit (when the USB is plugged in it's supposed to disconnect the battery from my widget, connect it to the battery charger and also power my widget from the USB). I've been thinking about it fot three days straight and I just cannot seem to come up with a solution.  |O

Please help!
If anything can go wrong, it will.
 

Online madires

  • Super Contributor
  • ***
  • Posts: 7744
  • Country: de
  • A qualified hobbyist ;)
Re: Switching between battery charger and the circuit
« Reply #1 on: October 13, 2013, 03:03:54 pm »
A SPDT relay :-) But i'd guess that there are some battery management ICs for that. Two PNP BJTs with some clever driver might also work, i.e. one PNP between the battery and the circuit and the second one between USB and circuit. Or two Schottky diodes instead of the BJTs (slightly higher voltage drop but very simple, i.e. higher voltage wins).
 

Offline JohnnyGringo

  • Regular Contributor
  • *
  • Posts: 154
  • Country: vg
Re: Switching between battery charger and the circuit
« Reply #2 on: October 13, 2013, 03:13:29 pm »
Use some OR-ing diodes. Basically a OR function with 2 diodes.

Check out:
http://www.codemsys.com/SMPS/Parallel.htm
"Anyone who has never made a mistake has never tried anything new." - Albert Einstein
 

Offline dr_p

  • Frequent Contributor
  • **
  • Posts: 309
  • Country: ro
Re: Switching between battery charger and the circuit
« Reply #3 on: October 13, 2013, 03:20:00 pm »
why disconnect the battery in the first place?


the datasheet for the MCP73831 states less than 2uA discharge in shutdown mode (VDD not present)
 

Offline M. András

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: hu
Re: Switching between battery charger and the circuit
« Reply #4 on: October 13, 2013, 04:40:21 pm »
why not chose a charge controller which has this function? disconnects the battery from the load when external power applied
 

Offline fencluTopic starter

  • Regular Contributor
  • *
  • Posts: 121
  • Country: pl
Re: Switching between battery charger and the circuit
« Reply #5 on: October 13, 2013, 08:05:52 pm »
The circuit is in the attachment. A relay is far too big for this application. It's a small 5x5cm board so only SMD semiconductors are possible. I dunno. It's sounds simple but I completely can't get my head arround that. My widget is powered from VCC (the Li-Po battery) and is supposed to be powered from 5V USB when connected.
If anything can go wrong, it will.
 

Offline M. András

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: hu
Re: Switching between battery charger and the circuit
« Reply #6 on: October 13, 2013, 08:28:10 pm »
look at what these dedicated TI charge controllers provide simple elegant but requires "few" components :http://www.ti.com/lit/ds/symlink/bq24610.pdf
 the rest are here http://www.ti.com/lsds/ti/power-management/battery-charger-solutions-products.page#p1152=Single%20Cell&p2192=Power%20Path&p338=Li-Polymer
have a look and decide few fets passives etc provides charging while powering the system from the external supply some of them as i recall have fatures that supplies excess power from the battery on demand while running from external power source. but i was looking at 6+cell chargers
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3024
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Switching between battery charger and the circuit
« Reply #7 on: October 13, 2013, 10:04:55 pm »
See this thread I started a couple weeks back:
https://www.eevblog.com/forum/projects/primary-(eg-usb)-and-auxillary-(eg-battery)-power-steering-ic/

Note, the circuit I proposed there doesn't work brilliantly, the mosfets sometimes seem to stay on or only partially shut down.

 I've tried solving that unsuccessfully with some resistance to influcence the order of the mosfets shutting down etc, but it didn't work well either and I think it would have been fiddly.

My latest idea (not yet tested) is to use some 4000 series NOR gates, 2 P Channels (S to S config) and one N per power source, the G of the P channels pulled up to a diode OR'd low current supply and the 4000 series gates driving the N channel gate high, pulling the P channel gates low  when appropriate. 

But this is getting ridiculously complicated and only serves as a "dammit I'm sure I can make this work" thing, when one of the IC's in that thread can do the job for a buck.

~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline Maxlor

  • Frequent Contributor
  • **
  • Posts: 565
  • Country: ch
Re: Switching between battery charger and the circuit
« Reply #8 on: October 13, 2013, 10:46:12 pm »
For a USB/battery-powered project at work we're using the TI bq24072. It does exactly what you seem to need: when a charger is connected, it charges the battery and powers the rest of the system from the charger, and if you disconnect the charger, it switches to the battery. This happens without interruption (or at least fast enough that the system doesn't seem to notice.)

A similar chip is the MCP73871. The keyword with both is autonomous power source selection.

They're both bigger devices than the one you mentioned, but they're not as complex as they seem at first glance; you probably don't need all their pins and can simply tie some to VDD or GND, and you'll save the hardware you'd otherwise need for switching between sources.
« Last Edit: October 13, 2013, 10:48:53 pm by Maxlor »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf