Bear in mind, I have zero electrical background, this is just a hobby so correct me if I make mistakes. This question is part of my journey trying to create my own pcb.

I want to create a power supply for an ATmega328P SMD microcontroller and a Legacy Digi XBee S1. According to the datasheets the XBee operates between 2,8-3,4V and the ATmega328P operates between 1,8-5,5V. Together I expect them to draw less then 150mA in power.

I decided to use 2 Li-ion cells to supply the power (they supply 3,7V in parallel). Now to make sure the voltage stays within range for both devices I decided to put a voltage regulator in my circuit.

I chose the TPS78001DDCR SOT because this voltage regulator uses very little power by itself and from what I've read should be one of the most efficient ones.. (long battery life is important to my application).

TPS780 pin configuration and functions excerpt from datasheet describing capacitor requirements

The datasheet mentions (as seen in the images) that it's a good idea to add capacitors to the IN and OUT pins. I have selected KEMET C0603C105K9RACTU as the to be used capacitors with a value of 1µF.

I have schematics and a custom parts library in Eagle for all of this. This is an edited diagram after remarks from Bimpelrekkie:

edited and improved eagle schematic of user

My question is:

  • Am I right that the chosen voltage regulator is the better choice for my application (terms of efficiency)?
  • Did I choose the right capacitors (1µF)? The datasheet mentions 0.1µF aswell.
  • How do I program the output voltage (3.3V)? I can't seem to wrap my head around the calculations done for programming the regulator. (datasheet chapter 7.5 or page 17)

Thank you for reading this far :)

  • 1
    \$\begingroup\$ 1) Sorry, but your "circuit diagram" is a mess. Look in the datasheet of the TPS78001 (bottom of first page) how we draw circuits. We are picky about that as making it too complex (like yours) makes it very hard to see how things are connected and makes it easy to make mistakes. Only in the PCB layout will the physical size and pin position of the IC matter. 2) those are not AA batteries. They're 18650 Li-Ion cells and these are much larger than AA cells. \$\endgroup\$ Commented Nov 30, 2017 at 6:36
  • \$\begingroup\$ @Bimpelrekkie Thank you for pointing out that these are not AA batteries. I've also used the correct symbols now and made a new diagram. \$\endgroup\$
    – cjsd
    Commented Nov 30, 2017 at 12:57

2 Answers 2


I agree that the TPS78001 would be a good choice assuming you stick with using 3.7 V (one Li-Ion cell or more cells in parallel) as the battery.

Going for a switching regulator will not bring much as the voltage drop across the regulator is small. Also the quiescent current of a switched regulator is very likely going to be higher than the 500 nA of the TPS78001.

To save power, I would design for the lowest regulated voltage both modules can accept so that would be 2.8 V. Then as long as Vbat = 2.8 V + 0.2 V = 3 V the regulator can regulate properly. But at 3 V the battery is too low anyway. Ideally you'd design the device to shut off if the battery goes below 3.4 V or so.

In the datasheet I only see 1 uF decoupling capacitors so that should be good enough, no need to add 100 nF. But (pro tip!) if you are designing a PCB for this then just add the footprints on the board but not place the component. Then if you do need them later, they're easy to add.

If you cannot calculate the resistors needed to set an output voltage then you're overthinking it. Look at table 2, note how R2 is always 1 M ohm. Note how \$V_{FB}\$ = 1.216 V, it is a constant. If you want 3.3 V then \$V_{out}\$ = 3.3 V. Now use equation 2 to calculate R1.

You could also see it as: R1 and R2 are a voltage divider. The input voltage is 3.3 V and the output voltage must be the value of \$V_{FB}\$ so 1.216 V. That would give you a ratio R1/R2. Then you choose R1 (or R2, it does not matter) and calculate the other.

  • \$\begingroup\$ I've written down to create a low battery cutoff. Where do you get the 0.2V value in your sentence "Vbat = 2.8 V + 0.2 V = 3 V"? I'll keep your tip in mind. Lastly does R2 have to be 1MOhm? Thank you for taking the time to respond and help me. \$\endgroup\$
    – cjsd
    Commented Nov 30, 2017 at 14:44
  • \$\begingroup\$ 3rd line on datasheet: Low Dropout: 200 mV at 150 mA. does R2 have to be 1MOhm No, you could make R2 100 ohm and R1 133 to get 2.8 V. That would work. But what would be the disadvantage of doing that? The datasheet states: Resistors R1 and R2 should be chosen for approximately 1.2-μA divider current That leads to R2 = 1 Mohm. \$\endgroup\$ Commented Nov 30, 2017 at 14:46
  • \$\begingroup\$ Thanks so much for the valuable info. It's people like you that keep me motivated to finish a project like this as a complete newbie. \$\endgroup\$
    – cjsd
    Commented Nov 30, 2017 at 16:01
  • \$\begingroup\$ I understand the part of the voltage dividing now. I should have 1,31 MOhm and 1 MOhm to get the Vout at 2.80896V. Thanks again! \$\endgroup\$
    – cjsd
    Commented Dec 1, 2017 at 1:01

Question 1: That is up to you to decide, there are too many variables to consider. Question 2: 0.1uF is the minimum specified by TI. Their reference schematics show 1uF.

Question 3: You have only 1 unknown, which is R1. Pick R2 = 1 MOhm, and solve the equation.

  • \$\begingroup\$ Can't upvote but have one \$\endgroup\$
    – cjsd
    Commented Nov 30, 2017 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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