from __future__ import division
from math import log
Vin=12.5 #V
Ri=10 #kohm
IS=10**-13 #A
T=27 #degree C
VT=26 #mV
Vref=Ri*IS*1000 #V
Vout=-VT*10**-3*log(Vin/Vref) #V
print "Output Voltage, Vout = %0.1f V " %Vout
from __future__ import division
R1=10 #kohm
k=1.38*10**-23 #J/K
T=298 #K
q=1.6*10**-19 #C
Kdash=k*T/q #Kdash=k*T/q assumed for temporary calculation
print "Output Voltage, Vout(V) is ",round(-Kdash,4),"*log(Vin/%0.f*10**3)" %R1
#Not possible to tale log of symbols.
from __future__ import division
R1=10 #kohm
R2=10 #kohm
k=1.38*10**-23 #J/K
T=298 #K
q=1.6*10**-19 #C
Kdash=k*T/q #Kdash=k*T/q assumed for temporary calculation
print "Output Voltahe, Vout(V) is -R1*(log(",round(-1/Kdash,1),"*Vin)**-1"
#Not possible to tale log of symbols.
from __future__ import division
from math import log10
k=1 #for the givn connection
#(a)
Vin=5 #V
Vout=-k*log10(Vin/0.1) #V
print "(a) For 5V input, Output Voltage = %0.2f V " %Vout
#(b)
Vin=2 #V
Vout=-k*log10(Vin/0.1) #V
print "(b) For 2V input, Output Voltage = %0.1f V " %Vout
#(c)
Vin=0.1 #V
Vout=-k*log10(Vin/0.1) #V
print "(c) For 0.1V input, Output Voltage = %0.f V " %Vout
#(d)
Vin=50 #mV
Vout=-k*log10(Vin/1000/0.1) #V
print "(d) For 50mV input, Output Voltage = %0.1f V " %Vout
#(e)
Vin=5 #mV
Vout=-k*log10(Vin/1000/0.1) #V
print "(e) For 5mV input, Output Voltage = %0.1f V " %Vout
from __future__ import division
from math import log10
k=1 #for the givn connection
#For 755N module
Rin=10 #kohm
Iref=10 #micro A
Vref=Rin*Iref/1000 #V
#(a)
Vin=5 #V
Vout1=-k*log10(Vin/0.1) #V
Vout=Vref*10**(-Vout1/k) #V
print "(a) For 5V input to log amp, Antilog amp Output = %0.f V " %Vout
#(b)
Vin=2 #V
Vout1=-k*log10(Vin/0.1) #V
Vout=Vref*10**(-Vout1/k) #V
print "(b) For 2V input to log amp, Antilog amp Output = %0.f V " %Vout
#(c)
Vin=0.1 #V
Vout1=-k*log10(Vin/0.1) #V
Vout=Vref*10**(-Vout1/k) #V
print "(c) For 0.1V input to log amp, Antilog amp Output = %0.1f V " %Vout
#(d)
Vin=50 #mV
Vout1=-k*log10(Vin/1000/0.1) #V
Vout=Vref*10**(-Vout1/k) #V
print "(d) For 50mV input to log amp, Antilog amp Output = %0.f mV " %(Vout*1000)
#(e)
Vin=5 #mV
Vout1=-k*log10(Vin/1000/0.1) #V
Vout=Vref*10**(-Vout1/k) #V
print "(e) For 5mV input to log amp, Antilog amp Output = %0.f mV " %(Vout*1000)