What are some ways a square wave is made out of a sine wave?

Started by Marc.yo, May 11, 2007, 03:18:08 PM

Previous topic - Next topic

Marc.yo

I guess the first question is simple.What, fundamentally, is a square wave as opposed to a sine wave?


How does a square wave shaper work to make a sine wave into a sqaure wave and how would you set up an circuit to do this?


Diagrams would be very helpful.



Meanderthal

 For your first question, with diagrams, animations, math and all:

Click me...

Easiest way to turn a sine into a square wave- distortion. That's what distortion is, more or less...
I am not responsible for your imagination.

pjwhite

The wiki article talks about making a square wave from a combination of sine waves, but I think what you're looking for is a more practical approach.

An ideal square wave transitions from one voltage level to another with zero transition time.  Practically, that transition time is limited by amplifier slew rate, capacitance, etc.  A simple way to turn a sine wave into an "almost" square wave is to amplify it to the extent that the amplifier circuitry clips the wave at its positive and negative peaks, flattening the top and bottom of the wave.  The more voltage gain you program into the amplifier, the faster the transition time and the "squarer" the output becomes.  Here's a simple drawing showing an undistorted sine wave, the same waveform amplified by 10 times (ideal), and the actual clipped output.

Let's assume that the original sine wave is 18 volts peak-to-peak (blue waveform).  A non-inverting (ideal) opamp circuit with a gain of 10 and a power supply voltage of +/- 9 volts is used to amplify the sine wave.  The actual output waveform is clipped as shown by the yellow waveform.