{ "metadata": { "name": "", "signature": "sha256:f9ba841d51e943eb842cd7b286030046166ba358e1dbe882cc0bc48bab2a1a28" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter3: Linear Application of IC Op-Amps" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex3.1:pg-95" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "R1=2.2#kohm\n", "G=-100 #Voltage gain\n", "Rf=-G*R1#kohm\n", "print \"Value of Rf: \",Rf ,\"kohm\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Value of Rf: 220.0 kohm\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex3.2:pg-95" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "Vin=2.5 #mV\n", "R1=2 #kohm\n", "Rf=200 #kohm\n", "G=-Rf/R1 #Gain\n", "Vo=G*Vin/1000.0 #V\n", "print \"Output Voltage Vo=\",Vo \n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Output Voltage Vo= -0.25\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex3.3:pg-96" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "G=-10 #Gain\n", "Ri=100 #kohm input resistance \n", "R1=Ri #kohm\n", "R2=-G*R1 #kohm\n", "print R1,\"is the Value of R1 in kohm \" \n", "print int(R2/1000),\"the Value of R2 in Mohm \" \n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "100 is the Value of R1 in kohm \n", "1 the Value of R2 in Mohm \n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex3.4:pg-119" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#Given\n", "FT1=1 #Filter Transmission\n", "FT2=0.99 #Filter Transmission\n", "FT3=0.9 #Filter Transmission\n", "FT4=0.1 #Filter Transmission\n", "A1= int(-20*math.log10(FT1)) #dB\n", "A2= round(-20*math.log10(FT2),3) #dB\n", "A3= round(-20*math.log10(FT3),3) #dB\n", "A4= -20*math.log10(FT4) #dB\n", "print \"For filter transmission=1, Attenuation(dB)=\", A1 \n", "print \"For filter transmission=0.99, Attenuation(dB)=\",A2 \n", "print \"For filter transmission=0.9, Attenuation(dB)=\",A3\n", "print \"For filter transmission=0.1, Attenuation(dB)=\",A4 \n", " #Answer in the book is wrong for 0.99 filter transmission.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "For filter transmission=1, Attenuation(dB)= 0\n", "For filter transmission=0.99, Attenuation(dB)= 0.087\n", "For filter transmission=0.9, Attenuation(dB)= 0.915\n", "For filter transmission=0.1, Attenuation(dB)= 20.0\n" ] } ], "prompt_number": 24 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex3.5:pg-119" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given\n", "import math\n", "fo=2 #kHz\n", "Ap=10.0 #Band pass gain\n", "C=0.1 #micro F(have to choose C, 0.01