Maker Pro
Maker Pro

converting square waves to sine waves?

B

Bob Masta

I think diode wave shaping is definately the way to go because it's cheaper,
smaller, and relatively frequency independant. You could do it with only 4
diodes and a handful of resistors if say 5% THD could be tolerated (more
diodes and resistors if a lower distortion level was required . You would
first have to convert the square wave to a triangle wave and then use that
to drive a non linear network. This is how it's generally been done in
function generators since the late 60's.

http://www.ozitronics.com/docs/k23.pdf

Diode waveshaping is *much* more difficult than an
overdriven differential pair. All those breakpoints are
interacting, and you (usually) need to match positive
and negative sections. The differential pair only
needs two adjustments and will easily get you below
1% THD. You can adjust it by ear, with a scope,
or (best) with an FFT spectrum analyzer.

Even by ear you can probably get to 0.5%. You are
basically listening for 2nd and 3rd harmonics, so set
the fundamental to around 400 Hz to put the
harmonics in a sensitive part of your hearing range.
Once you get the two adjustments reasonably
close, you will find you can trade off between 2nd
and 3rd harmonics until you find the best sweet spot.

I don't know of any easy way to adjust multiple
breakpoints. Even if they don't interact (which you
can arrange using transistors instead of diodes and
putting them in the feedback loop), it's still a real
nightmare to adjust. You pretty much need to do it
statically, stepping the input voltage through the range
and checking the output voltage at each step.

Breakpoint-type waveshaping is probably best reserved
for something you absolutely can't approximate any other
way. I've used it for reciprocal generation in the "good
old days" before microprocessors, but I'd never consider
it for sine shaping.

Just my 2 cent's worth....


Bob Masta
dqatechATdaqartaDOTcom

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
 
B

Baphomet

Bob Masta said:
Diode waveshaping is *much* more difficult than an
overdriven differential pair. All those breakpoints are
interacting, and you (usually) need to match positive
and negative sections. The differential pair only
needs two adjustments and will easily get you below
1% THD. You can adjust it by ear, with a scope,
or (best) with an FFT spectrum analyzer.

Even by ear you can probably get to 0.5%. You are
basically listening for 2nd and 3rd harmonics, so set
the fundamental to around 400 Hz to put the
harmonics in a sensitive part of your hearing range.
Once you get the two adjustments reasonably
close, you will find you can trade off between 2nd
and 3rd harmonics until you find the best sweet spot.

I don't know of any easy way to adjust multiple
breakpoints. Even if they don't interact (which you
can arrange using transistors instead of diodes and
putting them in the feedback loop), it's still a real
nightmare to adjust. You pretty much need to do it
statically, stepping the input voltage through the range
and checking the output voltage at each step.

Breakpoint-type waveshaping is probably best reserved
for something you absolutely can't approximate any other
way. I've used it for reciprocal generation in the "good
old days" before microprocessors, but I'd never consider
it for sine shaping.

Bob -

You are absolutely correct but it may not be quite as bleak a picture as you
suggest. I will post results on alt.binaries.schematics.electronic
(CONVERTING SQUARE WAVES TO SINE WAVES). I used only two diodes and didn't
choose resistor values or reference voltages carefully, and then compared
the synthesized waveform with a mathematical sine wave, and summed. The
error signal (THD) is probably well under 5%. Joe (the O.P.) didn't state
what distortion level he was looking for and I got the impression this was
being conducted more as an experiment than for precision measurements.

As you suggested in a previous post, one of the drawbacks to this method is
that in normal practice, one usually starts with a fixed amplitude triangle
generator and derives all other waveforms therefrom. I should guess that the
most difficult part of this experiment would be in "leveling" the integrator
output. This could be done by changing the RC timeconstant, possibly by
using the same variable resistance that Joe's square wave generator used to
adjust the frequency although possibly, another pot would have to be
"ganged" to the orignial.

It's always easier to do things right from the start than having to go back
and reverse engineer everything and still wind up with an "iffy" circuit at
best.
 
Top