A logarithmic amplifier, often referred to as a log amplifier, is a linear electronic circuit where the output voltage is directly proportional to the natural logarithm of the input signal. The fundamental output equation for a log amplifier can be expressed as Vout = K ln(Vin/Vref), where Vref represents a constant reference voltage, and K signifies the scale factor. Log amplifiers have diverse applications in electronics, including operations like multiplication or division (achievable through addition and subtraction of the logarithms of operands), signal processing, computerized process control, data compression, decompression, root mean square (RMS) value detection, and more. Generally, two common configurations of log amplifiers are the Opamp-diode log amplifier and the Opamp-transistor log amplifier.
Opamp-diode log amplifier
The diagram above depicts a straightforward Opamp-diode log amplifier configuration. Essentially, it consists of an operational amplifier (opamp) configured in a closed-loop, inverting arrangement, with a diode placed within the feedback path. The voltage across the diode consistently maintains a logarithmic relationship with the current passing through it. Consequently, when a diode is positioned within the feedback loop of an opamp in an inverting configuration, the resulting output voltage becomes directly proportional to the negative logarithm of the input current. Given that the input current is directly proportional to the input voltage, we can therefore conclude that the output voltage is in turn directly proportional to the negative logarithm of the input voltage.
According to the PN junction diode equation, the relationship between current and voltage for a diode is
Id = Is (e(Vd/Vt)-1)…………(1)
Where Id is the diode current. Is is the saturation current. Vd is the voltage across the diode and Vt is the thermal voltage.
Since Vd the voltage across the diode is positive here and Vt the thermal voltage is a small quantity, the equation (1) can be approximated as
Id = Is e(Vd/Vt)…………………(2)
Since an ideal opamp has infinite input resistance, the input current Ir has only one path, that is through the diode. That means the input current is equal to the diode current Id.
=> Ir = Id ………………….(3)
Since the inverting input pin of the opamp is virtually grounded, we can say that
Ir = Vin/R
Since Ir = Id (from equation (3) )
Vin/R = Id …………………..(4)
Comparing equation (4) and (2) we have
Vin/R = Is e(Vd/Vt)
i.e. Vin = Is R e(Vd/Vt)……………(5)
Considering that the negative of the voltage across the diode is the output voltage Vout (see the circuit diagram (fig1)), we can rearrange the equation (5) to get
Vout = -Vt In(Vin/IsR)
Opamp transistor log amplifier.
In this arrangement, an operational amplifier (opamp) operates in an inverting mode with a transistor integrated into its feedback path. Specifically, the collector of the transistor is linked to the opamp’s inverting input, the emitter is connected to the output, and the base is grounded. A crucial prerequisite for the proper functioning of a logarithmic amplifier (log amp) is that the input voltage must consistently remain in the positive range. You can observe the circuit diagram of an Opamp-transistor log amplifier depicted below.
From Fig 2 it is clear that base-emitter voltage of the transistor Vbe = -Vout ………(1)
We know that Ic = Iso (e(Vbe/Vt)-1) ………….(2)
Where Ic is the collector current of the transistor. Iso the saturation current. Vbe the base emitter voltage and Vt the thermal voltage.
Equation (1) can be approximated as Ic = Iso e(Vbe/Vt) ………….(3)
Ie, Vbe = Vt In (Ic/Iso) …………….(4)
Since input pin of an ideal opamp has infinite input impedance, the only path for the input current Ir is through the transistor and that means Ir = Ic.
Since the inverting input of the opamp is virtually grounded
Ir = Vin/R
That means Ic = Vin/R ……………(5)
From equations (5) , (4) and (1) it is clear that
Vout = -Vt ln (Vin/IsoR1)………….(6)