Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Square to sine wave convertor help..

Status
Not open for further replies.

nandhu015

Advanced Member level 5
Joined
Feb 11, 2006
Messages
1,960
Helped
300
Reputation
600
Reaction score
222
Trophy points
1,353
Location
India
Activity points
9,924
Hi

Can any one help me to design a square wave from a microcontroller to sine wave.

The frequency is 50Hz

Expecting replies

Nandhu
 

LPF with cut-off frequency of 50Hz - <150Hz will do it.

A square wave is composed of the 1st harmonic and all of the odd ones so just filter the away the odd harmonics, leaving the fundamental sine wave and any DC offset.
A notch/bandpass filter will work just as well these will remove the DC component also.
 

you can use a PLL. But VCO must has sine wave output

square wave is your reference signal and the output of VCO is sine wave
 

Old Nick said:
A notch/bandpass filter will work just as well these will remove the DC component also.

A notch filter to convert a squarewave into a sinus ???
 

Hello all,

A common trick to do that is to double integrate the square wave, giving arcs of parabola, and then some low pass filter to eliminate high freq. components

Hope this helps, best regards!
 

jorgito said:
A common trick to do that is to double integrate the square wave, giving arcs of parabola, and then some low pass filter to eliminate high freq. components

More or less, this procedure is identical to a low pass filtering of third order, isn´t it ?
 

I'm not shure LvW.
The output of the first integation is a sawtooth and the output of the second is a series of arcs of parabolas, but there are discontinuties in slope where the sawtooth reaches max's or min's. I don't see how linear filtering can do that, but repeating, I'm not shure.
Hope to hear your comments.
Best regards!
 

Yes, I know that. And this was the reason of my doubts.

Regards!
 

jorgito said:
I'm not shure LvW.
The output of the first integation is a sawtooth and the output of the second is a series of arcs of parabolas, but there are discontinuties in slope where the sawtooth reaches max's or min's. I don't see how linear filtering can do that, but repeating, I'm not shure.
Hope to hear your comments.
Best regards!
Thanks for your reply - and : Yes, I agree, as far as the output of the two integrator cascade is concerned.
However, you have mentioned an additional low pass after the integrators - and I think that its output will not differ considerably from the output of a third order lowpass.

Or with other words: I only had the frequency domain in my mind. To convert a squarewave into a sine wave requires to attenuate all higher harmonics as good as possible. Under the assumption that the cross-over frequency of the integrators is app. identical to the fundamental frequency the next line (third harmonic) is damped according to a slope of -40 dB/Dec. This can be accomplished, approximately, also by a second order lowpass filter with a cut-off at the fundamental frequency. But I confess, there is a difference of about 3 dB. Thus, regarding the attenuation of higher harmonics two integrators can do roughly the same job as a second order low pass. I wonder if simulation of both alternatives (including the additional lowpass filtering) in the time domain can reveal the difference.
Regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top