# How to calculate proper R value for RC filters in amplifier power supply

This is an extension of a question I asked yesterday here regarding power rail sag I was seeing (turns out I was indeed dropping below the regulator dropout voltage).

I'm trying to figure out how I would obtain the appropriate values for the calculations to devise a proper resistor value if I did indeed want to include one or more RC filters in the power supply rails.

If I were trying to implement an amplifier circuit (past the power supply of this schematic, so the everything but the included power supply) and run a variable load of 16 ohm headphones up to 600 ohm headphones to a reasonable volume, how do I calculate this? The amplifier circuit is just for reference, it wouldn't be this exact one but similar in nature (two stages, gain and buffer)

Amplifier schematic:

PSU schematic I'm testing with from the previous post:

I tried removing the first set of resistors (of the two in series, so now just 10ohms) to make the reservoir larger but still leave one RC filter, but because I'm not quite sure how to calculate the proper resistor value it ended up instantly frying the leftover resistor once powered.

Sorry for my ignorance on the subject. I have a basic understanding of calculating various parts of a circuit, but this is much more complex than I've tried before.

• What is the maximum expected load current? – Bruce Abbott Oct 24 at 19:53
• I'm looking at using LM4562's in parallel on the output stage. Possibly two of the chips per an output channel, so 8 amplifiers with 4 per an audio channel and the output limit being +/- 26mA per an individual amplifier channel. All of that is way more current than I could ever need for headphones, but it should help reduce noise if setup properly from what I understand summing the amplifiers together for each audio channel. Overall, similar to the specs of the amp schematic I posted which had a design goal of 7 Volts RMS & 200+ mA peak current. – crabbyone Oct 24 at 20:33
• @crabbyone Well, I calculate that it takes $3.3\:\text{ms}$ to dump half of the energy that your resistors will absorb (about $80\:\text{mJ}$) if there was no load at the time. (I ignored the inrush current you must be experiencing and assumed near-instant charging of the first set of capacitors.) That's about $25\:\text{W}$ over that short time period. There are resistors specified with a fusing action integral (I^2 t) -- but many aren't, too. What exactly do you want to calculate? Or do you want recommendations for resistors that can handle what is happening now? Or what else, exactly? – jonk Oct 24 at 22:05
• Thank you @jonk, I guess what I'm looking for is two fold. What are suitable values for resistor/capacitor in this area for the RC filter and how would I have calculated that in the first place? I have been reading through the Douglas Self Small Signal Audio Design book and he references in a +/-17v circuit built similar to this, he measured very low ripple noise (below that of the 17v linear regulator after the filtering) using a 6,800uF reservoir capacitor followed by a 2.2ohm resistor and 4,400uF capacitor configured as an RC filter. How do I calculate the specs for wattage in that case? – crabbyone Oct 24 at 22:49
• @crabbyone My very first serious design attempt (many decades ago, as a teenager) was a linear power supply like this, except using BJTs for regulation. There is enough complexity, despite apparent simplicity in basically understanding the ideas behind it, that doing a good design requires quite a breadth of study/knowledge. (Of course, one can easily make one without knowing that much, too. That's what's great about it as a learning tool. You can start "mostly ignorant" and still get by, if badly. Then learn and improve as you go. Nice, in that way. – jonk Oct 25 at 0:30

## Overview

Let me start with some thoughts about using headphones. Typically (I think, but I'm open to correction), headphones are arranged as $$\32\:\Omega\$$ devices. (They will range upwards towards $$\600\:\Omega\$$, today, though I commonly used very sensitive $$\2\:\text{k}\Omega\$$ headphones "back in the day." (Hard to find, now.) The power output offered on devices like cell phones (where available) is usually in the small number of milliwatts: perhaps as much as $$\10\:\text{mW}\$$, give or take. So, assuming a simple sine wave (I need to state that assumption because music and other audio isn't a simple sine wave), the expected peak output voltage will be on the order of $$\V_\text{PEAK}=\sqrt{2\cdot R\cdot P}\approx 800\:\text{mV}\$$. In short, if the output of a single channel can handle a $$\\pm1\:\text{V}\$$ swing, you've done more than enough.

Now, amplifiers can be fixed-gain (if we are building one of these on a protoboard) or support a volume control (if making something commercial and more useful.) The above computations were maximum output swing values, assuming the volume control is at its maximum output position. Of course, less swing works fine if you want a lower volume. But the above gives you a back-of-the-envelope estimate of your output requirements.

This relates directly back to your power supply rail requirements. An amplifier system will need voltage rails (of course) in order to operate well. But the closer those rails are (within circuit limitations of course) to the maximum needs at the output, the less wasted power their will be and the easier/cheaper the power supply itself often will also be. You don't want to cut corners. But there's no reason for a $$\\pm 12\:\text{V}\$$ power supply, if your output isn't ever going to need to do better than $$\\pm 1\:\text{V}\$$ at its output. Opamp outputs (and inputs) have limitations when they get near their rail voltages. And a BJT circuit will have its own requirements for "voltage headroom." If you want to be generous, I'd say that you should add another $$\3\:\text{V}\$$ to your output requirements. In this case, I don't think you need more than $$\\pm 5\:\text{V}\$$ and almost certainly could live very well at $$\\pm 4\:\text{V}\$$.

So my first thought about your power supply is to reduce the voltage to one that provides $$\4.5\:\text{V}\$$ with $$\\pm 500\:\text{mV}\$$ allowable ripple on the supply. Of course, if you already have the transformer and parts then that's another issue.

Also, you really only need to have a peak current compliance of perhaps $$\\pm 30\:\text{mA}\$$ and certainly no more than $$\\pm 50\:\text{mA}\$$ at the output. To be honest, this earlier figure of $$\\pm 30\:\text{mA}\$$ is very close to what you can expect from many simple and cheap opamps. So your headphone needs are well within easy grasp of an opamp circuit, with only minor worries to consider later. This calculation helps validate the first-glance appearances of your circuit, which uses opamp outputs directly (without added external devices to boost compliances.) So that makes me happy, without bothering to check the datasheets on your opamps.

## Unregulated Power

A transformer is obvious. This both isolates your circuit from the mains supply and also efficiently steps down the voltages to something closer to your needs. A center-tapped transformer makes using a bridge rectifier easy to use in creating a pair of plus and minus voltage rails, too. So all that is to the good and pretty easy to follow.

Given that, you now have some capacitors added to the circuit. If you add these directly after the diode bridge, then when you power things up there will be very high currents running through the diode bridge as it works to "fill" the capacitors to their nominal voltages. Once that's reached, of course, it calms down a lot.

But it might be best in your case if you'd skip the first bank of capacitors and just focus on using a set of resistors followed by capacitors. The resistors will automatically limit that in-rush of current. And, to be honest, you really don't need a direct connection from the capacitors backwards to the transformer. We are only talking about something like $$\10\:\text{mW}\$$ per channel (left channel/right channel) or a total of $$\20\:\text{mW}\$$ into the headphones (if very loud.) If you assume the power supply is designed for $$\500\:\text{mW}\$$ per rail, it's still a very tiny power supply and the resistors won't interfere much. But they will help protect against the in-rush current and also help "filter" away the ripple.

You could, if you want to be aggressive about it, add another set of resistor+capacitor filters to each side. If so, then your circuit would be extended by adding resistors going from the bridge DC outputs to their first capacitors. But the calculations of the final ripple would take me further than I want to go. So I'm just going to help with calculation of a single, loaded RC filter, exposed to the $$\120\:\text{Hz}\$$ pulses available at the output of the bridge rectifier.

## Filter Capacitor Calculations

In steady state conditions, under load, the capacitors will supply current for the amplifier system and your headphones for some of each $$\120\:\text{Hz}\$$ period -- in short, for only some part of each $$\8.3\:\text{ms}\$$ period. But as soon as the next cycle rises upwards enough, the diodes move rapidly into forward conduction and then they (and the transformer) supply the current needed to re-charge the capacitors as well as supply the amplifier system and headphone loads. At the very peak of this next cycle, the voltage at the transformer moves downward again and soon enough the transformer ceases to supply the current. And the load shifts back over to the capacitor.

If there were no load at all, then the capacitors would charge up at the beginning and then nothing much else would happen. But with a load, the voltage on the capacitors will decline as current is drawn from them. Similarly, as the bridge rectifier activates, it will re-charge the capacitors through the (suggested) resistors. The resistors will limit that inflow of current to safe values, but that also means they will make it take longer to charge up the capacitors.

For simple purposes, you can assume that both the process of charging the capacitors upward via the resistors and the process of discharging them into the load is linear, with a computation that looks something like:

$$\Delta V = \Delta t\frac{I}{C}$$

Here, $$\I\$$ is the total current ($$\I_R\$$ if charging or $$\I_\text{LOAD}\$$ if discharging) and $$\C\$$ is the capacitance, of course. In steady state, the meaning of $$\\Delta V\$$ will be your allowed peak-to-peak ripple -- obviously, the rise from the minimum capacitor voltage to its maximum must equal the fall from the maximum to its minimum. So that one you can just plug in as you like it. Finally, $$\\Delta t\$$ will be $$\t_\text{charge}\$$ when charging through $$\R\$$ or else $$\t_\text{discharge}\$$ when supplying current to the amplifier and headphones.

Again, note that the rising $$\\Delta V\$$ must, in steady state, be equal to the falling $$\\Delta V\$$. So it follows easily that $$\\Delta t_\text{charge}\frac{I_R}{C}=\Delta t_\text{discharge}\frac{I_\text{LOAD}}{C}\$$. Cancelling $$\C\$$, it's $$\\Delta Q = I_R\cdot \Delta t_\text{charge}= I_\text{LOAD}\cdot \Delta t_\text{discharge}\$$.

It turns out that charge is everything. I'd mentioned the equation of $$\\text{d} Q = C\cdot \text{d} V\$$ or, in finite terms, $$\\Delta Q = C\cdot \Delta V\$$. This means that there will be a certain change in charge on the capacitor during the charging period and the same change (but with opposite sign) in charge during the discharging period. Current times time is charge, so $$\\Delta Q = I_R\cdot\Delta t_\text{charge}=I_\text{LOAD}\cdot \Delta t_\text{discharge}\$$. You also know that $$\\Delta t_\text{charge}+\Delta t_\text{discharge}\approx 8.33\:\text{ms}\$$.

Intuitively, I think you may begin to feel that there is something here that allows us to work towards both a good value for $$\C\$$ as well as $$\R\$$. Let's put down some numbers. Suppose we go with my $$\V_\text{CC}=4.5\:\text{V}\$$ with $$\\pm 500\:\text{mV}\$$. Then this means that $$\\Delta V=1\:\text{V}\$$, as the voltage at the capacitor goes from $$\4\:\text{V}\$$ to $$\5\:\text{V}\$$ and back, again. (Similarly for the negative rail.) Suppose we also decide that our amplifier and headphones will present a total average load of $$\I_\text{LOAD}=100\:\text{mA}\$$ (per rail.) [Note we are setting up budgets right now for the design.] And finally, let's just assume that the capacitors are supplying the load for "most of the time."

I say "most" and not "all" because if you assumed the capacitors supplied all of the load current, all of the time, there'd be no time for charging them back up and the required $$\I_R\$$ would be infinite. We know that's crazy. So we know the capacitors will only supply load current for "most of the time." We know also that it will be most because if it weren't most of the time, then the bridge rectifier and resistor would be supplying it and that would imply lots of ripple because that's what the rectified AC pulses "look like" (rising from zero to the max value and then back to zero.) Since we know that's not the case (or, at least, we hope it's not), we can conclude that in any design we care about the capacitors will be supplying the load for most of the $$\8.33\:\text{ms}\$$ period.

Calculus would let you work out the details. But let's say that since we are going from $$\4\:\text{V}\$$ to a peak of $$\5\:\text{V}\$$, then it must be the case that the angle at which charging starts must be about $$\\operatorname{sin}^{-1}\left(\frac45\right)\$$, stopping near $$\90^\circ\$$, out of a total of $$\180^\circ\$$ (each $$\120\:\text{Hz}\$$ period is half of a sinusoidal period.) This suggests about 20% charging time and 80% discharging time, as a broad guess.

Keeping it very simple, then, we find that $$\C=80\%\cdot t_\text{period}\cdot \frac{I_\text{LOAD}}{\Delta V}\approx 666\:\mu\text{F}\$$. We'd round that to $$\C=680\:\mu\text{F}\$$.

## Resistor Calculations

I find now that the average charging current through $$\R\$$ must be four times more, because the time available for charging is four times shorter. We want the peak value, though, for $$\I_R\$$, which will be about twice the average. So in this case the peak current will be $$\2\cdot 4\cdot 100\:\text{mA}\$$ or $$\800\:\text{mA}\$$. As the peak voltage (over the minimum voltage of the once-discharging capacitor) is $$\1\:\text{V}\$$ (our $$\\Delta V\$$, so to speak), then $$\R=\frac{1\:\text{V}}{800\:\text{mA}}=1.25\:\Omega\$$. We can choose a nearby standard value of $$\R=1.2\:\Omega\$$.

## Transformer

With that in hand, the last bit of business is the transformer secondary voltage. With current peaks mentioned above, I'd expect at least one volt and probably more across a diode in the bridge, at peak charging current. (Which occurs close to where the capacitor voltage is at its minimum.) We know the voltage drop across the resistor is $$\\Delta V=1\:\text{V}\$$, at this moment. So I figure that one side of the center tap must be $$\V_{\text{C}_\text{MIN}}+\Delta V+V_\text{DIODE}=4.0\:\text{V}+1\:\text{V}+1.2\:\text{V}=6.2\:\text{V}\$$, or about $$\4.4\:\text{V}_\text{RMS}\$$. Doubled to get both sides of the transformer, that's a secondary rated for $$\\ge 8.8\:\text{V}_\text{RMS}\$$. (There are more details in specifying an appropriate transformer, such as its "regulation %" and current handling, etc.) But that gives an idea. I'd probably select a $$\9\:\text{V}_\text{RMS}\$$, center-tapped transformer in this case.

## Validation

I promise you that I did not, in any way at all, attempt to do anything with Spice prior to writing the above text. It came entirely from a "stream of consciousness" and nothing more. I was, of course, interested in verifying what I wrote to you. So just a few minutes ago I cobbled up a behavioral Spice schematic to test myself and make sure I didn't completely screw up along the way.

Here is the schematic and resulting waveforms for both rails:

I used a $$\45\:\Omega\$$ resistor for the load, as this is what I'd assume given an average rail voltage of $$\4.5\:\text{V}\$$ and a desired average current of $$\100\:\text{mA}\$$. The $$\X\$$ parameter on the schematic is just the RMS voltage for the transformer.

Close enough.

[More can be done, of course. But then you'd be deep into coursework and I'd need to write a book, or something (which I promise you I'm not qualified to write.) Since these books have been written by qualified, well-informed authors, I'd suggest you start simple like this but then also consider books and/or just sitting down with paper and pencil to work outward from here, questioning my various (somewhat incorrect) assumptions and thinking more closely. Over time, you'll find interesting nooks and crannies where the above doesn't work well and then you'll expand your reach. For example, there is definitely one place where I seriously glossed over a detail that provides you with a quantity twice the value you'd see with an oscilloscope, but which as you can see from simulation works out in the end and keeps this simpler to write about.]

• Thank you so much @jonk, this is more information than I could ever ask for. I have a lot to digest here, but this will certainly tie together a lot of things I had read and fill in the holes between them. – crabbyone Oct 26 at 2:58
• @crabbyone I apologize for not having more time to draw various pictures. But you can find them on the web as well as here in EESE. I also probably could have written less and better, or still more and better, but I didn't have time to do either. Hopefully, what I did do works "okay" for you. – jonk Oct 26 at 3:07