#Given
Vsat = 14.0 #Saturation Voltage
R1 = 1000.0
R2 = 100.0 #Load resistances
#Calculation
Vut = (R2/(R1*R2))*Vsat
#Result
print" Value of Upper Threshold Voltage = ",Vut*1000,"mV"
#Given
Vsat = -13.0 #Saturation Voltage
R1 = 1000.0
R2 = 100.0 #Load resistances
#Calculation
Vlt = (R2/(R1*R2))*Vsat
#Result
print" Value of Lower Threshold Voltage = ",Vlt*1000,"mV"
#Given
Vut = 12.0
Vlt = 8.0 #Upper and Lower Threshold Voltages
Vsatp = 15.0
Vsatm = -15.0 # Saturation Voltages
R = 10*10**3 #Choosing R
#Calculation
Vh = Vut - Vlt # Hysteresis Voltage
Vctr = (Vut + Vlt)/2.0 #Center Voltage
n = (Vsatp - Vsatm)/Vh # Resistor Factor
Vref = Vctr / (1 + (1/n)) #Reference Voltage
Resistance = n * R
#Result
print" Center Voltage = ", Vctr ,"V"
print" Resistor Factor = " , n
print" Reference Voltage = ", round(Vref,2)
print" Feedback resistor is ", Resistance
#Given
Vsatp = 15.0
Vsatm = -15.0 # Saturation Voltages
Vh = 4.0 #Hysteresis Voltage
Vctr = 10.0 #Center voltage
#Calculation
n = ((Vsatp - Vsatm)/Vh)-1
R = 10*10**3 #Input Resistance
Vref = ((n + 1)*(Vctr))/n # Reference Voltage
Resistance = n * R # Feedback Resistance
#Result
print" Resistance Factor = ", n
print" Reference Voltage = ", round(Vref,2),"V"
print" Feedback Resistance = ", Resistance/1000,"kohm"
#Given
Vut = 13.5
Vlt = 10.5 #Upper and Lower Threshold Voltages
Vref = -15 # Reference Voltage
Vsatp = 13.0
Vsatm = -13.0 #Saturation Voltages
R = 10*10**3 # Input Resistance
#Calculation
Vctr = (Vut + Vlt)/2.0
Vh = Vut - Vlt
m = -(Vref / Vctr)
Resistance = m * R
n = (Vsatp-Vsatm)/Vh
Resistance1 = n * R
#Result
print" Hysteresis Voltage = ", Vh
print" Center Voltage = ", Vctr
print" Resistor mR = ", Resistance/1000,"kohm"
print" Resistor nR = ", round(Resistance1/1000,2),"kohm"