Chapter 7:Op Amps with diodes

Example 7.1 Page no 205

In [4]:
#Given
V = 15.0       #V,Voltage
mR = 30*10**3  #, ohm, Resistance 
R = 10*10**3    #ohm, 2nd resistor
Ei = -10        #V, Voltage supply

#calculation
Vref = V / 3.0 
Voa = -Ei-Vref  
Vob = Ei / 2.0 

#Result
print"Reference voltage is",Vref,"V"
print"Values of Voa =",Voa,"V","and Vob ", Vob,"V"
Reference voltage is 5.0 V
Values of Voa = 5.0 V and Vob  -5.0 V