Square wave to psuedo-sine wave?
On Tue, 23 Mar 2010 12:39:59 -0700 (PDT), "dave.harper"
wrote:
I'm trying to come up with a filter or converter that takes a square
wave input and outputs something closer to a sign wave (varying
between ~1.9kHz and 2.1kHz). It can have some distortion, but I'm
trying to eliminate the sharp leading and trailing edge. One option
I'm pursuing is a bandpass filter (2 caps and 2 resistors), which
looks to give a reasonable output, but still not quite as smooth as
I'd like.
A lowpass filter is appropriate. You're trying to kill the higher
(odd) harmonics but there's no signal below the fundamental, excepting
DC maybe.
A dual-stage RC lowpass would be pretty good, if you set the -3 dB
point around 2 KHz. A higher-order filter, active or LC, would be even
better. An LC filter isn't unreasonable at 2 KHz.
John
|