What is the difference between analog vs. digital signals? Is there a preference of when to choose each signal type?

Analog: Continuous, time-varying signals
Digital: Discrete values (0 or 1)

Thinking of this in the context of microcontrollers and reading sensor data…

Analog sensors produce continuous output signals (i.e. -10 to 10 V) that is proportional to the quantity being measured. With digital sensors they produce a discrete digital output signal that is a digital representation of a quantity being measured (binary outputs).

In the context of a smart-connected device, analog sensors are generally I2C based and will need their own separate cabling to route signals back to the host micro-controller. Digital sensors, based on their nature, can output the digital signal on a bus instead so device communication efforts are “simpler” per to say.

image

image