dave.harper wrote:
On Mar 23, 3:00 pm, John Larkin
wrote:
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
I modeled a few low pass filters, and think this is the best
solution. I have 3 RC low-pass filters and the output looks
relatively sine-like. Thanks to everyone that provided good
suggestions! Here's the schematic in LTSpice (comments appreciated):
If a well-designed Wien bridge oscillator gets hammered by RFI, you're
somewhat depending on luck that an active filter doesn't have the same
problem.
--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com