Please review my lipo charger and step down schematics - Page 1
Forum section: electronics / beginners

author: online1234
author_rank: Contributor
timestamp: December 31, 2019, 04:26:31 pm
content: Hello,I'm a total noob to circuit design. I'm trying to make a pcb that charge lipo battery and step down to 3v to power a keyboard controller.I follow the schematic of the Adafruit lipo charger and added MCP1700 to step down from 3.7 to 3v.I'm not sure the placement of the on/off switch, I read it somewhere saying the components consume power when it's not plugged in, is it true?I'd like to switch off the keyboard when it's not in use but still able to charge the battery.Any opinion would be appreciated!

author: mariush
author_rank: Super Contributor
timestamp: December 31, 2019, 05:01:51 pm
content: A keyboard controller will use very very low power when idle.The on/off switch will be nearly pointless., unless you're planning to also have rgb leds or something more power hungry.You'll save way more power by using a switching regulator optimized for low current instead of a linear regulator.With linear regulator, you have 3.7v in, 3v out ... that's 81% efficiency, 20% of battery will be lost as heat.Here's an example:https://www.digikey.com/product-detail/en/diodes-incorporated/AUR9713AGH/AUR9713AGHDICT-ND/8545833You'd get up to around 90% efficiency and it has an enable pin (connect to input voltage to turn on, to ground to turn off)See page 12 for example schematic :https://www.diodes.com/assets/Datasheets/AUR9713.pdfIt may feel scary and difficult for a beginner but they're really not hard .. and being a surface mount part is also not a big problem, you can bend the leads to make more room between leads.Here's something a bit more expensive, but can be up to 96% efficient:https://www.digikey.com/product-detail/en/on-semiconductor/NCP1521BSNT1G/NCP1521BSNT1GOSCT-ND/1560581Here's datasheet:https://www.onsemi.com/pub/Collateral/NCP1521B-D.PDFYou have the example circuit on first page (similar to the other chip's circuit) and detailed notes about how to choose components for a particular voltage output in another page in the datasheet.

author: Peabody
author_rank: Super Contributor
timestamp: December 31, 2019, 05:28:23 pm
content: I don't have a problem with the linear regulator. Switching regulators tend not to be very efficient at very low currents. You don't have a big voltage drop here, and the regulator has a 1.6µA quiescent current, which is pretty good.You can charge the battery when the switch is turned off, but may not be able to do so safely when it's turned on. You would be drawing current for the regulator and controller through the charger. If that current is too high, the charger will not be able to sense that the battery is fully charged, and may continue charging. That's not safe for lithium batteries, which cannot be trickle-charged. It depends on the current needed for the load, but in the worst case you would have to turn the switch off while charging the battery.What's needed is a "load sharing" circuit, which both charges the battery and powers the load, independently, when USB is plugged in, so that battery charging can proceed properly to termination. You might see if Adafruit has a charger which uses the MCP73871, which includes the load sharing circuit. Info on load sharing can be found here:http://ww1.microchip.com/downloads/en/AppNotes/01149c.pdf

author: Kasper
author_rank: Frequent Contributor
timestamp: December 31, 2019, 06:59:49 pm
content: I agree with Peabody's post.That's how Adafruit does it on some of their feather boards. Check the Adafruit feather schematics of you want more part numbers than what is provided in that app note.

author: Nusa
author_rank: Super Contributor
timestamp: December 31, 2019, 10:34:20 pm
content: And when doing efficiency math, remember that what you label as 3.7V is a nominal voltage. Reality is going to be over 4V much of the time, rather plugged in or not.

author: online1234
author_rank: Contributor
timestamp: January 01, 2020, 03:30:22 pm
content: Quote from: mariush on December 31, 2019, 05:01:51 pmThanks for the suggestion. Really good tips as I wasn't aware of the regulator efficiency. I would definitely consider using the ic you suggested on a project in the future, like Bluetooth keyboard that takes every drop of power!The reason I add an on/off switch is that I carry the keyboard in my bag to work sometimes, switching off is a function I'd like to have.

author: online1234
author_rank: Contributor
timestamp: January 01, 2020, 03:40:46 pm
content: Quote from: Peabody on December 31, 2019, 05:28:23 pmMany thanks for reviewing. That's what I afraid of when dealing with a battery charging circuit, the last thing I want is battery explored to my face. lolI definitely will look up the load sharing circuit and implement into it.

author: online1234
author_rank: Contributor
timestamp: January 01, 2020, 03:43:45 pm
content: Quote from: Nusa on December 31, 2019, 10:34:20 pmYou're right! Thanks for pointing it out.

author: online1234
author_rank: Contributor
timestamp: January 01, 2020, 07:21:26 pm
content: Forgot to say... Happy New Year!Added a load sharing circuit. I followed gerdmuller.de lipo charger design.https://easyeda.com/gerdmuller.de/lithium-battery-charger-mcp73831-with-load-sharingThere are things I don't understand - What is the purpose of the 100K resistor(R4)?and why use schottky diode instead of signal diode? I assume schottky diode have a lower forward voltage drop?

author: james_s
author_rank: Super Contributor
timestamp: January 01, 2020, 07:40:37 pm
content: If you're a beginner, don't mess with a switching regulator just yet, they're much easier to use than they used to be but it's still a can of worms that you don't need to be opening for this project. If you were trying to regulate down from something like 24V or your circuit was drawing an amp or more then I'd feel differently but in this case 80% efficiency is pretty good, you could easily do worse with a poorly optimized switcher.

author: Peabody
author_rank: Super Contributor
timestamp: January 01, 2020, 07:56:04 pm
content: Happy New Year!First, it seems you have the P-channel mosfet oriented backwards. You have it oriented in the typical switch mode, but for this purpose it needs to be the opposite way around - with BAT+ feeding the drain, and the source at Vout. The reason is the body diode, which needs to be forward biased from the battery toward the load. The body diode needs to block current from flowing from USB/D1 back into the battery. The mosfet will conduct about the same in either direction if it's turned on, but in this case the direction of the body diode is controlling. Compare your drawing to the gerdmuller drawing.The purpose of the resistor is to make sure the mosfet gate is turned ON when USB is NOT plugged in, so the battery can supply current, but turned OFF when USB IS plugged in. You want USB to directly power the load and charge the battery, independently, and you need the mosfet to be OFF then. The body diode will not pass current from the battery because the 4.2V maximum voltage there is lower than the USB voltage. You may have to adjust the value of the resistor. A full explanation can be found here:https://blog.zakkemble.net/a-lithium-battery-charger-with-load-sharing/And yes, a Schottky is used because the forward voltage drop is lower.

author: Kasper
author_rank: Frequent Contributor
timestamp: January 01, 2020, 08:16:30 pm
content: Happy New Decade!re PMOS orientation: it is helpful to include the body diode in the schematic symbol so it is easier to read and harder to screw up.

author: online1234
author_rank: Contributor
timestamp: January 02, 2020, 12:56:59 am
content: Thanks for the explanation! I was confused by the name of the terminals, thinking just to connect them according to the name.Trying to figure out the value of the resistor, but regrettably, I don't have the basic electronic knowledge. My brain is fired only just look at those equations.I go with 100k as per the example for now.

author: online1234
author_rank: Contributor
timestamp: January 02, 2020, 01:01:14 am
content: Quote from: Kasper on January 01, 2020, 08:16:30 pmI downloaded the symbol from somewhere.After more research, I redrew the symbol and it makes much clearer on how it works!