How can I create an exact sinuswave with a frequency locked to the squarewave?

Status
Not open for further replies.

octron

Junior Member level 1
Joined
Oct 19, 2001
Messages
18
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
83
I need some help !!! :?

I have a squarewave with possible frequencies between 500Hz and 1000Hz. How can I create an exact sinuswave with a frequency locked to the squarewave.

Thanks
 

sinus filter design

One way is to have a phase locked loop with a genuine sine wave oscillator.

Another way will only work if you have a genuine square wave (no second harmonic) because of the 2-1 frequency range. Use a low pass filter or a band pass filter. I would opt for the low pass since you will get better performance for a given number of components. www.nuhertz.com has some free and some 20 day free use filter design programs you can use. Select the elliptical filter type with a cutoff frequency of 1150 Hz and a stop band at 1500 Hz. You can select the dB down at 1500 that you want to get the harmonic distortion you need. The more the value, the more elements in your filter.
 

square wave low pass filter

Use a bandpass filter to eliminate the Fourier components that contribute to the square wave rising and falling edges. What you are left with is the fundamental frequency as a sine wave.

In simpler terms, use a .5Khz to 1Khz bandpass filter. The output will mostly be the sine wave fundamental frequency component of the input. (There will be a second harmonic component at 1Khz when your input is .5Khz that you will have to make a special provision for).
 

convert square wave to sinus

The other way is to convert square-wave into triangular (leaky integrator) and then use non-linear property of diodes to piecewise form a sine. This may be followed by a BPF to further remove the highest odd harmonics.
 

design of sinus filter

You have 500Hz frequency range. No praticle.
You can use filter If you want to convert wave form for single freq. Else your all filter parameters must change by your desired frequency.
 

sinus filter

Hi, another method is to integrate twice, you will get a pseudo sin wave
 
square wave bandpass

Try a high order switched-capacitor lowpass filter instead.
You can find such filter from for ex. Maxim...
Se this app note from Maxim: **broken link removed**
 

square wave filter

Hi

There is little problem with low pass filter ,because when you trying to convert 1000 Hz freq you should use the low band pass filter with max pass freq 1000 Hz , but when the freq changes to 500 Hz this filter will not be able to cut 2nd harmonic from 500 Hz which is 1000 Hz as filter must bypass 1000 Hz . Of course you can uses sophisticated solution - design regulated low bandpasss filter and adjust when changing squarewave freq , but it is complicated .

You can also use EPROM to write the sin values into, with data outputs connected to DAC and connect the address input to digital divider supplied from high freq .
Input freq will be 256 times more than output freq when just 8 address inputs are used (that is for 8 bit sin resolution output ). Then you can very easy filter out harmonics rubbish(cheap low pass filter will be enough ) from DAC output .
On 8th address bit in EPROM
input will be squarewave output the same freq and the same phase as sin on DAC output .
 

square wave sinus

I had the same problem some years ago ( also i had the problem to keep the phase delay constant with frequency )
The solution was :
1) Use the incoming frequency to lock a PLL ( I used a 4046 ) locked 256 times the incoming frequency
2) Pass the 256*Fin to a divider with 8 bit output ( Used a 4020 )
3) pass the data from 4020 to a DAC ( Used DAC 08 )
Filter with a weack bessel filter the output of the DAC

With this system we had no problems to track the incoming frequency ( the purpose was to clear the incoming signal from noise ) and it is still working.

Mandi
 

square to sinus converter

use low pass filter for cut off at your freq, may be 4 to 9 pole and it will work nice
 

square wave and band pass filter

I had about similar problem... wanted to make a sine from a square wave but NO (or only very small) phase delay allowed.
If you make a LPF and simply cuttoff at around your operating freq you will see the time delay (or group delay) is far too high. A BPF would be nice but this is ven a bigger disater as you cannot maintain the phase stability.
I found out that it is better to make for example 2 pcs bandreject filters that work at 3x and 5x the operating freq. Then you get a reasonable sine with very little time delay to the original square. Just took me 2 coils and some caps.
Seems to be odd but for me this sine was good enough and a lot cheaper as having a PLL. (note the PLL will offset you by 90 degrees out of phase)
Can be easely understood if you play around with Nuhertz filter design and watch the group delay results you get for the different configurations.
:?
rgds
 

1000 hz sinus

1000Hz is twice of 500Hz.
One LPF with maxim frequency 1000Hz is not able to do this.
You can try two parallel LPFs.
Use switch to select one of them.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…