View Single Post
  #11   Report Post  
Old March 24th 10, 03:25 PM posted to sci.electronics.design,rec.radio.amateur.homebrew
Don Lancaster Don Lancaster is offline
external usenet poster
 
First recorded activity by RadioBanter: Mar 2010
Posts: 1
Default Square wave to psuedo-sine wave?

Bob Eld wrote:
"dave.harper" wrote in message
...
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. I've also considered using a counter feeding a bank of
resistors, but finding a method for it to start counting up with it
hits 0 and down when it hits the high value might be more difficult.

Originally, I had used a wein-bridge oscillator with op-amps to make
the sine wave, but due to the environment, EMI was a problem and it
damped out the oscillations (even with ferrite beads and modest
shielding). So I'd like to avoid using op-amps (since they are
apparently sensitive to EMI) if possible.

Any suggestions?

Thanks in advance!
Dave


I would make a five pole elliptic low pass active filter breaking at about 3
kHz with a deep 80 dB notch at the third harmonic of 6 kHz. This is a dual
op amp (2 section) solution and uses a small number of resistors and caps.
You should be able to attenuate all of the harmonics at least 80 dB leaving
a pretty good sine wave.




Parallax invented the ultimate in mind-numbingly simple sinewave
generators many years ago. SIX BYTES !!! of working code on a PIC!!!!

Start with page 85.3 of http://www.tinaja.com/glib/hackar4.pdf





--
Many thanks,

Don Lancaster voice phone: (928)428-4073
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml email:

Please visit my GURU's LAIR web site at
http://www.tinaja.com