Today I started playing around with making a low-pass filter to sample audio and flash an LED to the bass. I currently have a simple low-pass filter using 660K resistor and a 0.047uF ceramic capacitor. I am quite happy with the results as my sound is a LOT more bassy, but problem is the higher frequencies are still getting through...barely but still going through. Is there a way by maybe chaining low-pass filters or some other method to make sure no frequencies above say 80Hz gets through? This way I can just see the bass? Also is it better to use a higher capacitor and lower resistor or vice versa? Or does it now matter which is greater?
"chained" filters come in two types - chebyshev and butterworth - the main difference between them is if they are a chain of PI or T filters.
They both have much sharper drop-offs than a straight RC filter. The more stages you have the sharper the cutoff curve.
For multiple stage filters you're better off using inductors instead of resistors, as they don't reduce your current as much as resistors do.
Yes you can do it with inductors, however the inductor values you need when you are working at audio frequencies are typically too large to be practical. The usual way to get a sharper cutoff is to make a higher order filter using an op amp. Google "2nd order low pass filter" to get started.
You may wish to try out any of the SPICE programs that are available Free.
I generally use falstad.com for audio stuff, prepackaged filter examples to give you a jump start.
Electronics 202 Lesson of the Day: Filters are classified by type (Low Pass, High Pass, Band Pass, Band Reject) and order (1st, 2nd, 3rd). The order is basically the number of energy storage elements (caps and inductors) with the caveat that if you can combine two elements to make one equivalent one it only counts as one element.
For every order of filter you will drop the signal by 20 dB per decade. So if the corner frequency of your low pass filter is at say 50Hz, 1KHz will be 20dB lower than 100Hz. dB is a non-linear scale that is defined as follows dB = 20 * Log10(Voltage). However our hearing is also non-linear, so you can think of dB as a rough linear relationship to what you will hear.
The quick conclusion from this is that 20dB per decade is not a very sharp edge. For this reason many people will use filters with a higher order. With just passive components 2nd or 3rd order is about as far as you can go without running into stability issues. You can also get low pass filter op amps that are made to act as high order (4-6) filters.
If you move to digital filters that are done in software you can get a very sharp edge by using filters of order 50 or higher. The placement of the corner frequencies,referred to here as poles, determines the behavior of the digital filter. There are many alternatives that offer various degrees of cutoff speed as a trade-off for ripple in the pass band. I have spent weeks and weeks on these topics in school, so to sum them up adequately in a forum post is hard.
You can use the Arduino to run a digital low pass filter, but you still need a first or second order filter on its input to filter out the highest frequencies to avoid aliasing, so it is not the easy way out at all. Feel free to post back on any of this for further explanation.
TLDR: There are a lot of cool filters, try a 2nd order filter before diving into the added complexity of something higher. Higher order = less unwanted stuff.
For every order of filter you will drop the signal <> by 20 dB per decade...
FIFY
Yes, I even remember thinking to myself that I should specify that is for the stop band as I wrote it, but apparently it never made it over the dangerous crevasse between the brain and the keyboard.