Multiple PMIC - Page 1
Forum section: electronics / beginners

author: braddrew0
author_rank: Regular Contributor
timestamp: March 04, 2016, 10:53:20 pm
content: Hi Guys,Quick newb question. I'm trying to power a device from a single Li-Ion cell. I'd like to run a few different PMIC chips on this, but I'm not sure how they should connect together. Specifically, I'm trying to add a protection PMIC (UVP, OVP, OCP, etc), a monitoring PMIC (gas gauge style) and a charger.I haven't narrowed it down to specific components yet, but all the datasheets I've reviewed show an example circuit with the PMIC connected directly to the cell. The output of these circuits are a 'pack+' and 'pack-', which is the protected/monitored/charged cell.What is the best way to incorporate multiple types of PMIC with the same cell? Should I have cell -> protection -> monitor -> charge in series? Or do I connect all of them together in parallel, directly to the cell?Thanks!

author: uncle_bob
author_rank: Unknown
timestamp: March 04, 2016, 11:14:16 pm
content: HiThere are at least a thousand power monitor IC's on the market. Most systems use one (and only one) of them. I would suggest digging a bit to see if you can get what you need done with a single chip.Bob

author: braddrew0
author_rank: Regular Contributor
timestamp: March 05, 2016, 02:27:59 am
content: Thanks Bob - that would be the perfect solution, an all-in-one, but it seemed like the manufacturer websites split their products into the "big three" (protection, monitor, charge) and I was struggling to find an all in one solution.I'll keep looking down this path (all in one), but I'm still interested in how you would combine them if there was no all in one solution - or is the answer that you shouldn't?Thanks again!

author: uncle_bob
author_rank: Unknown
timestamp: March 05, 2016, 02:53:19 pm
content: HiThe stuff I use all talks to an MCU. You hook up the chip(s) to it and write the code to make them work. The DC wires are the easy part.Bob

author: ROBOT
author_rank: Contributor
timestamp: March 05, 2016, 07:10:33 pm
content: I think the cheapest most abudent one you can get is the AXP209. It is used in tablets. They can be bought if eBay and aliexpress for about $0.30 each. The nice thing is it automatically switches from battery power to input power without interrupting the output.

author: uncle_bob
author_rank: Unknown
timestamp: March 05, 2016, 07:27:25 pm
content: HiHere's a few of the things you might want to do for power control:1) Detect external power from any of N external sources that do or don't share a common ground2) Vote on which external source(s) to use for output power3) Vote independently on which external source(s) to use to charge the battery.4) Route the external power through zero drop switching to the output if suitable5) Route the external power through a switcher to buck (or boost) it for local output.6) Detect problems with any external power source under some set of pre-defined rules. Disconnect if needed.7) Protect against problems with external power sources under some set of pre-defined rules.Log the history of each power source for later review.Note that we have not really made it to a battery at all .... The sources could easily be the mains power from each of three phases of the feed, a pair of solar panel arrays, and dual backup generator systems. How to hook up all the IC's and which ones to use ... that is a secondary question once you have the power sources laid out. Depending on the fiddly little details of each branch above, you will make different decisions on what to use.Bob

author: braddrew0
author_rank: Regular Contributor
timestamp: March 06, 2016, 12:46:12 am
content: Thanks guys - I probably left quite a bit of background out of the first post but I'll add it in here so you can see what I'm looking for.I want to use a single Li-Ion or Li-Poly cell to power a range of different circuits. Every circuit will have it's own unique power requirements but every circuit will also have USB connectivity. Because I'll already have a USB connector in any design that uses this, I'd like to use that connector to recharge the cell. So in terms of this specific circuit, I'm after the following logic:* If the USB cable is disconnected, the cell provides power to drive the circuit* If the USB cable is connected and the power requirements of the circuit are less than what is being drawn from the USB port, the remaining current is used to charge the cell (when required)* If the USB cable is connected and the power requirements of the circuit exceed the USB supply, the cell augments the power provided by USBFrom this, the output of this circuit should be power in the range ~2.7 - 5.5V (from discharged cell only through to full cell and then USB connected). I am comfortable with everything downstream (on the load side) of the power MUX.In terms of the power MUX, my first preference is a simple diode OR gate design. The main issue with this is the voltage drop of the diodes - even if I use Schottky, at high currents there is still a significant (ie ~400mV+) voltage drop. At the low end of the cell I need to determine if this is acceptable. The other option I considered is a FET based solution - much lower voltage drop but more complex. Either way, I'm pretty happy with the options for the MUX (although I'm always open to advice).So the key requirements for power management include:* OVP, UVP and OCP (at a minimum) for the cell* High accuracy capacity meter with uC interface* Ability to charge from USB (ie ~4.5-5.5V)* From a design perspective, small size is preferred over lower cost however no BGA componentsMy first take on this was to roll my own solution with a simple uC as a dedicated PMIC, interfacing to the cell/USB through a couple of DACs, a current sense and control FETs. I steered away from that as a solution because I don't believe I can manage it in a smaller area than dedicated PMIC devices, and I didn't want to spend the time/cost developing and debugging a proprietary system.Second step was to look at dedicated PMIC from a range of manufacturers. I find it hard to believe that a single Li-Ion/Li-Po charged from USB is a novel/unique requirement, but I struggled to find any solution which could do protection, capacity monitoring and charge management in the one IC. Most manufacturers I looked at broke these three out into individual chips (although I could find charge + protection and capacity + protection).So to take an example (and I haven't finalised a decision on these components, but they appear acceptable) - I could use bq2970 as the protection chip (http://www.ti.com/product/Bq2970), bq78z100 as a gas gauge (http://www.ti.com/product/bq78z100) and bq25896 as the charge controller (http://www.ti.com/product/bq25896). The datasheets for each of these give example circuits, but all the examples are given in isolation (ie it doesn't show how to use all three at once).So that gets me back to the original question - how would I integrate, for example, these three components on a single cell? I see a few options:* All three directly connected to the cell in parallel. This appears to me like it would remove protection from both the monitor and charge circuits.* All three connected in series (say protection -> monitor -> charge). This to me looks like the monitor circuit wouldn't be as accurate, because it wouldn't be tracking the power use of the protection circuit (which is admittedly small).* A combination of series/parallel connections. This makes the most sense to me.* Or there's a smarter way to do it - I'm hoping this is the caseSo to answer your specific comments - ROBOT, that looks like a neat little chip and I will bookmark for later, but it doesn't look like it can monitor the remaining capacity of the cell?Bob - thanks again, and I think I have answered most of those points, but to be sure:1 - Two inputs, USB 5V and cell 2.7-4.3V (approx). In circuit will have common ground.2 - Decided by power mux, but in accordance with above logic.3 - Only single external source (USB 5V).4 - Function of power mux, but I like the idea of zero drop.5 - I'm comfortable with downstream of the mux - this will change for the different applications I have in mind. I should mention that this power won't be fed directly into anything other than another DC-DC convertor (ie a 1.8V LDO for low power circuit, etc).6 - External supply problems is a really good point, I hadn't considered that. I'm planning a range of input currents (from ~150mA for low power USB up to a 3A fast charger) but I haven't looked at the case where it doesn't meet spec...7 - I'll have ESD protection on the USB port, but again open to suggestions on additional protection. I'm not really planning to filter the USB power because everything downstream of the mux will run through another convertor - but again open to suggestions.8 - I wasn't planning to log, but that's a good idea, I'll give it some thought.Thanks once again for your help - hopefully this clarifies where I'm at and what I'm trying to achieve

author: Cerebus
author_rank: Super Contributor
timestamp: March 06, 2016, 01:29:41 am
content: Quote from: ROBOT on March 05, 2016, 07:10:33 pmBe warned the AXP209 is a 48 lead, 6x6mm QFN package. That is, murder to fix onto a board on the typical hobbyist workbench.

author: andyturk
author_rank: Frequent Contributor
timestamp: March 06, 2016, 01:39:58 am
content: Most of the batteries I've used have internal protection, so I've only had to deal with the charger and gas gauge functions. In order to be accurate, the gas gauge needs to see all of the current going into or out of the battery, so it'll be in series (or at least its sense resistor will be in series). A simple charger will be in parallel to the battery, but the more complicated chips with power path functionality essentially isolate the battery from the rest of the system and give you some sort of system power rail that everything else hangs off of.The charger chips are the easiest to deal with. Fancy ones have an I2C interface where you can set charge parameters, while simple ones just have status pins that you can hook up to LEDs or read directly. The MCP73831 is cheap and cheerful for small cells. It's a SOT-23-5 and works well on small designs, but lacks any kind of power switching smarts. It's bigger brother, MCP73871 adds power path functionality and some other bells and whistles. My last project used a BQ24295 which does the power path stuff, knows all about USB chargers and is programmable via I2C. It's also got a DC/DC buck converter to deliver more charge current to bigger batteries when you're charging from a limited source like USB. That buck converter means you'll need to pay attention to your PCB layout though.Paired with the BQ24295 was a BQ27421 gas gauge. Once correctly configured, it worked well, but that thing is a pain to use! It requires special hardware (and TI's BQ Studio GUI) to configure correctly, and each time a battery is connected, you have to download almost 1kb of configuration data into it. The out-of-the-box settings provide a SOC ("state of charge") percentage, but they'll be significantly off until the gauge is configured for the exact parameters of your battery design. I assume that the other TI gas gauge products work the same way. Unless you're building a consumer product where super accurate battery info is an important feature, I'd skip the complexity of a gas gauge and just guestimate charge from cell voltage.If this is a one-off/hobby project, go with one of the MCP chargers as they're dead simple.

author: uncle_bob
author_rank: Unknown
timestamp: March 06, 2016, 01:53:30 am
content: Quote from: braddrew0 on March 06, 2016, 12:46:12 amHiOk, let's focus just on that one for a bit. USB has some "interesting" rules about power. There is a "suspend" mode where you are expected to get your gizmo to zero current in some crazy time period after you receive the software command (1 us??). If you don't they have the "right" to disable all your power and make you go away. In order to deal with all of this, you need a USB stack on your device. Are you planning to go that far?Bob

author: braddrew0
author_rank: Regular Contributor
timestamp: March 06, 2016, 03:01:03 am
content: Thanks guys, some great replies!Cerebus - Good advice, that's smaller than I've managed before. If push comes to shove I should be able to get access to an oven, but that would also open up BGA. Definitely something to think about!Andy - Thank you, this post is a goldmine - you've answered most of the questions I had and a couple I hadn't even thought to ask! This won't be a commercial design (I still have a lot to learn before I'd be confident that one of my designs is suitable to sell) but saying that the learning experience for me of building something to similar standards far outweighs the cost. I think I can leave the gauge off on most of the circuits I have planned, but unfortunately I think I'm going to need that accuracy for one of them. I hadn't really looked at the MCP series before, but that's now high on the list. Thanks again!Bob - That's a good point! The circuits I have planned now will either be FT232R to uC or a custom USB stack in an FPGA (preference is the FTDI chip, if the uC can handle the whole system). So that should have a full USB stack, but I'll look into it. Thanks!

author: braddrew0
author_rank: Regular Contributor
timestamp: March 06, 2016, 04:03:14 am
content: I found this site which seems to also answer a lot of my questions (http://dkc1.digikey.com/us/en/TOD/Texas_Instruments/Battery-Management-Part-1/Battery-Management-Part-1.html) - particularly the system diagram on slide 8.Thanks all!

author: ROBOT
author_rank: Contributor
timestamp: March 06, 2016, 11:49:19 am
content: Quote from: braddrew0 on March 06, 2016, 12:46:12 amFrom the AXP209 data sheet. It appears you can estimate battery life:"Simple battery monitors estimate the battery energy by measuring the battery voltage. However, themultiple 12-bit ADCs in the AXP209 can measure battery voltage, as well as battery current andexternal power voltage and current. It integrates battery charge and discharge coulomb counter. Usingthis data, the Host is capable of calculating accurately the battery energy and other battery data, suchas the system real-time consumption, remaining battery energy, battery charge progress, remainingbattery using time and charge time, etc."Another option for you to ponder go look at some tablet computer tear downs and see what PMIC they are using. I know most of the $30 Chinese tablets use the AXP209.

author: uncle_bob
author_rank: Unknown
timestamp: March 07, 2016, 12:05:24 am
content: Quote from: braddrew0 on March 06, 2016, 03:01:03 amHiThe FTDI chip does not come even close to what you really need to set things up. It will barely get it's self out of the way and can not negotiate for higher power with the source. You need a fairly good micro before you get to the point you have this stuff. The "normal stuff" in a FPGA library is even less than what the FTDI has.Bob

author: braddrew0
author_rank: Regular Contributor
timestamp: March 09, 2016, 12:43:13 am
content: Thanks again Bob,I wasn't planning on using any library USB stack - it would be my own custom stack in an FPGA. Saying that, this is really my last resort on this project, I'm not a fan of using CPLD/FPGA on a battery powered device.I've done a bit more research on the problem you're talking about. As I understand it, the USB port should provide a low current source, which can be disconnected by the host. In order to ask for high current mode or keep the source flowing, my circuit would need to communicate these intentions to the USB host. Is that a reasonable summary?In terms of communicating this, I'd rather not put the overhead in the uC at this stage (for project one it's already close to max). After a bit of searching, I've found this family of devices, starting with bq24392 (http://www.ti.com/product/BQ24392). Any thoughts on using something like this as an interface between the USB port and an FT232R to manage the power aspects of the design?Thanks!

author: uncle_bob
author_rank: Unknown
timestamp: March 09, 2016, 01:00:24 am
content: Quote from: braddrew0 on March 09, 2016, 12:43:13 amHiThere is a low level dialog that takes place between the host and the target to get "more current". There is a bit more to it:In the event of a power down, the target has a very short time to get to a *very* low current level. It goes from 150 ma to < 1 ma in microsecond sort of time.The target needs to "enumerate" properly to the host. This involves shipping a fairly extensive list of this and that over the USB connection. The whole negotiation process is not at all simple. With a lot of hosts, if something goes wrong ... poof .. no more power.Bob