Go Down

Topic: Low pass filter - sacrifice gain (Read 159 times) previous topic - next topic

DocStein99

I'm trying sharpen my skills with audio, and need advice please.  I've been working with the tone() function and also moving into other synthesizer ic chips.

I know I must use low pass filter on the audio-out line to the amplifier.  I first tried:



(2) 33k-ohm resistors, in series, (2) .01 uf non-polar capactiors to ground.

This works good, except it seems to affect the gain too much.  So then I tried replacing (2) 33k-ohm resistors, with (2) 10k resistors, and that gave me more volume.  I then moved to (2) 5.6k-ohm resistors.  It's working but it seems I sacrifice the strength of that signal.

If I just ditch the 1st resistor and use only 1 resistor & 2 capacitors, it seems to get rid of that random squeal noise, leaving some hissing.  At this point, I am just sort of replacing stuff to see what happens - not really calculating on a scientific level how to handle this issue.

Is there a better way to design this filter - without sacrificing the gain ?

Grumpy_Mike

You need to do proper calculations on the cut off frequency and roll off you actually want or need.
You need an active filter not a passive one, then you design any gain into it. It consists of an op amp and some feedback capacitors and resistor. While what you have are known  as two first order filters you can not continue to cascade them because the impedance requirements of each stage. You need a low impedance driver input and a high impedance load for an RC filter and therefore you can't cascade sections very well.
However a second order active filter gives you that and so you can cascade them to get what you want.

There are many on line filter calculation sites bur half the problem is knowing what filter charastics you require.

Filter design is complex and randomly replacing component values is never going to get you far.

jaholmes

Yeah, the -3db roll-off point with 33k and .01uF is approximately 480Hz.  That's brutal.  What sort of filter response were you hoping for?

Paul Stoffregen

#3
Feb 27, 2017, 06:11 pm Last Edit: Feb 27, 2017, 06:16 pm by Paul Stoffregen
The trouble with completely passive filters is their high output impedance.  Or in plain layman's terms, their output is "weak".  The filter's performance varies dramatically (both gain and frequency response) depending on whatever load is connected to its output.  The impedance (or strength) of the input can also matter.

My guess is you probably weren't aware of this, otherwise you would have included more info in your question about what's really connected to both sides of the filter.  We can assume the input connects directly to an Arduino pin, which is a fairly known quantity, though the output from older boards is somewhat different than the newer models.

If the load connected to your filter output is reliably known, perhaps the filter can be designed to take it into account.  But only so much is possible without adding an amplifier into the filter.  To drive low impedance (or "heavy") loads like heaphones or speakers, or to get consistent performance with different loads, an amplifier is needed.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy