low pass filtering of square wave to get sine wave
low pass filtering of square wave to get sine wave
(OP)
I'm filtering a 1020Hz 3.3V squarewave from a microprosessor using a 2 pole low pass butterworth filter. Thanks to TI for their filter pro! I would like the output frequency of filter to be a 1020Hz sine wave. I realize that if I select the cutoff frequency at 1020Hz that my sine wave will be attenuated by -3dB. However, I would like this sine wave to be attenuated as little as possible.
By taking a look at the forier transform of a square wave I see the following beginning few terms...
4*k/(pi)*(sinx+0.33sin(3x)+0.2sin(5x)...)
So my understanding of the forier trasform is that I can set a cutoff frequency for the filter at 3*1020Hz (frequency of second term) and my output of the filter will be an unattenuated 1020Hz sine wave.
I would like to bounce this thought process off of you guys to see if this is a correct way to be thinking about getting an unattenuated sine wave. I'm new to filters...
I appreciate your guidance!
Thanks,
Windell
By taking a look at the forier transform of a square wave I see the following beginning few terms...
4*k/(pi)*(sinx+0.33sin(3x)+0.2sin(5x)...)
So my understanding of the forier trasform is that I can set a cutoff frequency for the filter at 3*1020Hz (frequency of second term) and my output of the filter will be an unattenuated 1020Hz sine wave.
I would like to bounce this thought process off of you guys to see if this is a correct way to be thinking about getting an unattenuated sine wave. I'm new to filters...
I appreciate your guidance!
Thanks,
Windell





RE: low pass filtering of square wave to get sine wave
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: low pass filtering of square wave to get sine wave
It is a wonderful idea. But, to do this, you need a so-called brick-wall filter. That is a filter with G=1 in the passband and G=0 in the stopband. Such filters do not exist IRL. But approximations exist.
Your original idea (resonant circuit) is better if you want to do this. But bulky and usually somewhat problematic because of component drift - especially the L.
Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...