# LTSpice Log Amplifier Circuit problem

#### 5O5mm

Joined May 15, 2021
15
Hi,

The circuit works fine for natural log, base 2 and 3 but it didn't work for any log base greater than 4. For any log base I adjust the differential gain with the feedback resistors which are dependent to the value of thermal voltage (and since every BJT model has a slight different thermal voltage, I didn't want to take it as a constant 26mV instead used a behavioral source to adjust the resistor value) according to the equations attached.
What I'd like to see at the output is when we use behavioral source as input such as pow(n, n) and step the n parameter which is the log base, the output voltage should be the value of n but it isn't working for values of n greater than 4.

#### Attachments

• 4.2 KB Views: 9
Last edited:

#### eetech00

Joined Jun 8, 2013
3,418
Hi,

The circuit works fine for natural log, base 2 and 3 but it didn't work for any log base greater than 4. For any log base I adjust the differential gain with the feedback resistors which are dependent to the value of thermal voltage (and since every BJT model has a slight different thermal voltage, I didn't want to take it as a constant 26mV instead used a behavioral source to adjust the resistor value) according to the equations attached.
What I'd like to see at the output is when we use behavioral source as input such as pow(n, n) and step the n parameter which is the log base, the output voltage should be the value of n but it isn't working for values of n greater than 4.

View attachment 257051
View attachment 257018View attachment 257019View attachment 257020
Why do you think its not working the way you want it to?

#### Alec_t

Joined Sep 17, 2013
13,219
it didn't work for any log base greater than 4.
Not surprising. Consider what the input voltage at V1 becomes as n increases. It rapidly exceeds the supply voltage of the op-amps !

#### ericgibbs

Joined Jan 29, 2010
16,741
hi 505,
This is your sim plot.
E.

#### eetech00

Joined Jun 8, 2013
3,418
the output voltage should be the value of n but it isn't working for values of n greater than 4.
Looks to me like its doing what you want.
But you might as well not use the opamp supply pins because their not being asserted anyway.