Eli5: So apparently Arduino Uno cannot output analog signals and so it uses pulse width modulation to mimic an analog signal output. So then, how can a square wave with varrying width mimic an analog signal’s sine wave?

307 views

Eli5: So apparently Arduino Uno cannot output analog signals and so it uses pulse width modulation to mimic an analog signal output. So then, how can a square wave with varrying width mimic an analog signal’s sine wave?

In: 34

18 Answers

Anonymous 0 Comments

The pulse is much higher frequency than the sine it represents. At the top of the sine wave, long top pulses and short bottom pulses. In the middle of the sine, equal length tops and bottoms of the pulse. At the bottom of the sine, long bottoms on the pulse and short tops. If you apply a little low-pass filter to smooth it out, it becomes a sine!

You are viewing 1 out of 18 answers, click here to view all answers.