I'm having trouble designing a power supply circuit for a small microcontroller-based project.

The board I'm building will be powered by a 3.7V LiPo battery most of the time, but it could also be connected to a computer via USB. In that case the computer should be used as power source and the battery should be charged. The circuit to be powered requires around 5V and uses under 200mA.

I've put together various schematics from around the web and I've come to this, but since I don't know much about electronics I'm unable to tell if it would work or maybe burn...


[EDIT: I added a physical switch right after the battery to disconnect it and thus reduce leakage current when the system is turned off]

Here are the datasheets of U1 and U2:

So, here are my questions:

  • Will this circuit work? What should I change?
  • If the circuit makes some sense, are Q1 and D1 appropriate? (I have no idea, I found them in one of the many forums I just visited)
  • Even if this circuit doesn't make any sense, how should the thermistor for the MCP73833 be placed? I guess I should stick it on the battery, but I've never seen a battery with something looking like a thermistor on it, so I'm curious.

Thanks for any answer!


Do you really need 5V to be used in your uC? There are some available uC's that can be powered with 3.3 volts, which will eliminate the hassle of boosting the battery voltage to 5V.

Q1 is what cuts the supply voltage from the boost converter if you plug it in to USB. D1 in the circuit makes sense but I don't think it's a good idea to put it there. Diodes usually have a voltage drop of 0.7 V, which means that if you power your circuit using USB, your VCC will drop to 4.3V.

You are also correct about the Thermistor being on the Battery. LiPo batteries have a history of being explosive and unsafe, that's why the thermistor is required.

EDIT: So far your circuit is correct and based on the datasheets that you have given, you are using these circuits the way they are supposed to be used.

  • \$\begingroup\$ thansk for your answer. Yes, I do need at least 4.5V. I put the diode there to prevent the battery power from cutting itself off by powering Q1.. \$\endgroup\$ – noearchimede Aug 24 at 10:39

I'm definitely not a professional electronics engineer, so take this with a large grain of salt.

That said I've used the following in a very similar application (details for all the components and the PCB layout are available on GitHub) and it works pretty well (although there's some coil whine): schematic

If you use a battery with built-in protection circuitry this is all you need. The single IC is a TP5400 charge controller/boost converter ($1.50 for 5 pieces including shipping on Aliexpress) which is used in cheap chinese power banks. It supposedly delivers up to 1A, but I'm using <200mA so I can't guarantee that's accurate. There's a (partial) english translation of the datasheet available here.

The power switch cuts off after the switching regulator. I measured a standby current of a few microamps, which would give at least several months of standby time, more than enough for me.

This is definitely not the right solution if you need guaranteed reliability but it's probably hard to beat on price and simplicity.

(This was the first time I designed a PCB with a switching regulator, I probably went overboard with the caps.)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.