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?

287 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

First, an analog signal does not mean it is a sine wave. Analog just means it has a continuous range of output between it’s values. The Uno does not have a built in digital to analog converter built in, so it only outputs discrete binary values.

The Arduino Uno also only deals with positive DC voltage. Most applications of wave signals specifically want to have part of the wave below reference ground, which requires additional circuitry to divide your voltage.

The Uno intentionally uses a basic microcontroller for learning and doing small projects. Any useful circuit is going to require more components. If your project needs an analog output, get an digital to analog converter.

Directly to your question: Arduino Uno does not have the ability to directly mimic a sine wave. It’s PWM is only positive. At best, it can mimic the absolute values (rectified) of a sine wave. Other answers explain how it does this very well.

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