summaryrefslogtreecommitdiff
path: root/Electronic_Principles_/Chapter_5_New.ipynb
diff options
context:
space:
mode:
authorJovina Dsouza2014-06-18 12:43:07 +0530
committerJovina Dsouza2014-06-18 12:43:07 +0530
commit206d0358703aa05d5d7315900fe1d054c2817ddc (patch)
treef2403e29f3aded0caf7a2434ea50dd507f6545e2 /Electronic_Principles_/Chapter_5_New.ipynb
parentc6f0d6aeb95beaf41e4b679e78bb42c4ffe45a40 (diff)
downloadPython-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.tar.gz
Python-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.tar.bz2
Python-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.zip
adding book
Diffstat (limited to 'Electronic_Principles_/Chapter_5_New.ipynb')
-rw-r--r--Electronic_Principles_/Chapter_5_New.ipynb508
1 files changed, 508 insertions, 0 deletions
diff --git a/Electronic_Principles_/Chapter_5_New.ipynb b/Electronic_Principles_/Chapter_5_New.ipynb
new file mode 100644
index 00000000..44f83157
--- /dev/null
+++ b/Electronic_Principles_/Chapter_5_New.ipynb
@@ -0,0 +1,508 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 5 SPECIAL-PURPOSE DIODES"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-1, Page 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 5.1.py\n",
+ "#Zener diode of figure 5.4a has breakdown voltage of 10V. \n",
+ "#What are the minimum & maximum zener currents? \n",
+ "\n",
+ "#Variable declaration\n",
+ "Vsmin=20 #Source voltage minimum(V)\n",
+ "Vsmax=40 #Source voltage maximum(V)\n",
+ "Vbd=10 #Breakdown voltage(V)\n",
+ "R=0.82 #Resistance(KOhm)\n",
+ "\n",
+ "#Calculation\n",
+ "Vr1=Vsmin-Vbd #voltage across resistor(V)\n",
+ "Is1=Vr1/R #Minimum current(mA)\n",
+ "Vr2=Vsmax-Vbd #voltage across resistor(V)\n",
+ "Is2=Vr2/R #Maximum current(mA)\n",
+ "\n",
+ "#Result\n",
+ "print 'Ideally, zener diode acts as a battery(of breakdown voltage = 10V) shown in figure 5-4b'\n",
+ "print 'Minimum current Is1=',round(Is1,2),'mA'\n",
+ "print 'Maximum current Is1=',round(Is2,2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ideally, zener diode acts as a battery(of breakdown voltage = 10V) shown in figure 5-4b\n",
+ "Minimum current Is1= 12.2 mA\n",
+ "Maximum current Is1= 36.59 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-2, Page 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 5.2.py\n",
+ "#Is the zener diode of figure 5-6a operating in the breakdown region?\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vs=18 #supply voltage(V)\n",
+ "Rs=0.27 #source resistance(KOhm)\n",
+ "RL=1 #Load resistance(KOhm)\n",
+ "Vz=10 #Zener voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "VTH=(RL/(Rs+RL))*Vs #Thevenin voltage(V)\n",
+ "\n",
+ "#Result\n",
+ "print 'Thevenin voltage VTH = ',round(VTH,2),'V'\n",
+ "print 'Thevenin voltage is greater than zener voltage, zener diode is operating in breakdown region.'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thevenin voltage VTH = 14.17 V\n",
+ "Thevenin voltage is greater than zener voltage, zener diode is operating in breakdown region.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-3, Page 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 5.3.py\n",
+ "#What does the zener current equal in Figure 5-6b?\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vs=18 #supply voltage(V)\n",
+ "Rs=0.27 #source resistance(KOhm)\n",
+ "RL=1 #Load resistance(KOhm)\n",
+ "Vbd=10 #Zener voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "Vr=Vs-Vbd #voltage across resistor(V)\n",
+ "Is=Vr/Rs #Current(mA)\n",
+ "IL=Vbd/RL #Current(mA)\n",
+ "Iz=Is-IL #Zener current(mA)\n",
+ "\n",
+ "#Result\n",
+ "print 'Load current IL = ',IL,'mA'\n",
+ "print 'Zener current Iz = ',round(Iz,2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load current IL = 10 mA\n",
+ "Zener current Iz = 19.63 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-7, Page 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 5.7.py\n",
+ "#The zener diode of figure 5-12 has a breakdown voltage of 10V and a zener resistance of 8.5 Ohm.\n",
+ "#Use second approx. to calculate load voltage when zener current is 20 mA.\n",
+ "\n",
+ "#Variable declaration\n",
+ "Iz=20 #zener current(mA)\n",
+ "Rz=8.5 #zener resistance(Ohm)\n",
+ "Vbd=10 #Zener voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "DVL=Iz*Rz/1000 #change in load voltage(V)\n",
+ "VL=Vbd+DVL #Load voltage(V)\n",
+ "\n",
+ "#Result\n",
+ "print 'Change in load voltage DVL =',DVL,'V'\n",
+ "print 'Load voltage with second approx., VL =',VL,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in load voltage DVL = 0.17 V\n",
+ "Load voltage with second approx., VL = 10.17 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-8, Page 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 5.8.py\n",
+ "#In figure 5-12, Rs = 270 Ohm, Rz=8.5 Ohm and VR(in)=2V. \n",
+ "#What is the approximate ripple voltage across the load?\n",
+ "\n",
+ "#Variable declaration\n",
+ "Rs=270 #Source resistance (Ohm)\n",
+ "Rz=8.5 #zener resistance(Ohm)\n",
+ "VRin=2 #Zener voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "VRout=(Rz/Rs)*VRin*1000 #Load ripple voltage(V)\n",
+ "\n",
+ "#Result\n",
+ "print 'Load ripple voltage VRout=',round(VRout,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load ripple voltage VRout= 62.96 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-10, Page 157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 5.10.py\n",
+ "#A zener regulator has an i/p voltage varies from 22 to 30 V. \n",
+ "#If the regulated output voltage is 12 V & load resistance varies from 140 Ohm to 10 KOhm, Find maximum allowable series resistance.\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vil=22 #input voltage range low(V)\n",
+ "Vih=30 #input voltage range high(V)\n",
+ "Vz=12 #regulated output voltage(V)\n",
+ "Rl=140 #Load resistance low(KOhm)\n",
+ "Rh=10 #Load resistance high(KOhm)\n",
+ "\n",
+ "#Calculation\n",
+ "RSmax=Rl*(float(Vil)/float(Vz)-1) #Maximum series resistance\n",
+ "\n",
+ "#Result\n",
+ "print 'Maximum series resistance RSmax =',round(RSmax,2),'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum series resistance RSmax = 116.67 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-11, Page 157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 5.11.py\n",
+ "\n",
+ "#A zener regulator has an input voltage varies from 15 to 20 V. \n",
+ "#If zenerge is 6.8V and load current varies from 5 mA to 20 mA,find maximum allowable series resistance.\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vil=15 #input voltage range low(V)\n",
+ "Vih=20 #input voltage range high(V)\n",
+ "Vz=6.8 #regulated output voltage(V)\n",
+ "Il=5 #Load current low(mA)\n",
+ "Ih=20 #Load current high(mA)\n",
+ "\n",
+ "#Calculation\n",
+ "RSmax=(Vil-float(Vz))/Ih*1000 #Maximum series resistance\n",
+ "\n",
+ "#Result\n",
+ "print 'Maximum series resistance RSmax =',RSmax,'V'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum series resistance RSmax = 410.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-12, Page 168"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 5.12.py\n",
+ "#Figure 5-23a shows voltage-polarity tester. Find approx. LED current if the dc input voltage is 50V & series resistance is 2.2 KOhm.\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vi=50 #voatage supply(V)\n",
+ "Rs=2.2 #series resistance(KOhm)\n",
+ "Vf=2 #forward approx. voltage\n",
+ " \n",
+ "#Calculation\n",
+ "Is=(Vi-Vf)/Rs\n",
+ "\n",
+ "#Result\n",
+ "print 'LED current Is =',round(Is,2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "LED current Is = 21.82 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-13, Page 168"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 5.13.py\n",
+ "#Figure 5-23b shows continuity tester. find approx. LED current if the series resistance is 470 Ohm.\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vs=9 #voatage supply(V)\n",
+ "Rs=470.0 #series resistance(Ohm)\n",
+ "Vf=2 #forward approx. voltage\n",
+ " \n",
+ "#Calculation\n",
+ "Is=(Vs-Vf)/Rs\n",
+ "\n",
+ "#Result\n",
+ "print 'LED current Is =',round((Is*1000),2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "LED current Is = 14.89 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-14, Page 169"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 5.14.py\n",
+ "#In figure 5-24, find avg. LED current if the ac source voltage is 20V rms and series resistance is 680 Ohm.\n",
+ "#Also calculate approx. power dissipation in series resistor.\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vac=20 #AC voatage supply(V)\n",
+ "Rs=680.0 #series resistance(KOhm)\n",
+ " \n",
+ "#Calculation\n",
+ "Vacp=1.414*Vac #peak source voltage(V)\n",
+ "Is1=(Vacp/Rs)*1000 #approx. peak current(mA)\n",
+ "Is2=Is1/math.pi #average of half-wave current through LED(mA)\n",
+ "P=(Vac)**2/Rs #Power dissipation(W)\n",
+ "\n",
+ "#Result\n",
+ "print 'approx. peak LED current Is1 =',round(Is1,2),'mA'\n",
+ "print 'average of half-wave current through LED Is2 =',round(Is2,2),'mA'\n",
+ "print 'Power dissipation P =',round(P,2),'W'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "approx. peak LED current Is1 = 41.59 mA\n",
+ "average of half-wave current through LED Is2 = 13.24 mA\n",
+ "Power dissipation P = 0.59 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5-15, Page 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 5.15.py\n",
+ "#Figure 5-25, find capacitor is used instead of resistor. \n",
+ "#what is average LED current if the capacitance is 0.68 uf?\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vs=120 #AC voatage supply(V)\n",
+ "f=60 #frequency(Hz)\n",
+ "C=0.68 #series resistance(KOhm)\n",
+ " \n",
+ "#Calculation\n",
+ "Xc=1/(2*math.pi*f*C)*1000 #capacitive reactance(KOhm)\n",
+ "Vacp=Vs*1.414\n",
+ "Is1=(Vacp/Xc) #approx. peak current(mA)\n",
+ "Is2=Is1/math.pi #average current through LED(mA)\n",
+ "\n",
+ "#Result\n",
+ "print 'Capacitance reactance Xc = ',round(Xc,2),'KOhm'\n",
+ "print 'approx. peak LED current Is1 =',round(Is1,2),'mA'\n",
+ "print 'average current through LED Is2 =',round(Is2,2),'mA'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacitance reactance Xc = 3.9 KOhm\n",
+ "approx. peak LED current Is1 = 43.5 mA\n",
+ "average current through LED Is2 = 13.85 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file