How do I properly switch from powering a circuit from a Li Ion to a DC adapter? - Page 1
Forum section: electronics / projects

author: ivan747
author_rank: Super Contributor
timestamp: September 14, 2011, 02:48:57 am
content: Hello, guysI am doing a project based around a Lithium Ion battery which has to be charged. I plan to use the MAX1551 dual charger IC, designed for charging batteries off a DC adapter or USB cable. It inputs for both and gives preference to the DC adapter, of course. This IC also features a CHG pin, which indicates whenever a power source is present.I need some circuit to switch for powering the circuit with either DC or USB when any of them are present, so the battery can be isolated while it is being charged.Selecting between DC and USB is kinda easy: add a couple of diodes (the forward voltage drop doesn't matterthatmuch because there is a DC-DC converter). I was thinking on having a P-channel MOSFET connected to the CHG pin of the charger IC, so when the charger IC detects a power source, it toggles the MOSFET. But I also have to isolate the battery from the P-channel MOSFET's Drain pin. If I don't it goes boom.That means I need some way to add another MOSFET (right after the Li Ion), with a NOT gate so it is conducting when the CHG output indicates there is no USB or DC inputs attached. Problem solved, I thinkWhat simple circuit do you recommend? Are there any cheap IC's that will do this (they don't even have to come with MOSFETs). I am posting this because it's my first time dealing with batteries, DC-DC converters, voltage monitors IC's (just a fancy comparator) and battery "gas" gauges.I was also thinking of using a good old relay, but they are kind of bulky and a need the board to be less than 1.5cm (~1/2 inch).Thanks,Ivan***Speaking about battery gas gauges, I should warn young players not to think a battery's negative terminal is the ground reference. Actually, due to the current measurement resistor, it is below the circuit ground. So if the equipment is grounded, don't hook your scope's earth clip to the negative terminal of the battery. You will confuse the gas gauge IC and create a huge current path all over your house.***

author: Balaur
author_rank: Unknown
timestamp: September 14, 2011, 06:45:12 am
content: I've used a TPS2110/2111 with good results. Takes care of everything:http://www.ti.com/product/tps2110a

author: jakeypoo
author_rank: Regular Contributor
timestamp: September 14, 2011, 03:42:31 pm
content: You can do this easily with a low dropout diode between battery->Vdc as long as you don't mind the drop in voltage.I do remember seeing an application circuit for this sort of arrangement in many Li-ion charging ICs, or maybe it was in a DS for a 3.3V LDO Reg. Can't seem to find one now though

author: ivan747
author_rank: Super Contributor
timestamp: September 14, 2011, 06:58:49 pm
content: Quote from: Balaur on September 14, 2011, 06:45:12 amLooks nice at a first glance. The only problem I have is that it works down to 2.8V. I wanted it to go all the way down to 2.5. I don't think it's a big deal, though, because at 3V the voltage on a Li Ion battery just drops abruptly. The good thig is that now I know the name of what I was looking for: a power multiplexer. This kinda looks like a smart pair of ORing diodes. I will do the required adjustments for having the battery disabled at 3V and having the low battery warning to trigger at 3.5V. Thanks!

author: shadewind
author_rank: Frequent Contributor
timestamp: September 14, 2011, 09:42:28 pm
content: Sorry for hijacking this thread but since I know nothing about power switching solutions, I'm just wondering: The diode solution, do you mean you simply put the diode in series with the positive supply line from, for example, USB to prevent reverse current? So when the DC adapter voltage is supplied, it's supposed to be higher and therefore reverse bias the diode?

author: scrat
author_rank: Frequent Contributor
timestamp: September 15, 2011, 06:09:03 am
content: Quote from: shadewind on September 14, 2011, 09:42:28 pmYes, I think you're getting it right.The problem I see is the high dropout on the battery voltage (which is lower than USB or DC input), since he wanted the battery to be isolated from the other power sources when they are connected, too. Dedicated ICs use transistors for the switching between sources.