01-12-2012, 04:12 PM
Basic Analog and Digital
Basic Analog.pdf (Size: 2.49 MB / Downloads: 27)
Analog Voltage and Binary States
This series of experiments introduces analog and digital electronics. What does that
mean? In What’s a Microcontroller? we learned that analog is a “continuously variable
value”. Another way to think about it is that analog electronics is analogous to nature.
There are lots of continuously variable values in nature, such as motion, light level, and
sound. The position of a door as it swings open is a good example of a continuously
variable value. As a door swings from all the way closed to all the way open, it visits
every value in between. At one instant during its travel, it is 1/3 of the way open. At
another instant, it is 1/2 way open, and so on.
INTRODUCTION TO ANALOG AND DIGITAL
Digital simply means represented by digits. Think about how many times each day you
encounter analog values that are represented with digits. The temperature is 79.8 degrees.
The speed limit is 45 miles per hour, etc. Not surprisingly, digital electronics represents
values with digits.
The term digital is also used when referring to binary devices such as the circuitry that
makes a calculator work, the microprocessor in a computer, and the BASIC Stamp
microcontroller. It's true - they are all digital devices. Binary devices are digital devices
using two digits, 0 and 1.
The experiments in What’s a Microcontroller? introduced a variety of techniques for
interfacing with the outside world and other devices. These interfaces were mostly
binary. This series of experiments extends the capabilities of interfacing by introducing
several analog component interfaces and more component interface techniques.
In this first experiment, we'll build a circuit that produces an analog voltage at its output.
Remember that analog voltage is continuously variable. The circuit will be adjustable so
that it can produce an output anywhere between 0 and 5 volts. We'll also build a circuit
called a voltage follower that uses this analog voltage to drive an LED circuit.
The Potentiometer - A Source of Variable Voltage
The potentiometer (pot) has 3 pins on its underside that get plugged into the Board of
Education. On the topside, it has a knob you can twist to adjust it. In this experiment, we
will use variable resistance to get a variable voltage output. Figure 1-3 shows how the
pins on the underside of the pot from the parts kit correspond to the circuit symbol.
The LM358 Op-amp
An op-amp (operational amplifier) is a building block commonly used in analog circuits.
Figure 1-5 shows the circuit symbol and block diagram for the LM358 op-amp used in
this experiment. The op-amp circuit used in this experiment is called a voltage follower
because the same voltage comes out as goes in. In other words, the voltage at the output
"follows" the voltage at the input. The reason it's used in the circuit in this experiment is
to electrically separate a potentiometer circuit from an LED circuit. We'll learn more
about the usefulness of a voltage follower in Chapter #4.
The Board of Education
Figure 1-6 shows the remaining circuit symbols used in the first experiment and where to
find them on the Board of Education. The symbol for Vdd is the positive 5 volt supply for
the BASIC Stamp and the Board of Education. There are 4 sockets along the top side of
the breadboard to the left for making connections to Vdd.
Next, the ground symbol is used for Vss. This is the reference terminal for taking
measurements, and it's considered to be 0 volts compared to all other voltages on the
Board of Education. The four sockets for connecting jumper wires to Vss along the top of
the breadboard to the right.
There is a row of fifteen sockets along the left side of the breadboard for connecting to
the BASIC Stamp I/O pins. Each I/O pin has a label. I/O pin P0 is connected to the
bottom left socket. Pin P1 is the next socket up, and above that socket is the connection to
pin P2, and so on through pin P15 at the top left.