• No results found

Digital-to-Analog Conversion

6.2.1 Operational Amplifier Basics

The operational amplifier is a fundamental building block for many analog electronic systems. The schematic symbol for an operational amplifier (op-amp) is shown in Figure 6-2.

Digital–to-Analog Converter (DAC)

Analog Output (Voltage or Current) Digital Logic Levels

Figure 6-2 Operational amplifier (op-amp) schematic representation.

The operational amplifier component is a very high internal gain amplifier that only needs a minute amount of current to flow through its input pins (marked with a + and – sign), in order to function. The –ve input is referred to as the inverting input and the +ve input is referred to as the non-inverting input. The device also has power supply rails (normally hidden) that connect to the upper and lower power supply voltages to power the device. When the polarity of the input voltage differential 'V is positive, with the +ve input voltage higher than the –ve input voltage, the op-amp output voltage (Vout) will be positive. Likewise the reverse holds true when the polarity of 'V is negative.

Since the op-amp internal gain is very high, say 1 million, then if a 10V output signal was to be generated, only 10/millionth of a volt is required between the two input pins ('V = 10PV,P represents micro, which is 10-6). The current entering the

op-amp is extremely low, and might be say 200nA (n represents nano, 10-9).

The op-amp is a building block for various amplifier designs. The two rules concerning its very high gain and practically zero input current allow us to evaluate many op-amp circuits. The op-amp shown previously in Figure 6-2 has no external components connected to it. In this state it is of no practical use, so we must connect external components from the output to the input and take advantage of what is known as a feedback configuration. The term feedback is used because we are feeding the output signal back into the input of the op-amp. Now let us look at a current-to-voltage circuit as shown in Figure 6-3, since its function is fundamental to the operation of the DAC on the interface board.

Figure 6-3 Current-to-voltage op-amp circuit.

Vin (1V) Ra 1K Rf 2K Vout i i 'V Vout Lower power supply voltage Upper power supply voltage

The input voltage Vin, generates a current i which flows through the resistors Ra and Rf as shown, generating voltage Vout. We calculate the output voltage Vout by knowing the value of the current i and also the value of the voltage at the –ve input pin (and of course knowing the values of the two resistors Ra and Rf).

Vout cannot fall outside the op-amp’s power supply voltage range, since the op- amp doesn’t have any special internal circuitry to generate output voltages exceeding that of the power supply. Most op-amps are powered from upper supply voltages of +15V or less and lower power supply voltages of –15V or higher. Bearing this in mind, along with the fact that the op-amp has huge internal gain, then no matter what the output voltage of the op-amp might work out to be, the difference in voltage between the +ve and –ve input pins ('V) must be less than say fifteen microvolts.

Vout (max) = 'V x Internal Gain +/- 15V = 15PV x 106

In the above example, the output voltage, Vout, cannot exceed either supply voltage at +/-15V, therefore 'V will always be less than ~15PV, assuming the op- amp internal gain is one million.

The voltage at the –ve input pin is equal to the voltage at the +ve input pin plus

'V. Since the voltage at the +ve input pin is equal to analog ground (0V, shown by the hollow triangle symbol), and we know that the difference in voltage ('V) between the +ve and –ve input pins will always be less than 15PV, the voltage at the –ve input pin will be less than 0V + 15PV = 15PV. This –ve input pin voltage is so close to zero volts that we might as well call it zero volts or virtual ground. Now that we know the –ve input pin voltage, we can calculate the current flow i

and determine the output voltage Vout.

Figure 6-4 Calculating input current i.

Current flows from higher voltages to lower voltages, therefore, the current i will flow as shown in Figure 6-4 since Vin is at a greater voltage than the –ve input pin of the op-amp at virtual ground (# 0V). With 1V at one end of resistor Ra and ‘zero’ volts at the other end, the current i is as follows:

Ra 1K Rf 2K Vout i i ‘0V’ Vin (1V)

Currenti = Volts / Resistance = (1V – 0V) / 1K = 1mA

Note that the symbol ‘K’ represents one thousand ohms.

Since effectively zero current flows into the op-amp input pins, all of current i must flow through Rf, into the output pin and to the op-amp load (not shown).

Vout is equal to the voltage at the –ve input pin plus whatever the voltage is across resistor Rf. Using V = I x R, the voltage across resistor Rf is equal to current i

multiplied by the resistance of Rf.

VRf = 1mA x 2K

= 2V

As mentioned previously, current flows from higher voltages to lower voltages, therefore the voltage at the left end of Rf is at a higher voltage than the voltage at the right end of Rf. Since the left end of Rf is at 0V, the voltage difference VRf is

2V, the right end of Rf must be at –2V. Knowing that the right end of Rf is connected to Vout, Vout must be equal to –2V.

The current i flowing through the feedback circuit must enter the junction at the op- amp output and split, part-of this current flowing into the op-amp load (not shown, towards Vout) and the remainder flowing into the op-amp output. How the op-amp draws the right amount of current into its output will be understood once the operation of negative feedback is explained.

In principle, the op-amp will draw (sink) or supply (source) sufficient current to ensure that current i remains at a level to force the –ve input pin to ‘0V’. This process happens automatically when a negative feedback configuration is used, as shown in Figure 6-3 and Figure 6-4. To configure negative feedback, connect the output voltage Vout back to the –ve input, either directly or through the use of external components, usually resistors. Negative feedback works as follows. If say, the input voltage Vin increases, the voltage at the –ve input will increase slightly, increasing the small negative voltage difference between the op-amp’s +ve and –ve inputs ('V). This increased negative voltage ('V) will generate an increasingly more negative output voltage Vout, which will in-turn have the

negative effect of reducing the voltage at the –ve input pin. This generates a decrease in 'V that will eventually settle to equilibrium. This process takes place automatically and quite rapidly in the op-amp when using negative feedback. Positive feedback, on the other hand is altogether different and does not produce a self-correcting output voltage. Instead, the output voltage swings to the appropriate voltage supply. Later when the polarity between the +ve and –ve inputs is reversed, the output will swing to the opposite voltage supply. This type of feedback is used inside voltage comparators.

Armed with an understanding of how a current-to-voltage converter circuit works, we can move on to analyse and understand how practical DAC circuitry works.