square wave to sine wave converter

gauri_22480

Oct 15, 2004
18
Joined
Oct 15, 2004
Messages
18
hello,

I just wanted to know if somebody could suggest me a way to convert a square wave to a sine wave with same frequency ? Just like you can convert it to triangle wave with a op. Amp. mounted as an intergrator.

Thanks in advance for any suggestion.

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Gauri,
Just filter out all the harmonics and you'll be left with the fundamental frequency which is a perfect sine-wave.
I have used a switched-capacitor low-pass filter IC and it worked very well. National Semi used to make some but they are obsolete now. Go to www.maxim-ic.com and you will see many.

 

Ldanielrosa1

Nov 25, 2003
316
Joined
Nov 25, 2003
Messages
316
If you send a square wave through an integrator, you should get a triangle out. Sending that through a second integrator should give you something a sine wave with pointy peaks. I think the Exar chip ends the quest here. One more stage may improve the wave noticably.

You'll have to correct for gain vs. frequency, but the concept is there.

 

Kevin Weddle

Feb 23, 2004
1,620
Joined
Feb 23, 2004
Messages
1,620
Brilliant observation. You can in fact get something of a sinewave output as long as the time constant is short. You want to quickly charge the capacitor where it will rest at the DC. Then you can append a filter network. This might involve another amplifier stage.

 

MP1

Dec 7, 2003
3,399
Joined
Dec 7, 2003
Messages
3,399
Here attached is some info I found in my archives regarding square to sine conversion. Hope it is helpful.

MP

square2sine.pdf

 

Attachments

  • square2sine.pdf
    223.5 KB · Views: 43

Kevin Weddle

Feb 23, 2004
1,620
Joined
Feb 23, 2004
Messages
1,620
How do you get the output of an oscillator to produce a sinewave? I believe the ouput of an oscillator is more like a triangle. What we need is a sinewave generator instead of turning a square wave into a sinewave. I don't think it is possibe but I will continue to investigate.

http://www.interq.or.jp/japan/se-inoue/e_ckt18.htm

The complicity of this circuit leads me to believe that it does indeed produce a sinewave. The question is why must they use so many components to accomplish this task. The whole point to not just oscillate, but to produce the DC that is required. I think it has something to do with lag and nonresposiveness. Whenever you have a circuit that is idle, you have a DC. This means that you have an increase somewhere that is not producing the increase elsewhere. An idle circuit.

 
Last edited by a moderator:

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Kevin,
The circuit that you posted is a common Wien Bridge Oscillator, that produces a sine-wave by using positive feedback around the 1st opamp by the bandpass-filter of the equal RC networks (the Wien Bridge). The 1st opamp's negative feedback resistors of R3, R4 and the FET give it a gain of 3 to make-up for the loss in the Wien Bridge network.
The 2nd opamp is simply a filtered full-wave rectifier and its output controls the resistance of the FET for amplitude control. The circuit oscillates with a stable frequency that is at the maximum output frequency of the bandpass filter.
A problem with Wien Bridge Oscillators is output amplitude bounce when the frequency is changed, and when they are first turned-on. Since the rectifier's output is filtered, it is delayed and the circuit's output amplitude takes time to settle.

Years ago, Wien Bridge Oscillators used a simple lightbulb for amplitude control (Hewlett-Packard's very 1st product was a Wien Bridge Oscillator with a lightbulb). If the output amplitude increased, the lightbulb would get more power and its resistance would increase, which also increased the negative feedback resulting in reduced gain and the amplitude would be decreased back down to normal. It too had amplitude bounce because a lighbulb is slow to react. I had one that bounced for minutes when its output frequency was 10Hz.

The circuit's DC operating point is simply 0V (it has a dual supply) by the 0V reference for the 1st opamp through R1, like all opamp linear circuits.

 
Top