Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Sine

Status
Not open for further replies.

Electronman

New Member
Hello

Can you guys please tell me how to convert the output of this square wave oscillator (the output is ramp after passing through R1 & C1) so that its output become SINE wave?
I have to do so with minimum changes in the circuit.
 

Attachments

  • 12.PNG
    12.PNG
    5.9 KB · Views: 358
A cap will pass the high frequency component and attenuate the low frequency component but that will not make a sine wave. Something more like a bandpass is needed. If he does not need a square wave or the triangle, I would pop out D1 and D2, and add a filter.
 
Hello

Can you guys please tell me how to convert the output of this square wave oscillator (the output is ramp after passing through R1 & C1) so that its output become SINE wave?
I have to do so with minimum changes in the circuit.

hi,
Look at this pdf, page 11 shows a ramp to sine conversion method.
 

Attachments

  • AN-263.pdf
    350.6 KB · Views: 352
for the sine wave, you can connect an inductor and capacitor in series between the oscillator output and ground. The sinewave will be present at the junction between the L & C. Calculate the values for L and C for the frequency of the oscillator (f) from the equation: f = 1/(2*pi*sqrt(L*C)). The L & C form a resonant circuit and will freely oscillate at the resonant frequency (voltage at junction will be much higher than at the output of the oscillator).

Alternately, you can just use another RC, but increase the time constant (increase R and/or C) to make it filter out more harmonics of the squarewave to leave you with just the fundamental frequency (as a sinewave). EDIT: connect this RC to the triangle wave output
 
Last edited:
An RC filter will only attenuate low frequencies. For a sine wave you need a single frequency which requires filtering above and below the fundamental such as a bandpass.
 
If you have a F Hz square wave with no offset then you won't have DC. You are going to have the odd harmonics. So if you are running at F Hz, you are going to have sine waves F Hz, 3*F Hz, 5*F Hz... (2n-1)*F Hz.

You have to build a low pass filter that attenuates frequencies higher than F Hz.
 
Use a switched-capacitor Butterworth lowpass filter IC. A 4th-order filter produces fairly low distortion and an 8th-order filter produces extremely low distortion.
 
If you have a F Hz square wave with no offset then you won't have DC. You are going to have the odd harmonics. So if you are running at F Hz, you are going to have sine waves F Hz, 3*F Hz, 5*F Hz... (2n-1)*F Hz.

You have to build a low pass filter that attenuates frequencies higher than F Hz.

Can you explain what do you mean please?
 
Well Thanks for all inputs,

I do not want to practically do so, Just want to know if it is possible to extract any sine wave in the output of the above circuit without adding any other components?

y professor wanted me to design a sine wave generator using op-amps, I just designed the above, but finally I noticed that the out put is square before the output filter, and ramp after the output low pass filter.
Any idea how to use this circuit to be able to get an sine output without or wit minimum component changes?
 
Well Thanks for all inputs,

I do not want to practically do so, Just want to know if it is possible to extract any sine wave in the output of the above circuit without adding any other components?

y professor wanted me to design a sine wave generator using op-amps, I just designed the above, but finally I noticed that the out put is square before the output filter, and ramp after the output low pass filter.
Any idea how to use this circuit to be able to get an sine output without or wit minimum component changes?

hi,
To get a sine wave from that circuit will require adding more components for an amplifier and LP filters.
 
So noway to do so without adding more components!?
the freq and the amplitude are not too important to me, just a sine is enough
 
Can we adjust the low pass filter so that its output become sine? Or working with the components values? It's no matter if we could not get an stable or good sine, just something to show that the circuit is able to work as a sine generator will be enough (As I told even a very poor one is more than enough).
 
Can we adjust the low pass filter so that its output become sine? Or working with the components values? It's no matter if we could not get an stable or good sine, just something to show that the circuit is able to work as a sine generator will be enough (As I told even a very poor one is more than enough).

hi,
As explained by Dougy, add a series inductor and capacitor to the ramp output, take a rough sine wave from the junction of the inductor and capacitor.

Use the formula for resonance that Dougy posted to determine the I and C values.

The freq is approx 5KHz.
 
Also, as mentioned prev. an additional RC after the triangle will give an ok sinewave, see attached.

SquareTriSin.gif

As you can see, the amplitude is down a fair bit. (plots are scaled: ramp*15, sine*250)
 
Good idea, thanks for it, but can I do it by adding no component?
I guess. You can remove those diodes and 10k resistor from the oscillator feedback path as they appear useless. Now connect a huge resistor from the output of the triangle wave to the 2 diode back-to-back (acting as a tiny capacitor). This likely won't work in practice, but with a few assumptions it will work on paper.

Besides Can you let me know how it does work?
Thanks
It reduces the harmonics of the squarewave. Read up on harmonics of a squarewave. Have a look at the animation on Square wave - Wikipedia, the free encyclopedia - it shows what happens as you add more harmonics (sinewaves that have higher frequency than the fundamental - for a squarewave the harmonics are an odd integer multiple of the fundamental frequency) together; the more harmonics, the more like a squarewave the result becomes. Conversely, if you have a squarewave and remove the harmonics with a low pass filter, you will get more rounded waves and eventually a sinewave.
 
My professor wanted me to design a sine wave generator using op-amps, I just designed the above, But finally I noticed that the out put is square before the output filter, and ramp after the output low pass filter.
Any idea how to use this circuit to be able to get an sine output without or with minimum component changes?
You designed a simple square-wave and triangle-wave generator then added the most simple filter that is possible (a single resistor and capacitor). Of course its sine-wave is bad.
You can improve it with a better filter that removes most of the harmonics .

I think your professor wanted you to design a real sine-wave generator with a Wien bridge with an amplitude stabilizing circuit, a phase-shift oscillator or one of the many complicated circuits.
I designed and made all three of them. My complicated circuit makes a stepped sine-wave with 10 steps (5 times over-sampled) then filters it with an 8th-order switched-capacitor Butterworth lowpass filter IC. Its distortion is extremely low.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top