summaryrefslogtreecommitdiff
path: root/sample_notebooks/DaudIbrahir Saifi
diff options
context:
space:
mode:
authorhardythe12015-07-03 12:23:43 +0530
committerhardythe12015-07-03 12:23:43 +0530
commit9d260e6fae7328d816a514130b691fbd0e9ef81d (patch)
tree9e6035702fca0f6f8c5d161de477985cacad7672 /sample_notebooks/DaudIbrahir Saifi
parentafcd9e5397e3e1bde0392811d0482d76aac391dc (diff)
downloadPython-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.tar.gz
Python-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.tar.bz2
Python-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.zip
add/remove books
Diffstat (limited to 'sample_notebooks/DaudIbrahir Saifi')
-rwxr-xr-xsample_notebooks/DaudIbrahir Saifi/Chapter2.ipynb228
1 files changed, 228 insertions, 0 deletions
diff --git a/sample_notebooks/DaudIbrahir Saifi/Chapter2.ipynb b/sample_notebooks/DaudIbrahir Saifi/Chapter2.ipynb
new file mode 100755
index 00000000..b9dc8563
--- /dev/null
+++ b/sample_notebooks/DaudIbrahir Saifi/Chapter2.ipynb
@@ -0,0 +1,228 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cba451428c3d9c574800bbc1429b7e9efcd18af4b82f735faf4ac85b4ea52c65"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter02:The 741 IC OP-AMP"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2.1:Pg-80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Ex 2.1\n",
+ "\n",
+ "# data from fig of Ex2.1\n",
+ "VCC=5.0;#V\n",
+ "IS=10**-14.0;#A\n",
+ "RS=39*1000.0;#ohm\n",
+ "VBE12=0.7;#V(Assumed)\n",
+ "VBE11=0.7;#V(Assumed)\n",
+ "VEE=-5;#V\n",
+ "IREF=(VCC-VBE12-VBE11-VEE)/RS*10**6;#micro A\n",
+ "print \"Estimated input reference current , IREF(micro A)\",round(IREF,2)\n",
+ "VT=25*10**-3;#V(Thermal Voltage)\n",
+ "VBE=VT*log(IREF*10**-6/IS);#V\n",
+ "IREF=(VCC-VBE-VBE-VEE)/RS*10**6;#micro A\n",
+ "print \"More precise value of reference current , IREF(micro A)\",round(IREF,2)\n",
+ "#Replacing Vcc by 15 V in the original design\n",
+ "VCC2=15.0;#V\n",
+ "VEE2=-15.0;#V\n",
+ "IREF=(VCC2-VBE-VBE-VEE2)/RS*10**6;#micro A\n",
+ "VBE=VT*log(IREF*10**-6/IS);#V\n",
+ "R5=(VCC-VBE-VBE-VEE)/(IREF*10**-6);#ohm\n",
+ "R5=round(R5/1000);#kohm\n",
+ "print \"Value of R5(kohm) : \",R5"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Estimated input reference current , IREF(micro A) 220.51\n",
+ "More precise value of reference current , IREF(micro A) 225.88\n",
+ "Value of R5(kohm) : 12.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2.2:Pg-81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Ex 2.2\n",
+ "import math\n",
+ "# data from fig of Ex2.2\n",
+ "IC10=20*10**-6;#A\n",
+ "IREF=0.5*10**-3;#A\n",
+ "IS=10**-14;#A\n",
+ "VT=25*10**-3;#V(Thermal Voltage)\n",
+ "R4=VT/IC10*math.log(IREF/IC10);#ohm\n",
+ "print \"For Widlar current source design, the value of R4(kohm) : \",round(R4/1000,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For Widlar current source design, the value of R4(kohm) : 4.02\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2.3:Pg-82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Ex 2.3\n",
+ "\n",
+ "import math\n",
+ "# given data\n",
+ "Gm1=10.0;#mA/V\n",
+ "Gm1=Gm1/1000;#A/V\n",
+ "Cc=50.0;#pF\n",
+ "Cc=Cc*10**-12;#F\n",
+ "Rt=10**8;#ohm(Shunting resistance with Cc)\n",
+ " # solution\n",
+ "Ao=Gm1*Rt;#unitless\n",
+ "fp=1/(2*math.pi*Rt*Cc);#Hz\n",
+ "ft=Gm1/(2*math.pi*Cc)/10**6;#MHz\n",
+ "print \"Frequency at which gain is maximum, fp in Hz\",round(fp,1)\n",
+ "print \"Unit gain frequency, ft(MHz)\",round(ft,1)\n",
+ "#Bode plot can not be plotted with the given data in the question by using python functions. \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency at which gain is maximum, fp in Hz 31.8\n",
+ "Unit gain frequency, ft(MHz) 31.8\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2.4:Pg-83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Ex 2.4\n",
+ "\n",
+ "import math\n",
+ "# given data\n",
+ "SR=10.0/10**-6;#V/s\n",
+ "Vout=10.0;#V(magnitude of output voltage)\n",
+ "fm=SR/(2*math.pi*Vout)/1000;#kHz\n",
+ "print \"Full power bandwidth(kHz)\",round(fm,1)\n",
+ "VT=25.0/1000;#V(Thermal voltage)\n",
+ "ft=SR/(2*math.pi*4*VT)/10.0**6;#MHz\n",
+ "print \"Unity gain bandwidth(MHz)\",round(ft,1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Full power bandwidth(kHz) 159.2\n",
+ "Unity gain bandwidth(MHz) 15.9\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2.5:Pg-84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Ex 2.5\n",
+ "\n",
+ "VCC=5;#V\n",
+ "VEE=-5;#V\n",
+ "VBE=0.6;#V\n",
+ "VCE23=0.6;#V\n",
+ "VCE_sat=0.2;#V\n",
+ "Vo_max=VCC-VCE_sat-VBE;#V\n",
+ "Vo_min=VEE+VCE_sat+VBE+VCE23;#V\n",
+ "print \"Maximum output voltage(V)\",round(Vo_max,2)\n",
+ "print \"Minimum output voltage(V)\",round(Vo_min,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum output voltage(V) 4.2\n",
+ "Minimum output voltage(V) -3.6\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file