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?

294 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

It can’t. It outputs a square wave, the idea is that for some applications they don’t care about voltage, they care about average voltage, if the voltage outputted is a square wave which is 5 volts 20% of the time and 0 80% of the time you can average this to 1 volt. For some things like say LEDs or lightbulbs, this works pretty well to control their brightness.

But for other applications it just won’t work. You might be able to achieve some better results by using a capacitor, this can smooth out the output (in the industry we call this a low pass filter) but it still will be hard to make a perfect sign wave out of this.

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