Boost converter + lipo charger/battery protection circuit - Page 1
Forum section: electronics / projects

author: aiq25
author_rank: Regular Contributor
timestamp: March 15, 2019, 12:52:52 am
content: Hi. I designed a boost converter + lipo charger/battery protection circuit (based on YouTuber GreatScott!'s design). I would appreciate some feedback. Attached are the Gerbers, view of all PCB layers and schematic files.I would like to test the boost and battery circuits seperately, so I have two SMD pads that I will bridge to connect the two circuits later on.This was designed in KiCad. I can share those files if anyone is interested.

author: Peabody
author_rank: Super Contributor
timestamp: March 15, 2019, 01:09:53 am
content: As I remember his circuit, it did not include something called load sharing. This is needed if you want to charge the battery and power your device at the same time. Load sharing allows the Vbus source to power both the load and the charger independently so the load doesn't have to be supplied by charger current. If that happens, the load current may prevent the charger from ever shutting down, which would be a safety problem.http://ww1.microchip.com/downloads/en/AppNotes/01149c.pdfhttp://blog.zakkemble.net/a-lithium-battery-charger-with-load-sharing/Basically, load sharing requires adding a P-channel mosfet, a schottky diode and a resistor.

author: aiq25
author_rank: Regular Contributor
timestamp: March 17, 2019, 02:16:43 pm
content: Quote from: Peabody on March 15, 2019, 01:09:53 amThanks. I thought about this after completing the PCB. This module will be used for a small portable game system I'm building, so I don't think it's a big issues for me but I will add it to a future revision of this board if it works out.

author: janoc
author_rank: Super Contributor
timestamp: March 17, 2019, 02:24:54 pm
content: Quote from: Peabody on March 15, 2019, 01:09:53 amOr a charger IC with a "power-path" feature built-in. E.g. TI has a few chips such as bq25890, bq25606 etc. that do this. The features these have, such as the OTG support, may be an overkill, but if space is at premium it is likely worth it than hacking up a discrete solution. They even support a "supplement mode" where if the load needs more current than available from the charger the rest will go out of the battery automatically.These are also fast chargers - supporting the USB BC 1.2 spec, the various non-standard resistor-between D+/D- pin hacks and there are even variants supporting the USB C Power delivery standard.Just beware, the datasheets of these are a horrid confused mess

author: Peabody
author_rank: Super Contributor
timestamp: March 17, 2019, 06:57:42 pm
content: The MCP73871 also supposedly has sharing built in. But I have no experience with it.

author: aiq25
author_rank: Regular Contributor
timestamp: March 17, 2019, 11:59:52 pm
content: Quote from: janoc on March 17, 2019, 02:24:54 pmI actually looked at this before. Unfortunately soldering QFN IC's is not easy for me, so I wanted to avoid IC's that are hard to solder for me.

author: KL27x
author_rank: Super Contributor
timestamp: March 18, 2019, 12:08:34 am
content: What with the little outline around all your pads? It is in the same color as your top copper, but this would be causing some shorts if copper.

author: KL27x
author_rank: Super Contributor
timestamp: March 18, 2019, 12:15:14 am
content: I am curious why there are so many parts. I'll have to check out the schematic and maybe I learn something. My circuit for doing this has a quarter of the parts, ha.

author: aiq25
author_rank: Regular Contributor
timestamp: March 18, 2019, 12:20:22 am
content: Ok this IC is interesting because it has a boost incorporated: bq25606.

author: aiq25
author_rank: Regular Contributor
timestamp: March 18, 2019, 12:22:32 am
content: Quote from: KL27x on March 18, 2019, 12:08:34 amThose are copper. I used KiCad libraries and used hand solder pads for the resistors and capacitors.

author: KL27x
author_rank: Super Contributor
timestamp: March 18, 2019, 12:43:50 am
content: QuoteGood luck with that.

author: aiq25
author_rank: Regular Contributor
timestamp: March 18, 2019, 12:47:07 am
content: Quote from: KL27x on March 18, 2019, 12:43:50 amAre you talking about the IC pads?

author: KL27x
author_rank: Super Contributor
timestamp: March 18, 2019, 01:05:51 am
content: Every pad on the entire board. Did you run DRC (Design Rule Check?) If you run DRC and it passes, I'd check what clearances you have in your DR's. If those box outlines are in copper, you have multiple obvious clearance issues on this board.

author: aiq25
author_rank: Regular Contributor
timestamp: March 18, 2019, 01:57:52 am
content: Quote from: KL27x on March 18, 2019, 01:05:51 amOh, I think I know what you mean now, I was bit confused. No the outlines are not copper actually, at least shouldn't be so I will double check this. I did run DRC and no errors. I will post back after double checking. Thanks for pointing it out.

author: KL27x
author_rank: Super Contributor
timestamp: March 18, 2019, 04:58:10 am
content: Ok. Then I suspect that is either the soldermask or paste layer. Curious that it is the same color as the top copper layer!

author: aiq25
author_rank: Regular Contributor
timestamp: March 18, 2019, 01:00:36 pm
content: Quote from: KL27x on March 18, 2019, 04:58:10 amThis is weird. They are rendered as being part of the pad but I can't figure out what they actually are. I ran DRC again and everything was clear, so I'm not sure what they are. Attached is an 3D rendering.

author: PeterZ
author_rank: Regular Contributor
timestamp: March 18, 2019, 01:37:09 pm
content: QuoteThat's how KiCad is showing the net/pad clearance. Not to confuse with pad to zone clearance, which might be different.

author: aiq25
author_rank: Regular Contributor
timestamp: March 18, 2019, 02:03:25 pm
content: Quote from: PeterZ on March 18, 2019, 01:37:09 pmThanks. I will clean up the PCB to avoid the clearances.

author: aiq25
author_rank: Regular Contributor
timestamp: March 18, 2019, 06:19:06 pm
content: I started cleaning this up a little but I think there is no point, I'm going to get this PCB made and then change the design to use one of the TI IC's with integrated boost. That way I can have boost plus charging all in one IC.

author: janoc
author_rank: Super Contributor
timestamp: March 19, 2019, 01:59:03 pm
content: Quote from: aiq25 on March 18, 2019, 06:19:06 pmUh careful - those BQxxx chips only provide a USB OTG boost converter function (aka if you activate the function, you will get 5V/1A out of the normally input Vbus pin to power any device that could be connected to e.g. a smartphone). Otherwise they work as a sort-of buck converterwhen you have charger connected. If the battery is too discharged or not present the IC will regulate the output voltage to about 3.5V minimum, otherwise it keeps the output at battery voltage + 150mV (or so) - so the output is not really regulated and moves as the battery voltage changes. When running without the charger, the outputisn't regulated at all, i.e. no buck or boost functionality (ignoring the OTG thing).The datasheet is a very confused mess with quite a few contradictory parts but when you look at the block diagram of the IC it is clear what it can actually do.If you need regulated output (boost converter), you will need to either use the OTG function (may not be practical) or add a separate converter. Basically these chips are meant to be fast USB chargers supporting OTG power and managing the power path in such way that it balances both the charging of the battery and powering the output in various charger/battery combinations. Nothing more, really.That is unfortunate but it kinda makes sense given these are meant for smartphones and similar applications, where you will need to generate multiple power rails anyway. So it doesn't try to be smart and get in the way (which would only waste power) - it only handles the battery charging for you and delivers a meaningful (not necessarily stable or regulated) voltage that you can then convert further, as needed.

author: aiq25
author_rank: Regular Contributor
timestamp: March 21, 2019, 04:20:26 am
content: Quote from: janoc on March 19, 2019, 01:59:03 pmThanks. Yeah I was reading the datasheet carefully and I searched one of those parts and found a link to a TI forum where they recommend separate boost and charger IC's. I think that's what I will go with.

author: kjr18
author_rank: Regular Contributor
timestamp: March 21, 2019, 08:39:53 am
content: I made one of those charger/protection/boost modules some time ago, and I came up with something like this. It uses smaller and less powerful version of TP4056, because I wanted smaller board size. When no usb is connected, transistor is open, allowing boost circuit to use battery for source, when usb is connected, mosfet closes and boost uses usb source with some voltage drop on Schottky diode. It's simple and works. You could also use two diodes, but that would give you some voltage drop on battery, thus limiting energy stored in it.

author: janoc
author_rank: Super Contributor
timestamp: March 21, 2019, 09:27:22 am
content: Quote from: aiq25 on March 21, 2019, 04:20:26 amYou can still use the BQxxx part for the charging side - if you want fast charging from USB using the various charging specs (BC, PD, the various non-standard resistor dividers between D+ and D-) and dynamic power path management (charging while using the device, weak charger supplemented by the battery, works even with no battery, etc.) these chips are hard to beat on price and board space. There are simpler solutions using a few discrete components but none of those will give you the fast charging and the charger flexibility (available current/voltage detection) that this IC series can do.Just add another converter or LDO after it to generate the power rails your project requires.

author: janoc
author_rank: Super Contributor
timestamp: March 21, 2019, 09:30:28 am
content: Quote from: kjr18 on March 21, 2019, 08:39:53 amThat's pretty much what you will find in many of those cheap battery + 5V boost AliExpress modules, except for the battery protection circuit (most Li-ion/Li-Po batteries have these built-in, you aren't using raw cells, are you?).

author: kjr18
author_rank: Regular Contributor
timestamp: March 21, 2019, 10:47:40 am
content: Quote from: janoc on March 21, 2019, 09:30:28 amYeah, but if you need other voltages, then you might be out of luck. I made this mainly for powering DSO150 (which gets powered by around 9V). Works ok for this purpose. I added battery protection just in case if I ever wanted to use bare cell.

author: janoc
author_rank: Super Contributor
timestamp: March 21, 2019, 03:02:52 pm
content: Quote from: kjr18 on March 21, 2019, 10:47:40 amYes, true, most are designed for 5V (aka powerbank). However, it shouldn't be too hard to change the resistors in the feedback divider, if needed.A much worse issue is that some of these modules are poorly designed and don't regulate properly - I have one that is supposed to be a buck-boost converter for 3.3V and it was completely happy to send me 4V+ into a radio module that cannot handle more than 3.6V, destroying it. Or don't want to start properly under load.