Author Topic: Audio Frequencies Filtering - Question.  (Read 9432 times)

0 Members and 1 Guest are viewing this topic.

Offline KapichTopic starter

  • Contributor
  • Posts: 13
  • Country: il
Audio Frequencies Filtering - Question.
« on: January 16, 2015, 06:36:35 pm »
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=item3cdb27e091

www.ebay.com/itm/251506641374?_trksid=p2055119.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Question 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 a bunch!
Thanks you so much for your help!

 
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4357
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Audio Frequencies Filtering - Question.
« Reply #1 on: January 16, 2015, 06:49:04 pm »
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.

Offline KapichTopic starter

  • Contributor
  • Posts: 13
  • Country: il
Re: Audio Frequencies Filtering - Question.
« Reply #2 on: January 16, 2015, 06:57:31 pm »
Done it with 'NI MultiSim' - Came out quite convincing.
« Last Edit: January 17, 2015, 05:25:13 pm by Kapich »
 

Offline KapichTopic starter

  • Contributor
  • Posts: 13
  • Country: il
Re: Audio Frequencies Filtering - Question.
« Reply #3 on: January 17, 2015, 09:20:14 pm »
Bump
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Audio Frequencies Filtering - Question.
« Reply #4 on: January 17, 2015, 11:53:16 pm »
Quote
but can I build it so it will work using simply breadboard and a soldering stand?

It 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.
================================
https://dannyelectronics.wordpress.com/
 

Offline KapichTopic starter

  • Contributor
  • Posts: 13
  • Country: il
Re: Audio Frequencies Filtering - Question.
« Reply #5 on: January 18, 2015, 05:27:02 pm »
Ok, nice one... Got me there  :palm:

Now 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  :-/O :-BROKE
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4319
  • Country: us
  • KJ7YLK
Re: Audio Frequencies Filtering - Question.
« Reply #6 on: January 18, 2015, 05:57:26 pm »
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.
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: Audio Frequencies Filtering - Question.
« Reply #7 on: January 18, 2015, 06:41:39 pm »
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..

Seriously, 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.

 

Offline KapichTopic starter

  • Contributor
  • Posts: 13
  • Country: il
Re: Audio Frequencies Filtering - Question.
« Reply #8 on: January 20, 2015, 08:30:48 pm »
codeboy2k,
You're absolutely right. I will take this words seriously.

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.

I 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.gif

And thanks for the honest answers!
Waiting for more.
« Last Edit: January 20, 2015, 08:32:31 pm by Kapich »
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4319
  • Country: us
  • KJ7YLK
Re: Audio Frequencies Filtering - Question.
« Reply #9 on: January 20, 2015, 09:33:10 pm »
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.
 

Offline IconicPCB

  • Super Contributor
  • ***
  • Posts: 1583
  • Country: au
Re: Audio Frequencies Filtering - Question.
« Reply #10 on: January 20, 2015, 10:40:32 pm »
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. 
 

Offline GK

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Audio Frequencies Filtering - Question.
« Reply #11 on: January 20, 2015, 10:45:35 pm »
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[2]) 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.
« Last Edit: January 21, 2015, 04:55:50 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28886
  • Country: nl
    • NCT Developments
Re: Audio Frequencies Filtering - Question.
« Reply #12 on: January 20, 2015, 10:52:41 pm »
If you are using a microcontroller anyway I'd use an ARM controller and an 16 or 32 point FFT.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4319
  • Country: us
  • KJ7YLK
Re: Audio Frequencies Filtering - Question.
« Reply #13 on: January 21, 2015, 03:20:09 am »
If you are using a microcontroller anyway I'd use an ARM controller and an 16 or 32 point FFT.
Kapich 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.
 

Offline GK

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Audio Frequencies Filtering - Question.
« Reply #14 on: January 21, 2015, 04:25:22 am »
Kapich dismissed the FFT option in his very first message.  He did not reveal the reason for his fascination with the analog solution.


Obviously, 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.


The MSGEQ7 is a very interesting switched-capacitance filter IC for making spectrum displays. Alas, it is only 7 band.


And this is even better:

http://www.mix-sig.com/index.php/msscsa-single-chip-spectrum-analyzer

With 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.
« Last Edit: January 21, 2015, 05:32:14 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline Skimask

  • Super Contributor
  • ***
  • Posts: 1433
  • Country: us
Re: Audio Frequencies Filtering - Question.
« Reply #15 on: January 21, 2015, 04:35:19 am »
If you are using a microcontroller anyway I'd use an ARM controller and an 16 or 32 point FFT.
PIC18F4620 @ 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.
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.
 

Offline KapichTopic starter

  • Contributor
  • Posts: 13
  • Country: il
Re: Audio Frequencies Filtering - Question.
« Reply #16 on: January 22, 2015, 06:04:00 pm »
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.

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[2]) 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.

I 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!  :clap:

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, Thanks  :)
Any answer, from any member on the forum will be greatly appreciated.

 

Offline ehughes

  • Frequent Contributor
  • **
  • Posts: 410
  • Country: us
Re: Audio Frequencies Filtering - Question.
« Reply #17 on: January 22, 2015, 06:26:30 pm »
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-100207

Once you go digital you can get into cool stuff like windows, spectrograms, etc.

Have fun.
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2336
  • Country: ca
Re: Audio Frequencies Filtering - Question.
« Reply #18 on: January 23, 2015, 03:02:03 pm »
If you are using a microcontroller anyway I'd use an ARM controller and an 16 or 32 point FFT.
Kapich 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.
That'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.
 

Offline KapichTopic starter

  • Contributor
  • Posts: 13
  • Country: il
Re: Audio Frequencies Filtering - Question.
« Reply #19 on: January 23, 2015, 04:33:19 pm »
My last project was based on the MSGEQ7, awesome IC.
This time doing the same, with bigger scale and self made filters.

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-100207

Once you go digital you can get into cool stuff like windows, spectrograms, etc.

Have fun.

Awesome, thanks - I've noticed that all those videos are your work.  :clap:
 

Offline GK

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Audio Frequencies Filtering - Question.
« Reply #20 on: January 28, 2015, 02:24:15 pm »
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?


I 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.

     
« Last Edit: January 28, 2015, 10:38:19 pm by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf