# RC Filter calculations for smoothing off a square wave to a sine wave

Status
Not open for further replies.

#### ringo888

##### Member level 1
Hi Guys,

I have a square wave that I need to smooth off to a sine wave using an RC filter, it needs to rolloff at 5KHz, i'm assuming I need a Low Pass RC network. What values would you suggest? I take it you use:

Fc= 1/(2.Pi.R.C)

Any advise would be a big help.

Thanks,
Ringo

rc filter

C=0.16/(Fc*R) for R=1k
C=32nF=33nF or
R=0.16/(F*C) and for C=10nF
R=3.3K

rc filter calculator

ringo888,
The formula you propose is the correct one to use for a first order low pass filter with a corner frequency of f. However, you don't mention the kind of "smoothing" performance that you need. You can not get a high quality sine wave by running a square wave through a first order filter. A square wave consists of an infinite sum of fundamental and odd order harmonics.
.
For example,
The amplitude of the 3rd harmonic voltage component of a square wave is 1/3 times the amplitude of the fundamental voltage. A 1st order filter attenuates at a rate of approximately 3 dB/octave in the stop band. Since the 3rd harmonic is 0.585 octaves above the fundamental, the minimum power ratio of third harmonic to fundamental that can be expected for a first order filter[(1/3)^2](.585) = .065 dB. The minimum voltage ratio is the square root of this value, or .255.
Regards,
Kral

Status
Not open for further replies.