Audio Frequencies Filtering - Question. - Page 1
Forum section: electronics / projects

author: Kapich
author_rank: Contributor
timestamp: January 16, 2015, 06:36:35 pm
content: Hello dear friends and common hobbyists,I am planning on building an Audio Spectrum analyzer (Led Based).A major part of it consist an array of Analog Filters,in the configuration of "Multiple Feedback Filters" (MFB Filers) - For 16 Frequency bands (Range is 50Hz~20KHz).They are going to be based on Film Capacitors, and 1/2 Watt regular resistors & a LM833 OpAmps.I've made in-depth calculations for all of the needed values of each frequency band associated components.Those are my values -www.ebay.com/itm/64-values-1280pcs-1-ohm-10M-ohm-1-4W-Metal-Film-Resistors-Assortment-Kit-/261374861457?pt=LH_DefaultDomain_0&hash=item3cdb27e091www.ebay.com/itm/251506641374?_trksid=p2055119.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AITQuestion is -Is my way is practical?As said, I've made calculation of the needed values for each freq band, so theoretically there is no problem, but can I build it so it will work using simply breadboard and a soldering stand?I am not aiming for a shiny professional Spectrum Analyzer, I know its easier to do it via the FFT Method - but I insist on the analog approach.Will appreciate any answer, please respond - any peice of information will help me abunch!Thanks you so much for your help!

author: AndyC_772
author_rank: Super Contributor
timestamp: January 16, 2015, 06:49:04 pm
content: If I were you, I'd download a free copy of LTSpice and simulate the circuit.If you have time, or a fast PC, you can even use a real audio WAV file as the stimulus for the circuit, and plot how each output varies over time.

author: Kapich
author_rank: Contributor
timestamp: January 16, 2015, 06:57:31 pm
content: Done it with 'NI MultiSim' - Came out quite convincing.

author: Kapich
author_rank: Contributor
timestamp: January 17, 2015, 09:20:14 pm
content: Bump

author: dannyf
author_rank: Super Contributor
timestamp: January 17, 2015, 11:53:16 pm
content: QuoteIt can be built, even with your values of components;Whether YOU can be build it with those values is unknown to anyone except YOU.So if you want US to tell YOU if YOU can build it, you have to tell US who YOU are and what YOU are capable of.

author: Kapich
author_rank: Contributor
timestamp: January 18, 2015, 05:27:02 pm
content: Ok, nice one... Got me thereNow seriously, if some one ever done something similar,or familiar at this area.. Please say your thoughts.I have everything what needed,but I'm afraid it will not work due to basic knowledge that I am missing - I am only a begginer.Thus, I don't want to waste my money for nothing or on a failure..Thanks guys

author: Richard Crowley
author_rank: Super Contributor
timestamp: January 18, 2015, 05:57:26 pm
content: Yes, you can probably do that. When you say "these are my values" you simply give references to a generic resistor and capacitor assortment. Not really sure what the question is there since you have not actually showed us your proposed circuit.You don't mention anything about how you are converting the outputs of the filters into LED displays?Without some schematic diagrams to examine, your questions are almost impossible to answer.

author: codeboy2k
author_rank: Super Contributor
timestamp: January 18, 2015, 06:41:39 pm
content: Quote from: Kapich on January 18, 2015, 05:27:02 pmSeriously, with this approach you'll never learn. We were all beginners once. I learned by doing and failing, then trying to determine why I failed, and then I learned what not to do anymore, and I became smarter and better.You can't worry about "wasting money". All education has its costs, be it time, money, family, or friends.You need to be prepared to incur those costs.

author: Kapich
author_rank: Contributor
timestamp: January 20, 2015, 08:30:48 pm
content: codeboy2k,You're absolutely right. I will take this words seriously.Quote from: Richard Crowley on January 18, 2015, 05:57:26 pmI don't have the option to post some schematics,But the main idea is:Filter Ouput -> Peak detector (Sample each band) -> Analog to Digital Converter -> Micro-controller 89C52 -> Led Matrix array.I've asked if my idea is realistic.I mean, can I built such Filter array and make it output precise and accurate data?For example, One of the filters must have a precise value of 22nF Cap and some 12Ohm, 1KOhm Resistors,the thing is that they may not be as accurate and it may rune the whole filter.I mean, 22nF can be actually 21 or 20 (Same for Resistors) due to its not absolute.and in such low values even a DMM cant measure if the value is true or wrong because we cant know if the component is drifting,or the DMM is drifting due to his own built in accuracy error.Here is the Band pass filters configuration that i intend to use.www.electronics-tutorials.ws/filter/fil98.gifAnd thanks for the honest answers!Waiting for more.

author: Richard Crowley
author_rank: Super Contributor
timestamp: January 20, 2015, 09:33:10 pm
content: No. it is NOT "realistic" to try to make a "precise and accurate" array of bandpass filters using analog techniques.Especially with common-value, non-precision components. Especially as a first, amateur project.Even back a couple generations ago, in the analog era, spectrum analyzers were fiddly non-precision things with asymmetrical, overlapping bands and different rise and fall times for lower and higher frequency bands. Which is why everyone gladly discarded the old analog techniques in favor of digital FFT methodology.If you want to fool around making analog bandpass filters, you cannot expect "precise and accurate" without considerably more effort and expense, and then results will be seriously inferior to even the simplest of digital solutions.You might also want to do some additional research into bandpass filter circuits. IIRC, that is not the type that was most commonly used in analog spectrum analyzers.

author: IconicPCB
author_rank: Super Contributor
timestamp: January 20, 2015, 10:40:32 pm
content: National semiconductors ...now Texas Instruments used to have a chip called MF10. The chip was based on switched capacitor technology which resulted in a filter of selectable topology ( band/ low/high pass ) and tunable frequency simply by altering the clock rate applied to the chip.So..get Your micro, program the counter divider for double the right output frequency and pass it through a flip flop ( for 50% duty cycle) clock the band pass filter and You have a tunable sweepable spec an.Give the output filter time enough to charge up so that its response does not get smeared due to excessively fast sweep rate and You should be pretty happy with the outcome. You want more selectivity I hear You say. simply daisy chain more MF10 but be careful to design the filter constellation ( always wanted to say that in a post ) so that the poles and zeroes give a stable low ripple transient behaviour.

author: GK
author_rank: Super Contributor
timestamp: January 20, 2015, 10:45:35 pm
content: So long as your performance expectations are within reason, MFB filters work fine for this application so long as you don't go too high in Q - anything higher than 10 and the filter characteristics (passband gain, center frequency, etc) become too dependant on component tolerances.I did a 21 band (half octave - f*SQRT) analyser with MFB filters. To get a decent overall filter slope and separation between bands I used two cascaded MFB filters per band (42 filters in total), based on quad op-amps. I can't remember what Q I used and aren't in a position to look it up right now, but I'm pretty sure it wasn't very high and I aimed for a overall response ripple over the 20 Hz - 20 kHz spectrum of 6dB or less. Here it is in action (filter board visible at 1m30s):Don't listen to the naysayers, building something like this even as a "newbie" is a great way to start experimenting and learning analogue techniques.EDIT:No uC here! 74HC logic for the video generator and logarithmic A-D conversion done by an LM360 comparator in conjunction with a R/C exponential ramp generator synced with the vertical screen scan.

author: nctnico
author_rank: Super Contributor
timestamp: January 20, 2015, 10:52:41 pm
content: If you are using a microcontroller anyway I'd use an ARM controller and an 16 or 32 point FFT.

author: Richard Crowley
author_rank: Super Contributor
timestamp: January 21, 2015, 03:20:09 am
content: Quote from: nctnico on January 20, 2015, 10:52:41 pmKapich dismissed the FFT option in his very first message. He did not reveal the reason for his fascination with the analog solution.The MSGEQ7 is a very interesting switched-capacitance filter IC for making spectrum displays. Alas, it is only 7 band.

author: GK
author_rank: Super Contributor
timestamp: January 21, 2015, 04:25:22 am
content: Quote from: Richard Crowley on January 21, 2015, 03:20:09 amObviously, he'd like to apply his recently learnt theory in solder. So what? And building a handful of MFB filters entirely adequate in performance for a hobby project that is not (as explicitly stated) aiming to be a "shiny professional Spectrum Analyzer" is hardly the ambitious endeavour that you are making it out to be.Quote from: Richard Crowley on January 21, 2015, 03:20:09 amAnd this is even better:http://www.mix-sig.com/index.php/msscsa-single-chip-spectrum-analyzerWith a suitably divided clock feeding one chip per octave you can presumably have a 60 band, 1/6th octave spectrum analyser. Alas, the last time I enquired (a few years ago) it was $250 USD MOQ, and the OP probably wouldn't want to solder that many LEDs anyhow.

author: Skimask
author_rank: Super Contributor
timestamp: January 21, 2015, 04:35:19 am
content: Quote from: nctnico on January 20, 2015, 10:52:41 pmPIC18F4620 @ 40Mhz, 127 bands (only 122 shown on the LCD, and only 32 levels of amplitude shown, again due to the LCD).Did it back in '98. "Lost" the video somewhere on a hard drive for 13+ years. Found it again a few years ago.Should rebuild it someday with a newer PIC and a RGB TFT LCD and see what it looks like.

author: Kapich
author_rank: Contributor
timestamp: January 22, 2015, 06:04:00 pm
content: Thank you all guys,your answers help me a lot!Definitely not taken as granted - Both positive and negative ones!For the one that asked,I do wish to know the basics before I go for more advanced approaches, that's why I insist on the analog way.After all, in the future, I want it to be more than a hobby,so I must learn as much as possible - from any point of view, both old and new.Quote from: GK on January 20, 2015, 10:45:35 pmI did saw your project in the past, its unbelievably inspiring - In fact it was one of my motivators,quite surprising that I see you respond here, hands down - big honor!1. So in fact you did used 2 filters for each band to get a bigger bandwidth for each sampled frequency?2. My sampled frequencies been chosen arbitrarily by me, of-course in a way that there is no over lap between the bands.I just don't see a point to follow some harmonic law, while I can choose them by myself while maintaining an about equal separation between each one.Is there something wrong with this approach?3. In my calculations, I've did a gain of 2 in each band.Means, I assume that the aux 'line level' that comes from initial noise filter (Lowpass Filter below about 20~21KHz) input circuit is measured beween ~0.5-1.5 volts,thus, I've set each filter to amplify the wave at each band by 2, for more spacious voltage stages distribution at the led matrix.In other words, I've set the output of each filter band for about 6db instead 0db.Does my assumptions are right?Again, ThanksAny answer, from any member on the forum will be greatly appreciated.

author: ehughes
author_rank: Frequent Contributor
timestamp: January 22, 2015, 06:26:30 pm
content: When you are ready to "graduate" to a DSP approach, here is a project that has training video, PCB designs, etc to get you started:https://community.freescale.com/docs/DOC-100207Once you go digital you can get into cool stuff like windows, spectrograms, etc.Have fun.

author: macboy
author_rank: Super Contributor
timestamp: January 23, 2015, 03:02:03 pm
content: Quote from: Richard Crowley on January 21, 2015, 03:20:09 amThat's not an issue; just use four of them. Tweak the chip oscillator frequencies so that you get 28 equally spaced bands. The spacing of the IC's frequency bands is ideal: 4/3 octave. So with 4 staggered devices, you get classic 1/3 octave bands. Clock frequencies of the four devices would be (e.g.) 82 kHz, 104 kHz, 131 kHz, and 165 kHz, to get 1/3 octave bands from 32 Hz to 16kHz. The only issue might be the Q of the filters, which is defined as 6, a little on the low side for 1/3 octave, but usable.

author: Kapich
author_rank: Contributor
timestamp: January 23, 2015, 04:33:19 pm
content: My last project was based on the MSGEQ7, awesome IC.This time doing the same, with bigger scale and self made filters.Quote from: ehughes on January 22, 2015, 06:26:30 pmAwesome, thanks - I've noticed that all those videos are your work.

author: GK
author_rank: Super Contributor
timestamp: January 28, 2015, 02:24:15 pm
content: Quote from: Kapich on January 22, 2015, 06:04:00 pmI used two (identical and cascaded) MFB filters per band to get a better filter slope (sharper cut-off out of band). I have dug up and attached the computed frequency response chart for my filters. It seems that I chose a filter Q for a 3dB passband ripple. I stuck strictly to the 1/2 octave harmonic steps here (started at 20 Hz and kept multiplying by the square root of 2, ending at 20.48 kHz), so that the filter response of each band overlaps its neighbors equally. This is important as it means that even so the analyzers resolution isn't great (the ability if the analyzer to resolve a single frequency), the overall display produced is a truthful as possible (given the filter Q and cut-off performance limitations) representation of the spectral composition of the input signal.