User talk:LucasVB/Sine from square waves

Practical sine wave generation
Is there a Wikipedia article about how practical people generate sine waves? Or would that verge too close to the "No Howtos" rule?

In practice, lots of people want to generate sine waves from digital electronics (which are notorious for only generating square waves).
 * Some people drive high-power loads. Some high-power loads like 3-phase motors require something like a sine wave, but the high-power transistors that drive them work best when operated as switches, either switched entirely on or switched entirely off (generating something like a square wave).
 * Some people want a sine wave at some particular precise audio frequency -- perhaps to drive DTMF-controlled equipment. Purely analog sine wave generators typically drift too much in frequency, except for crystal oscillators, which aren't available at audio frequencies.

But none of these use any of the techniques we've discussed -- Walsh transforms, sum of square waves at different amplitudes and frequencies, etc.

I've only seen these 3 techniques used to generate sine-wave-shaped voltages:
 * analog-to-digital converter (for example, "Digital signals produce pure sine waves" by Ronald Mancini 1997)
 * pulse-width modulation (for example, "Generate sine wave modulated PWM with AVR microcontroller"
 * "magic sinewaves".

All of them use a crystal oscillator at some much higher frequency to set the timing, so each of these 3 are a different type of "crystal controlled electronic oscillator".

None of these methods generate a perfect sinewave directly, so all of them require an output "anti-aliasing filter". With adequate filtering, the output of the filter is close enough to perfect sinewave. Typically quite a bit of error (+-5% ?) is "close enough", so often a simple RC or LC filter is more than adequate.

I hope that helps whoever stumbles across this page. Feel free to move this to a more appropriate wiki article. --75.19.73.101 21:34, 26 October 2007 (UTC)