Maker Pro
Maker Pro

square to sine

J

John Fields

Jan 1, 1970
0
My thinking was that with a simple single-pole lowpass with a
square-wave input:


SQIN>---[R]--+--->OUT
|
[C]
|
GND>---------+--->GND

You wind up with an integrator which merely charges and discharges
the cap as the square wave makes its excursions.

To get the lowpass to work here, the corner frequency
needs to be just above the 1 kHz square wave frequency.
An RC circuit like the above is only a good integrator
approximation if its time constant is long, such that the
effective corner is well below the input frequency.

---
You're joking, right?

If you start screwing around with the time constant all you'll wind
up doing is changing the output amplitude and waveshape, which will
_never_ resemble a sinewave, no matter what you do.
---
 
J

John Fields

Jan 1, 1970
0
As has been mentioned, you can filter the higher harmonics out using a band
pass or preferably a low pass filter but that only works at a small range of
frequencies. Depending on the required purity of the sine wave, filtering
may prove to be difficult requiring a steep slope multi-pole filter to clean
out harmonics. If the square wave has any asymmetry, even a percent or two,
there will be a significant second harmonic present. This is a bitch to get
rid of because of its closeness to the fundamental. Even the third harmonic
can be troublesome.

---
The OP's query asked for a circuit with a stable sine wave output
with a frequency equal to that of a squarewave input signal. Since
he specified a "square wave", I think we can safely assume a 50%
duty cycle and, therefore, disregard the even harmonics.
 
B

Bob Masta

Jan 1, 1970
0
On Sun, 06 Nov 2005 15:57:29 GMT, "Bob Eldred"

If you can get a good triangle, you can get a very good
approximation... easily as good as a standard "function
generator", which are typically 1% THD. Although the
8038 uses diode breakpoints for shaping, this is not
a very good method for individual use... too many adjustments,
even assuming you can figure out how to proceed with the
adjustment.

My method of choice is an overdriven differential pair.
You will end up with 2 adjustments: The amount of
overdrive (input level), and the amount of feedback.
If you feed the output to an amp and headphones,
you can adjust this by ear. (Though a scope helps
to get you in the ballpark.) You will be balancing
between 2nd and 3rd harmonic levels. 1% THD is
easy, and I have gotten as low as 0.25% on occasion,
though I don't know how stable that would be.
The by-ear method is better than a scope alone for
distortion adjustment. An FFT spectrum analyzer
is better still.

I have seen a paper where the authors used a matched
pair in a temperature-controlled oven and got
something like 0.001%. However, if you are shooting
for these sorts of levels, then the input triangle itself becomes
more of an issue. It's pretty hard not to have some sort of
glitch at the peaks.

Best regards,


Bob Masta
dqatechATdaqartaDOTcom

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Home of DaqGen, the FREEWARE signal generator
 
Top