**Operational Amplifier**An amplifier is a device which increases the signal strength of an analogue signal input. An operational amplifier (op-amp) is an important system building block, which can be configures in many different ways in order to cause amplification of signals for different applications.

The open loop voltage gain G_{o }is given by;

G_{0 = }output voltage/ input voltage

Which is given by;

V_{o} = V_{out}/ (V^{+ }– V^{–})

The operational amplifier cannot generate an output voltage which is greater than its supply voltage. If such an input is used which attempts to produce an output greater than V_{s+ }or less than V_{s}^{-1} the output voltage will stay at V_{s+ }or V_{s-1}.

Using the equation G_{out }= V_{OUT}/ (V^{+ }– V^{–})

We can see the following possible output voltage.

**Op-amp as a comparator**

Comparators are usually used in sensor circuit, for example a circuit which detects when the temperature in a room drops below a certain level and causes a heater to turn on.

When its temperature decreases, the resistance of the thermistor decreases.

The potential divide formed of the thermistor and R_{1} will produce a varying voltage, which is used as the non-inverting (V_{+}) input of the op-amp.

- When the temperature of the thermistor is low, its resistance will also be low, therefore the voltage across R
_{1}, will be small, and so V, will also be small. Given that V_{+}is larger than the voltage across the variable resistor, the output to the heater will be +120 V so it will be turned on. - When the temperature of the thermistor is high, its resistance will also be high, therefore the voltage across R
_{1}will be small, and so V_{+}will also be small. Given that V_{+}is smaller than the voltage across the variable resistor, the output to the heater will be 0 V so it will be turned off.

**Inverting amplifier configuration**

In an inverting amplifier configuration, the output voltage from the operational amplifier is fed back into the inverting input of the op-amp, forming a closed-loop circuit with negative feedback. Due to this, the gain of the op-amp can be adjusted to much lower values.

An example inverting amplifier configuration is shown on the right. Note that the power supply connections are not shown, however unless otherwise noted, they are assumed to be present.

Using virtual earth analysis, and the assumptions noted below, we can derive the transfer function (voltage output equation) for this type of circuit.

Assumptions:

- The op-amp is ideal (requirements for this are noted above).
- The op-amp in operating in its linear region and so is not saturated.

By looking at the inverting amplifier configuration above, you can see that the non-inverting input voltage is 0 V (as it is connected to the ground). And as the op-amp is ideal, it has infinite open-loop gain (A_{OL}). Using these piece of information, we can rewrite the open-loop transfer function as shown:

*V _{out}=A_{OL }(V_{+}-V_{–})*

*V _{out}= *∞ × (0 –V-)

V – = -V_{out}/ ∞

* *

This equation shows us that the voltage at the inverting input is virtually zero, as it is such a small value (because it is divided by infinite open-loop gain) it can be regarded as zero. This point in the circuit is known as a virtual earth, as even though it is not connected to earth, it (virtually) has a value of 0 V. The location of the virtual earth is shown on the circuit on the right using a red cross.

**Non-inverting Amplifier Configuration**

A non-inverting amplifier configuration does not affect the polarity of the signal, so it is useful if a signal must be amplified and keep its original polarity. In this configuration, the output voltage from the operational amplifier is fed back into the non-inverting input of the op-amp.

The transfer function of a non-inverting amplifier configuration is given by:

V_{Out}/V_{in }= 1 + R_{f}/R_{1}

It is important to note that the gain can never be lower than 1.

We know that:

I_{in} = V_{in}/R_{in}

And,

I_{f} = V_{out}/R_{f}

The input resistance is very high so virtually no current enters or leave the inverting input (-) of the op-amp.

If V_{in} is a positive potential the current from left to right V_{out} will be negative;

I_{f }= – I_{in}

And V_{out}/R_{f }= -V_{in}/R_{in}

Thus Gain is given by;

G = V_{out}/V_{in} = – R_{f}/R_{in}

The negative sign shows that when the input voltage is positive then the output voltage is negative.