# Practical Electronics/Operational amplifiers

## Intro

Op Amp is a short hand term for Operational Amplifier. An operational amplifier is a circuit component that amplifies the difference of two input voltages:

Vo = A (V2 - V1)

Op Amps are usually packaged as an 8-pin integrated circuit.

Operational Amplifier IC Chip
Pin Usage
1 Offset Null
2 Inverted Input
3 Non-Inverted Input
4 -V Supply
5 No use
6 Output
7 +V Supply
8 No use

Op Amp symbol

op-amp
• V+: non-inverting input
• V: inverting input
• Vout: output
• VS+: positive power supply
• VS−: negative power supply

Op amps amplify AC signal or AC Voltage better than a simple bipolar junction transistor.

## Op Amp Functions

From above

V0 = A (V2 - V1)

### Voltage Comparator

V2 > V1 , V0 = +Vss
V2 < V1 , V0 = -Vss
V2 = V1 , V0 = 0

### Inverting Amplifier

With one voltage is grounded

If V2 = 0 , V0 = -A V1 . Inverting Amplifier

### Non-Inverting Amplifier

With one voltage is grounded

If V1 = 0 , V0 = A V2 . Non-Inverting Amplifier

## Linear Configurations

### Differential amplifier

Differential amplifier
${\displaystyle V_{\mathrm {out} }=V_{2}\left({\left(R_{\mathrm {f} }+R_{1}\right)R_{\mathrm {g} } \over \left(R_{\mathrm {g} }+R_{2}\right)R_{1}}\right)-V_{1}\left({R_{\mathrm {f} } \over R_{1}}\right)}$
• Differential ${\displaystyle Z_{\mathrm {in} }}$  (between the two input pins) = ${\displaystyle R_{1}+R_{2}}$

#### Voltage Difference Amplifier

Whenever ${\displaystyle R_{1}=R_{2}}$  and ${\displaystyle R_{\mathrm {f} }=R_{\mathrm {g} }}$ ,

${\displaystyle V_{\mathrm {out} }={R_{\mathrm {f} } \over R_{1}}\left(V_{2}-V_{1}\right)}$

#### Voltage Difference

When ${\displaystyle R_{1}=R_{\mathrm {f} }}$  and ${\displaystyle R_{2}=R_{\mathrm {g} }}$  (including previous conditions, so that ${\displaystyle R_{1}=R_{2}=R_{\mathrm {f} }=R_{\mathrm {g} }}$ ):

${\displaystyle V_{\mathrm {out} }=V_{2}-V_{1}\,\!}$

### Inverting Amplifier

Inverting amplifier
${\displaystyle V_{\mathrm {out} }=-V_{\mathrm {in} }\left({R_{f} \over R_{1}}\right)}$

Inverting Amplification is dictated by the ratio of the two resistors

### Non-Inverting Amplifier

Non-inverting amplifier
${\displaystyle V_{\mathrm {out} }=V_{\mathrm {in} }\left(1+{R_{2} \over R_{1}}\right)}$

Non-Inverting Amplification is dictated by the ratio of the two resistors plus one

### Voltage Follower

Voltage follower

From Non-Inverting Amplifier's formula. If the resistors has the same value of resistance then output voltage is exactly equal to the input voltage

${\displaystyle V_{\mathrm {out} }=V_{\mathrm {in} }\!\ }$

From Inverting Amplifier's formula. If the resistors has the same value of resistance then output voltage is exactly equal to the input voltage and inverted

${\displaystyle V_{\mathrm {out} }=-V_{\mathrm {in} }\!\ }$

### Summing amplifier

Summing amplifier
${\displaystyle V_{\mathrm {out} }=-R_{\mathrm {f} }\left({V_{1} \over R_{1}}+{V_{2} \over R_{2}}+\cdots +{V_{n} \over R_{n}}\right)}$

When ${\displaystyle R_{1}=R_{2}=\cdots =R_{n}}$ , and ${\displaystyle R_{\mathrm {f} }}$  independent

${\displaystyle V_{\mathrm {out} }=-\left({R_{\mathrm {f} } \over R_{1}}\right)(V_{1}+V_{2}+\cdots +V_{n})\!\ }$

When ${\displaystyle R_{1}=R_{2}=\cdots =R_{n}=R_{\mathrm {f} }}$

${\displaystyle V_{\mathrm {out} }=-(V_{1}+V_{2}+\cdots +V_{n})\!\ }$

### Integrator

Integrating amplifier

Integrates the (inverted) signal over time

${\displaystyle V_{\mathrm {out} }=\int _{0}^{t}-{V_{\mathrm {in} } \over RC}\,dt+V_{\mathrm {initial} }}$

(where ${\displaystyle V_{\mathrm {in} }}$  and ${\displaystyle V_{\mathrm {out} }}$  are functions of time, ${\displaystyle V_{\mathrm {initial} }}$  is the output voltage of the integrator at time t = 0.)

### Differentiator

Differentiating amplifier

Differentiates the (inverted) signal over time.

The name "differentiator" should not be confused with the "differential amplifier", also shown on this page.

${\displaystyle V_{\mathrm {out} }=-RC\left({dV_{\mathrm {in} } \over dt}\right)}$

(where ${\displaystyle V_{\mathrm {in} }}$  and ${\displaystyle V_{\mathrm {out} }}$  are functions of time)

### Comparator

Comparator
• ${\displaystyle V_{\mathrm {out} }=\left\{{\begin{matrix}V_{\mathrm {S+} }&V_{1}>V_{2}\\V_{\mathrm {S-} }&V_{1}

Từ V0 = A (V2 - V1)

• Vo = 0 khi V2 = V1
• Vo > 0 khi V2 > V1
Vo = Vss
• Vo < 0 khi V2 < V1
Vo = V-ss

When two input voltages equal. The output voltage is zero . When the two input voltages different and if one is greater than or less than the other

1. Vo = Vss khi V2 > V1
2. Vo = V-ss khi V2 < V1

### Instrumentation amplifier

Instrumentation amplifier

Combines very high input impedance, high common-mode rejection, low DC offset, and other properties used in making very accurate, low-noise measurements

### Schmitt trigger

Schmitt trigger

A comparator with hysteresis

Hysteresis from ${\displaystyle {\frac {-R_{1}}{R_{2}}}V_{sat}}$  to ${\displaystyle {\frac {R_{1}}{R_{2}}}V_{sat}}$ .

### Gyrator

Inductance gyrator

A gyrator can transform impedances. Here a capacitor is changed into an inductor.

${\displaystyle L=R_{\mathrm {L} }RC}$

### Zero level detector

Voltage divider reference

• Zener sets reference voltage

### Negative impedance converter (NIC)

Negative impedance converter

Creates a resistor having a negative value for any signal generator

• In this case, the ratio between the input voltage and the input current (thus the input resistance) is given by:
${\displaystyle R_{\mathrm {in} }=-R_{3}{\frac {R_{1}}{R_{2}}}}$

## Non-linear configurations

### Rectifier

Super diode

Behaves like an ideal diode for the load, which is here represented by a generic resistor ${\displaystyle R_{\mathrm {L} }}$ .

• This basic configuration has some limitations. For more information and to know the configuration that is actually used, see the main article.

### Peak detector

Peak detector

When the switch is closed, the output goes to zero volts. When the switch is opened for a certain time interval, the capacitor will charge to the maximum input voltage attained during that time interval.

The charging time of the capacitor must be much shorter than the period of the highest appreciable frequency component of the input voltage.

### Logarithmic output

Logarithmic configuration
• The relationship between the input voltage ${\displaystyle v_{\mathrm {in} }}$  and the output voltage ${\displaystyle v_{\mathrm {out} }}$  is given by:
${\displaystyle v_{\mathrm {out} }=-V_{\gamma }\ln \left({\frac {v_{\mathrm {in} }}{I_{\mathrm {S} }\cdot R}}\right)}$

where ${\displaystyle I_{\mathrm {S} }}$  is the saturation current.

• If the operational amplifier is considered ideal, the negative pin is virtually grounded, so the current flowing into the resistor from the source (and thus through the diode to the output, since the op-amp inputs draw no current) is:
${\displaystyle {\frac {v_{\mathrm {in} }}{R}}=I_{\mathrm {R} }=I_{\mathrm {D} }}$

where ${\displaystyle I_{\mathrm {D} }}$  is the current through the diode. As known, the relationship between the current and the voltage for a diode is:

${\displaystyle I_{\mathrm {D} }=I_{\mathrm {S} }\left(e^{\frac {V_{\mathrm {D} }}{V_{\gamma }}}-1\right)}$

This, when the voltage is greater than zero, can be approximated by:

${\displaystyle I_{\mathrm {D} }\simeq I_{\mathrm {S} }e^{V_{\mathrm {D} } \over V_{\gamma }}}$

Putting these two formulae together and considering that the output voltage ${\displaystyle V_{\mathrm {out} }}$  is the inverse of the voltage across the diode ${\displaystyle V_{\mathrm {D} }}$ , the relationship is proven.

Note that this implementation does not consider temperature stability and other non-ideal effects.

### Exponential output

Exponential configuration
• The relationship between the input voltage ${\displaystyle v_{\mathrm {in} }}$  and the output voltage ${\displaystyle v_{\mathrm {out} }}$  is given by:
${\displaystyle v_{\mathrm {out} }=-RI_{\mathrm {S} }e^{v_{\mathrm {in} } \over V_{\gamma }}}$

where ${\displaystyle I_{\mathrm {S} }}$  is the saturation current.

• Considering the operational amplifier ideal, then the negative pin is virtually grounded, so the current through the diode is given by:
${\displaystyle I_{\mathrm {D} }=I_{\mathrm {S} }\left(e^{\frac {V_{\mathrm {D} }}{V_{\gamma }}}-1\right)}$

when the voltage is greater than zero, it can be approximated by:

${\displaystyle I_{\mathrm {D} }\simeq I_{\mathrm {S} }e^{V_{\mathrm {D} } \over V_{\gamma }}}$

The output voltage is given by:

${\displaystyle v_{\mathrm {out} }=-RI_{\mathrm {D} }\,}$