{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter : 10 - Non-linear Applications of IC Op-amps" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 10.1 : Page No - 383\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "#Given data\n", "V_CC = 15 # in V\n", "V_sat = V_CC # in V\n", "R1 = 120 # in ohm\n", "R2 = 51 # in k ohm\n", "R2 = R2 * 10**3 # in ohm\n", "V_in = 1 # in V\n", "V_UT = (V_sat*R1)/(R1+R2) #in V\n", "print \"When supply voltage is +15V then threshold voltage = %0.1f mV\" %(V_UT*10**3) \n", "V_ULT = ((-V_sat)*R1)/(R1+R2) # in V\n", "V_ULT = V_ULT # in V\n", "print \"When supply voltage is -15V then threshold voltage = %0.1f mV\" %(V_ULT*10**3) \n", "\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "When supply voltage is +15V then threshold voltage = 35.2 mV\n", "When supply voltage is -15V then threshold voltage = -35.2 mV\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 10.2 : Page No - 383\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "#Given data\n", "V_sat = 12 # in V\n", "V_H = 6 # in V\n", "R1 = 10 # in k ohm\n", "R1 = R1 * 10**3 # in ohm\n", "# Formula V_H= R1/(R1+R2)*(V_sat-(-V_sat)) and Let\n", "V = V_H/(V_sat-(-V_sat)) # in V (assumed)\n", "R2= (R1-V*R1)/V\n", "print \"The value of R1 = %0.f k\u03a9\" %(R1*10**-3) \n", "print \"The value of R2 = %0.f k\u03a9\" %(R2*10**-3) " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of R1 = 10 k\u03a9\n", "The value of R2 = 30 k\u03a9\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 10.3 : Page No - 384\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from numpy import pi\n", "from math import asin\n", "#Given data\n", "V_P = 5 # in V\n", "V_LT = -1.5 # in V\n", "V_H = 2 # in V\n", "f = 1 # in kHz\n", "f = f * 10**3 # in Hz\n", "V_UT = V_H-V_LT # in V\n", "V_m = V_P/2 # in V\n", "# Formula V_LT= V_m*sind(theta)\n", "theta= asin(-V_LT/V_m) *180/pi\n", "T = 1/f # in sec\n", "theta1 = theta+180 # in degree\n", "T1 = (T*theta1)/360 # in sec\n", "T2 = T-T1 # in sec\n", "print \"The value of T1 = %0.3f ms\" %(T1*10**3)\n", "print \"The value of T2 = %0.3f ms\" %(T2*10**3)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of T1 = 0.602 ms\n", "The value of T2 = 0.398 ms\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 10.4 : Page No - 384\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given data\n", "V_H = 10 # in V\n", "V_L = -10 # in V\n", "I_max = 100 # in \u00b5A\n", "I_max = I_max * 10**-6 # in A\n", "V_HV = 0.1 # in V\n", "V_sat = 10 # in V\n", "R2 = 1 # in k ohm\n", "R1 = 199 # in k ohm\n", "R = (R1*R2)/(R1+R2) # in k ohm\n", "print \"The resistance = %0.f \u03a9\" %(R*10**3) \n", "\n", "# Note: The unit of the answer in the book is wrong" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The resistance = 995 \u03a9\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 10.6 : Page No - 386\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given data\n", "V_sat = 12 # in V\n", "R1 = 1 # in k ohm\n", "R2 = 3 # in k ohm\n", "V_LT = ((-V_sat)*R1)/R2 # in V\n", "print \"The value of V_LT = %0.f V\" %V_LT \n", "V_UT = (-(-V_sat) * R1)/R2 # in V\n", "print \"The value of V_UT = %0.f V\" %V_UT \n", "V_H = (R1/R2)*(V_sat - (-V_sat)) # in V\n", "print \"The value of V_H = %0.f V\" %V_H" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of V_LT = -4 V\n", "The value of V_UT = 4 V\n", "The value of V_H = 8 V\n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 10.7 : Page No - 387\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given data\n", "R1 = 80 # in k ohm\n", "R2 = 20 # in k ohm\n", "V_sat = 12.5 # in V\n", "V_UT = (R2/(R1+R2))*V_sat # in V\n", "print \"Upper threshold voltage = %0.1f V\" %V_UT \n", "V_LT = (R2/(R1+R2))*(-V_sat) # in V\n", "print \"Lower threshold voltage = %0.1f V\" %V_LT \n", "V_HV = (R2/(R1+R2))*(2*V_sat) # in V\n", "print \"The hysteresis voltage = %0.f V\" %V_HV" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Upper threshold voltage = 2.5 V\n", "Lower threshold voltage = -2.5 V\n", "The hysteresis voltage = 5 V\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 10.10 : Page No - 409\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import log\n", "#Given data\n", "R1 = 86 # in k ohm\n", "V_sat = 15 # in V\n", "R2 = 100 # in k ohm\n", "V_UT = (R1/(R1+R2))*V_sat # in V\n", "print \"The value of V_UT = %0.2f V\" %V_UT \n", "V_LT = (R1/(R1+R2))*(-V_sat) # in V\n", "print \"The value of V_LT = %0.2f V\" %V_LT \n", "R_F = 100 # in k ohm\n", "R_F= R_F*10**3 # in ohm\n", "C = 0.1 # in \u00b5F\n", "C = C * 10**-6 # in F\n", "f_o = 1/(2*R_F*C*log( (V_sat-V_LT)/(V_sat-V_UT) )) # in Hz\n", "print \"Frequency of oscillation = %0.f Hz\" %f_o" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of V_UT = 6.94 V\n", "The value of V_LT = -6.94 V\n", "Frequency of oscillation = 50 Hz\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 10.12 : Page No - 421\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given data\n", "del_Vin = 5 # in V\n", "FRR = 80 # in dB\n", "# Formula FRR= 20*log10(del_Vin/del_Vout)\n", "del_Vout=del_Vin/(10**(FRR/20)) # in V\n", "print \"Change in output voltage = %0.1f mV\" %(del_Vout*10**3)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Change in output voltage = 0.5 mV\n" ] } ], "prompt_number": 19 } ], "metadata": {} } ] }