Digital Sound to Analog Sound

AnalogKid

Joined Aug 1, 2013
11,056
If you start with the idea that any lowpass filter can reduce the harmonics of square waves, then there are tradeoffs. For example, a single-pole filter can reduce the harmonics just as much as a 3-pole filter if the single pole cutoff frequency is much lower. But if it is much lower, then the fundamental sine wave will be lower in amplitude. So the tradeoff is a much less complicated filter but a much lower signal. Increasing the number of poles in the filter lets you set the filter cutoff frequency closer to the input squarewave frequency for the same amount of harmonic attenuation. I know this applies mostly to attenuation of the third harmonic, but that's the largest harmonic.

So what? Here's what. Having two oscillators and two filters tuned to the two frequencies will get you two sinewaves. But another approach is to have only one filter circuit on the combined signal. The filter performance will change as the input signal frequency varies, but that is the tradeoff for way fewer parts. Also, if this is a European-style two-tone siren, then you are down to only one oscillator with something to change the freq like switching a capacitor.

ak
 

crutschow

Joined Mar 14, 2008
34,470
If you start with the idea that any lowpass filter can reduce the harmonics of square waves, then there are tradeoffs. For example, a single-pole filter can reduce the harmonics just as much as a 3-pole filter if the single pole cutoff frequency is much lower.
................................
That's not accurate. It's true they will both reduce the square-wave harmonics but a 3-pole filter has a much steeper rolloff then a 1-pole so any harmonics are reduced proportionally more as compared to the fundamental.
For example the 2nd harmonic would be reduced by 6dB (anywhere on the rolloff slope) as compared to the fundamental for the single-pole filter but reduced by 18dB for the 3-pole filter.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
11,056
That's not accurate. It's true they will both reduce the square-wave harmonics but a 3-pole filter has a much steeper rolloff then a 1-pole so any harmonics are reduced proportionally more as compared to the fundamental.
For example the 2nd harmonic would be reduced by 6dB (anywhere on the rolloff slope) as compared to the fundamental for the single-pole filter but reduced by 18dB for the 3-pole filter.
That's why I added this part: "I know this applies mostly to attenuation of the third harmonic, but that's the largest harmonic."

To a variable frequency input, a single pole filter with the right corner freq can have some of the characteristics of a slope detector. I was trying to make the point that a 3-pole filter isn't the only possible solution without getting too deep into filter theory with someone who might not have the background for it.

ak
 

crutschow

Joined Mar 14, 2008
34,470
Well I appreciate your wanting to simplify things for the op but the same principle applies to the third harmonic. The single-pole filter will reduce the 3rd harmonic by about 9dB and the 3-pole filter by about 28dB (depending upon where on the attenuation slope you are operating). That's why the 3-pole filter output looks like a sinewave and the 1-pole output never does, no matter where on the slope you operate.

A 2-pole filter would have less 3rd harmonic attentuation than the 3-pole, of course.
 
Top