Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]() "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. |
#2
![]() |
|||
|
|||
![]()
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 |
#3
![]() |
|||
|
|||
![]() "Don Lancaster" wrote in message ... 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 Thanks Don. Truly weird! I plan to code it up and play around with this when time permits. So, the original poster could put this into a single chip PIC and forget about his square wave source. He'd still need to run a D toA to get an analog output, would he not? Within that algorithm he could also pull out a square wave too if needed. Frequency could be anything within the speed of the processor with appropriate, even externally controlled internal delays and of course be crystal controlled and very stable. Hmmm. I already have a use for this. Thanks again. Bob |
#4
![]() |
|||
|
|||
![]() Bob Eld wrote: 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. Here is minimal solution: http://www.abvolt.com/misc/square_to_sine.jpg This filter makes for about 0.65% of THD; it is probably as good as it could be done in reality with this number of components. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
FA: Heathkit G-2 Sine/Square Wave Generator 1948 LAST DAY! | Equipment | |||
FA: Heathkit G-2 Sine/Square Wave Generator 1948 LAST DAY! | Equipment | |||
Need manual for RCA WA-44C sine/square wave generator | Boatanchors | |||
Need manual for RCA WA-44C sine/square wave generator | Equipment | |||
Need manual for RCA WA-44C sine/square wave generator | Equipment |