What is the general formula to calculate the peak to peak ripple voltage and Vdc average of the voltage at the input of the 7805 voltage regulator in a circuit like this?

Suppose the load is a fixed resistor. Then how can I find the peak to peak ripple voltage and Vdc voltage at the input of 7805? What are the general formulas for this?

enter image description here


  • \$\begingroup\$ How do you want to characterize the load? If it is a fixed load, the analysis if fairly easy, but if time varying, the solution is much more complex. \$\endgroup\$
    – colintd
    Sep 15 at 10:06
  • 2
    \$\begingroup\$ The answer doesn't really depend on the 7805. It's all about the rectifier, the capacitors, and the load current. The 7805 adds maybe a couple of milliamperes to the load current. \$\endgroup\$
    – JRE
    Sep 15 at 10:10
  • 2
    \$\begingroup\$ The answer to this question is in the question that your previous closed question was a duplicate of. Did you read the answers there? Also do you want the simple approximation like everyone else or really the actual formula which nobody uses as it would be too complex for any practical purpose? \$\endgroup\$
    – Justme
    Sep 15 at 10:31
  • 1
    \$\begingroup\$ First of all you need to know your transformer parameters. Nonideal transformers have strong dependency output voltage on load current. \$\endgroup\$ Sep 15 at 10:36
  • 1
    \$\begingroup\$ @Justme or really the actual formula which nobody uses as it would be too complex for any practical purpose? Have you got any references for this "formula that is too complex"? It's not hard to derive an approximation that doesn't assume infinitely short charging pulses, but then it's one step away from adding series resistance and needing differential equations. Takes a couple minutes tinkering with Mathematica for either one. The key observation is that the unwieldy solutions have reasonably accurate approximations. So we approximate in the model and in the solution, more than once. \$\endgroup\$ Sep 15 at 17:13

3 Answers 3


What is the general formula to calculate the peak to peak ripple voltage and Vdc average of the voltage at the input of the 7805 voltage regulator in a circuit like this?

The general formula should really be independent of what the load is. A 7805 with a fixed load resistance R is equivalent to a stand-alone constant current source 5V/R.

So, first we simplify the circuit we want to analyze:


simulate this circuit – Schematic created using CircuitLab

And now we attach this load to the rectifier:


simulate this circuit

With the source set to 9VAC RMS, rhe ripple on the smoothing capacitor looks as follows:

Ripple voltage waveform on the load

The ripple amplitude is ≈3.2Vpp.

To make the derivation more elementary, we further assume that the current pulses that charge the capacitors are infinitely short.

Thus, we have smoothing capacitor being discharged by a constant current from some peak rectified voltage, at a frequency of 50Hz. Due to full rectification, every 1/100th of a second, the capacitor gets recharged infinitely quickly and the discharge repeats.

Thus, all we really need to know is how low the capacitor discharges from the peak voltage:

$$\begin{aligned} C &= \frac{\Delta Q}{\Delta V} \\ \Delta Q &= I_{discharge} \cdot T_{discharge} \\ & \text{thus} \\ \Delta V &= \frac{\Delta Q}{C} = \frac{I_{discharge} \cdot T_{discharge}}{C}, \end{aligned}$$

where T is the rectifier pulse period - 1/2 of the mains period.

So, for our particular case of 57μF, 25mA load, and 10ms period (100Hz) we'd have

$$ \Delta V = \frac {25{\rm\,mA} \cdot 10{\rm\,ms}} {57{\,\mu\rm F}} \approx 4.4{\rm\,V}. $$

This estimate is a bit high. Looking at the formula, we know that the load current and the capacitance are known exactly, so that's not the problem. It seems that the time is too long. We'd get \$\Delta V\approx 3.2{\rm\,V}\$ for \$T'=7.3{\rm\,ms}\$.

So, how to find this time? Can we see it anywhere in the ripple graph? Let's see:

enter image description here

We found it: that's the time the capacitor is discharging. The remaining \$10{\rm\,ms}-7.3{\rm\,ms}=2.7{\rm\,ms}\$, the voltage is "riding up" the sine wave as the capacitor recharges.

We'd now want to find this charging period τ. From the graph we note that \$\Delta V=\frac{I(T-\tau)}{C}\$, and we can derive

$$\begin{aligned} V_{pk} \sin \left( \frac{\pi}{2}-\pi\frac{\tau}{T} \right) &= V_{pk} - \Delta V \\ \cos \left (\pi\frac{\tau}{T} \right) &= 1 - \frac{\Delta V}{V_{pk}} \\ \cos \left (\pi\frac{\tau}{T} \right) &= 1 - \frac{I}{V_{pk}\,C}(T-\tau) = 1 - \frac{I\,T}{V_{pk}\,C} \left( 1-\frac{\tau}{T} \right) \end{aligned}$$

To simplify this expression, we make two substitutions: $$\begin{aligned} \frac{\alpha}{\pi} &= \frac{\tau}{T} \\ \beta &= \frac{I\,T}{V_{pk}\,C} \\ \end{aligned},$$

and then

$$\begin{aligned} \cos\left( \pi\frac{\alpha}{\pi} \right) &= 1 - \beta\left(1 - \frac{\alpha}{\pi} \right) \\ \cos(\alpha) - \alpha \frac{\beta}{\pi} - 1 + \beta &= 0. \\ \end{aligned}$$

Now we can expand the left side into a power series:

$$ \beta - \frac{\beta}{\pi} \alpha - \frac{1}{2} \alpha^2 + O[\alpha]^3 = 0, $$

and solve:

$$ \alpha \approx \frac{1}{\pi}\left( \sqrt{\beta}\sqrt{\beta+2\pi^2} - \beta \right). $$

For those of you wanting to get α without using square roots, here's a 2nd order Padé approximation:

$$ \alpha \approx \frac{0.135452 \beta ^2+0.42255 \beta +0.0753487}{0.0450834 \beta ^2+0.304995 \beta +0.209677}. $$

Now we can back-substitute \$\alpha\$:

$$ \tau = \frac{T}{\pi^2}\left( \sqrt{\beta}\sqrt{\beta+2\pi^2} - \beta \right). $$

Let's get numerical results: $$ \beta = \frac{I\,T}{V_{pk}\,C} = \frac{25{\rm\,mA} \cdot 10{\rm\,ms}} {12.2{\rm\,V} \cdot 57{\mu\,\rm F}} = 0.3916. $$

Then $$\begin{aligned} \tau &= \frac{10{\rm\,ms}}{\pi^2} \left( \sqrt{0.3916}\sqrt{0.3916+2\pi^2} - 0.3916 \right) = 2.4{\rm\,ms} \\ T' &= T - \tau = 10{\rm\,ms}-2.4{\rm\,ms} = 7.6{\rm\,ms} \\ \Delta V &= \frac{I \, T'}{C} = \frac{25{\rm\,mA} 7.6{\rm\,ms}}{57{\rm\,\mu F}} = 3.3{\rm\,V}. \end{aligned}$$

The complete formula for ripple voltage then is:

$$ \boxed{\begin{aligned} V_{pk} &= \sqrt{2} \, V_{RMS} - 1.4{\rm\,V}, \\ \beta &= \frac{I\,T}{V_{pk}\,C}, \\ \tau &\approx \frac{T}{\pi^2}\left( \sqrt{\beta}\sqrt{\beta+2\pi^2} - \beta \right), \\ \Delta V &\approx \frac{I \, (T-\tau)}{C}. \end{aligned}} $$

Above, \$V_{RMS}\$ is the RMS AC voltage being fed to the rectifier, we assume 1.4V drop across full bridge under peak load, \$I\$ is the constant load current, \$T\$ is the half-period of the AC voltage (e.g. 10ms for 50Hz mains).

The average DC voltage is about

$$ V_{DC,avg} = V_{pk} - \frac{1}{2} \Delta V. $$

These formulas are approximate - with one useful significant digit, say ±10%. For better results, use SPICE with an accurate model of real components. Pay attention to the source impedance seen from the transformer's secondary, the ESR of the capacitors, behavior of diodes under pulse loading, etc.

The formulas work assuming a simplified model, and use series expansion - that's because the circuit, although simple, is highly nonlinear and no closed-form exact solutions exist and there's no point to them anyway. The model is too simple to start with. For a more complex model that uses differential equations and includes capacitor ESR and transformer Zsource, it's possible to get rather unwieldy analytical approximations using the Fourier transform. An interesting but rather practically useless exercise.


The general procedure is:

  • You know the output voltage, 5 V.
  • From the datasheet you can find the minimum regulator input voltage. From memory, it's about 7 V on the 7805. (There's a 2 V drop on all the 78xx regulators.)
  • Then you need to select transformer and capacitor values to ensure that the input voltage never falls below VMIN.

enter image description here

Figure 1. Valley dip voltage must be kept above the regulator's minimum input voltage. Image source: Making circuits easy.

  • Allow two diode voltage drops for the rectifier.

The linked article gives details on the calculations and a web search shows up many online smoothing capacitor calculators.

  • \$\begingroup\$ yes I really want to have the general formulas for peak to peak ripple and average DC voltage of the valley dip voltage. Of course these two voltages will depend upon the value of capacitor and input rectified voltage of the capacitor. I need the equation that relates these voltages to the capacitor. \$\endgroup\$
    – Alex
    Sep 15 at 10:39
  • 3
    \$\begingroup\$ Technically the question asked how to calculate the ripple. This does not answer that. Of course these formulas can be rearranged to give out ripple. \$\endgroup\$
    – Justme
    Sep 15 at 10:40
  • \$\begingroup\$ Please read the question again. I have edited it. \$\endgroup\$
    – Alex
    Sep 15 at 10:46

If you suppose that the load is "fixed", then one can do this ...
Suppose that current into load is "constant".

enter image description here


Your Answer

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

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