| ??? 06/13/02 11:17 Read: times |
#24400 - RE: How to convert square wave into sine wav |
I don't think a band-pass filter is a solution for a "wide range of frequencies" as Ali needs. A filter can only be designed for a certain range of frequencies. Outside that range it would be ineffective and you would get an even worse sine wave.
Suppose the range is X Hz to Y MHz, to remove harmonics for the X Hz frequency, you would normally design the cut-off for just above X Hz. But as X<Y we need a higher cut-off, and the filter can have a MAXIMUM cut-off of just below 3X Hz (Square wawes contain only odd harmonics)...now if 3X << Y MHz, you have a problem. (My DSP analytical skills are quite weak, so pleazzzze correct me if I am wrong!) If you are talking filters, maybe you could have an array of filters circuits for a number of frequencies. Alternatively you could have a single active filter with an array of different selectable RC combinations for different ranges. The input square wave can be amplified and a part of it fed to a selector circuit (F/V Converter -> ADC -> selector lines) which would activate the appropriate filter/RC circuit. I would draw you a diagram to explain all this better if I thought it would actually make sense to implement it :)) Ok its a pretty complicated solution, but its about as round-about as Erik's i/p F -> uC -> Lookup table + DAC solution :-)) I am sure the other solutions mentioned are more suitable. kundi |



