Universal Active Filters: Part 1

Today I am experimenting with a single chip Universal Active Filter, in this case I made a small PCB for the UAF-42 from Texas Instruments. I chose this part in particular as it facilitates setting the filter frequency by changing just a pair of resistors and the somewhat critical values that are contained on the chip have been laser trimmed for accuracy. This type of active filter includes Operational Amplifiers to supply gain and it supports various configurations including simultaneous operating modes such as Band Pass, Low Pass and High Pass make it “Universal”.

Filter Basics

Speaker Crossover Example
Speaker Crossover Example

Looking at the block diagram you can see where I have inserted a dual-ganged potentiometer to change both resistors simultaneously which should allow a straight forward adjustment for our purposes here.

Looking into the components of a simple RC filter which can easily implement a simple Low Pass or High Pass filter, we see that the math is fairly straight forward and swapping the components with each other is all that is needed to change the type of filter.

Real Pole Filter Example
Real Pole Filter Example

To tell the difference between the high and low pass examine the circuit shown where the capacitor is in series with the signal. Simply put, no Direct Current (DC) can make its way through a capacitor in series, so DC (0Hz) and other low frequencies are rejected or attenuated. Likewise when the capacitor sits across the signal (from the signal to ground) it can act like a battery; it stores energy and resists a change in voltage allowing slower, lower changes or frequencies to get through while resisting faster changes in voltage.

Whats Your Frequency Response

To demonstrate the frequency response of a system a Sweep Frequency Generator can be used. Here my old and venerable HP 3314A Function Generator is set up to sweep from 80Hz up to 5kz and pass it through the filter circuit. Looking at the input you can see the sweep start at a visibly low frequency and then sweep to a high frequency. Looking at the output one can see the amplitude of the different outputs and due to the way the oscilloscope is set up the output is synchronized with the start of the frequency sweep. This means that we can estimate the signal frequency based on its location on the scope.

When a Picture is Worth a 1,000 Hertz

Looking at the image we can see that the blue trace of the High Pass has an initial “blip” (a nonlinearity, possibly of the “ripple” variety) and that the amplitude of the signal on the right shows that it’s passing the higher frequencies. Likewise the green trace is passing the lower frequencies on the left and the pink trace a pass region in the middle.

hml-pass

Due to the adjustability provided by the dual resistors, I can adjust the filter frequency easily from low to high using my potentiometer. And if you watch the video you can see the effects of these adjustments, I tend to think of an analog synthesizer when I think of interacting filters sweeping the audio band, perhaps I can automate the adjustment of these filters in a following video.

Check back soon to catch Part 2 where I test some of what we talked about in earlier episodes about Square waves and harmonics. I also talk a little bit about the real-life math involved.

39 thoughts on “Universal Active Filters: Part 1

    1. Essentially the parts won’t be making it into my permanent collection as the price has gone up and they are somewhat noisy. I am on the hunt for a good design to use for a Voltage Controlled Filter for analog synths in the mean time.

      With that said the same filter can be made from OP Amps and passive components, the capacitors in particular should be better quality ones such as film or a good quality ceramic.

        1. No, just feedback as created by the “wires” and resistors as shown on the schematic. With negative feedback a cool thing happens which that you are in a sense telling an opamp stage to “make the output match the input except for these adjustments”. Negative feedback can be used to turn a diode with a .6 v forward voltage drop into a diode with a 0v forward voltage drop for example, or sum a voltage that is offset by time or phase etc.

          1. “used to turn a diode with a .6 v forward voltage drop into a diode with a 0v forward voltage drop for example”

            Yeah, I remember that from Op Amp class… cool!

      1. I’m building a synthesizer right now using MAX260 programmable switched capacitor filters. They are great fun to use, you can control the F0 and the Q-factor digitally (using an arduino-clone).
        They can be used for Low-pass, band-pass, high-pass and even all-pass (for phasing effects)

          1. I have an MF-10 board made and in the wings for a future video. I met Thom Fredrikson, the designer of the MF-10 many many years ago, he was one of those people that you hang on every word he says.

    2. The best one I found was the UAF42AU on Newark for $11.90. But as Bil said in a reply, you can build this with op-amps and passive components – and I say for cheaper too. A quick look through Digi-Key, I was able to get all the components (in quantities of 1) for $9.66.

    1. An active filter generally has an active element such as an amplifier in addition to passive elements such as resistors and caps. With the amplifier its easy to build more effective filters. It’s possible to build a 5th order bandpass filter using just passive components but the math is a pretty heavy lift and it would not be as easily adjustable.

      Check the video, I mention a little more on this I think.

    2. Another important difference is signal to noise ratio. My math is rusty but I am sure someone will correct me if I am wrong.

      Any input has a noise component, transistors are also noisy especially at low signal / bias levels.

      A first order filter attenuates all signals by at least 3dB, it attenuates the wanted signal by 3dB and the unwanted frequencies even further. A second order is 6dB and a third order is 9dB etc. A bandpass is actually two filters so first is 6dB then 12dB, 18dB etc.

      Any circuit has a minimum noise level. If you (passive) filter a signal and then amplify it back up then you are also amplifying the noise. The greater the filtering (order) then the more noise you get because you have to amplify more to get back to the original signal level.

      An active filter integrates the amplifier and filter so the filtering happens at the higher amplitude where it is further away from the noise (floor) so you have a much better signal to noise ratio.

      1. Not really, a first order RC filter attenuates the corner frequency by 3 dB. Attenuation gets stronger going one way (e.g. a low-pass filter attenuates higher frequencies more, that’s your 6 dB/octave figure), whereas if you go the other way far enough, the attenuation is essentially zero. However, even multistage RC filters are quite limited in performance: for instance, the “knee” of the frequency response will always be rather soft, regardless of the number of cascaded stages. Not so with active filters.

  1. Make the maths ! (Their is no fun without it), at least the simple relation of 1/f, RC L? and the simple Gain 1+R1/R2…
    OR
    Connect 2 digital i2c potentiometers and drive them with an Arduino…

      1. The video sounds more complicated as it is. Just make a fast explanation how an amp-op work, the G=1+R1/2, then show that R1 or R2 can be replaced with an RC network, and that’s the most important thing: this feedback loop make filtering very efficient and it’s why it’s called active.
        Next show how this amp-ops can be hooked together. The UAF-42 is funny, but anything can also be done with a simple LM324.
        Cool about the i2c pots…

  2. Thanks for the post Bil. Off-topic I hadn’t heard of the Dinosaur Den until there was a post about it recently on here. Suffice it to say I watched the episodes and enjoyed them a lot. I’m sorry to hear about Fran’s wrist problems and understand why she can’t do the show anymore, but I’ll miss it.

  3. Thanks for the excellent post and video, Bil.
    Do you or anyone else here happen to know if these filters work at RF frequency ranges? Applications I’m looking for would be used between roughly 200 KHz and 75 MHz, for receive only.

    1. The highest bandwidth for any op-amp that I have seen is 80MHz. Most of them seem to work in the range of a handful of MHz.

      The trick with filtering RF in this range appears to be to use a JFET as an A-class LNA for the input stage, so that the signal is boosted way above the noise floor of the low-grade components you have to use because of the cost RF stuff.

    2. I did a google and found may specialized RF op-amps that work right up to the GHz range. Normally RF filters are LC filters and not CR filters. The inductors usually have a tuning lug because component tolerances and properties have a much larger influence on filter frequencies. ie at RF frequencies a resistor looks like a resistor with a series inductor and a capacitive shunt. Like wise a capacitor looks like it has a series inductance and a resistive shunt.

      Some RF filters also use varicap diodes (varactors).

      Another useful way to filter is to have a fixed filter up at higher frequency than the signal and up modulate a sideband into the filters frequency range that way you can use a PLL to accurately control the effective filter frequency range, this is how older analog spectrum analyzers worked.

  4. Over $10 for just one? You can get 50 lm358, 741, lm324, ne5532, tl074 etc (some in dual or quad packages) for under $10. For the price alone, it’s worth it to understand the math and use op amps.

  5. I had to get up for work super early this morning and I couldn’t get to sleep last night so I hopped on Hackaday. Turned this video on and enjoyed it so much I ended up spending the next two hours watching videos on here.

    I still made it to work on time, but I’m tired and have a strange urge to buy a whole lot of paint stir sticks.

  6. Thank you Bill, it is a very good and useful video. I have a question… when do you recommend to use analog or digital filter? because i think with a digital filter you have a lot of adventages and posibilities.
    If you have a microcontroller like stm32f4 (it is cortex M4) you can use DSP CMSIS library for this kind of things

  7. as a software guy that has to dable in digital signal ocasionally, i have no idea on the video what are that mess on the input channel when you show the result on the scope.

    i figured the band pass from low to high frequency would look like a simple sine with a progression from low Hz to high. but it is all mushed up from the beginning almost.

    and then the filter results in the middle… why that artifact? shouldn’t it block the right part completely from the low and the left part from the high? why do we still get both?

    1. In the video I describe the imperfectness of a single chip filter with internal caps. The scope was set for a dot display and integration to create more of the envelope and less about triggering on the sweep source. Trimming the values for a static frequency would yield pretty tight results but this was a universal filter that I could adjust over multiple decades with a sing (dual ganged) pot…. many compromises result in this simple design.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s