A waveform that varies periodically and sharply from one level to another. True square waves cannot be produced by actual electronic devices, they always have some degree of curviness to them.

the periodic fourier series described by the fourier integral of

f(x)=a       (-p/2,0)
f(x)=-a      (0,p/2)

where a is the amplitude and p is the period

there is a phenomenon called(I believe) the Gibbs phenomenon to describe why no mechanical method can create a true square wave
It's pretty hip to be square.

For the communication of data there can be little more useful than a good square wave. Unfortunately, as has been mentioned previously, even computers can't really make a perfect square wave. Luckily for we netizens, they can fake it pretty well.

To make a square wave, start with a sine wave:

    
            _             _
           / \           / \
          /   \         /   \
         /     \       /     \
        /       \     /       \
       /         \   /         \
      /           \_/           \_

Now we have to try and turn that into a square wave. Sure, sounds great, you say, but how?!? By adding other sine waves, of course. Not just any sine waves, naturally, since we don't want to change the fundamental wave pattern. Nope, we want to add harmonic frequencies. More specifically, we want the odd harmonics, the third, fifth, seventh, et cetera. I'm going to stick to ASCII art representations, since the mathematics involved is best covered in other write ups.

Conveniently, we have the third and fifth harmonics of our simple sine wave right here.

        _       _      _       _
       / \     / \    / \     / \
      /   \   /   \  /   \   /   \
     /     \_/     \/     \_/     \_

3rd harmonic

      _   _   _   _   _   _   _   _
     / \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_

5th harmonic

When we add them together, we get something that looks kind of like this:

        /\   /\     /\   /\
        | ~~~ |     | ~~~ |
        |     |     |     |
        |     |     |     |
        |     |     |     |
     ~~\/     \/~~~\/     \/~

Which is fairly comperable an actual square wave:

        |~~~~~|     |~~~~~|
        |     |     |     |
        |     |     |     |
        |     |     |     |
     ~~~|     |~~~~~|     |~~~~~

The most basic use of square waves for transmission of data is to make a positive charge a 1, and a lack of charge a 0, or vise-versa. You can build a better receiver and create mutiple levels of sensitivity, to send multiple bits with each signal, i.e. no charge is a 00, the next charge is a 01, the next charge is a 10, and the highest charge is a 11. There are even methods of data transmission that throw all these ideas out the window.


ssd would like me to mention that the little nobbies on the "corners" of the square wave are called "ringing." Thanks ssd!

iirc, the reason a square-wave can't actually be generated is fairly simple. The amount of energy required to create a transition in the wave is related to the derivative of that change. So when a square wave goes from low to high or vice versa it has an infinite derivative and, thus, requires infinite energy.



Feel free to correct me, I'm not sure of this.

Log in or register to write something here or to contact authors.