I am designing a 5 V DC power supply. I will explain the main component set up excluding the capacitors since I am not sure of capacitor placement or appropriate ratings.

I intend to supply power to only three things:

  1. one white led (3.3 V, 20 mA);
  2. one green led (3.3 V, 20 mA);
  3. one USB 2.0 type A receptacle (5V, 2.5 A). [This USB receptacle will supply power to a Raspberry Pi 3 B, hence the 2.5 A maximum].

I intend to place these three things in parallel.

I believe I am using a typical design by starting with a transformer with output rated at 12 V @ 4.17 A with a maximum power rating of 50VA. The transformer secondary voltage will be connected to the bridge rectifier (GBU410) which is rated at maximum output current of 4A. Then of course current goes from this rectifier to a LM323K linear voltage regulator rated at 5V, 3A. Then, from this, current will split to the parallel branches. The branches with the LEDs will be regulated by only one LP2950 low drop out (LDO) voltage regulator rated at 3.3 V, 100 mA.

Now, regarding capacitors, I believe my main concern is placing the appropriate capacitors near the linear voltage regulator and near the LDO regulator. Is that correct? If not, please correct me.

If I am correct, what are the appropriate capacitor types and ratings for this type of low power system? And how many actual capacitors should there be in theory?

In terms of quantity, is it ok to think that I will only need 4 capacitors for this system? (Two for the linear voltage regulator and two for the LDO regulator.)

Please let me know if my reasoning is faulty for any or all of these questions.

  • \$\begingroup\$ What does "led (3.3V, 20 mA)" mean? 3.3V forward voltage? Because LEDs tend to not care about the supply voltage, as long as you keep within the rated current. 3.3V supply is too low for many LEDs though. \$\endgroup\$
    – Lundin
    Nov 30, 2023 at 7:54
  • \$\begingroup\$ thanks for the reply. this is the information from the datasheets for both LEDs. forward voltage Vf (3.3V) and forward current If (20 mA). what do you think about the capacitor questions ? \$\endgroup\$
    – keikaku
    Nov 30, 2023 at 8:04
  • \$\begingroup\$ And so you must provide a higher voltage, preferably with margins. If you provide exactly 3.3V then it won't work reliably. This (how does a diode work) is very basic stuff that you need to study long before attempting to design a voltage regulator circuit. \$\endgroup\$
    – Lundin
    Nov 30, 2023 at 8:23
  • \$\begingroup\$ here is an idea. what do you think of this. instead of using an LDO for the LEDs, i can just use the one 5 V output and resistors in series with the LEDs to lower each branch to the appropriate voltage needed for the LEDs. this would give the margin you mention, correct ? also, what do you think about my questions about the capacitors ? \$\endgroup\$
    – keikaku
    Nov 30, 2023 at 8:36
  • \$\begingroup\$ Yes, obviously you need resistors in series with the LEDs or they will burn to a crisp. You use resistors to give the desired current, not voltage. But seriously, you need to back away from this project until you have studied electronics more. In particular, you should not go anywhere near VAC, for now. \$\endgroup\$
    – Lundin
    Nov 30, 2023 at 8:42

1 Answer 1


The reasoning is faulty, because in reality you do not want to make a linear regulator capable of providing 2.5A. So the capacitors are irrelevant.

That's because for 2.5A output at 5V which is 12.5 watts, there regulator needs 2.5A 12V input, which is 30 watts.

You will be spending more watts wasted as heat in the regulator that the watts used by load.

With about 18W going to waste as heat, the regulator needs a big chunk of metal as heat sink, and still the case of the regulator can be 35C hotter than the heat sink.

The rectified output from 12VAC transformer is about 17V max. Depending on if you live in 50Hz or 60Hz AC area, it will have an effect on the capacitance. To make 5V out, the regulator needs at least 7.5V minimum. After full bridge rectifying, the peaks happen every 10ms in 50Hz land, and the capacitor is charged to 17V. Under a 2.5A load, the capacitor voltage is allowed to drop from 17V to 7.5V. It turns out it is surprisingly low, only about 2700uF. In reality that is the minimum which takes no tolerance into account. But this is the way to calculate it, Q=I×t=C×U.

  • \$\begingroup\$ thank you for the reply. the input to the transformer is 120VAC at 60 Hz. and i am trying to understand what you wrote. initially you wrote that the capacitors are irrelevant, but it then it sounds like towards the end you say i do need them. is this correct? also, the input to the linear regulator will be at least 7.5V already, is that not what it needs? in addition, the "2700uF" value, is that just for one capacitor or for all of them? in either case, you didn't mention how many capacitors i actually need. could you clarify or expand further on your answer please ? \$\endgroup\$
    – keikaku
    Nov 30, 2023 at 8:28
  • \$\begingroup\$ @justme was showing you how to calculate the capacitors for a linear regulator but the first point stands: a linear regulator is entirely unsuitable for this application. Dissipating 30W of heat would require a very large heatsink and/or a fan. Use a switching regulator instead. \$\endgroup\$
    – vir
    Nov 30, 2023 at 9:11
  • \$\begingroup\$ @keikaku No the process how to calculate the bulk capacitor linear regulator is there, and it applies to all linear regulators. I am personally surprised how low the required capacitance actually is in this case. But what you should learn from this is that while in theory possible, it really makes no sense to make a 5VDC 2.5A linear regulator with 12VAC input. It is big, heats up a lot, weighs up a lot, and wastes energy. You can still do it if you want, as a learning experience. It will teach you a lot about different things you likely realize as you go, so itself it will be valuable. \$\endgroup\$
    – Justme
    Nov 30, 2023 at 10:08
  • \$\begingroup\$ @justme are you suggesting maybe i should use a transformer that steps down to less than 12 VAC ? \$\endgroup\$
    – keikaku
    Nov 30, 2023 at 15:24

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.