Low pass filter

Hi all - newbie post

I went through all of the posts I could find on low pass filters. All of the off-the-shelf passive circuit parts that were suggested appear to have been discontinued.

I'm looking to drive a powered subwoofer with something in the range of 2.5 - 18 Hz tones. I realize that these will be 'felt' rather than 'heard' .. everything I find is an amp but I don't need an amp since I am using a powered subwoofer, and it already has the cooling, is approved by various agencies for use in homes, doesn't radiate bad electronic noise, etc.

The arduino is connected to a small keypad where the experimenter enters the frequency, 25 -> 180, with an implied decimal place. The arduino puts out the PWM analog until there is another keypress.

The subwoofer is ... is howling a good word? .. and I expect it is the higher frequencies in the PWM output. It's not a great powered sub, an older Energy model ... but it should be good enough to do the job. I don't think I need anything fancy - the more filtering is likely better. I don't want to 'hear' anything. Distortion of any one frequency is fine. Phase shift is fine as long as the corner frequency doesn't make it an oscillator :wink: There is only a single tone going in.

A passive circuit design is great. Output of the Arduino pin -> filter -> powered subwoofer input. If there is an active filter (not an amplifier) that will do that range, that works too. I'm surprised that I'm having trouble finding this ... I thought this would be the easy part!

The regular Arduino doesn't have a DAC (PWM isn't true analog). Have you increased the PWM frequency?

You can use almost any op-amp to make filters. The famous Active Filter Cookbook is available online. Or you can search for a "switched capacitor filter IC". Note that most op-amp circuits require positive & negative power supplies (to handle the AC audio signal) and switched capacitor filter may require that too.

I know a bit about DACs versus PWM, but since the frequencies are so low I had assumed (bad word!) that the PWM would be good enough.

I have not put the output on a scope to verify that the signal to the powered sub is full of higher frequencies ... but it does not sound happy at ALL.

I'll read up on adjusting the PWM frequency. Thanks! Not sure what the default is, but if I go higher than 20 K that should get rid of audible harmonics ... which is what I really want to do.

I'll post one way or the other. I hate threads that just die with no way to tell if something fixed it!

Yes you need to increase the PWM frequency.

A passive circuit design is great.

Most of the passive designs are only first order or second order filters. The order of a filter is a measure fo how quickly the output drops off with increasing frequency.

A first order filter drops off at 3dB per octave, that is the output drops by half each time the input frequency doubles. A second order filter drops off a 6dB per octave, and so on.

To make higher order filters you need either a buffer amplifier between each stage or you incorporate the filter with the amplifier using an op-amp. So a sixth order filter would require three amplifier stages.

You can design active filters that drop off faster at the expense of ripple in the pass band or the stop band. These have names like Bessel filter, or Chebyshev filter.

thingstodo_ca:
Hi all - newbie post

I went through all of the posts I could find on low pass filters. All of the off-the-shelf passive circuit parts that were suggested appear to have been discontinued.

Like resistors and capacitors? Really?

I have not put the output on a scope to verify that the signal to the powered sub is full of higher frequencies ... but it does not sound happy at ALL.

Right! PWM is pulses which contain multiple frequencies. And, they are "nasty" 5V peak-to-peak pulses. I wouldn't run unfiltered PWM into an amplifier that I cared about. :wink:

Your ear and the speaker are essentially high pass (actually bandpass) filters so you may have to filter more than you think...

And, it's probably easy to overdrive the speaker or built-in amplifier to the point where you get audible distortion harmonics. Unless you have a "big" subwoofer (or multiple subs) I'd guess you'll hear distortion components before you "feel" the subsonic bass. ...You can also feel bass that's not subsonic. Most "pro" subwoofers used for live music or in dance clubs go down to about 40Hz.

You can generate square waves with delay() or delayMiocroseconds(). That should be easier to filter than PWM but you can't control the "volume" digitally. And, I'm not scared of running low-frequency (volume controlled) square waves into my amplifier.* ...The tone() function generates square waves but it doesn't go below 31Hz.

If you can use a computer I'd try your soundcard, although not all soundcards go subsonic. Audacity can generate sine wave files (down to 1Hz with 1Hz resolution**) or you can probably find a tone generator application for your computer or phone (but "audio" generators that go subsonic might be harder to find.)

You might also consider adding a DAC, or using an audio shield. Audio shields play audio files (WAV or MP3) so you'd need one file for each frequency. And, you could again run into subsonic limitations.

A DAC normally needs low-pass filter too but if the sample rate is high enough you can get-away without one. I was doing some experiments with an oscilloscope and a cheap soundcard once and I was very surprised to see a stair-stepped waveform! I never heard anything "wrong" and after thinking about it, the harmonics are ultrasonic and mechanically filtered by the speaker (and maybe filtered by the amplifier too).

  • Not a problem with your subwoofer but constant high-frequency tones can kill a tweeter. The tweeter in a "100W" speaker can't handle 100W and you can burn-out a tweeter with supersonic tones/harmonics that you can't hear.

** I was able to "tweak" the frequency and easily go down to 0.1Hz with Audacity's Change Speed effect. (I didn't try playing the files through my soundcard.)

P.S.
Are you sure the amplifier in your subwoofer goes down to 2.5Hz? Most amplifiers have a "DC blocking" capacitor on the input (because DC an also burn-out a speaker or amp without making sound) and that capacitor acts as a high-pass filter.

You can also burn-out a 100W woofer with a 100W amplifier. A 100W speaker is supposed to handle 100W program peaks, not continuous 100W test tones. Be careful!

For class D audio amps the internal frequencies used tend to be 200kHz and higher, which are strongly
attenuated in the tweeter voice coil fortunately, being an inductor. And typically the switching frequency
is strongly filtered in the amp's output circuit also.

Its best not to attempt routing PWM-derived signals into a class D audio amp as the two frequencies involved
may "beat" and generate loud audibles whistles / spurious tones.

If you use using low power into a small speaker typically you can get away without filtering and
let the speaker voice coil and mass act as the filter. Such a speaker is full-range and pretty robust.

The bad case is unfiltered PWM at low frequency (say 30kHz) direct to a power amplifier input - this
can cause distortion and overloading, whether the amp is class-D or not.

If you use lower frequency square waves to an analog power amp you'd be wise to use at least 4 poles
of filtering with a roll-off starting as low as possible (4kHz for voice, 15kHz for quality audio) - this
should keep the ultrasonic components well down in amplitude.

MarkT:
Like resistors and capacitors? Really?

I should have stated 'active' filter designs that I found on the forum had parts that were discontinued.
And I didn't know that passive were mostly first or second order.

DVDdoug:
Right! PWM is pulses which contain multiple frequencies. And, they are "nasty" 5V peak-to-peak pulses. I wouldn't run unfiltered PWM into an amplifier that I cared about. :wink:

Your ear and the speaker are essentially high pass (actually bandpass) filters so you may have to filter more than you think...

And, it's probably easy to overdrive the speaker or built-in amplifier to the point where you get audible distortion harmonics. Unless you have a "big" subwoofer (or multiple subs) I'd guess you'll hear distortion components before you "feel" the subsonic bass. ...You can also feel bass that's not subsonic. Most "pro" subwoofers used for live music or in dance clubs go down to about 40Hz.

You can generate square waves with delay() or delayMiocroseconds(). That should be easier to filter than PWM but you can't control the "volume" digitally. And, I'm not scared of running low-frequency (volume controlled) square waves into my amplifier.* ...The tone() function generates square waves but it doesn't go below 31Hz.

If you can use a computer I'd try your soundcard, although not all soundcards go subsonic. Audacity can generate sine wave files (down to 1Hz with 1Hz resolution**) or you can probably find a tone generator application for your computer or phone (but "audio" generators that go subsonic might be harder to find.)

You might also consider adding a DAC, or using an audio shield. Audio shields play audio files (WAV or MP3) so you'd need one file for each frequency. And, you could again run into subsonic limitations.

A DAC normally needs low-pass filter too but if the sample rate is high enough you can get-away without one. I was doing some experiments with an oscilloscope and a cheap soundcard once and I was very surprised to see a stair-stepped waveform! I never heard anything "wrong" and after thinking about it, the harmonics are ultrasonic and mechanically filtered by the speaker (and maybe filtered by the amplifier too).

  • Not a problem with your subwoofer but constant high-frequency tones can kill a tweeter. The tweeter in a "100W" speaker can't handle 100W and you can burn-out a tweeter with supersonic tones/harmonics that you can't hear.

** I was able to "tweak" the frequency and easily go down to 0.1Hz with Audacity's Change Speed effect. (I didn't try playing the files through my soundcard.)

P.S.
Are you sure the amplifier in your subwoofer goes down to 2.5Hz? Most amplifiers have a "DC blocking" capacitor on the input (because DC an also burn-out a speaker or amp without making sound) and that capacitor acts as a high-pass filter.

You can also burn-out a 100W woofer with a 100W amplifier. A 100W speaker is supposed to handle 100W program peaks, not continuous 100W test tones. Be careful!

It appears that I should not be connecting that circuit to my powered sub any more.

Hopefully I didn't do any damage! The 'howl' hurt my ears and scared the crap out of me. I don't expect that the signal was connected for more than 10 seconds.

After checking online (my old energy powered subwoofer did not appear on my 'online manuals' search ... but I didn't try that hard) ... I found a couple of older forums that discuss it. And, of course, you are correct. The frequency response starts at 40 Hz, or maybe a bit lower. The discussion was not on my exact model but it was close (a bit newer I think) ... which is much too high for the experiments.

So I guess I DO need an amplifier circuit to get down to that frequency range. AND a powered sub is not the solution, so what exactly can I 'drive' to output these frequencies? It doesn't sound like an audio coil is a great match. I'm not sure what forums I should be looking for ... sub-sonic maybe?

@Grumpy_Mike - ripple on the high-order filters is ripple across the frequency response - right? If you are sending a tone, a single frequency, it should not matter .. or not matter much?

I think I understand now a bit about why this is a project, and not a buy-it-off-the-shelf thing. ...

ripple on the high-order filters is ripple across the frequency response - right?

That is correct. So ripple in the pass band would mean that a single tone would be louder at some frequencies than others.

I should have stated 'active' filter designs that I found on the forum had parts that were discontinued.

We’re these discontinued parts the operational amplifier? If so then by and large you can substitute another one that you can get hold of. Just make sure it works on the voltage you want to use and that the output can get close the power rails you are using.

It is better to do any filtering at signal levels and then amplify it to drive the speaker.

Follow-up post:

So far, I have only progressed some research on this project. I did find out that below audible audio is grouped under the name infrasonics (which also appears to be a brand name).

So far (as of Dec 2020) I think these are reasonable parts to continue with the build

This board claims to generate sine waves in the range that is required
https://www.amazon.ca/gp/product/B07KVS1KD5/ref=ox_sc_saved_title_1?smid=A196NNSP1X7WL9&psc=1

There are a few selections for an off-the-shelf amplifier with input signals in the 5 Hz and up range.
Crown DC-300A is an old design, not cheap but it looks like a tank and has a reputation for hard-to-damage

Taramps HD-Series Amplifiers, down to 10 hz

Budget solution (car audio) - so this would require a beefy 12V supply as well.

And these two 'speakers' .. not really speakers ... do reproduce the rumble. I just don't know if they make an audible noise when they do their thing at low frequency, or if they need to be bolted/mounted to a large cone ... maybe a 4 x 8 foot sheet of plywood? ... to move the air required for the rumble. I don't expect that bolting these things to the floor joists of a building is a reasonable solution :wink: