Home |
Search |
Today's Posts |
#11
|
|||
|
|||
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 |
#12
|
|||
|
|||
Square wave to psuedo-sine wave?
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 |
#13
|
|||
|
|||
Square wave to psuedo-sine wave?
On Mar 24, 9:06*am, Uwe Hercksen wrote:
dave.harper schrieb: 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. Hello, a Wien-Robinson bridge oscillator needs a good amplitude stabilisation. If the amplification is to low, the oscillations will damp out. I guess there was something wrong with your amplitude stabilisation. Bye No, I used non-linear feedback (diodes) and it worked like a champ. O- scope showed a nice, rounded, stable wave with no clipping. It was only when the nearby transmitter was turned on, the oscillations damped out. Dave |
#14
|
|||
|
|||
Square wave to psuedo-sine wave?
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): Version 4 SHEET 1 1476 680 WIRE 592 -608 0 -608 WIRE -80 -528 -160 -528 WIRE -80 -496 -80 -528 WIRE -160 -464 -160 -528 WIRE 464 -368 32 -368 WIRE 144 -304 80 -304 WIRE 80 -256 80 -304 WIRE 144 -240 144 -304 WIRE 160 -240 144 -240 WIRE 416 -240 416 -256 WIRE 416 -240 384 -240 WIRE -160 -176 -160 -400 WIRE 0 -176 0 -608 WIRE 0 -176 -160 -176 WIRE 160 -176 0 -176 WIRE 464 -176 464 -368 WIRE 464 -176 384 -176 WIRE -592 -144 -592 -192 WIRE -544 -144 -592 -144 WIRE -432 -144 -464 -144 WIRE -352 -144 -352 -192 WIRE -352 -144 -432 -144 WIRE -352 -112 -352 -144 WIRE 160 -112 96 -112 WIRE 592 -112 592 -608 WIRE 592 -112 384 -112 WIRE -592 -96 -592 -144 WIRE -432 -96 -432 -144 WIRE 32 -96 32 -368 WIRE 32 -96 -160 -96 WIRE 160 -48 144 -48 WIRE 448 -48 384 -48 WIRE -592 16 -592 -16 WIRE -432 16 -432 -16 WIRE -352 16 -352 -48 WIRE 448 16 448 -48 WIRE -160 32 -160 -16 WIRE 144 32 144 -48 WIRE 144 32 -160 32 WIRE 144 80 144 32 WIRE 208 80 144 80 WIRE 448 128 448 80 WIRE 96 160 96 -112 WIRE 96 240 -64 240 WIRE -64 256 -64 240 WIRE 96 288 96 240 WIRE -64 336 -224 336 WIRE -224 352 -224 336 WIRE -64 384 -64 336 WIRE -224 432 -384 432 WIRE -224 480 -224 432 FLAG -592 16 0 FLAG 80 -256 0 FLAG -592 -192 +5V FLAG 416 -256 +5V FLAG -352 16 0 FLAG -432 16 0 FLAG -352 -192 +2.5V FLAG 448 128 0 FLAG -80 -496 0 FLAG 208 80 +5V FLAG -64 448 0 FLAG 96 352 0 FLAG -224 544 0 SYMBOL voltage -592 -112 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 WINDOW 0 -66 54 Left 0 WINDOW 3 47 51 Left 0 SYMATTR InstName V1 SYMATTR Value 5 SYMBOL res -560 -128 R270 WINDOW 0 32 56 VTop 0 WINDOW 3 0 56 VBottom 0 SYMATTR InstName R6 SYMATTR Value 1k SYMBOL res -448 -112 R0 SYMATTR InstName R7 SYMATTR Value 1k SYMBOL polcap -368 -112 R0 SYMATTR InstName C3 SYMATTR Value 10µ SYMBOL Misc\\NE555 272 -144 R0 SYMATTR InstName U1 SYMBOL cap 432 16 R0 SYMATTR InstName C1 SYMATTR Value 10nF SYMBOL res -176 -192 R0 SYMATTR InstName R2 SYMATTR Value 33500 SYMBOL res -176 -112 R0 SYMATTR InstName R1 SYMATTR Value 1000 SYMBOL cap -176 -464 R0 SYMATTR InstName C2 SYMATTR Value .01µF SYMBOL cap -80 384 R0 SYMATTR InstName C4 SYMATTR Value .08µF SYMBOL res -80 240 R0 SYMATTR InstName R3 SYMATTR Value 1000 SYMBOL cap 80 288 R0 SYMATTR InstName C10 SYMATTR Value .08µF SYMBOL res 80 144 R0 SYMATTR InstName R8 SYMATTR Value 1000 SYMBOL cap -240 480 R0 SYMATTR InstName C11 SYMATTR Value .08µF SYMBOL res -240 336 R0 SYMATTR InstName R12 SYMATTR Value 1000 TEXT -648 -472 Left 0 !.tran 0 5ms 0 1u TEXT -648 -432 Left 0 !.ic V(in1)=2.7 TEXT -648 -512 Left 0 ;555 Radio Modem |
#15
|
|||
|
|||
Square wave to psuedo-sine wave?
On 24 Mar, 18:22, "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): An inductor really does make a big difference for these kind of jobs and only costs pennies. I've tacked on an LC filter to your drawing. Output is 5Vpkpk sine at very low distortion. (filter is a 3rd order, Chebyshev, low pass, with 6db passband ripple and a Zero notch at 6kHz. Components rounded to preferred values) [replacement for LTlist...] Version 4 SHEET 1 1748 680 WIRE -80 -528 -160 -528 WIRE 592 -528 0 -528 WIRE -80 -496 -80 -528 WIRE -160 -464 -160 -528 WIRE 464 -368 32 -368 WIRE 144 -304 80 -304 WIRE 80 -256 80 -304 WIRE 144 -240 144 -304 WIRE 160 -240 144 -240 WIRE 416 -240 416 -256 WIRE 416 -240 384 -240 WIRE -160 -176 -160 -400 WIRE 0 -176 0 -528 WIRE 0 -176 -160 -176 WIRE 160 -176 0 -176 WIRE 464 -176 464 -368 WIRE 464 -176 384 -176 WIRE -592 -144 -592 -192 WIRE -544 -144 -592 -144 WIRE -432 -144 -464 -144 WIRE -352 -144 -352 -192 WIRE -352 -144 -432 -144 WIRE -352 -112 -352 -144 WIRE 160 -112 96 -112 WIRE 592 -112 592 -528 WIRE 592 -112 384 -112 WIRE -592 -96 -592 -144 WIRE -432 -96 -432 -144 WIRE 32 -96 32 -368 WIRE 32 -96 -160 -96 WIRE 160 -48 144 -48 WIRE 448 -48 384 -48 WIRE 448 -32 448 -48 WIRE -592 16 -592 -16 WIRE -432 16 -432 -16 WIRE -352 16 -352 -48 WIRE -160 32 -160 -16 WIRE 144 32 144 -48 WIRE 144 32 -160 32 WIRE 848 48 784 48 WIRE 960 48 912 48 WIRE 448 64 448 32 WIRE 144 80 144 32 WIRE 208 80 144 80 WIRE 96 128 96 -112 WIRE 128 128 96 128 WIRE 576 144 560 144 WIRE 640 144 576 144 WIRE 784 144 784 48 WIRE 784 144 720 144 WIRE 832 144 784 144 WIRE 960 144 960 48 WIRE 960 144 912 144 WIRE 1104 144 960 144 WIRE 1152 144 1104 144 WIRE 96 160 96 128 WIRE 1104 224 1104 144 WIRE 96 240 -64 240 WIRE -64 256 -64 240 WIRE 784 256 784 144 WIRE 960 256 960 144 WIRE 96 288 96 240 WIRE -64 336 -224 336 WIRE -224 352 -224 336 WIRE 784 352 784 320 WIRE 960 352 960 320 WIRE 1104 352 1104 304 WIRE -64 384 -64 336 WIRE -224 464 -224 432 WIRE -224 464 -368 464 WIRE -224 480 -224 464 FLAG -592 16 0 FLAG 80 -256 0 FLAG -592 -192 +5V FLAG 416 -256 +5V FLAG -352 16 0 FLAG -432 16 0 FLAG -352 -192 +2.5V FLAG 448 64 0 FLAG -80 -496 0 FLAG 208 80 +5V FLAG -64 448 0 FLAG 96 352 0 FLAG -224 544 0 FLAG 1104 352 0 FLAG 960 352 0 FLAG 784 352 0 FLAG 576 144 Square FLAG 1152 144 Sineout FLAG 128 128 Square SYMBOL voltage -592 -112 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 WINDOW 0 -66 54 Left 0 WINDOW 3 47 51 Left 0 SYMATTR InstName V1 SYMATTR Value 5 SYMBOL res -560 -128 R270 WINDOW 0 32 56 VTop 0 WINDOW 3 0 56 VBottom 0 SYMATTR InstName R6 SYMATTR Value 1k SYMBOL res -448 -112 R0 SYMATTR InstName R7 SYMATTR Value 1k SYMBOL polcap -368 -112 R0 SYMATTR InstName C3 SYMATTR Value 10µ SYMBOL Misc\\NE555 272 -144 R0 SYMATTR InstName U1 SYMBOL cap 432 -32 R0 SYMATTR InstName C1 SYMATTR Value 10nF SYMBOL res -176 -192 R0 SYMATTR InstName R2 SYMATTR Value 33500 SYMBOL res -176 -112 R0 SYMATTR InstName R1 SYMATTR Value 1000 SYMBOL cap -176 -464 R0 SYMATTR InstName C2 SYMATTR Value .01µF SYMBOL cap -80 384 R0 SYMATTR InstName C4 SYMATTR Value .08µF SYMBOL res -80 240 R0 SYMATTR InstName R3 SYMATTR Value 1000 SYMBOL cap 80 288 R0 SYMATTR InstName C10 SYMATTR Value .08µF SYMBOL res 80 144 R0 SYMATTR InstName R8 SYMATTR Value 1000 SYMBOL cap -240 480 R0 SYMATTR InstName C11 SYMATTR Value .08µF SYMBOL res -240 336 R0 SYMATTR InstName R12 SYMATTR Value 1000 SYMBOL ind 928 128 R90 WINDOW 0 5 56 VBottom 0 WINDOW 3 32 56 VTop 0 SYMATTR InstName L1 SYMATTR Value 15m SYMBOL cap 912 32 R90 WINDOW 0 0 32 VBottom 0 WINDOW 3 32 32 VTop 0 SYMATTR InstName C5 SYMATTR Value 47n SYMBOL cap 944 256 R0 SYMATTR InstName C6 SYMATTR Value 680n SYMBOL cap 768 256 R0 SYMATTR InstName C7 SYMATTR Value 680n SYMBOL res 736 128 R90 WINDOW 0 0 56 VBottom 0 WINDOW 3 32 56 VTop 0 SYMATTR InstName R4 SYMATTR Value 330 SYMBOL res 1120 320 R180 WINDOW 0 36 76 Left 0 WINDOW 3 36 40 Left 0 SYMATTR InstName R5 SYMATTR Value 1k8 TEXT -648 -472 Left 0 !.tran 0 50ms 0 1u TEXT -648 -432 Left 0 !.ic V(in1)=2.7 TEXT -648 -512 Left 0 ;555 Radio Modem |
#16
|
|||
|
|||
Square wave to psuedo-sine wave?
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 |
#17
|
|||
|
|||
Square wave to psuedo-sine wave?
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. 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 You have such a narrow "bandwidth" that you might consider an LC tuned network.. |
#18
|
|||
|
|||
Square wave to psuedo-sine wave?
On Wed, 24 Mar 2010 11:22:28 -0700 (PDT), "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): Version 4 SHEET 1 1476 680 WIRE 592 -608 0 -608 WIRE -80 -528 -160 -528 WIRE -80 -496 -80 -528 WIRE -160 -464 -160 -528 WIRE 464 -368 32 -368 WIRE 144 -304 80 -304 WIRE 80 -256 80 -304 WIRE 144 -240 144 -304 WIRE 160 -240 144 -240 WIRE 416 -240 416 -256 WIRE 416 -240 384 -240 WIRE -160 -176 -160 -400 WIRE 0 -176 0 -608 WIRE 0 -176 -160 -176 WIRE 160 -176 0 -176 WIRE 464 -176 464 -368 WIRE 464 -176 384 -176 WIRE -592 -144 -592 -192 WIRE -544 -144 -592 -144 WIRE -432 -144 -464 -144 WIRE -352 -144 -352 -192 WIRE -352 -144 -432 -144 WIRE -352 -112 -352 -144 WIRE 160 -112 96 -112 WIRE 592 -112 592 -608 WIRE 592 -112 384 -112 WIRE -592 -96 -592 -144 WIRE -432 -96 -432 -144 WIRE 32 -96 32 -368 WIRE 32 -96 -160 -96 WIRE 160 -48 144 -48 WIRE 448 -48 384 -48 WIRE -592 16 -592 -16 WIRE -432 16 -432 -16 WIRE -352 16 -352 -48 WIRE 448 16 448 -48 WIRE -160 32 -160 -16 WIRE 144 32 144 -48 WIRE 144 32 -160 32 WIRE 144 80 144 32 WIRE 208 80 144 80 WIRE 448 128 448 80 WIRE 96 160 96 -112 WIRE 96 240 -64 240 WIRE -64 256 -64 240 WIRE 96 288 96 240 WIRE -64 336 -224 336 WIRE -224 352 -224 336 WIRE -64 384 -64 336 WIRE -224 432 -384 432 WIRE -224 480 -224 432 FLAG -592 16 0 FLAG 80 -256 0 FLAG -592 -192 +5V FLAG 416 -256 +5V FLAG -352 16 0 FLAG -432 16 0 FLAG -352 -192 +2.5V FLAG 448 128 0 FLAG -80 -496 0 FLAG 208 80 +5V FLAG -64 448 0 FLAG 96 352 0 FLAG -224 544 0 SYMBOL voltage -592 -112 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 WINDOW 0 -66 54 Left 0 WINDOW 3 47 51 Left 0 SYMATTR InstName V1 SYMATTR Value 5 SYMBOL res -560 -128 R270 WINDOW 0 32 56 VTop 0 WINDOW 3 0 56 VBottom 0 SYMATTR InstName R6 SYMATTR Value 1k SYMBOL res -448 -112 R0 SYMATTR InstName R7 SYMATTR Value 1k SYMBOL polcap -368 -112 R0 SYMATTR InstName C3 SYMATTR Value 10µ SYMBOL Misc\\NE555 272 -144 R0 SYMATTR InstName U1 SYMBOL cap 432 16 R0 SYMATTR InstName C1 SYMATTR Value 10nF SYMBOL res -176 -192 R0 SYMATTR InstName R2 SYMATTR Value 33500 SYMBOL res -176 -112 R0 SYMATTR InstName R1 SYMATTR Value 1000 SYMBOL cap -176 -464 R0 SYMATTR InstName C2 SYMATTR Value .01µF SYMBOL cap -80 384 R0 SYMATTR InstName C4 SYMATTR Value .08µF SYMBOL res -80 240 R0 SYMATTR InstName R3 SYMATTR Value 1000 SYMBOL cap 80 288 R0 SYMATTR InstName C10 SYMATTR Value .08µF SYMBOL res 80 144 R0 SYMATTR InstName R8 SYMATTR Value 1000 SYMBOL cap -240 480 R0 SYMATTR InstName C11 SYMATTR Value .08µF SYMBOL res -240 336 R0 SYMATTR InstName R12 SYMATTR Value 1000 TEXT -648 -472 Left 0 !.tran 0 5ms 0 1u TEXT -648 -432 Left 0 !.ic V(in1)=2.7 TEXT -648 -512 Left 0 ;555 Radio Modem Your RC values could be optimized. Try using successively bigger resistors and correspondingly smaller caps in successive stages. As is, each filter stage heavily loads the previous one. These RCs each have an unloaded 3 dB point of about 2 KHz, so three in a row will lose about 9 dB. Making the taus a little shorter will increase output at the expense of distortion. I'd expect a 3-pole LC filter to be a lot better. John |
#19
|
|||
|
|||
Square wave to psuedo-sine wave?
"Phil Allison" Function generator. Integrate square wave to get triangle wave. Shape triangle wave to sine wave using a couple of diodes. See http://kitsrus.com/projects/k23.pdf ** Contrary to the OP's wishes, that POS uses op-amps. Have you seen the ugly " sine" wave it produces ?? The diodes will rectify the RF energy. Not even a starter. Contrary to what you think, the OP seems like he would be happy with a sine wave with only 1% distortion. ** Fraid that POS has a lot more than 1% THD. The diodes will rectify RF but at the output the signal level should be several orders of magnitude higher than the RF. ** The OP wants to link his device to a transmitter. The amount of RF energy is serious. Did you read his post at all ?? So would not expect that to be a problem. ** Yawnnnnnnnnnnnnnnnnn.... ..... Phil |
#20
|
|||
|
|||
Square wave to psuedo-sine wave?
On Mar 24, 3:56*pm, wrote:
On 24 Mar, 18:22, "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): An inductor really does make a big difference for these kind of jobs and only costs pennies. I've tacked on an LC filter to your drawing. Output is *5Vpkpk sine at very low distortion. (filter is a 3rd order, Chebyshev, low pass, with 6db passband ripple and a Zero notch at 6kHz. Components rounded to preferred values) [replacement for LTlist...] That is a nicer output, but that also requires a 15mH coil. Wouldn't that be a little big? This will be going into a small payload container with 3" diameter. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
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 |