I am creating a power supply which will need to convert the 24vac to 5vdc. I am thinking of using a rectifier to convert ac to dc, then a capacitor to smooth out the voltage, then an LM2596-5 to drop it down to 5v. I am having trouble with selecting the right capacitor to smooth out the voltage. I saw this formula to find out the capacitor value

Current * Half Cycle time / acceptable voltage drop *1000 = C uf

When I plugged in my values

2 * 8.3 / 1 * 1000 = 16,600 uf

As you can see I get a ridiculous number and this guy has used a 100 uf cap on his 24vac to 5Vdc power supply. My use is a smart thermostat that I am making. my max current that my setup takes is 1.4a but my rectifier is rated for 2a so that is why I am doing 2 amps. I am mainly confused on how the formula is giving really large numbers and why that guy happily chose 100uf

The Formula I got is from this video

  • \$\begingroup\$ If you want only 1 volt of ripple, and have 1 amp load, re-charging only once per second, then you need ONE FARAD. For 1/120Hz, you need 1/120 = 8,333uf. \$\endgroup\$ Commented Jun 30, 2019 at 3:35
  • \$\begingroup\$ @analogsystemsrf why did you use 120hz? \$\endgroup\$ Commented Jun 30, 2019 at 3:49
  • 1
    \$\begingroup\$ @SunnyskyguyEE75 isn't 24vac is around 35vdc after rectification because of RMS \$\endgroup\$ Commented Jun 30, 2019 at 3:50
  • \$\begingroup\$ "isn't 24vac is around 35vdc after rectification because of RMS" - yes it, is and the unloaded output voltage may be even higher (better not be higher than 37V!). \$\endgroup\$ Commented Jun 30, 2019 at 3:59
  • \$\begingroup\$ @BruceAbbott So what will the DC to DC converter that you can buy do differently than my current configuration? What would you recommend to change? \$\endgroup\$ Commented Jun 30, 2019 at 4:09

2 Answers 2


My method of calculating C bulk for AC rectifiers is based on energy storage required to prevent dropout if AC input cuts out for 1 cycle at max load.

The typical design on page 1 of your IC spec shows a Cin=680uF for a 12V to 5V @ 5A.

Let’s how close I get to their recommended design.

also Figure 23 shows the ripple current rating for the typical bulk e-cap must have a larger ripple current rating , for larger cap values to withstand the current surges. The RMS current rating of a capacitor is determined by the amount of current required to raise the internal temperature approximately 10°C above an ambient temperature of 105°C. This is NOT the value you want to use in the design , rather the max rated for which capacitors are rated for often 1500 hrs lifespan at the rated temperature. Lower ESR, higher ripple current yet smaller C values are desired. Then ripple voltage in the cap can be further reduced by the circuit ESR added to the cap ESR.

However a lower input voltage a higher average current is needed to maintain a constant DC output power. So there are a lot of critical tradeoffs to balance in e-cap selection and the wrong one means poor reliability and efficiency from overall losses incurred.


Thus using 50 Hz for one cycle= 20 ms. Your output power specified was 5V*1.4A=7W and the suggested efficiency was 80%. So the required energy = E= P*t/80%= 180 mJ

The 24Vac bridge can produce 35V no load and about 24V average with lots of ripple so if we use this high ripple avg, \$E=1/2CV^2=180mJ\$ thus \$C=180mJ*2/24^2=625 uF\$

Hmm pretty close.

Next ESR or Ripple current.(rms) I use the same value as DC current as expected value ( but not a hard startup). so to reduce the stress on the heating up the cap, I am going to insert a power SMD resistor to this cap about 0.1 Ohm hopefully for reliability purposes for the cap without creating losses elsewhere. Then choose a cap with an ESR value of 10 mOhm so it doesn’t heat up much. this results in a ESR*C=0.01*680uF=6.8us which I know is achievable in low ESR caps. (<10us)

so my recommendation is 625 uF or 680 uF ,10 mOhm + Rs=100 mOhms in series.

  • \$\begingroup\$ Can you explain me how you calculated the energy? I live in Canada so I have 60 Hz. In the formula for the capacitor why did you multiplied the joules by 2? \$\endgroup\$ Commented Jun 30, 2019 at 13:41
  • \$\begingroup\$ I see there are lots of different formulas. do you know why there are so many formulas just for calculating one value \$\endgroup\$ Commented Jun 30, 2019 at 13:43
  • \$\begingroup\$ it is because there are so many different tradeoffs. I just made a simulation with my assumptions and model of your design and did not get the best efficiency but got it working with 100uF|30m + Rs=100m using Falstad’s sim (what @Transistor calls a toy) with 24Vac 50Hz input resulting 24Vdc rms then Buckboost to 5V A 1.4V validating every comment I made. \$\endgroup\$ Commented Jun 30, 2019 at 15:14
  • \$\begingroup\$ I live in Toronto just outside GTA... OH CA-NA-DAH , eh! Look again C= 2* .... \$\endgroup\$ Commented Jun 30, 2019 at 15:20
  • \$\begingroup\$ To be honest I really don't know what you did in your formula. how did you get the joules? Why did you divide by 24^2 when you wrote before it is being divided by 1? Sorry if I am bugging you but I don't understand what you did. \$\endgroup\$ Commented Jun 30, 2019 at 16:25

Since the LM2596 is a switching regulator, the input current will be much lower than the output current. Assuming a minimum of 24VDC input and 83% efficiency the input current for 2A output at 5V would be 2/(24/5)*1/0.83 = 0.5A. Using your formula the required capacitance is then 0.5*8.3*1000 = 4,150uF.

If more ripple is acceptable then a smaller capacitance would be sufficient. You have around 10V of 'headroom' before the voltage drops below 24V, and even more before it gets close to the regulator's dropout voltage. For 10V ripple you only need ~415uF according to the formula.

However there is another reason for using higher capacitance - mains 'brownouts' and dropouts. Even though it might work OK with as much as 20V ripple under normal circumstances, a few low voltage or missing mains cycles could allow the capacitor voltage to drop too low, causing mysterious glitches in the device being powered. Higher capacitance holds the voltage up for longer to smooth over any momentary drops in the mains voltage.

  • \$\begingroup\$ I understand more thanks. Few questions. First is how did you calculate the amps. Second, I see that these capacitors are pretty large. Is it possible to add multiple smaller capacitance capacitors in parallel or series? I can build sideways but I don't want it to be too thick. if it's not possible then I guess I can lay it down sideways. \$\endgroup\$ Commented Jun 30, 2019 at 4:47
  • \$\begingroup\$ also, how does ray (the guy from the link in question) get away with his 100uf cap. his current draw is 1a \$\endgroup\$ Commented Jun 30, 2019 at 4:56
  • \$\begingroup\$ At 100% efficiency power in = power out. Power = Volts * Amps, so the current ratio is the inverse of the voltage ratio. The voltage ratio (from input to output) is 5/24 so the current ratio is 24/5. If 270uF is OK for 10V ripple then 135uF is OK at 20V, maybe even a bit less due to shorter time between half-cycles lower down the curve. Also your formula may be conservative, and his circuit might be drawing less current? I wouldn't be happy with it though. \$\endgroup\$ Commented Jun 30, 2019 at 5:03
  • \$\begingroup\$ You can put capacitors in parallel to make more efficient use of space. In series is bad because it reduces the total capacitance. \$\endgroup\$ Commented Jun 30, 2019 at 5:26
  • \$\begingroup\$ The 2496 switching regulator has large pulse currents, from 3.6 - 7A and this does not depend on load. You need to size the capacitor to ensure that you don't get dropouts. The formula described may work for linear regulators but will give you much to high a C value for a switching regulator. You need to include both the switcher pulse width and frequency in any calculation. \$\endgroup\$ Commented Jun 30, 2019 at 6:09

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.