diff options
author | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
---|---|---|
committer | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
commit | 4a1f703f1c1808d390ebf80e80659fe161f69fab (patch) | |
tree | 31b43ae8895599f2d13cf19395d84164463615d9 /Analog_Integrated_Circuits_by_R.S._Tomar/Chapter10_1.ipynb | |
parent | 9d260e6fae7328d816a514130b691fbd0e9ef81d (diff) | |
download | Python-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.tar.gz Python-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.tar.bz2 Python-Textbook-Companions-4a1f703f1c1808d390ebf80e80659fe161f69fab.zip |
add books
Diffstat (limited to 'Analog_Integrated_Circuits_by_R.S._Tomar/Chapter10_1.ipynb')
-rwxr-xr-x | Analog_Integrated_Circuits_by_R.S._Tomar/Chapter10_1.ipynb | 220 |
1 files changed, 220 insertions, 0 deletions
diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter10_1.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter10_1.ipynb new file mode 100755 index 00000000..9fe9f6c7 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter10_1.ipynb @@ -0,0 +1,220 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f64bf7a670dc36e359e5aa56e0bfa29f09c70f7a0babc95be4c64434f164d9d6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter10 - Comparators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 10.1 - page : 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sin\n", + "t=range(0,5) #sec(Assumed)\n", + "Vin=5*sin(2*pi*t[0]) #V\n", + "VCC=15 #V\n", + "R2=1 #kohm\n", + "R1=6.8 #kohm\n", + "VEE=-15 #V\n", + "Vsat=13 #V\n", + "Vref=R2*VCC/(R1+R2) #V\n", + "print \"Reference Voltage = %0.2f V \" %Vref\n", + "print \"If Vin>Vref , Vout = %0.2f V \" %Vsat \n", + "print \"If Vin<Vref , Vout = %0.2f V \" %-Vsat" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reference Voltage = 1.92 V \n", + "If Vin>Vref , Vout = 13.00 V \n", + "If Vin<Vref , Vout = -13.00 V \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 10.2 - page 340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Vsat=7 #V\n", + "R1=68 #kohm\n", + "R2=82 #kohm\n", + "VUTP=R2*Vsat/(R1+R2) #V\n", + "VLTP=R2*-Vsat/(R1+R2) #V\n", + "print \"Upper trip point = %0.2f V \" %VUTP \n", + "print \"Lower trip point = %0.2f V \" %VLTP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Upper trip point = 3.83 V \n", + "Lower trip point = -3.83 V \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 10.3 - page : 340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import arcsin, pi\n", + "#Vin=5*sin(omega*t)\n", + "Vm=5 #V\n", + "Vsat=7 #V\n", + "R1=68 #kohm\n", + "R2=82 #kohm\n", + "VUTP=R2*Vsat/(R1+R2) #V\n", + "fi=arcsin(VUTP/Vm)*180/pi #degree\n", + "print \"Phase shift = %0.2f degree \" %fi \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Phase shift = 49.94 degree \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 10.4 - page : 344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "VZ1=4.7 #V\n", + "VZ2=4.7 #V\n", + "R1=68 #kohm\n", + "R2=15 #kohm\n", + "Vout=VZ1+0.7 #V(As one zener diode is always forward biased)\n", + "VR1=Vout #V\n", + "IR1=VR1/R1*1000 #micro A\n", + "IR2=IR1 #micro A\n", + "VR2=IR2*10**-3*R2 #V\n", + "Vout=VR1+VR2 #V\n", + "VUTP=(R2/(R1+R2))*Vout #V\n", + "VLTP=(R2/(R1+R2))*(-Vout) #V\n", + "print \"VUTP = %0.2f V \" %VUTP \n", + "print \"VLTP = %0.2f V \" %VLTP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VUTP = 1.19 V \n", + "VLTP = -1.19 V \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 10.5 - page : 346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Vsat=12.5 #V\n", + "Vref=-12.5 #V\n", + "R1=80 #kohm\n", + "R2=20 #kohm\n", + "Beta=R2/(R1+R2) #unitless\n", + "UTP=Beta*Vsat+(1-Beta)*Vref #V\n", + "LTP=-Beta*Vsat+(1-Beta)*Vref #V\n", + "VH=UTP-LTP #V\n", + "R3=R1*R2/(R1+R2) #kohm\n", + "print \"UTP = %0.2f V \" %UTP \n", + "print \"LTP = %0.2f V \" %LTP \n", + "print \"Hysteresis Voltage, VH = %0.2f V \" %VH \n", + "print \"Use R3 = %0.2f kohm \" %R3 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "UTP = -7.50 V \n", + "LTP = -12.50 V \n", + "Hysteresis Voltage, VH = 5.00 V \n", + "Use R3 = 16.00 kohm \n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |