Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

What kind of filters to use for audio LED spectrum analyzer?

  1. Mar 24, 2010 #1
    Hi, all

    I've been reading these forums for a while, and now that I have a question, I've finally decided to join.

    The question I have is school-related, but not really direct coursework since it's very open-ended.

    I am part of a group (in electronics class) that is building an LED bar-graph based spectrum analyzer. The concept is pretty simple - a bunch of filters each of which selects a frequency, and an LED bar graph circuit that lights up according to the amplitude of each filter's output.

    We are currently trying to figure out what kind of filter to use for this and how to quantify our specifications. Since op amps a re a point of great emphasis in the course, we came to the decision to use an active filter (Sallen-Key or something similar).

    Does anyone have any general advice on what kind of filters to use for such project? Should we use a butterworth bandpass filter for every band with a good amount of bandwidth, or is it better to go for hi-q filters and label each bar graph in terms of its center frequency? Also, how tolerant should we be of roll-off for this application? Would something like 40-60 dB per decade be OK.

    PS. If i make myself sound ignorant that's because I am. No one in the group has any real signal processing or filter-design experience. We have not been formally introduced to active filters, and the point of the project is to do something not necessarily within the official scope of the course.
     
  2. jcsd
  3. Mar 24, 2010 #2
    How many LED bars do you plan to use for what range of frequencies?
     
  4. Mar 24, 2010 #3
    sorry, should have specified. 7 bars over 32-4000 Hz (i'm trying to push for 16k, but that's only if we have time and parts). our bar graphs will be done by LM3914s, one per bar graph to avoid the complexities of doing a dot matrix. (tentatively)

    Band One: 32-65 [Hz]
    Band Two: 65-130 [Hz]
    Band Three: 130-262 [Hz]
    Band Four: 262-523 [Hz]
    Band Five: 523-1046 [Hz]
    Band Six: 1046-2093 [Hz]
    Band Seven: 2093-4186 [Hz]
     
  5. Mar 25, 2010 #4

    berkeman

    User Avatar

    Staff: Mentor

    Welcome to the PF.

    Nope twice. First, you are not ignorant, you are learning. that is a good thing.

    Second, a digital filter paradigm seems best to me. Have you read much so far about digital filter algorithms? You can even model them on Excel -- don't think of them as black magic.
     
  6. Mar 25, 2010 #5
    One of our group members suggested it, but we are very limited in the ICs we can use. If we do that, then we can use TTL chips and thats about it, but as far as doing the A to D conversion (i don't even think we need D-A conversion), we're on our own and clueless about it. Basically our toolbox is passive components (R,C,L), transistors (which we have no idea how to use yet), and op amps (specifically, we have 741s available), plus whatever we request and the professor approves in writing (which we did for 3914s and he approved because it's very simple, the graphs will be linear btw.). As of now, none of us have any idea how to implement FFT in digital logic.

    The thing we are most concerned about in terms of analog filters is how much overlap we should have between frequency ranges. Is it better to have a high q-factor and pretty much leave out chunks of the spectrum, or should we do butterworth (/chebyshev?) filters with 3-db cutoffs near the limits of our specified ranges?


    For some reason, people doing similar analog projects seem to have used relatively hi-q filters and defined them in terms of center frequency. Any idea why?

    I'm thinking of trying butterworth (2nd order?) lo-pass in series with hi-pass. seems really simple, maybe too easy (and inefficient?).
     
  7. Mar 25, 2010 #6
    I think you will find if you let the filter characteristic curves intersect at the -3 dB points and you sum the results of all the individual filters, the curve of the overall spectrum will be flat. However a single frequency at the center of one of the bandpass filters will also be visible at the outputs of the filters on either side. A signal at the intersection of two filters will look equally strong at the outputs of both filters.

    The alternative is to increase the Q of the filters which will minimize the crosstalk between filters but the frequencies between filters will be attenuated or even be undetected.

    Much of engineering is managing trade offs.
     
  8. Mar 25, 2010 #7

    vk6kro

    User Avatar
    Science Advisor

    There are calculator sites available for designing op-amp active filters.

    The first one that came up on Google was this:
    http://www.captain.at/electronics/active-filter/

    Seems to work OK. I tried this simulation:

    http://dl.dropbox.com/u/4222062/active%20filter.PNG [Broken]

    The components don't seem especially critical, so I modified it to use standard values.

    The shape is not ideal for a spectrum analyser and, as Skeptic2 says, you could lose some frequencies in the process.
    However, it would be a cheap product compared with winding inductors for passive filters and it would work at least as well as simple filters.
     
    Last edited by a moderator: May 4, 2017
  9. Mar 25, 2010 #8
    thanks! yeah, we were using the same calculator website. one of our resistor vals was off, so we were getting strange results. thank you for the simulation, this really gives me confidence, I was trying to do this in matlab, but had trouble entering the H-function, but i think now i can plot a curve of some kind, hopefully it actually is the magnitude response. So, I guess were using this multiple-feedback topology now that we have most of the equations figured out.
     
  10. Mar 25, 2010 #9
    vk6kro: what program did you use for the sim?
     
  11. Mar 25, 2010 #10

    MATLABdude

    User Avatar
    Science Advisor

    When we did this years and years ago for my active circuits class, we just cascaded a simple op-amp low-pass filter, along with a simple op-amp high-pass filter (obviously, the cut-off frequency for the high-pass would be lower than the cut-off frequency for the low-pass, thus allowing you to create a band-pass)

    Since the objective was to analyze low, mid-band, and high frequency (audio) signals, we also used single-stage low and high-pass filters. The neat thing about the low-pass was that when you used really low frequencies (like 1 - 0.01 Hz), the LED would noticeably fade in and out.

    As for LEDs, I'd suggest just picking something that gives you a nice indication (maybe a rainbow of LEDs for high to low frequencies?). As others have alluded to, I'd be more worried about making the separate pass-bands work properly. Keep in mind the current driving capabilities of whatever op-amp you choose, and spec LEDs which take less than the maximum current output of the Op-Amps (or conversely, spec Op-Amps that have high enough current output to supply the LEDs you've selected).

    EDIT: Ooops! I totally misread that as "what kind of LEDs should I be using?" instead of what kind of filter!
     
  12. Mar 25, 2010 #11

    berkeman

    User Avatar

    Staff: Mentor

    [STRIKE]Looks like it's part of the website calculator that he linked to just above the plot in his post.[/STRIKE]

    (guess not!)
     
    Last edited: Mar 25, 2010
  13. Mar 25, 2010 #12

    vk6kro

    User Avatar
    Science Advisor

    I used LT Spice 4 for the simulation.
     
  14. Mar 25, 2010 #13
  15. Mar 25, 2010 #14
    thanks, Bob S. we were using that as a source, but couldn't figure out the transfer function for their filters... until now

    in case anyone is looking for the same info: http://www.robots.ox.ac.uk/~sjrob/Teaching/SP/l4.pdf
    on page 6 of this pdf, there is a good analysis of the milti-feedback filter. careful, the Ys are all reciprocals of what is intuitive (at least to me): i.e. Y_r=1/R and Y_c=sC .

    that formula looks great in matlab and generates pretty charts. :D

    now all we have to do is decide on the q factor, which we now have a handy (albeit disgusting in terms of code quality) matlab script to help us with.
     
  16. Mar 25, 2010 #15

    Nice. We've been trying to be stingy with op-amp usage (although same can't be sau=id of us using 7 display drivers, one per bar), but maybe simpler would have been exponentially easier.

    LOL we also found that the LEDs flicker at low frequencies, but we considered that a bug for some reason. We now have a design incorporating a diode bridge and a series RC to remedy the "problem" (although we havent tested it yet and have no idea what it actually does).

    I think everyone's been drooling over using blue LEDs, but no one wants to splurge, so maybe we can do just the bottom row or something :D .

    so i guess now all thats left is making the pass-bands fit together nicely and building it. I'll try to post some pics when were done.

    THANK YOU ALL FOR THE HELP!
     
  17. Apr 6, 2010 #16
    That's quite difficult.I might as well refer you to a a person who knows everything about that.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: What kind of filters to use for audio LED spectrum analyzer?
Loading...