Home |
Search |
Today's Posts |
#21
![]() |
|||
|
|||
![]()
On 25/03/2010 12:37 PM, dave.harper wrote:
On Mar 24, 3:56 pm, wrote: On 24 Mar, 18:22, 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. Amateur rocket? |
#22
![]() |
|||
|
|||
![]() "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 |
#23
![]() |
|||
|
|||
![]()
On 25 Mar, 02:37, "dave.harper" wrote:
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. They're about the size of 0.4W resistors but if you're stuck for space then it's not an option. I had in mind this ... 'Epcos' part# B82144A2156J000 A pic of a similar item ... http://uk.farnell.com/epcos/b78108s1...646?Ntt=608646 Or a different body style but more expensive ... http://uk.farnell.com/murata-power-s...44?Ntt=1077044 |
#24
![]() |
|||
|
|||
![]()
On Mar 25, 10:57*am, wrote:
On 25 Mar, 02:37, "dave.harper" wrote: 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. They're about the size of 0.4W resistors but if you're stuck for space then it's not an option. I had in mind this ... 'Epcos' part# *B82144A2156J000 A pic of *a similar item ...http://uk.farnell.com/epcos/b78108s1...-4700uh/dp/608... Or a different body style but more expensive ...http://uk.farnell.com/murata-power-s...ductor-15mh/dp... Hm, what about this one? Looks promising: http://search.digikey.com/scripts/Dk...me=811-2058-ND |
#25
![]() |
|||
|
|||
![]()
On 25 Mar, 20:26, "dave.harper" wrote:
On Mar 25, 10:57*am, wrote: On 25 Mar, 02:37, "dave.harper" wrote: 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. They're about the size of 0.4W resistors but if you're stuck for space then it's not an option. I had in mind this ... 'Epcos' part# *B82144A2156J000 A pic of *a similar item ...http://uk.farnell.com/epcos/b78108s1...-4700uh/dp/608... Or a different body style but more expensive ...http://uk.farnell.com/murata-power-s...ductor-15mh/dp... Hm, what about this one? *Looks promising: http://search.digikey.com/scripts/Dk...tail&name=811-.... Yep. Fine!. (DigiKey 811-1302-ND for the 15mH) |
#26
![]() |
|||
|
|||
![]()
On Thu, 25 Mar 2010 13:26:27 -0700 (PDT), "dave.harper"
wrote: On Mar 25, 10:57*am, wrote: On 25 Mar, 02:37, "dave.harper" wrote: 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. They're about the size of 0.4W resistors but if you're stuck for space then it's not an option. I had in mind this ... 'Epcos' part# *B82144A2156J000 A pic of *a similar item ...http://uk.farnell.com/epcos/b78108s1...-4700uh/dp/608... Or a different body style but more expensive ...http://uk.farnell.com/murata-power-s...ductor-15mh/dp... Hm, what about this one? Looks promising: http://search.digikey.com/scripts/Dk...me=811-2058-ND --- How about this: Version 4 SHEET 1 880 680 WIRE 208 0 16 0 WIRE 208 16 208 0 WIRE 16 32 16 0 WIRE 16 128 16 112 WIRE 208 144 208 96 WIRE 336 144 208 144 WIRE 208 160 208 144 WIRE 16 256 16 208 WIRE 208 256 208 224 WIRE 208 256 16 256 WIRE 16 352 16 256 FLAG 16 352 0 SYMBOL ind 192 0 R0 SYMATTR InstName L1 SYMATTR Value .00932 SYMATTR SpiceLine Rser=110 SYMBOL cap 192 160 R0 WINDOW 0 42 38 Left 0 WINDOW 3 26 65 Left 0 SYMATTR InstName C1 SYMATTR Value .68e-6 SYMBOL voltage 16 112 R0 WINDOW 3 24 104 Invisible 0 WINDOW 39 0 0 Left 0 SYMATTR Value PULSE(0 5 0 1e-7 1e-7 250e-6 500e-6) SYMATTR InstName V1 SYMATTR Value2 AC 1 SYMBOL res 0 16 R0 SYMATTR InstName R1 SYMATTR Value 10 TEXT 40 288 Left 0 !.tran .1 TEXT 40 320 Left 0 !;ac oct 256 10 10000 The coil is a Caddell-Burns 6740-61 (6.8 - 12mH) variable inductor: http://www.caddell-burns.com/PDF/A1042.pdf You can use it to tune to 2kHz, dead nuts, but that tunability comes at a price: http://www.caddell-burns.com/priceLi..._List_Pg_2.pdf and the cap is any garden variety 0.68µF polyester cap. JF |
#27
![]() |
|||
|
|||
![]() Quote:
|
#28
![]() |
|||
|
|||
![]()
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. 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 With a 10% of fc range i would use an integrator first then use an active RC bandpass filter. |
#29
![]() |
|||
|
|||
![]()
On Wed, 24 Mar 2010 14:02:12 -0700, Tim Wescott wrote:
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. How many _well designed_ Wien bridge oscillators have you seen that get hammered by EMI/RFI? |
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 |