The Classroom

Filters

...Operational Amps Revisited

Bob Harper

Issue 15, September 2018

This month we introduce you to op-amps used as the four basic filter types; Low-pass, High-pass, Bandpass, and Band Rejection.

Last month, we looked at how flexible op-amps were, and how they could be used in buffer and inverter circuits. Op-amps become even more useful when capacitors and inductors are added to the circuit.

The reactance of capacitors and inductors change as the frequency changes, thus allowing us to build amplifiers that change their gain as the frequency changes, or indeed, with both time and frequency.

RECAP ON REACTANCE

While resistors have resistance, capacitors and inductors are known as reactors. Reactors store the electrical energy in an electrostatic or electromagnetic field. Whereas a resistance converts the current flow into heat which cannot be returned to the wire, reactors only store the energy and return the energy when the fields close down.

Both capacitors and inductors limit a changing current, due to building the fields and then returning the energy to the circuit.

Another way to think of reactance is that capacitors attempt to maintain a constant voltage and inductors attempt to maintain a constant current.

An inductive time constant exists, but for the circuits that follow we will only deal with Capacitive time constants. You may remember that the time constant ‘Tau’ which uses the Greek letter ‘τ’ is the period of time taken for the voltage across a capacitor in series with a resistor to reach 63% of the applied voltage.

(We will leave the maths out this time or we’ll never fit the column!). The end result is that Tau = RC.

PASSIVE FILTERS

We have used resistor/capacitor circuits in the past to filter ripple voltage from power supplies, and to filter the signal from a pulse monitor in our heartbeat circuit. So the idea of a filter is not new to us.

When a capacitor is in parallel with a load, it is intended to maintain a steady DC, and bypass noise (ac) to ground. The capacitor only works properly as a power filter when there is a little resistance between the source and the capacitor. That is exactly what an ‘RC’-Filter circuit looks like.

Note: Filters using inductors and resistors (‘LR’-Filters), or capacitors and inductors (LC) or even ‘LCR’, are also used, but this article will stick with resistors with capacitors, (RC) as inductor values and therefore inductor sizes become large at low frequencies.

1
fig 1

In the power supply [1], DC is passed but ac is filtered out. We call that a low-pass filter. It doesn’t have to be at DC, however. If we take a better look at the circuit [1A], we will notice that the resistor and capacitor are actually a voltage divider. At zero frequency, DC, the capacitor will appear as an open circuit and have no effect on the output voltage. At infinite frequency, whatever that means to you, mathematically the capacitor will be a short circuit or ~0Ω reactance, and no signal can get past it.

At a frequency when the capacitive reactance is exactly equal to the resistance, the voltage divider will allow exactly half the signal amplitude to pass. In decibel terms, we call that -3dB. If you remember that 3dB means double, then -3dB means half power. We call that frequency (When R = Xc) the ‘cut-off frequency’.

Without using maths to prove it, fC = 1/(2 × π × R × C), or more commonly written as f = 1/(2πRC).

As an example, both circuits have a resistance of 1 and a capacitance of 159nF, the cut-off frequency can be calculated to be 1000Hz. (1001Hz to be more pedantic, yet still not perfect). The difference between a Low-pass Filter (LPF) and a High-pass Filter (HPF) is the placement of the resistor and the capacitor in each circuit.

The key difference between the two circuits [1] is the position of the R and C. If you swap these two components, a low-pass filter will become a high-pass filter, or vice versa.

In these circuits, Vout = Vin x Xc/(R+Xc) = Vin x 1k/(1k + 1k) @ fC = 1/(2RC) Hz

2
graph

The above graph of the Low-pass Filter [2] shows the resistance of R and reactance of C (in Ohms). The ac input voltage (0dB) and the resulting voltage at the junction of R and C in dB (Gain). You will also notice that the filter actually results in a dB Loss or a -dB Gain.

BUFFERED PASSIVE FILTERS

The low-pass and high-pass filters we have just shown have one limitation. If the energy drawn from the filter is great enough, the energy draw itself will alter the cut-off frequency as the input impedance of the following stage is in parallel with the capacitor. Not only will the input impedance change the cut-off frequency, but the parallel circuit itself may have a second resonant frequency.

We already know that Operational Amplifiers make great buffer amplifiers, therefore with the operational amplifier added to either the low-pass filter [3A] or high-pass filter [3B], the filter will behave much more like it was designed to.

3a
fig 3a
3b
fig 3b

In circuit [3A] (low-pass), Vout = Vin x Xc/(R+Xc) = Vin x 1k/(1k + 1k) @ fC = 1/(2RC) Hz

In circuit [3B] (high-pass), Vout = Vin x R/(Xc+R) = Vin x 1k/(1k + 1k) @ fC = 1/(2RC) Hz

ACTIVE FILTERS

Some texts refer to all filters that use an amplifier as ‘Active Filters’. My personal understanding is that the circuit is only an active filter if the filter circuit is in the feedback path or takes feedback from the output. I won’t argue the point right now, but mention that the buffer circuits above, with one RC circuit in each, are called ‘First Order’ circuits which means that the single RC pair causes the power of a signal to diminish at the rate of 20dB per decade. That means that the signal power from our 1kHz filter will be 20dB smaller at 10kHz, and 40dB smaller at 100kHz.

Power = Voltage × Current

Many of us have been confused by dB figures, especially when we first start using dB. One confusion is whether dB refers to Voltage, Current or Power, or even resistance! While dB and resistance are not immediately related, changing resistance can and does effect gain most of the time.

More correctly, a change in resistance will change the current in a resistance, or the voltage across it, which then has an effect on the system gain.

Power, however, is a result of BOTH voltage and current. If the voltage across a resistance is doubled, then according to Ohm’s Law, the current will also be doubled. The resulting power will be a product of twice the power and twice the current therefore resulting in four times the power.

In dB terms, a 3dB Voltage gain results in a 3dB Current gain, and as Gain dB are added not multiplied, the power gain will be 6dB. To prove this, a power gain of 4 mentioned above is mathematically 6dB.

The graph of figure 2 shows the -3dB point, referring to -3dB power, but a sharp eye familiar with log graphs will notice that the -3dB label is located 6dB below 0dB because the graph is showing voltage. The gain roll-off is only 10dB per decade for the same reason, but just above I have stated 20dB/decade, and that is the power roll-off, being 10dB for the voltage and 10dB for the current gain (loss).

ACTIVE FILTER TEMPLATE

Consider the template for ‘Second Order’ Active Filters of the Sallen Key design [4], with all elements shown as resistors so we can ignore the capacitors for a moment. The template is for a “Unity-Gain Sallen Key Filter” which is reasonably simple to make with two equal value resistors and two equal value capacitors. Mathematical design can go quite deep with gains to be made in performance by tweaking these values, but requiring an annoying amount of head scratching. The circuit was designed in 1955 by two engineers R.P Sallen and E.L Key for any who might want to search for the maths.

4
fig 4

The Sallen Key circuit provides a very high input impedance and can provide good gain, if desired, within the gain band of the op-amp.

The term ‘Second Order’ refers to the circuit using two RC networks. Every RC network, Resistor-Capacitor pair, is counted in the number of the ‘Order’, so 9 RC pairs in series would form a ‘Ninth Order’ filter.

The power out of a 'First Order' filter is reduced by 20dB per decade, and a ‘Second Order’ filter by 40dB per decade, so a ‘Ninth Order’ filter is 9 × 20dB = 180dB per decade, in theory. Practically speaking, the stages would begin to require shielding to avoid signal leakage from input to latter stages.

The template provides a good starting point with ‘scaled’ impedances representing the resistance or reactance of the element at a chosen cut-off frequency. In order to set the amplifier as a Buffer, Z6 has been labelled as 1Ω, approximating a feedback loop, while Z5 has been labelled as 1MΩ, approximating an open circuit, so the loop gain will be 1,000,000/(1,000,000+1) ~1:1. In a real buffer circuit, Z5 may be omitted, while Z6 becomes a piece of wire!

Otherwise, the op-amp can be given some gain, e.g. ~100:1 by making Z5 = 1kΩ and Z6 = 100kΩ. More exact calculations can be made if accuracy is desired using the inverting amplifier gain formula.

The circuits that follow replace the appropriate impedances with a resistor, or a capacitor calculated for the required frequency. For simplicity, we have used equal values for all components, and all have been set as 1kΩ for the frequency of cut-off. You can base your calculations on the impedance ‘Z’ values given or just make sure Z1 = Z2 = Z3 = Z4.

‘Sallen-Key’ Filter Template - @ cutoff frequency, capacitive reactance = 1kΩ.

SALLEN KEY LOW-PASS FILTER

The template can be made into a low-pass filter [5] by making sure the capacitors are parallel to the input and ground, i.e. by placing capacitors into Z2 and Z4, and resistors into Z1 and Z3.

5
fig 5

Using the impedances suggested, Z1 and Z3 become R1 and R3 as 1kΩ each, Z2 becomes C1, and Z4 = C2, both with an impedance of 1kΩ, or using the formula for capacitive reactance, Xc = 1/(2πfC), transposed for C = 1/(2πfXc).

If the frequency is to be 1000Hz, C = 1/(2π × 1000 × 1000) = 159e - 9 = 159nF.

That’s an odd value to find but depending on how accurately you need the filter to work, you might use a 150nF, or 82nF//82nF, etc. until you have the accuracy you want.

Another option is to select a value for C1 and C2 as something common, say 0.1µF. Calculate the reactance value of 0.1µF = 1/2πfC = 1590Ω. Therefore R needs to be 1592Ω ~= 3300Ω//3300Ω = 1650Ω, or as accurately as you require for the filter.

In Sallen Key circuits, fC = 1/(2RC) Hz

SALLEN KEY HIGH-PASS FILTER

6
figure 6

The High-pass filter [6] uses the same topology circuit, based on the template, but this time with Z1 and Z3 as capacitors, and Z2 and Z4 as resistors. The op-amp is once again in a buffer configuration but some gain could be added by setting the gain with resistors replacing Z5 and Z6. Calculate the non-inverted gain as per a normal op-amp.

The high-pass filter, set again for 1kHz cut-off frequency has the same values of components as the low-pass filter, but with the resistors swapped with the capacitors in the new filter. So 1kHz is the knee of the curve, but the gain levels out at frequencies above 1kHz, up until the GBP, (Gain Bandwidth Product), begins to become an issue if the signal approaches 1MHz.

The gain decreases by 40dB per decade below 1kHz so -40dB at 100Hz and -80dB at 10Hz.

SALLEN KEY BANDPASS FILTER

Sometimes an application requires a frequency bandwidth and nothing above or below. Communications equipment, for example, requires an audio voice bandwidth from 300Hz to 3kHz. The reasons for the limited bandwidth are to reduce interference between adjacent communication channels, but also to confine the power of the radio to the necessary frequencies only. Why transmit more frequencies if the overall intelligibility is not improved?

We could employ two filters, a 300Hz high-pass filter, and a 3kHz low-pass filter, using two filter circuits, but as 20dB per decade is still 100 times less power in the signal at 30Hz and also at 30kHz, a single filter is often sufficient.

7
fig 7

A Sallen Key Bandpass Filter [7] based upon the template. The 300Hz high-pass filter uses a capacitor input, which would be calculated as before, but this time for 300Hz as follows: C1 = 1/2πfXc = 1/2π300 × 1000 = 53µF.

The standard value choices are 47µF which will cause a higher cut-off frequency or 56µF which will cause a lower cut-off frequency. Z2 becomes a 1kΩ resistor as R2.

The 3kHz low-pass filter is formed by Z3 and Z4, Z3 being replaced by R3 a 1kΩ resistor, and Z4 by a capacitor C4, calculated for a frequency of 3kHz. C4 = 1/2πfXc = 1/2π3000x1000 = 5.3µF.

Notice how easy the capacitor calculation is once you realise that 10× the frequency requires a capacitance 10× less in value! The same choices in standard values are also 10× smaller.

The circuit could be built using two buffered filters, one low-pass filter and the other a high-pass filter, or two stages of Sallen Key filters if you need more cut-off or roll-off.

The difference between cut-off and roll-off is more about the expectations of the maker, Cut-off suggests a definite stop at that frequency, whereas roll-off recognises that the frequencies only begin to lose gain at around the ‘cut-off’ frequency.

BAND REJECTION OR NOTCH FILTER

To complete the set, the fourth type of filter is the opposite to the bandpass filter, known as the ‘Band Rejection Filter’ or the ‘Notch Filter’.

Assume we have an annoying 1kHz tone getting into our audio system. Of course, the best cure is to find it and remove it, ...with ‘maximum prejudice’. If possible, remove the annoying signal at the source, by using a very low-pass filter to remove everything except the DC power we need.

This isn’t always possible, and the source may not be ours to filter; meaning that the noise may come from some unknown or unreachable source.

The alternative is a filter to remove just the annoying tone, albeit leaving a gap in the audio system bandwidth! Therefore we use a ‘Deep Cut Notch Filter’ to remove only the annoying signal as much as possible while leaving as much precious HiFi as we can.

We cannot, however, do as we did with the bandpass filter, using a low-pass and a high-pass in series. Their rejection bands overlap and would remove everything. We need two filters, but they need to be wired in parallel, and their outputs added (summed) together.

We could use a circuit using two Sallen Key filters for a 40dB per decade cut-off, as separate high-pass and low-pass filters, then added together by an op-amp summing amplifier. This circuit has been used and is very flexible.

The details would depend on how badly the 1kHz signal interferes with your intended signal. If both filters, LPF and HPF are set at 1kHz, then the notch will only be -3dB on each filter, and less effective when added together.

The two frequencies must be different, allowing a small gap between the two roll-off curves. The greater the difference between the cut-off frequencies, the greater the depth of the notch, but also the greater the loss in the original signal.

Without an audio spectrum analyser and/or a fair bit of trial and error, the best we can do is lose more than we would like to, and set the LPF to perhaps 500Hz and the HPF to perhaps 2kHz, at least for the sake of this description.

TWIN-'T' NOTCH FILTER

A simpler alternative exists to the method we just described, called a “Twin-‘T’ Notch Filter”. The Twin ‘T’ Filter [8] has a single input feeding two RC filters, a LPF and a HPF, tuned to the same frequency.

8
fig 8

In this circuit, F = 1/(4.RC), R = R1 = R2 = 2R3, C = C1 = C2 = C3/2

The outputs of each RC filter are added by a third RC pair acting as both a summing circuit and also as another RC filter stage, albeit with two inputs, one via the resistor from the LPF, and the other via the capacitor from the HPF. The output becomes the input to the op-amp buffer, or gain stage if you prefer.

A variation on the Buffered Twin ‘T’ Filter is the Bootstrapped Twin ‘T’ Filter that has the normally grounded R and C connection, connected to the output instead.

This dramatically increases the ‘Q’ or sharp dip of the notch. In the circuit [8] remove the ground and connect the two points marked as '#'

Here is a typical bandpass graph for a Buffered Twin ‘T’ Notch Filter, and for a Bootstrapped Twin ‘T’ Filter [9]. The Bootstrapped graph has a notch that is both narrower and deeper.

9
graph

REALITY CHECK

All circuit calculations are based on components having perfect values; capacitors without any inductance or resistance, and resistors without any inductance or capacitance, and all values within a reasonable tolerance.

Reality is that components are rarely perfect. The formulae typically ignore external loading and some may use approximated values, or result in component values which cannot be bought.

Real circuits often require tailoring based on the actual values of the components being used.

WHERE TO FROM HERE?

If you haven’t read our op-amp introduction in issue 13, or the buffers and inverter circuits in issue 14, we encourage you to read them.

With all three articles, you have a great set of building blocks to suit most analogue applications.

There is still a lot more to op-amps that we hope to discuss in future issues, such as Oscillators, Multi-Vibrators, Signal Shapers, Function Generators, etc. Stay tuned.