Chapter 13. Analog
To experience without abstraction is to sense the world;
To experience with abstraction is to know the world.
These two experiences are indistinguishable;
Their construction differs but their effect is the same.—Lao Tse, Tao Te Ching
In this chapter, we’ll look at how you sample external voltages and convert these into digital values for processing by your embedded system. Such voltages may be generated by sensors and may represent light levels, temperature, or vibration. Or perhaps the voltages are the output of a microphone or audio system and need to be converted into digital data. Later, we’ll take a look at how you turn digital data into an analog output voltage. We’ll conclude the chapter with hardware to control electric motors.
First, though, let’s take a quick look at amplifiers and sampling theory. Note that this is a very complex field. Since the background theory is well beyond the scope of this book, we’ll just take an overview, giving enough background to allow you to interface your embedded system to simple analog circuitry. This discussion is by no means exhaustive, and it is deliberately simplified.
Amplifiers are used to interface one analog circuit to another. An amplifier is a circuit that increases (or decreases) a given input voltage to produce an output voltage. For example, say you had a sensor that produced a maximum output that was 5 mVpp, and this was to be interfaced to a sampling system that required an input signal ...