ANALOG DEVICES AN-23 APPLICATION NOTE ONE TECHNOLOGY WAY e P.O. BOX 9106 e NORWOOD, MASSACHUSETTS 02062-9106 e 617/329-4700 D/A Converter Generates Hyperbolic Functions Measurement and control systems frequently require fine re- solution around a setpoint with wide dynamic ranging capability. This can be satisfied by systems designs which use a high resolution, strictly linear approach; but this is costly and often unnecessary. Nonlinear function fitting using multiplying digital- to-analog converters (DACs) offers a desirable alternative by being both simpler and more cost-effective. This application note describes how extended range hyperbolic functions of the type A/X or A/X (where A indicates an analog constant, while X represents a decimally-expressed digital divisor) are easily generated by just two lowcost |.C.s; an operational amplifier and a multiplying DAC. Circuit configurations are provided for each polarity output along with dynamic performance photographs and general design guidelines for either binary or BCD-coded divisors. A XDIVISOR DIGITAL INPUTS B040 2010 8 4 2 1 Bi 82 B3 B4 BS B6 B7 BS CONSTANT _ THEORY OF OPERATION (A/X) Figure 1a shows the A/X function circuit which uses a two-digit BCD-coded DAC, the DAC-20EX, and a decompensated, wide- bandwidth op-amp, the OP-17. A constant current, | constant, equal to the value of one least significant bit (LSB), flows into the DAC output terminal, |). Simultaneous adjustment of the scale factor and output amplifier offset voltage is enabled by a multi- turn, low tempco potentiometer, R5, which adjusts current lIp producing voltage Vp across R2. The LSB value (scale factor) equals V,/Rt. Zener diode, D,, provides a stable reference voltage source. Because feedback for the op amp is through the DAC, capacitors C1 and C2 are added to provide proper phase compensation. Reference resistor R3 is determined by the scale factor and the maximum current allowed into the DAC reference input V,;+. Bias +18V Vrerl+) DAC-20EX Veer} COMP. V- Vt 16 3 13 1 O.1tHF O.1pF oO 3 -15V +15V Yout!+) -0 -VREF ICONSTANT = LSB VALUE = ~Vrer ~ rer * Re constant "83 Xrs Re Xpiv o2 INS57A ; 6.8V -15V R1, R2, R3 = 1% METAL FILM ALL CAPS = CERAMIC DISC 0.01uF WHERE Xeg = DECIMAL EQUIVALENT OF FULL SCALE COUNTS AND Xpyy = DECIMAL EQUIVALENT OF DESIRED DIVISOR TOP TRACE = CLOCK A a LOWER TRACE = THRU 1 10 (CODES 0000 0001 THRU 0001 0000) Figure 1. A/X Function Generator TOP TRACE = CLOCK LOWER TRACE = A THRU A 3 {CODES 0000 0011 THRU 0010 0010) TOP TRACE = CLOCK A A LOWER TRACE =THRU 22 1 99 {CODES 0000 0001 THRU 1007 1001) current compensation for the DAC reference amplifier is ac- complished by R4. Figures 1b, 1c, and 1d show dynamic performance of circuit 1a when the digital inputs are swept by an external BCD up-counter with codes of 0000 0001 through 1001 1001 (division by zero is not allowed). THEORY OF OPERATION (A/X) The circuit configuration for the A/X function is shown in Figure 2a. It is quite similar to that of Figure 1a with both the DAC reference amplifier and output amplifier terminals reversed. Capacitors C1 and C2 provide phase compensation. Figures 2b, 2c, and 2d show dynamic performance of circuit 2a. DESIGN CONSIDERATIONS 1. Circuit speed and settling time are dictated by output op amp slew rate, scale factor, and compensation. Use of slower amplifiers considerably increases the illustrated set- tling times. Effective slew rate of circuit 1a is 3V/ys, while circuit 2a slews 0.6V/ys. 2, Layout and breadboarding of high gain, wide-bandwidth devices necessitates considerable care with a ground plane with single point grounding being highly desirable. De- coupling capacitors located close to the devices supply inputs are essential. 8. Accuracy of the circuit is within 1% over the 0C to +70C temperature range with 1% metal film resistors Ri, R2 and R3. DAC linearity becomes an important factor as the divisor decreases; for this reason 1/4 LSB linear DACs are recommended. 4. Binary coding may be accomplished by substituting an 8-bit binary-coded DAC-08EX for the two-digit BCD-coded DAC- 20EX. In addition to adjusting circuit values however, a higher performance op amp such as the OP-17F is desirable because the output amplifiers input offset voltage drift becomes a more significant error source for overall scale factor stability over temperature. This is due to the increased resolution of the binary coding. A X"DIVISOR DIGITAL INPUTS 8040 2010 8 4 2 1 R3 +15V I CONSTANT 348k 44] B1 B2 63 64 BS BE B7 BB < 3 Vrerl) vi (+) out DAC-20Ex 15 Vv, O , ReFt) in, -VREF COMP. v- = = OMP. V- V+ lconstant = LSB VALUE = Cy 1e [3 143 1 -Vace--Iper* R 22pF ReF ~ REF Ra c, oC 1N957A, Ax constant "Pa Xrs 2 = R4 100pF ir Xpiv neko O.1uF + 6.8V 0.01nF WHERE Xpg = DECIMAL EQUIVALENT OF FULL SCALE COUNTS V AND Xpry = DECIMAL EQUIVALENT OF -15V +15V ~15V DESIRED DIVISOR R1, R2, R3 = 1% METAL FILM ALL CAPS = CERAMIC DISC TOP TRACE = CLOCK -A - LOWER TRACE = THRU A 1 10 (CODES 0000 0001 THRU 0001 0000} TOP TRACE = CLOCK -A = LOWER TRACE = THRU 3 {CODES 0000 0011 THRU 0010 0010) TOP TRACE = CLOCK A =, ~, LOWER TRACE = A THRU A 22 1 9 (CODES 0000 0001 THRU 1001 1001} Figure 2. -A/X Function Generator