30-Poles of Microcontroller Driven Analog Filter Fun

This project is an extension of two projects - first is the work on adding an APF-type high-Q bandpass feature to the 2nd RX of the FT-2000.  More on that project may be found by CLICKING HERE.  And the second driver is the memory of the fun I had as a kid with active filters.  


DSP vs. Analog

An active audio filter is in many ways comparable to the digital variety without the complexity.  It has the performance and flexibility advantages without the need for specialized DSP hardware or coding implementations.  There are two areas that the DSP is superior - in current rig implementations, the DSP filter is typically part of the AGC loop where a back-end AF only filter is not.  In addition, the ringing performance of the DSP can be better than the analog variety at the expense of higher demands on DSP hardware.      


Something More Extreme - A Microprocessor Controlled Deluxe Filter? 

If any active filter project can be called a Beast, it's possibly this one. Based on the Maxim MAX262 universal 4-pole switched capacitor filter (SCF) to provide the BPF function.  That is followed by a pair of MAX7400 8-pole elliptical response LPF modules.  These filters are adjustable for performance like cutoff frequency and (in the BPF filter case) Q.  Total pole count here is 24.  In addition, fixed LPFs on the input, output and amplification modules add an additional 6 poles of noise rejection roll off.   15 IC total.


Topology and Circuit Description

The design objectives were to allow for maximum flexibility of settings. The disadvantage of traditional fixed active filters are that their performance is not adjustable. Yet often times, band conditions would allow for a different Q or center frequency setting and with a fixed filter, that is not possible.  

The low end filtering was not considered because the 1K-mod combined with the IF shift on the 2nd RX allows for the similar steep roll-off on an adjustable basis.  In addition, the impact of the group delay (which is realized as ringing) is much harder to address in the active AF filter.  So low end roll off was gradual and just enough to help ensure some attenuation of possible 60 hz hum.

Here, thanks to the Maxim Switched Capacitor Filter (SCF) ICs, a micro-controller (Atmel AVR running at 11.125 MHz) provides the ultimate in flexibility. It drives an LCD display allowing for convenient indication of the filter settings.  The two BPF filter modules within the MAX262 are individually programmable and with separate clocking to set the center frequency of the following LPF elliptical as well.

As a result, an infinite variety of BPF filter response implementations are possible - all adjustable by firmware. The LPF is only adjustable at the cutoff frequency - however, by changing the socketed LPF filter IC, bessel, butterworth, elliptical R1.2 or elliptical R1.5 variations are possible.

At the input of the signal chain are AA filters. The sample frequency of the filter is about 100x the signal frequency so anti-alias filtering is not needed.  However, I wanted to keep the high frequency noise out of the signal path at the start.  The AA filters are a low Q butterworth design and provide about 12db of gain in the process.  The reason for the gain is that the noise floor of the SCF is fixed - so by pushing the signal strength up prior to these stages, the SNR is increased.

The gain of the BPF modules is equal to the Q.  Which means in the case of a Q=8 (as the APF filter design would require), an input signal of 1V would require an output swing of 8V. The filters are fed with a 6V signal to maintain logic compatibility with the MCU and that would mean clipping - certainly a bad thing. To avoid saturation of the BPF output under high Q conditions, digital pots prior to each stage allow for a preemptive gain reduction keeping peak voltage swings in check. 

Two additional digital pots prior to each output path (to the speaker amp and headphone amps) allow for individual gain setting.and leveling regardless of the headphone or speakers used.

Following the SCF BPF/LPF modules are the noise filters - these are low Q unity gain LPF 2-pole stages which buffer the 10K output of the SCF and drive the digital blend circuit.  The noise filters ensure there are no SCF noise artifacts present in the signal and the low Z output ensures the rest of the circuit sees a consistent supply Z.

The digital blend circuit allows mixing of the channel 1 and channel 2 inputs if the operator were to prefer not to have a one channel per ear operation method. Each signal path has it's own blend control, so for example, the main can be shared while the sub can remain isolated. The amount of blend is adjustable from 0 (isolated) to 100% (sound levels equal from both speakers).


Click on the topology graph for a high resolution view.


Following the digital blend are summing amps.  These incorporate LPF action as well and their primary function is to allow for additional AF inputs to be mixed into the final output.  Two AUX inputs are provided per channel.  An example of where I would use that is to provide AF output from my computer sound card output, as well as for the LP-PAN SDR.  The level of these AUX inputs is adjusted by an on-board trim-pot.

The loudspeaker amp is a 2x50W class-D switching type (CLICK HERE for more details) and the headphone amp is a hi power-op-amp.




Rob K0RU was kind enough to do the layout for me and build the PCB - I really appreciate his hard work as this project has grown into a level of complexity that I had not anticipated. Doing it on a breadboard would have been a nightmare.

The prototype's PCB is double sided.  Vias are manually plugged with wire or components soldered on both sides.  The PCB should have turned out better but the film I used was old and the effect was poor trace printing.

Other than aesthetics, board looks like it will be functional so the decision was made to push on - knowing that there would eventually be further modifications and likely an additional board would be built.  That really turned out to be the case as many of the circuit details were adjusted based on the prototype's bench performance.

Quite a few details were overlooked in the design (primarily DC biasing of the capacitive coupled stages) and these were discovered and fixed on the bench when testing the prototype.






















What's In the Box?





















The enclosure for the project is the Yaesu FT-2000 companion  speaker SP-2000. 

In the stock orientation, it has some LPF and HPF capabilities that are performed on a passive basis.  All of these items were removed in the mod process.  I never did find a use for those two original rotary switches so I guess they will just sit there and look pretty.  I used up every single IO port on that chip and so I can’t use these for quick preset or something like that.  Hmmmm….  Now if I were to hang a port expander off this CPU, that would give me an extra 16 I/O lines and I could add a lot more knobs, buttons and switches!!!  

The filter's control section (above, right) was built onto a Lexan face that extends below the front plane of the speaker and at a tilt thus avoiding modifications to the stock speaker facing.  The reason for this was practical; I could not find a way to mount the controls on the existing surface where it would look nice.

The stock 1/2 input switch now defines which of the two “paths” the filter is in so I can use the filter with either the main or the sub RX.  The AA/NF and other 3 kHz BW filtering (8 poles of LPF total) is fully time on both paths.  So only the BPF and elliptical LPF module flips from one side to the other.   The mute switch flips the feed between the two speakers (one internal, one external).  Normally I would run the main into this speaker and the sub to an external speaker.  The mute switch will let me reverse these two because the external speaker is not as ideally located near my head as the main speaker in this box is. 

I will label the front panel when the code is a bit more worked out.  That’s one of the cool things about the AVR doing the interface work – you can determine the functionality of the controls later as it’s not hard-wired for one certain way…

Presently the two gray colored push buttons enable/disable the LPF or BPF filters.  Rotary controls set LPF frequency, BPF frequency and BPF Q.  Each of the rotary switches have a push button built in which are tied to additional functions.  All of these 

The ribbon cable pokes out of a relief cut into the Lexan/steel.  Interestingly – the screws that some guys though were uncosmetic turned out to serve a very good functional use.  The bend angle is just right so that the screw touches the desk surface. 

When  pushing the rotary encoder switches, the Lexan flexes and gives a fuzzy feeling to operation.  I noticed there was none of this near the LCD (it had 2 screws already) and so I added a 3rd screw on the left.  Now the force of the push on the encoders is absorbed by the screw contact with the desk.  I will have to remember to put a bit of something on the bottoms of those screws to avoid scratching my precious desk.  Actually, the ideal solution would be to find some encoders that had a lighter touch on the center push button, did not have detents but did have some “drag” when you turned them and also had thread-mounts and kerneled shafts.  But I have been looking high and low and it seems that beast just does not seem to exist  at least that I’ve found.  


























The filter board sits atop the separate 100W speaker amp module (CLICK HERE FOR MORE ON THE AMP MODS) and is mounted in the box toward the back.  This location provides the max cavity dimension between the speaker and the board for batting.  This speaker is really a good unit for communications but the enclosure must have a damping material or the standing wave generated from reflections off the back wall can drive a guy nuts in CW/RTTY operation.

The DC power input goes through a big 2mH power choke with 0.1 on each side for a LPF PI net action.  On the amp side is a 47K uF cap to ensure the amp has plenty of local reserves just in case the external 19.5 4.75A power supply is not quite ready on a RMS basis to keep up with the amp’s peak demands.  In any event, with 50W + 50W – the house should rock with RTTY and CW at just any volume you want…

The headphone amp is also well-heeled.  The output drives 500 mA peak output per channel and will swing rail to rail 7V into 2 ohms.  I’m not sure what the limiting factor is but with the headphones I had tried today, my ears gave out far before the amp ran out of drive…  That’s got to be at least a couple of watts per channel – compare that with the usual 100mW headphone amp.  Beef should be served by the pound increment and headphone amps should come in watt increments, not mW.    

The external speaker outputs float above ground and to put the hells hammer on any RFI from that speaker line which will be long, there is a big type 31 ferrite with something like 12 or 15 turns of 178 wrapped around it.  I’m sure K9YC would find it satisfactory.    

Input lines have 0.1 across the input and a 470uH choke in line.  This is more of a RFI prevention measure than any attempt to add more LPF action.  The filter board has plenty of that.  I will graph the effect of this net sometime to make sure it's not otherwise effecting the overall response.

Plugging the phones in pushes a hard-mute on the speaker amplifier module so there’s no beeping or squeaking from the loudspeakers with running cans.  If you have experienced the bump-bump-bump sound typical powered loudspeakers produce at transmit, you will understand this feature.



Initial Operation Tests

After debugging the hardware, and making a basic firmware capability, I could test the overall frequency response of the filter and see how it performed vs. the design objectives.

The overall response of the unit looks like this.  This graph is with white noise feed into the system input, and with the spectrum analyzer connected to the output just prior to the speaker/headphone amps.  The slight additional roll off in the HP output (the speaker amp is similar) reflects the LPF filtering that was added to that stage.



The effect of the BPF and LPF filters can be seen here in this 20-20KHz wide frequency plot.  The LPF cutoff is set to 1000 hz in this example.  Center frequency of the BPF is 600 hz.




Zooming into a tighter range of 200 - 1500 hz span, we can see the effect of the HPF roll-off.  -46 db down at Fc+100 hz.  Performance on par with the rig's DSP.  The low end is not considered because the 1K-mod combined with the IF shift on the 2nd RX allows for the similar steep roll-off on an adjustable basis.




In this graph we can see the combinational effect of the two filters used together (the BPF and LPF).  From this graph it's easy to see that adjustments in the Q of the BPF, and in the Fo of the LPF, will allow the shape and the roll off to of this filter combination to exactly match the main rig's DSP APF (the low end is contained by the rig's 2nd IF filter).  In that sense, one of the project goals of providing a 2nd RX APF feature that matches the main is realized.




Performance of Filter With Rig

Coming soon...


© 2011-2018 AC0C - All Rights Reserved


Created with the QTH.com SiteBuilder.