diff options
16 files changed, 6164 insertions, 0 deletions
diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter1.ipynb b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter1.ipynb new file mode 100644 index 00000000..6b40d1a4 --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter1.ipynb @@ -0,0 +1,528 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Semiconductor Diodes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Thermal Voltage= 25.875 mV\n" + ] + } + ], + "source": [ + "k=1.38*(10**(-23)) #boltzmann's constant\n", + "t=273+27 #converting given temperature to Kelvin\n", + "q=1.6*(10**(-19)) #charge on an electron\n", + "\n", + "# V=(k*t)/q\n", + "\n", + "V=(k*t)/q\n", + "V=V*1000 #converting result in millivolts\n", + "print \"Thermal Voltage=\",V,\"mV\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2 (a)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage across Germanium diode= 0.2 V\n", + "Voltage across Silicon diode = 0.6 V\n", + "Voltage across GaAs diode = 1.1 V\n" + ] + } + ], + "source": [ + "Id= 1 #in mA, current across diodes\n", + "#from the standard graph for Ge,Si, and GaAs diodes\n", + "Vge=0.2\n", + "Vsi=0.6\n", + "Vgaas=1.1\n", + "print \"Voltage across Germanium diode=\",Vge,\"V\"\n", + "print \"Voltage across Silicon diode =\",Vsi,\"V\"\n", + "print \"Voltage across GaAs diode =\",Vgaas,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2 (b)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage across Germanium diode= 0.3 V\n", + "Voltage across Silicon diode = 0.7 V\n", + "Voltage across GaAs diode = 1.2 V\n" + ] + } + ], + "source": [ + "Id= 4 #in mA, current across diodes\n", + "#from the standard graph for Ge,Si, and GaAs diodes\n", + "Vge=0.3\n", + "Vsi=0.7\n", + "Vgaas=1.2\n", + "print \"Voltage across Germanium diode=\",Vge,\"V\"\n", + "print \"Voltage across Silicon diode =\",Vsi,\"V\"\n", + "print \"Voltage across GaAs diode =\",Vgaas,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2 (c)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage across Germanium diode= 0.42 V\n", + "Voltage across Silicon diode = 0.82 V\n", + "Voltage across GaAs diode = 1.33 V\n" + ] + } + ], + "source": [ + "Id=30 #in mA, current across diodes\n", + "#from the standard graph for Ge,Si, and GaAs diodes\n", + "Vge=0.42\n", + "Vsi=0.82\n", + "Vgaas=1.33\n", + "print \"Voltage across Germanium diode=\",Vge,\"V\"\n", + "print \"Voltage across Silicon diode =\",Vsi,\"V\"\n", + "print \"Voltage across GaAs diode =\",Vgaas,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2 (d)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Average Volatge value for Germanium Diode= 0.307 V\n", + "Average Volatge value for Silicon Diode= 0.707 V\n", + "Average Volatge value for GaAs Diode= 1.21 V\n" + ] + } + ], + "source": [ + "#Average value for Germanium\n", + "Vg=(0.2+0.3+0.42)/3\n", + "#Average value for Silicon\n", + "Vs=(0.6+0.7+0.82)/3\n", + "#Average value for GaAs\n", + "Vgs=(1.1+1.2+1.33)/3\n", + "print \"Average Volatge value for Germanium Diode=\",round(Vg,3),\"V\"\n", + "print \"Average Volatge value for Silicon Diode=\",round(Vs,3),\"V\"\n", + "print \"Average Volatge value for GaAs Diode=\",round(Vgs,3),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2 (e)" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Very close correspondence between knee voltage and average voltage\n", + "Germanium 0.3 V vs 0.307 V\n", + "Silicon 0.7 V vs 0.707 V\n", + "GaAs 1.2 V vs 1.21 V\n" + ] + } + ], + "source": [ + "#comparing average values in d with the standard knee voltages\n", + "#Average value for Germanium\n", + "Vg=(0.2+0.3+0.42)/3\n", + "#Average value for Silicon\n", + "Vs=(0.6+0.7+0.82)/3\n", + "#Average value for GaAs\n", + "Vgs=(1.1+1.2+1.33)/3\n", + "kge=0.3\n", + "ksi=0.7\n", + "kgaas=1.2\n", + "print \"Very close correspondence between knee voltage and average voltage\"\n", + "print \"Germanium\",kge,\"V vs\",round(Vg,3),\"V\"\n", + "print \"Silicon\",ksi,\"V vs\",round(Vs,3),\"V\"\n", + "print \"GaAs\",kgaas,\"V vs\",round(Vgs,3),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## There is a Repeatation of Example 1.2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dc resistance= 250.0 ohms\n" + ] + } + ], + "source": [ + "Id=2*(10**(-3)) #in ampere\n", + "Vd=0.5 #in volts\n", + "rd=Vd/Id\n", + "print \"dc resistance=\",rd,\"ohms\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dc resistance 40.0 ohms\n" + ] + } + ], + "source": [ + "Id=20*(10**(-3)) #in ampere\n", + "Vd=0.8 #in volts\n", + "rd=Vd/Id\n", + "print \"dc resistance=\",rd,\"ohms\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2(c)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dc resistance= 10.0 Mohms\n" + ] + } + ], + "source": [ + "#Id=-Is\n", + "Id=1*(10**(-6)) #in ampere\n", + "Vd=-10 #in volts\n", + "rd=abs(Vd)/Id\n", + "rd=rd/(10**(6))\n", + "print \"dc resistance=\",rd,\"Mohms\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ac resistance= 27.5 ohms\n" + ] + } + ], + "source": [ + "# drawing tangent at Id=2mA and choosing any random points n the tangent to gwt two set of values of Id and Vd\n", + "Id1=4*(10**(-3)) #IN ampere\n", + "Id2=0 #IN ampere\n", + "Vd1=0.76 #IN VOLTS\n", + "Vd2=0.65 #IN VOLTS \n", + "X=Id1-Id2\n", + "Y=Vd1-Vd2\n", + "rd=Y/X\n", + "print \"ac resistance=\",rd,\"ohms\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ac resistance= 2.0 ohms\n" + ] + } + ], + "source": [ + "# drawing tangent at Id=2mA and choosing any random points n the tangent to gwt two set of values of Id and Vd\n", + "Id1=30*(10**(-3)) #IN ampere\n", + "Id2=20*(10**(-3)) #IN ampere\n", + "Vd1=0.80 #IN VOLTS\n", + "Vd2=0.78 #IN VOLTS \n", + "X=Id1-Id2\n", + "Y=Vd1-Vd2\n", + "rd=Y/X\n", + "print \"ac resistance=\",rd,\"ohms\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3(c)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Dc resistance= 350.0 ohms exceeds ac resistance= 27.5 ohms\n", + "Dc resistance= 31.6 ohms exceeds ac resistance= 2 ohms\n" + ] + } + ], + "source": [ + "#calculating Dc resistance\n", + "#Case-1\n", + "Id1=2*(10**(-3)) #in ampere\n", + "Vd1=0.7 #in volts\n", + "Rd=Vd1/Id1\n", + "rd=27.5 #ac resistance in ohms\n", + "if Rd>rd:\n", + " print \"Dc resistance=\",Rd,\"ohms exceeds ac resistance=\",rd,\"ohms\"\n", + "else:\n", + " print \"Dc resistance=\",Rd,\"ohms didnot exceeds ac resistance=\",rd,\"ohms\"\n", + "\n", + "#Case-2\n", + "Id1=25*(10**(-3)) #in ampere\n", + "Vd1=0.79 #in volts\n", + "Rd=Vd1/Id1\n", + "rd=2 #ac resistance in ohms\n", + "if Rd>rd:\n", + " print \"Dc resistance=\",Rd,\"ohms exceeds ac resistance=\",rd,\"ohms\"\n", + "else:\n", + " print \"Dc resistance=\",Rd,\"ohms didnot exceeds ac resistance=\",rd,\"ohms\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "New potential across zener diode= 10.54 V\n" + ] + } + ], + "source": [ + "#Equation- change in Cvz=(Tc*Vz*(t1-t0))/100%\n", + "Tc=0.072 #unit %/celsius\n", + "t1=100 #in celsius\n", + "t0=25 #in celsius\n", + "Vz=10 #in volts\n", + "Cvz=(Tc*Vz*(t1-t0))/100\n", + "nVz=Vz+Cvz #new Vz\n", + "print \"New potential across zener diode=\",nVz,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The range of Wavelength for the frequency of Visible lightis 750 nm to 400 nm\n" + ] + } + ], + "source": [ + "#Equation wavelength(x)=c/f,where c=speed of light and f=frequency of the light\n", + "c=3*(10**(8))*(10**(9)) #in nm/s\n", + "x1=(c/(400*(10**12))) #in nm\n", + "x2=c/(750*(10**12)) #in nm\n", + "print \"The range of Wavelength for the frequency of Visible lightis\",x1,\"nm to\",x2,\"nm\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python [Root]", + "language": "python", + "name": "Python [Root]" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.12" + }, + "widgets": { + "state": {}, + "version": "1.1.2" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter10.ipynb b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter10.ipynb new file mode 100644 index 00000000..af056e34 --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter10.ipynb @@ -0,0 +1,934 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter-10 Operational Amplifiers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.1 Page number-598" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The DC voltage = 4.1 V\n", + "Collector current= 1.26 mA\n", + "Emitter current= 2.5 mA\n" + ] + } + ], + "source": [ + "#from the given circuit:\n", + "Vee=9 #supply in volts\n", + "Re=3.3 #emitter resistance in Kohm\n", + "Rc=3.9 #collector resistance in Kohm\n", + "Vcc=9 #supply voltage in volts\n", + "\n", + "#Calculation:\n", + "\n", + "Ie=(Vee-0.7)/Re #emitter current in mA\n", + "Ic=Ie/2 #collector current in mA\n", + "Vc=Vcc-(Ic*Rc) #Dc voltage in volts\n", + "\n", + "print \"The DC voltage =\",round(Vc,1),\"V\"\n", + "print \"Collector current=\",round(Ic,2),\"mA\"\n", + "print \"Emitter current=\",round(Ie,1),\"mA\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.2 Page number-601" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Output AC voltage = 174.5 mV\n" + ] + } + ], + "source": [ + "#from the given circuit:\n", + "Vee=9 #supply in volts\n", + "Re=43.0 #emitter resistance in Kohm\n", + "Rc=47.0 #collector resistance in Kohm\n", + "Vcc=9 #supply voltage in volts\n", + "Vi=2 #input voltage in mV\n", + "\n", + "#Calculation:\n", + "\n", + "Ie=((Vee-0.7)/Re)*1000 #emitter current in microA\n", + "Ic=Ie/2 #collector current in microA\n", + "Vc=Vcc-((Ic*Rc)/1000) #Dc voltage in volts\n", + "re=(26/Ic)/1000 #in ohms\n", + "A=Rc/(2*re) #Ac voltage gain \n", + "Vo=(A/1000)*Vi #Output ac voltage in volts\n", + "\n", + "print \"The Output AC voltage =\",round(Vo,1),\"mV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.3 Page number-603" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Common mode gain of the given amplifier (A): 0.54\n" + ] + } + ], + "source": [ + "#for the given circuit:\n", + "B=75\n", + "Rc=47.0 #collector resistance in Kohm\n", + "ri=20 #in Kohm\n", + "Re=43.0 #emitter resistance in Kohm\n", + "\n", + "#Common mode gain of the given amplifier (A):\n", + "A=(B*Rc)/(ri+2*(B+1)*Re)\n", + "\n", + "print \"Common mode gain of the given amplifier (A):\",round(A,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.4 Page number-604" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Common mode gain of the given amplifier (A): 0.0247\n" + ] + } + ], + "source": [ + "#for the given circuit:\n", + "B=75\n", + "Rc=10.0 #collector resistance in Kohm\n", + "ri=11 #in Kohm\n", + "Re=200.0 #emitter resistance in Kohm\n", + "\n", + "#Common mode gain of the given amplifier (A):\n", + "A=(B*Rc)/(ri+2*(B+1)*Re)\n", + "\n", + "print \"Common mode gain of the given amplifier (A):\",round(A,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.5 Page number-610" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output voltage of the inverting amplifier: -10.0 V\n" + ] + } + ], + "source": [ + "#for the given Inverting circuit:\n", + "Vi=2 #input voltage in volts\n", + "Rf=500.0 #feedback resistance in Kohm\n", + "R1=100.0 #input resistance in Kohm\n", + "\n", + "#Output voltage Vo:\n", + "Vo=-(Rf*Vi)/(R1)\n", + "\n", + "print \"Output voltage of the inverting amplifier:\",round(Vo,2),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.6 Page number-611" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output voltage of the non-inverting amplifier: 12.0 V\n" + ] + } + ], + "source": [ + "#for the given non-Inverting circuit:\n", + "Vi=2 #input voltage in volts\n", + "Rf=500.0 #feedback resistance in Kohm\n", + "R1=100.0 #input resistance in Kohm\n", + "\n", + "#Output voltage Vo:\n", + "Vo=(1+(Rf/R1))*Vi\n", + "\n", + "print \"Output voltage of the non-inverting amplifier:\",round(Vo,2),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.7(a) Page number-612" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output voltage of the Summing amplifier: -7.0 V\n" + ] + } + ], + "source": [ + "#for the given summing amplifier circuit:\n", + "V1=1 #input voltage in volts\n", + "V2=2 #input voltage in volts\n", + "V3=3 #input voltage in volts\n", + "R1=500.0 #input resistance in Kohm\n", + "R2=1000.0 #input resistance in Kohm\n", + "R3=1000.0 #input resistance in Kohm\n", + "Rf=1000.0 #feedback resistance in Kohm\n", + "\n", + "#calculation:\n", + "\n", + "X1=(Rf/R1)*V1 #temporary value\n", + "X2=(Rf/R2)*V2 #temporary value\n", + "X3=(Rf/R3)*V3 #temporary value\n", + "\n", + "#Output voltage Vo:\n", + "Vo=-(X1+X2+X3)\n", + "\n", + "print \"Output voltage of the Summing amplifier:\",round(Vo,2),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.7(b) Page number-612" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output voltage of the Summing amplifier: 3.0 V\n" + ] + } + ], + "source": [ + "#for the given summing amplifier:\n", + "V1=-2 #input voltage in volts\n", + "V2=3 #input voltage in volts\n", + "V3=1 #input voltage in volts\n", + "R1=200.0 #input resistance in Kohm\n", + "R2=500.0 #input resistance in Kohm\n", + "R3=1000.0 #input resistance in Kohm\n", + "Rf=1000.0 #feedback resistance in Kohm\n", + "\n", + "#calculation:\n", + "\n", + "X1=(Rf/R1)*V1 #temporary value\n", + "X2=(Rf/R2)*V2 #temporary value\n", + "X3=(Rf/R3)*V3 #temporary value\n", + "\n", + "#Output voltage Vo:\n", + "Vo=-(X1+X2+X3)\n", + "\n", + "print \"Output voltage of the Summing amplifier:\",round(Vo,2),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.8 Page number-616" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output offset voltage of the amplifier: 91.2 mV\n" + ] + } + ], + "source": [ + "#for the given amplifier circuit:\n", + "Vi=1.2*(10**-3) #input voltage in volts\n", + "Rf=150.0 #feedback resistance in Kohm\n", + "R1=2.0 #input resistance in Kohm\n", + "\n", + "#Output offset voltage Vo:\n", + "Vo=((R1+Rf)/R1)*Vi #in volts\n", + "Vo=Vo*1000 #output voltage in mVolts\n", + "\n", + "print \"Output offset voltage of the amplifier:\",round(Vo,2),\"mV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.9 Page number-617" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output offset voltage of the amplifier: 15.0 mV\n" + ] + } + ], + "source": [ + "#for the given amplifier circuit:\n", + "Ii=100 #input current in nA\n", + "Rf=150.0 #feedback resistance in Kohm\n", + "\n", + "#Output offset voltage Vo:\n", + "Vo=Ii*(10**-3)*Rf #in mVolts\n", + "\n", + "print \"Output offset voltage of the amplifier:\",round(Vo,2),\"mV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.10 Page number-617" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output offset voltage due to Vi: 404.0 mV\n", + "Output offset voltage due to Ii: 75.0 mV\n", + "Total offset voltage of the amplifier: 479.0 mV\n" + ] + } + ], + "source": [ + "#for the given amplifier circuit:\n", + "Vi=4.0*(10**-3) #input voltage in volts\n", + "Rf=500.0 #feedback resistance in Kohm\n", + "R1=5.0 #input resistance in Kohm\n", + "Ii=150 #input current in nA\n", + "\n", + "#Output offset voltage Vo1(due to Vi):\n", + "Vo1=((R1+Rf)/R1)*Vi #in volts\n", + "Vo1=Vo1*1000 #output voltage in mVolts\n", + "\n", + "#Output offset voltage Vo2(due to Ii):\n", + "Vo2=Ii*(10**-3)*Rf #in mVolts\n", + "\n", + "Total=Vo1+Vo2 #in mvolts\n", + "\n", + "print \"Output offset voltage due to Vi:\",round(Vo1,2),\"mV\"\n", + "print \"Output offset voltage due to Ii:\",round(Vo2,2),\"mV\"\n", + "print \"Total offset voltage of the amplifier:\",round(Total,2),\"mV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.11 Page number-618" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "input bias current at first input: 32.5 nA\n", + "input bias current at second input: 27.5 nA\n" + ] + } + ], + "source": [ + "#for the given amplifier:\n", + "Ii=5.0 #input current in nA\n", + "Ib=30 #average input bias current in nA\n", + "\n", + "#calculation:\n", + "Ib1=Ib+(Ii/2) #input bias current at first input in nA\n", + "Ib2=Ib-(Ii/2) #input bias current at second input in nA\n", + "\n", + "print \"input bias current at first input:\",Ib1,\"nA\"\n", + "print \"input bias current at second input:\",Ib2,\"nA\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.12 Page number-619" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cut-off frequency Fc: 5 Hz\n" + ] + } + ], + "source": [ + "#for the given amplifier:\n", + "f1=1*(10**6) #frequency in Hz\n", + "Avd=200 #Gain of the amplifier in V/mV\n", + "\n", + "#cut-off frequency(fc):\n", + "fc=f1/(Avd*(10**3)) #cut-off frequency in Hz\n", + "\n", + "print \"The cut-off frequency Fc:\",fc,\"Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.13 Page number-620" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum closed loop gain: 40.0\n" + ] + } + ], + "source": [ + "#from the given question:\n", + "Sr=2 #slew rate in V/microS\n", + "Vic=0.5 #change in input signal(during time t)in volts\n", + "t=10 #time of change of input signal in microS\n", + "\n", + "#calculation:\n", + "X=Vic/t #rate of change in input signal in V/microS\n", + "Acl=Sr/X #maximum closed-loop gain\n", + "\n", + "print \"Maximum closed loop gain:\",Acl" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.14 Page number-620" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "No output distortion\n" + ] + } + ], + "source": [ + "#for the given amplifier circuit:\n", + "Sr=0.5 #slew rate in V/microS\n", + "Vi=0.02 #input voltage in volts\n", + "Rf=240.0 #feedback resistance in Kohm\n", + "R1=10.0 #input resistance in Kohm\n", + "w=300*(10**3) #frequency in rad/s\n", + "K=0.48\n", + "\n", + "#calculation:\n", + "Acl=Rf/R1 #closed loop gain\n", + "K=Acl*Vi #output voltage in volts\n", + "x=(Sr/K)*(10**6) #maximum frequency value in rad/s\n", + "\n", + "if(w<=x):\n", + " print \"No output distortion\"\n", + "else:\n", + " print \"Distortion in output\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.15 Page number-621" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current drawn from the power supply: 20.83 mA\n" + ] + } + ], + "source": [ + "#from the data given in the question:\n", + "V=12.0 #dual power supply in volts\n", + "P=500 #power dissipated in mW\n", + "\n", + "#Curent drawn I:\n", + "I=(P/2)/V\n", + "\n", + "print \"Current drawn from the power supply:\",round(I,2),\"mA\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.16 Page number-624" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output offset voltage due to Vi: 31.0 mV\n", + "Output offset voltage due to Ii: 7.2 mV\n", + "Total offset voltage of the amplifier: 38.2 mV\n" + ] + } + ], + "source": [ + "#from the given circuit:\n", + "Vio=1 #input voltage in mV\n", + "Rf=360.0 #feedback resistance in Kohm\n", + "R1=12.0 #input resistance in Kohm\n", + "Ii=20 #input current in nA\n", + "\n", + "#Output offset voltage Vo1(due to Vio):\n", + "Vo1=((R1+Rf)/R1)*Vio #in mV\n", + "\n", + "#Output offset voltage Vo2(due to Ii):\n", + "Vo2=Ii*(10**-3)*Rf #in mVolts\n", + "\n", + "Total=Vo1+Vo2 #in mvolts\n", + "\n", + "print \"Output offset voltage due to Vi:\",round(Vo1,2),\"mV\"\n", + "print \"Output offset voltage due to Ii:\",round(Vo2,2),\"mV\"\n", + "print \"Total offset voltage of the amplifier:\",round(Total,2),\"mV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.17 Page number-624" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Closed loop gain Acl: -30\n", + "Input Impedance Zi: 12 Kohm\n", + "Output Impedance Zo= 0.011 ohm\n" + ] + } + ], + "source": [ + "#for the 741 Op-amp:\n", + "r0=75.0 #resistance in ohm\n", + "A=200*(10**3) #gain\n", + "Rf=360 #feedback resistor in Kohm\n", + "R1=12 #input resistor in Kohm\n", + "B=1.0/30\n", + "#calculation:\n", + "Acl=-Rf/R1 #(a)Closed loop gain \n", + "Zi=R1 #(b)input impedance in Kohm\n", + "Zo=r0/(1+B*A) #(c)output impedance in ohm\n", + "\n", + "print \"Closed loop gain Acl:\",Acl\n", + "print \"Input Impedance Zi:\",Zi,\"Kohm\"\n", + "print \"Output Impedance Zo=\",round(Zo,3),\"ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.18 Page number-625" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cut-off frequency fc: 50 Hz\n" + ] + } + ], + "source": [ + "#from th given characterstics:\n", + "f1=1*(10**6) #frequency in Hz\n", + "Avd=20000 #large signal amplification\n", + "\n", + "fc=f1/Avd #cut-off frequency\n", + "print \"Cut-off frequency fc:\",fc,\"Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.19 Page number-625" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum frequencyof the input signal: 106.2 kHz\n" + ] + } + ], + "source": [ + "#from th given data:\n", + "Vi=25*(10**-3) #input voltage in V\n", + "Acl=30 #closed-loop gain\n", + "Sr=0.5 #slew rate in V/microS\n", + "\n", + "#Calculation:\n", + "K=Acl*Vi #output gain factor\n", + "fm=Sr/(2*3.14*K) #maximum frequency in kHz\n", + "\n", + "print \"maximum frequencyof the input signal:\",round(fm*1000,1),\"kHz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.20 Page number-626" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Open loop voltage gain: 158489.3\n" + ] + } + ], + "source": [ + "import math\n", + "#from the given figure:\n", + "Vcc=12.0 #supply voltage in volts\n", + "Avd=104.0 #open loop Gain in dB\n", + "\n", + "Avdc=10**(Avd/20) #open loop voltage gain\n", + "print \"Open loop voltage gain:\",round(Avdc,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.21 Page number-628" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Value of CMRR in dB: 56.48 dB\n" + ] + } + ], + "source": [ + "import math\n", + "#from the given circuit:\n", + "#Differntial mode:\n", + "Vo=8.0 #output voltage in volts\n", + "Vd=1*(10**-3) #input voltage in volts\n", + "Ad=Vo/Vd #Gain\n", + "\n", + "#Common Mode operation:\n", + "Voc=12.0 #output voltage in mV\n", + "Vc=1 #input voltage in mV\n", + "Adc=Voc/Vc #Gain\n", + "\n", + "CMRR=round(Ad/Adc,1)\n", + "CMRR=20*math.log10(CMRR) #CMRR in dB\n", + "\n", + "print \"Value of CMRR in dB:\",round(CMRR,2),\"dB\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.22(a) Page number-629" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output voltage of the Op-amp: 45.8 mV\n" + ] + } + ], + "source": [ + "#from the given question:\n", + "Vi1=150.0 #first input voltage in microV\n", + "Vi2=140.0 #second input voltage in microV\n", + "Ad=4000.0 #differential gain\n", + "CMRR=100.0\n", + "\n", + "#Calculation:\n", + "Vd=Vi1-Vi2 #differential voltage in microV\n", + "Vc=0.5*(Vi1+Vi2) #common mode voltage\n", + "\n", + "Vo=Ad*Vd*(1+((1/CMRR)*(Vc/Vd)))\n", + "\n", + "print \"Output voltage of the Op-amp:\",round(Vo/1000,2),\"mV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-10.22(b) Page number-629" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output voltage of the Op-amp: 40.006 mV\n" + ] + } + ], + "source": [ + "#from the given question:\n", + "Vi1=150.0 #first input voltage in microV\n", + "Vi2=140.0 #second input voltage in microV\n", + "Ad=4000.0 #differential gain\n", + "CMRR=100000.0\n", + "\n", + "#Calculation:\n", + "Vd=Vi1-Vi2 #differential voltage in microV\n", + "Vc=0.5*(Vi1+Vi2) #common mode voltage\n", + "\n", + "Vo=Ad*Vd*(1+((1/CMRR)*(Vc/Vd)))\n", + "\n", + "print \"Output voltage of the Op-amp:\",round(Vo/1000,3),\"mV\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python [Root]", + "language": "python", + "name": "Python [Root]" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.12" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter11.ipynb b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter11.ipynb new file mode 100644 index 00000000..4f097148 --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter11.ipynb @@ -0,0 +1,513 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter-11 Op-Amp Applications" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-11.1" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output voltage= -0.25 mV\n" + ] + } + ], + "source": [ + "Rf=200.0 #in kohm(feedback resistor)\n", + "R1=2.0 #in kohm\n", + "Vi=2.5*(10**-3) #converting microV to mV(Input voltage)\n", + "\n", + "A=-Rf/R1 #gain of op-amp\n", + "Vo=A*Vi #output voltage in volts\n", + "print \"Output voltage=\",Vo,\"mV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-11.2" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output voltage= 12.12 mV\n" + ] + } + ], + "source": [ + "Rf=240.0 #in kohm(feedback resistor)\n", + "R1=2.4 #in kohm\n", + "Vi=120*(10**-3) #converting microV to mV(Input voltage)\n", + "\n", + "A=1+(Rf/R1) #gain of op-amp\n", + "Vo=A*Vi #output voltage in volts\n", + "print \"Output voltage=\",Vo,\"mV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-11.3" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output voltage= -1.79 V\n" + ] + } + ], + "source": [ + "Rf=470 #in kohm(feedback resistor)\n", + "R1=4.3 #in kohm\n", + "R2=33.0 #in kohm\n", + "R3=33.0 #in kohm\n", + "Vi=80*(10**-6) #converting microV to V(Input voltage)\n", + "\n", + "#Total gain(A)=A1*A2*A3\n", + "A=(1+(Rf/R1))*(-Rf/R2)*(Rf/R3)\n", + "Vo=A*Vi #output voltage in volts\n", + " \n", + "print \"Output voltage=\",round(Vo,2),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-11.4" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required resistors are R1= 30.0 Kohm, R2= 15.0 Kohm, R3= 10.0 Kohm\n", + "Output voltage Vo= 0.729 V\n" + ] + } + ], + "source": [ + "Rf=270.0 #in kohm(feedback resistor)\n", + "Vi=150*(10**-6) #converting microV to V(Input voltage)\n", + "#Case-1:Positive gain\n", + "A1=10 \n", + "R1=Rf/(A1-1)\n", + "#Case-2:Negative gain\n", + "A2=18 \n", + "R2=Rf/A2\n", + "#Case-3:Negative gain\n", + "A3=27\n", + "R3=Rf/A3\n", + "\n", + "#total gain of the circuit A=A1*A2*A3:\n", + "A=A1*A2*A3\n", + "#Output voltage Vo:\n", + "Vo=A*Vi\n", + "print\"Required resistors are R1=\",R1,\"Kohm, R2=\",R2,\"Kohm, R3=\",R3,\"Kohm\"\n", + "print\"Output voltage Vo=\",Vo,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-11.5" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required resistors are R1= 50.0 Kohm, R2= 25.0 Kohm, R3= 10.0 Kohm\n" + ] + } + ], + "source": [ + "Rf=500.0 #in kohm(feedback resistor)\n", + "A1=10 #gain of 1st op-amp\n", + "A2=20 #gain of 2nd op-amp\n", + "A3=50 #gain of 3rd op-amp\n", + "#since all the gain are negative in LM348 IC Op-amp,hence\n", + "R1=Rf/A1\n", + "R2=Rf/A2\n", + "R3=Rf/A3\n", + "\n", + "print\"Required resistors are R1=\",R1,\"Kohm, R2=\",R2,\"Kohm, R3=\",R3,\"Kohm\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-11.6" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output voltage Vo=-[ 0.5 sin(1000t)+ 0.33 sin(3000t)]\n" + ] + } + ], + "source": [ + "#V1=50mVsin(1000t)\n", + "#V2=10mVsin(3000t)\n", + "V1=50*(10**-3) #in volts\n", + "V2=10*(10**-3) #in volts\n", + "Rf=330.0 #in kohm(feedback resistor)\n", + "R1=33 #in kohm\n", + "R2=10 #in kohm\n", + "\n", + "#for the voltage summing circuit,Output voltage Vo:\n", + "Vo=-(Rf/R1)*V1+(Rf/R2)*V2\n", + "\n", + "print \"Output voltage Vo=-[\",(Rf/R1)*V1,\"sin(1000t)+\",(Rf/R2)*V2,\"sin(3000t)]\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-11.7" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output voltage Vo=-[ 20 V2 - 20.0 V1]\n" + ] + } + ], + "source": [ + "Rf=1000.0 #in Kohm(feedback resistor)\n", + "R1=100.0 #in Kohm\n", + "R2=50.0 #in Kohm\n", + "R3=500.0 #in Kohm\n", + "\n", + "#for the voltage subtractor circuit:\n", + "#Output voltage Vo=-(((Rf/R2)*V2)-((Rf/R3)*(Rf/R1)*V1))\n", + "\n", + "print \"Output voltage Vo=-[\",int(Rf/R2),\"V2 -\",int(Rf/R3)*(Rf/R1),\"V1]\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-11.8" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Output voltage Vo=-[ 1 V1 - 1 V2]\n" + ] + } + ], + "source": [ + "Rf=100.0 #in Kohm(feedback resistor)\n", + "R2=100.0 #in Kohm\n", + "R1=20.0 #in Kohm\n", + "R3=20.0 #in Kohm\n", + "\n", + "#for the voltage subtractor circuit,Output voltage Vo:\n", + "#Vo=-(((R3/(R1+R3))*((R2+R4)/R2)*V1)-((R4/R2)*V2))\n", + "\n", + "print \"Output voltage Vo=-[\",int((R3/(R1+R3))*((R2+Rf)/R2)),\"V1 -\",int(Rf/R2),\"V2]\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-11.10(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Il= 4.0 mA\n" + ] + } + ], + "source": [ + "Rf=4.0 #in Kohm(feedback resistor)\n", + "R1=2.0 #in Kohm\n", + "R2=2.0 #in Kohm\n", + "V1=8 #in volts\n", + "\n", + "#for the given circuit:\n", + "Il=V1/R1\n", + "\n", + "print \"Il=\",Il,\"mA\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-11.10(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vo= -20.0 V\n" + ] + } + ], + "source": [ + "Rf=2.0 #in Kohm(feedback resistor)\n", + "I1=10 #mA(input current)\n", + "\n", + "#for the given circuit,Output voltage Vo:\n", + "Vo=-I1*R1\n", + "\n", + "print \"Vo=\",Vo,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-11.11" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vo= 21 (V1-V2)\n" + ] + } + ], + "source": [ + "R=5000 #in ohm\n", + "Rp=500 #in ohm\n", + "#for the given circuit:\n", + "#Output voltage Vo=(1+(2*R)/Rp)*(V1-V2)\n", + "print \"Vo=\",(1+(2*R)/Rp),\"(V1-V2)\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-11.12" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cutoff-frequency Foh: 6.63 kHz\n" + ] + } + ], + "source": [ + "R1=1.2*(10**3) #in ohm\n", + "C1=0.02*(10**-6) #in farad\n", + "\n", + "#for first order low pass filter,Cutoff-frequency Foh:\n", + "Foh=1/(6.28*R1*C1)\n", + "\n", + "print \"Cutoff-frequency Foh:\",round((Foh/1000),2),\"kHz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-11.13" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cutoff-frequency Fol: 1.52 kHz\n" + ] + } + ], + "source": [ + "R1=2.1*(10**3) #in ohm\n", + "R2=R1\n", + "C1=0.05*(10**-6) #in farad\n", + "C2=C1\n", + "#for second order high pass filter,Cutoff-frequency Fol:\n", + "Fol=1/(6.28*R1*C1)\n", + "\n", + "print \"Cutoff-frequency Fol:\",round((Fol/1000),2),\"kHz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-11.14" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cutt-off frequencies are= 159.2 Hz and 7.96 kHz\n" + ] + } + ], + "source": [ + "R1=10.0*(10**3) #in ohm\n", + "R2=R1\n", + "C1=0.1*(10**-6) #in farad\n", + "C2=0.002*(10**-6) #in farad\n", + "\n", + "#for band pass filter,Cutoff-frequencies are:\n", + "Fol=1/(6.28*R1*C1)\n", + "Foh=1/(6.28*R2*C2)\n", + "\n", + "print \"Cutt-off frequencies are=\",round(Fol,1),\"Hz and\",round((Foh/1000),2),\"kHz\"" + ] + } + ], + "metadata": { + "anaconda-cloud": {}, + "kernelspec": { + "display_name": "Python [Root]", + "language": "python", + "name": "Python [Root]" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.12" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter12.ipynb b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter12.ipynb new file mode 100644 index 00000000..424a5907 --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter12.ipynb @@ -0,0 +1,866 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter-12 Power Amplifiers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.1" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Input dc power Pi= 9.65 W\n", + "output ac power Po= 0.625 W\n", + "Efficiency n= 6.5 %\n" + ] + } + ], + "source": [ + "#from the given question:\n", + "Vcc=20 #in volts\n", + "Rb=1 #base resistance in Kohm\n", + "B=25 #gain\n", + "Rc=20 #collector resistance in ohm\n", + "\n", + "#calculation of Q-point Parameters:\n", + "Ibq=(Vcc-0.7)/Rb #base current\n", + "Icq=B*Ibq #collector current\n", + "Vce=Vcc-Icq*Rc #collector -emitter voltage\n", + "\n", + "#when applying ac signal:\n", + "Ib=10 #peak base current value in mA\n", + "Ic=B*Ib #peak collector current in mA\n", + "Ic=Ic*(10**-3) #converting Ic to ampere\n", + "\n", + "Po=(Ic*Ic*Rc)/2 #output ac power in watt\n", + "Pi=Vcc*(Icq*(10**-3)) #input dc power in watt\n", + "\n", + "n=(Po/Pi)*100 #efficiency in %\n", + "\n", + "print \"Input dc power Pi=\",Pi,\"W\"\n", + "print \"output ac power Po=\",Po,\"W\"\n", + "print \"Efficiency n=\",round(n,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.2" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "effective resistance Rl= 1.8 Kohm\n" + ] + } + ], + "source": [ + "#for the given transformer:\n", + "N1=15.0 #no. of turns in primary coil\n", + "N2=1.0 #no. of turns in secondary coil\n", + "Rl=8.0 #load resistance\n", + "\n", + "#as seen looking into the primary coil of the transformer:\n", + "a=N1/N2\n", + "Rle=a*a*Rl\n", + "\n", + "print \"effective resistance Rl=\",(Rle/1000),\"Kohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.3" + ] + }, + { + "cell_type": "code", + "execution_count": 78, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Turn ratio = 25 : 1 \n" + ] + } + ], + "source": [ + "import math\n", + "#for the given transformer:\n", + "Rl=16.0 #load resistance in ohm\n", + "Rle=10*(10**3) #effective load resistance in ohm\n", + "\n", + "#as seen looking into the primary coil of the transformer:\n", + "x=Rle/Rl\n", + "Tr=math.sqrt(x)\n", + "\n", + "print \"Turn ratio =\",int(Tr),\": 1 \"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.5" + ] + }, + { + "cell_type": "code", + "execution_count": 79, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "DC input power Pi= 1.4 W\n", + "power dissipiated by the transistor Pq= 0.923 W\n", + "Efficiency n= 34.1 %\n" + ] + } + ], + "source": [ + "#from the given Question:\n", + "Vcc=10 #supply voltage in volts\n", + "Icq=140*(10**-3) #collector current in ampere\n", + "Po=0.477 #output ac power in watt\n", + "\n", + "#input dc power Pi:\n", + "Pi=Vcc*Icq #in watt \n", + "#power dissipiated Pq:\n", + "Pq=Pi-Po #in watt\n", + "\n", + "#efficiency n:\n", + "n=(Po/Pi)*100 #in %\n", + "\n", + "print \"DC input power Pi=\",Pi,\"W\"\n", + "print \"power dissipiated by the transistor Pq=\",Pq,\"W\"\n", + "print \"Efficiency n=\",round(n,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.6(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency of the amplifier n= 50 %\n" + ] + } + ], + "source": [ + "#for the transformer-coupled class A amplifier:\n", + "\n", + "Vcc=12 #supply voltage in volts\n", + "Vce=Vcc #collector-emitter voltage\n", + "Vp=12 #output voltage in volts\n", + "\n", + "Vcemax=Vce+Vp #maximum value of Vce\n", + "Vcemin=Vce-Vp #minimum value of Vce\n", + "x=(Vcemax-Vcemin)/(Vcemax+Vcemin)\n", + "n=50*(x*x)\n", + "\n", + "print \"Efficiency of the amplifier n=\",n,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.6(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 81, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency of the amplifier n= 12.5 %\n" + ] + } + ], + "source": [ + "#for the transformer-coupled class A amplifier:\n", + "\n", + "Vcc=12 #supply voltage in volts\n", + "Vce=Vcc #collector-emitter voltage\n", + "Vp=6.0 #output voltage in volts\n", + "\n", + "Vcemax=Vce+Vp #maximum value of Vce\n", + "Vcemin=Vce-Vp #minimum value of Vce\n", + "\n", + "x=((Vcemax-Vcemin)/(Vcemax+Vcemin))\n", + "n=50*x*x\n", + "\n", + "print \"Efficiency of the amplifier n=\",n,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.6(c)" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency of the amplifier n= 1.39 %\n" + ] + } + ], + "source": [ + "#for the transformer-coupled class A amplifier:\n", + "\n", + "Vcc=12 #supply voltage in volts\n", + "Vce=Vcc #collector-emitter voltage\n", + "Vp=2.0 #output voltage in volts\n", + "\n", + "Vcemax=Vce+Vp #maximum value of Vce\n", + "Vcemin=Vce-Vp #minimum value of Vce\n", + "\n", + "x=((Vcemax-Vcemin)/(Vcemax+Vcemin))\n", + "n=50*x*x\n", + "\n", + "print \"Efficiency of the amplifier n=\",round(n,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.7" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Input dc power Pi= 23.9 W\n", + "output ac power Po= 12.5 W\n", + "Efficiency n= 52.3 %\n" + ] + } + ], + "source": [ + "#for the transformer-coupled class B amplifier:\n", + "\n", + "Vcc=30 #supply voltage in volts\n", + "Vp=20 #output voltage in volts\n", + "Rl=16.0 #load resistance in ohm\n", + "\n", + "#calculation:\n", + "Ilp=Vp/Rl #peak load current in ampere\n", + "Idc=(2*Ilp)/3.14 #dc value of current drawn from power supply im ampere\n", + "Pi=Vcc*Idc #input dc power in watt\n", + "Po=(Vp*Vp)/(2*Rl) #output ac power in watt\n", + "\n", + "n=(Po/Pi)*100 #efficiency in %\n", + "\n", + "print \"Input dc power Pi=\",round(Pi,1),\"W\"\n", + "print \"output ac power Po=\",Po,\"W\"\n", + "print \"Efficiency n=\",round(n,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.8" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "DC input power Pi= 35.83 W\n", + "AC output power Po= 28.125 W\n", + "maximum power dissipiated by each transistor Pmax= 5.7 W\n" + ] + } + ], + "source": [ + "#for the transformer-coupled class B amplifier:\n", + "\n", + "Vcc=30 #supply voltage in volts\n", + "Rl=16.0 #load resistance in ohm\n", + "\n", + "#calculation:\n", + "Po=(Vcc*Vcc)/(2*Rl) #output ac power in watt\n", + "Pi=(2*Vcc*Vcc)/(Rl*3.14) #input dc power in watt\n", + "n=(Po/Pi)*100 #efficiency in %\n", + "Pmax=(0.5*2*Vcc*Vcc)/(Rl*3.14*3.14) #maximum power dissipiated\n", + "\n", + "\n", + "print \"DC input power Pi=\",round(Pi,2),\"W\"\n", + "print \"AC output power Po=\",round(Po,3),\"W\"\n", + "print \"maximum power dissipiated by each transistor Pmax=\",round(Pmax,1),\"W\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.9(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 85, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency n= 72.0 %\n" + ] + } + ], + "source": [ + "#for the transformer-coupled class B amplifier:\n", + "\n", + "Vcc=24.0 #supply voltage in volts\n", + "Vp=22.0 #output voltage in volts\n", + "\n", + "#calculation:\n", + "n=78.54*(Vp/Vcc) #efficiency in %\n", + "\n", + "print \"Efficiency n=\",round(n,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.9(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 86, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency n= 19.6 %\n" + ] + } + ], + "source": [ + "#for the transformer-coupled class B amplifier:\n", + "\n", + "Vcc=24.0 #supply voltage in volts\n", + "Vp=06.0 #output voltage in volts\n", + "\n", + "#calculation:\n", + "n=78.54*(Vp/Vcc) #efficiency in %\n", + "\n", + "print \"Efficiency n=\",round(n,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.10" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "DC input power Pi= 67.56 W\n", + "AC output power Po= 36.0 W\n", + "maximum power dissipiated by each transistor Pmax= 15.8 W\n", + "Efficiency n= 53.3 %\n" + ] + } + ], + "source": [ + "import math\n", + "#for the given circuit:\n", + "Vrms=12 #supply volts in rms voltage\n", + "Vcc=25 #in volts\n", + "Rl=4.0 #load resistance in ohm\n", + "\n", + "#Calculation:\n", + "Vi=math.sqrt(2)*Vrms #peak input voltage in volts\n", + "Vl=Vi #voltage across load as gain=1\n", + "Po=(Vl*Vl)/(2*Rl) #Output power across load in watt\n", + "\n", + "Il=Vl/Rl #peak load current in ampere\n", + "Idc=(2*Il)/3.14 #dc current from supplies\n", + "\n", + "Pi=Vcc*Idc #power supplied to circuit in watt\n", + "\n", + "Pq=(Pi-Po)/2 #power dissipiated\n", + "\n", + "n=(Po/Pi)*100 #efficiency in %\n", + "\n", + "\n", + "print \"DC input power Pi=\",round(Pi,2),\"W\"\n", + "print \"AC output power Po=\",round(Po,2),\"W\"\n", + "print \"maximum power dissipiated by each transistor Pmax=\",round(Pq,1),\"W\"\n", + "print \"Efficiency n=\",round(n,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Note:variation in result may occur because of different values of root 2 taken according to the precision" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.11" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "DC input power Pi= 99.46 W\n", + "AC output power Po= 78.125 W\n", + "maximum power dissipiated by each transistor Pmax= 21.3 W\n", + "Efficiency n= 78.5 %\n" + ] + } + ], + "source": [ + "#for the given circuit:\n", + "Vrms=12 #supply volts in rms voltage\n", + "Vcc=25 #in volts\n", + "Rl=4.0 #load resistance in ohm\n", + "\n", + "#Calculation:\n", + "Pi=(2*Vcc*Vcc)/(Rl*3.142) #Input power\n", + "Po=(Vcc*Vcc)/(2*Rl) #Output power in watt\n", + "n=(Po/Pi)*100 #efficiency in %\n", + "\n", + "Pq=(Pi-Po) #power dissipiated\n", + "Vl=Vp #condition to achieve maximum power operation\n", + "\n", + "print \"DC input power Pi=\",round(Pi,2),\"W\"\n", + "print \"AC output power Po=\",round(Po,3),\"W\"\n", + "print \"maximum power dissipiated by each transistor Pmax=\",round(Pq,1),\"W\"\n", + "print \"Efficiency n=\",round(n,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.12" + ] + }, + { + "cell_type": "code", + "execution_count": 89, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum power dissipiated= 31.65 W\n", + "Input voltage for maximum power dissipiated= 15.9 V\n" + ] + } + ], + "source": [ + "#for the given circuit:\n", + "Vrms=12 #supply volts in rms voltage\n", + "Vcc=25 #in volts\n", + "Rl=4.0 #load resistance in ohm\n", + "\n", + "#Calculation:\n", + "Pmax=(2*Vcc*Vcc)/(3.142*3.142*Rl) #maximum power dissipiated in watt\n", + "Vl=0.636*Vcc #input voltage for maximum power dissipiation in volts\n", + "\n", + "print \"maximum power dissipiated=\",round(Pmax,2),\"W\"\n", + "print \"Input voltage for maximum power dissipiated=\",Vl,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.13" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Second harmonic distortion D2= 10.0 %\n", + " Third harmonic distortion D3= 4.0 %\n", + " Fourth harmonic distortion D4= 2.0 %\n" + ] + } + ], + "source": [ + "#for the given output signal:\n", + "A1=2.5 #fundamental amplitude in volts\n", + "A2=0.25 #second harmonic amplitude in volts\n", + "A3=0.1 #Third harmonic amplitude in volts\n", + "A4=0.05 #Fourth harmonic amplitude in volts\n", + "\n", + "#calculating Harmonic Distortions:\n", + "D2=(A2/A1)*100\n", + "D3=(A3/A1)*100\n", + "D4=(A4/A1)*100\n", + "\n", + "print \" Second harmonic distortion D2=\",D2,\"%\"\n", + "print \" Third harmonic distortion D3=\",D3,\"%\"\n", + "print \" Fourth harmonic distortion D4=\",D4,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.14" + ] + }, + { + "cell_type": "code", + "execution_count": 91, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total harmonic Distortion THD= 10.95 %\n" + ] + } + ], + "source": [ + "import math\n", + "#for the given output signal:\n", + "A1=2.5 #fundamental amplitude in volts\n", + "A2=0.25 #second harmonic amplitude in volts\n", + "A3=0.1 #Third harmonic amplitude in volts\n", + "A4=0.05 #Fourth harmonic amplitude in volts\n", + "\n", + "#calculating Harmonic Distortions:\n", + "D2=(A2/A1)\n", + "D3=(A3/A1)\n", + "D4=(A4/A1)\n", + "\n", + "THD=math.sqrt((D2*D2)+(D3*D3)+(D4*D4))*100\n", + "\n", + "print \"Total harmonic Distortion THD=\",round(THD,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.15(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "second harmonic distortion D2= 2.38 %\n" + ] + } + ], + "source": [ + "Vcemin=1.0 #maximum value of collector emitter voltage in volts\n", + "Vcemax=22.0 #minimum value of collector emitter voltage in volts\n", + "Vceq=12.0 #collector emitter voltage in volts at Q-point\n", + " \n", + "x=(Vcemax+Vcemin)/2.0 #temporary variable\n", + "\n", + "D2=(abs(x-Vceq)/abs(Vcemax-Vcemin))*100 #in %\n", + "\n", + "print \"second harmonic distortion D2=\",round(D2,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.15(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "second harmonic distortion D2= 0.0 %\n" + ] + } + ], + "source": [ + "Vcemin=4.0 #maximum value of collector emitter voltage in volts\n", + "Vcemax=20.0 #minimum value of collector emitter voltage in volts\n", + "Vceq=12.0 #collector emitter voltage in volts at Q-point\n", + "\n", + "x=(Vcemax+Vcemin)/2.0 #temporary variable\n", + "\n", + "D2=(abs(x-Vceq)/abs(Vcemax-Vcemin))*100 #in %\n", + "\n", + "print \"second harmonic distortion D2=\",round(D2,2),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.16" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total harmonic distortion= 0.1 %\n", + "Fundamental power P= 64 W\n", + "Total power P= 64.67 W\n" + ] + } + ], + "source": [ + "#given the distortion reading:\n", + "D2=0.1 #second harmonic distortion\n", + "D3=0.02 #third harmonic distortion\n", + "D4=0.01 #fourth harmonic distortion\n", + "\n", + "I1=4 #in ampere\n", + "Rc=8 # load resistance in ohm\n", + "\n", + "#Calculation:\n", + "THD=math.sqrt((D2*D2)+(D3*D3)+(D4*D4)) #Total harmonic distortion\n", + "P1=(I1*I1*Rc)/2 #Fundamental power in watt\n", + "P=(1+THD*THD)*P1 #Total power in watt\n", + "\n", + "print \"Total harmonic distortion=\",round(THD,2),\"%\"\n", + "print \"Fundamental power P=\",P1,\"W\"\n", + "print \"Total power P=\",round(P,2),\"W\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.17" + ] + }, + { + "cell_type": "code", + "execution_count": 96, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " maximum dissipiation at 125 degreeC= 30.0 W\n" + ] + } + ], + "source": [ + "#for the given silicon transistor:\n", + "T1=125 #temperature in degree celsius\n", + "T2=25 #temperature in degree celsius\n", + "Df=0.5 #derating factor in W/degree C\n", + "Pd=80 #powerdissipiation at 25 degree celsius\n", + "\n", + "PdT1=Pd-(T1-T2)*Df #power dissipiation at T1=125 degree celsius\n", + "\n", + "print \"maximum dissipiation at 125 degreeC=\",PdT1,\"W\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-12.18" + ] + }, + { + "cell_type": "code", + "execution_count": 98, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " maximum power dissipiation Pd= 61.54 W\n" + ] + } + ], + "source": [ + "#for the given silicon power transistor:\n", + "Tsa=1.5 #in degreeC/W (heat sink thermal resistance)\n", + "Tjc=0.5 #in degreeC/W (transistor thermal resistance)\n", + "Tcs=0.6 #in degreeC/W (insulator thermal resistance)\n", + "\n", + "Tj=200 #maximum junction temperature in celsius\n", + "Ta=40 #ambient temperature in celsius\n", + "\n", + "Pd=(Tj-Ta)/(Tjc+Tcs+Tsa)\n", + "print \" maximum power dissipiation Pd=\",round(Pd,2),\"W\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python [Root]", + "language": "python", + "name": "Python [Root]" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.12" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter13.ipynb b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter13.ipynb new file mode 100644 index 00000000..0de89910 --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter13.ipynb @@ -0,0 +1,123 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter-13 Linear-Digital ICs" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-13.1" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency of output waveform= 634.9 Hz\n", + "The output waveform is :\n" + ] + }, + { + "data": { + "image/png": "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\nktSY/wPs7a/5bLlAFgAAAABJRU5ErkJggg==\n", + "text/plain": [ + "<matplotlib.figure.Figure at 0x92c6d68>" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import matplotlib.pylab as plt\n", + "#for the given Astable multivibrator:\n", + "Ra=7.5*(10**3) #Resistance in ohm\n", + "Rb=Ra\n", + "C=0.1*(10**-6) #capacitance in F\n", + "\n", + "Th=0.7*C*(Ra+Rb) #in ms\n", + "Tl=0.7*C*Rb #in ms\n", + "#calculating total period T:\n", + "T=Th+Tl\n", + "#calcualting frequency of output waveform\n", + "f=1/T\n", + "print \"frequency of output waveform=\",round(f,1),\"Hz\"\n", + "print \"The output waveform is :\"\n", + "\n", + "y=[0,5,5,1,1,5,5,1,1,5,5]\n", + "x=[0,0,1.05,1.05,1.575,1.575,2.625,2.625,3.15,3.15,3.5]\n", + "plt.plot(x,y,'m')\n", + "plt.xlabel('Time(ms)---->')\n", + "plt.ylabel('Vo---->')\n", + "plt.xlim(0.0,3.5)\n", + "plt.ylim(0.0,5.5)\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-13.2" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Period of output waveform= 0.825 ms\n" + ] + } + ], + "source": [ + "#for the given Monostable multivibrator:\n", + "Ra=7.5*(10**3) #Resistance in ohm\n", + "C=0.1*(10**-6) #capacitance in F\n", + "#period of the output wavform T:\n", + "T=1.1*C*Ra*1000\n", + "print \"Period of output waveform=\",round(T,3),\"ms\"" + ] + } + ], + "metadata": { + "anaconda-cloud": {}, + "kernelspec": { + "display_name": "Python [Root]", + "language": "python", + "name": "Python [Root]" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.12" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter14.ipynb b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter14.ipynb new file mode 100644 index 00000000..62fb4bb8 --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter14.ipynb @@ -0,0 +1,412 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter-14 Feedback and Oscillator Circuits" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-14.1(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage gain with feedback= -9.09\n", + "Input Impedance= 110.0 kohm\n", + "Output Impedance= 1.82 kohm\n" + ] + } + ], + "source": [ + "A=-100.0 #gain without feedback\n", + "Ri=10 #in kohm\n", + "Ro=20 #in kohm\n", + "beta=-0.1 #no unit\n", + "p=beta*A #no unit\n", + "Zi=Ri #in kohm\n", + "Zo=Ro #in kohm\n", + "\n", + "#for Voltage-Series feedback circuit:\n", + "Af=A/(1+p)\n", + "Zif=Zi*(1+p)\n", + "Zof=Zo/(1+p)\n", + "\n", + "print \"Voltage gain with feedback=\",round(Af,2)\n", + "print \"Input Impedance=\",round(Zif,2),\"kohm\"\n", + "print \"Output Impedance=\",round(Zof,2),\"kohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-14.1(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage gain with feedback= -1.96\n", + "Input Impedance= 510.0 kohm\n", + "Output Impedance= 392.16 ohm\n" + ] + } + ], + "source": [ + "A=-100.0 #gain without feedback\n", + "Ri=10 #in kohm\n", + "Ro=20 #in kohm\n", + "beta=-0.5 #no unit(feedback)\n", + "p=beta*A #no unit\n", + "Zi=Ri #in kohm\n", + "Zo=Ro #in kohm\n", + "\n", + "#for Voltage-Series feedback circuit:\n", + "Af=A/(1+p)\n", + "Zif=Zi*(1+p)\n", + "Zof=Zo/(1+p)\n", + "\n", + "print \"Voltage gain with feedback=\",round(Af,2)\n", + "print \"Input Impedance=\",round(Zif,2),\"kohm\"\n", + "print \"Output Impedance=\",round(Zof*1000,2),\"ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-14.2" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Change in feedback gain= 0.2 %\n" + ] + } + ], + "source": [ + "A=-1000.0 #gain without feedback\n", + "beta=-0.1 #feedback\n", + "ChangeA= 20 #in %(change in gain)\n", + "\n", + "#We know,Change in feedback gain (ChangeAf)=(1/(beta*A))*ChangeA:\n", + "ChangeAf=(1/(beta*A))*ChangeA\n", + "\n", + "print \"Change in feedback gain=\",ChangeAf,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-14.3" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage gain without feedback= -20.0\n", + "Voltage gain with feedback= -4.0\n" + ] + } + ], + "source": [ + "R1=80.0 #in kohm\n", + "R2=20.0 #in kohm\n", + "Ro=10.0 #in kohm\n", + "Rd=10.0 #in kohm\n", + "gm=4000*(10**(-6)) #in S\n", + "\n", + "Rl=(Ro*Rd)/(Ro+Rd) #in kohm\n", + "#neglecting 100kohm of R1 and R2 in series,we get\n", + "A=-(gm*Rl*1000)\n", + "#feedback factor B:\n", + "B=-R2/(R1+R2)\n", + "#gain with feedback Af:\n", + "Af=A/(1+(B*A))\n", + "\n", + "print \"Voltage gain without feedback=\",round(A,2)\n", + "print \"Voltage gain with feedback=\",round(Af,2)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-14.4" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Amplifier Gain of the given circuit= 10.0\n" + ] + } + ], + "source": [ + "A=100000 #gain of Op-amp\n", + "R1=1.8 #in kohm\n", + "R2=0.2 #in kohm\n", + "\n", + "#feedback factor B:\n", + "B=R2/(R1+R2)\n", + "#feedback gain of Op-amp Af:\n", + "Af=A/(1+(B*A))\n", + "\n", + "print \"Amplifier Gain of the given circuit=\",round(Af,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-14.5" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage gain without feedback= -293.33\n", + "Voltage gain with feedback= -4.22\n" + ] + } + ], + "source": [ + "hfe=120.0 #no unit\n", + "hie=900.0 #in ohm\n", + "Vs=10 #in mV(rms value)\n", + "Re=510.0 #in ohm(emitter resistor)\n", + "Rc=2200.0 #in ohm(collector resistor)\n", + "re=7.5 #in ohm\n", + "#Wihout feedback:\n", + "A=-hfe/(hie+Re)\n", + "B=-Re\n", + "#Gain With feedback:\n", + "Af=A/(1+(B*A))\n", + "#Voltage gain with feedback:\n", + "Avf=Af*Rc\n", + "#Voltage gain without feedback:(Re=0)\n", + "Av=-Rc/re\n", + "print \"Voltage gain without feedback=\",round(Av,2)\n", + "print \"Voltage gain with feedback=\",round(Avf,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-14.6" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage gain without feedback= -25.5\n", + "Voltage gain with feedback= -11.21\n" + ] + } + ], + "source": [ + "gm=5*(10**(-3)) #converting gm in mS to gm with unit S\n", + "Rs=1000.0 #in ohm(source resistor)\n", + "Rd=5100.0 #in ohm(drain resistor)\n", + "Rf=20000.0 #in ohm(feedback resistor)\n", + "#gain without feedback:\n", + "A=-gm*Rd\n", + "#gain with feedback:\n", + "Af=(-gm*Rd*Rf)/(Rf+(gm*Rd*Rs))\n", + "\n", + "print \"Voltage gain without feedback=\",round(A,2)\n", + "print \"Voltage gain with feedback=\",round(Af,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-14.7" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required value of Capacitance= 6.5 nF\n", + "Required value of Rd= 8.0 kohm\n" + ] + } + ], + "source": [ + "gm=5000*(10**(-6)) #converting gm in microS to gm with unit S \n", + "rd=40.0 #in kohm\n", + "R=10000.0 #in ohm(feedback circuit value)\n", + "f=1000 #frequency in hertz\n", + "\n", + "#calculating the required value of capacitance to ensure A>29\n", + "C=1/(6.28*R*f*2.45)\n", + "C=C/(10**(-9)) #converting F to nF\n", + "#Calculating required value of Rl:\n", + "A=40 #let(A>29)\n", + "Rl=(A/gm)/1000\n", + "print \"Required value of Capacitance=\",round(C,2),\"nF\"\n", + "print \"Required value of Rd=\",Rl,\"kohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-14.8" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resonant frequency= 3122.27 Hz\n" + ] + } + ], + "source": [ + "R=51*(10**3) #in ohm\n", + "C=0.001*(10**-6) #in Farad\n", + "\n", + "#for a Wein-bridge oscillator,Resonant fequency fo:\n", + "fo=1/(6.28*R*C)\n", + "\n", + "print \"Resonant frequency=\",round(fo,2),\"Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-14.9" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required value of Capacitance= 159.2 pF\n" + ] + } + ], + "source": [ + "fo=10*(10**3) #in Hz(Resonant frequency)\n", + "R=100*(10**3) #in ohm(let)\n", + "\n", + "#calculating the value of capacitane for Wein bridge oscillator:\n", + "C=1/(2*3.14*R*fo)\n", + "C=C/(10**(-12)) #converting F to pF\n", + "print \"Required value of Capacitance=\",round(C,1),\"pF\"" + ] + } + ], + "metadata": { + "anaconda-cloud": {}, + "kernelspec": { + "display_name": "Python [Root]", + "language": "python", + "name": "Python [Root]" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.12" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter15.ipynb b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter15.ipynb new file mode 100644 index 00000000..54188a98 --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter15.ipynb @@ -0,0 +1,599 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter-15 Power Supplies(Voltage Regulators)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-15.1" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ripple of y=the filter r: 6.0 %\n" + ] + } + ], + "source": [ + "Vrms=1.5 #in volts\n", + "Vdc=25 #in volts\n", + "\n", + "#Ripple of y=the filter r:\n", + "r=(Vrms/Vdc)*100 #in %\n", + "\n", + "print \"Ripple of y=the filter r:\",r,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-15.1" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage Regulation(V.R): 7.1 %\n" + ] + } + ], + "source": [ + "Vnl=60.0 #no load voltage in volts\n", + "Vfl=56.0 #full voltage in volts\n", + "#Voltage Regulation(V.R):\n", + "VR=((Vnl-Vfl)/Vfl)*100\n", + "\n", + "print \"Voltage Regulation(V.R):\",round(VR,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-15.3" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ripple Factor V= 1.2 V\n" + ] + } + ], + "source": [ + "I=50 #in mA(Current Drawn)\n", + "C=100 #in microF(Field Capacitor)\n", + "#for the Full Wave Rectifier:\n", + "#Ripple Voltage V:\n", + "V=(2.4*I)/C #in volts\n", + "\n", + "print \"Ripple Factor V=\",V,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-15.4" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Filter Dc voltage V: 27.9 V\n" + ] + } + ], + "source": [ + "Vm=30 #in volts(Peak Rectified Voltage)\n", + "I=50 #in mA(Current Drawn)\n", + "C=100 #in microF(Field Capacitor)\n", + "\n", + "#for the Full Wave Rectifier:\n", + "#Filter Dc voltage V:\n", + "\n", + "V=Vm-(4.17*I)/C #in volts\n", + "print \"Filter Dc voltage V:\",round(V,1),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-15.5" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ripple of the Filter r: 4.3 %\n" + ] + } + ], + "source": [ + "Vm=30 #in volts(Peak Rectified Voltage)\n", + "I=50 #in mA(Current Drawn)\n", + "C=100 #in microF(Field Capacitor)\n", + "Vdc=27.9 #in volts\n", + "#for the Capacity Filter :\n", + "#Ripple of the Filter R:\n", + "r=(2.4*I)/(C*Vdc)\n", + "r=r*100 #in %\n", + "print \"Ripple of the Filter r:\",round(r,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example-15.6" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "DC voltage across load(Rl) is Vdc= 53.6 V\n" + ] + } + ], + "source": [ + "R=120.0 #in ohm\n", + "C=10.0 #Capacitance in microFarad\n", + "Rl=1000.0 #load Resistance in ohm\n", + "V=60.0 #In volts(Dc voltage across filter initially)\n", + "\n", + "#for an RC filter section:\n", + "#DC voltage across load(Rl) is Vdc=\n", + "\n", + "Vdc=(Rl*V)/(R+Rl)\n", + "print \"DC voltage across load(Rl) is Vdc=\",round(Vdc,1),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-15.7" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "DC component of voltage across load(Rl) is Vdc= 136.4 V\n", + "AC component of output voltage is Vr= 3.9 V\n", + "Ripple of the output waveform r: 2.86 %\n" + ] + } + ], + "source": [ + "#forthe given RC filter circuit:\n", + "\n", + "#DC calculation:\n", + "R=500.0 #in ohm\n", + "C=10*(10**-3) #Capacitance in milliFarad\n", + "Rl=5000.0 #load Resistance in ohm\n", + "Vd=150.0 #In volts(Dc voltage across filter initially)\n", + "Vrms=15.0 #in volts(Ac voltage)\n", + "Vdc=(Rl*Vd)/(R+Rl)\n", + "print \"DC component of voltage across load(Rl) is Vdc=\",round(Vdc,1),\"V\"\n", + "\n", + "#AC calculation:\n", + "#Capacitive Impedance Xc:\n", + "Xc=1.3/C #in ohm\n", + "#AC component of output voltage Vr:\n", + "Vr=(Xc*Vrms)/R\n", + "print \"AC component of output voltage is Vr=\",round(Vr,1),\"V\"\n", + "\n", + "#Ripple of the output waveform r:\n", + "r=(Vr*100)/Vdc\n", + "print \"Ripple of the output waveform r:\",r,\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-15.8" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " The output voltage Vo= 11.3 V\n", + "The zener current IZ= 36.1 mA\n" + ] + } + ], + "source": [ + "#from the given circuit diagram:\n", + "Vz=12 #zener voltage in volts\n", + "Vbe=0.7 #in volts(base-emitter voltage)\n", + "Vi=20.0 #in volts(input supply)\n", + "Rl=1.0 #in ohm(load resistance)\n", + "B=50.0 #gain\n", + "R=220.0 #resistace in ohm\n", + "#for the given regulator circuit:\n", + "Vo=Vz-Vbe #calculating Output voltage\n", + "Vce=Vi-Vo #calculating collector-emitter voltage\n", + "Ir=(Vi-Vz)/R #calculating current through resistance R\n", + "Ir=Ir*1000 #calculating Ir in mA\n", + "\n", + "#for the given resistance R:\n", + "Il=Vo/Rl #current through Rl\n", + "Ic=Il\n", + "Ib=Ic/B #base current\n", + "Iz=Ir-Ib #zener current\n", + "\n", + "\n", + "print \" The output voltage Vo=\",Vo,\"V\"\n", + "print \"The zener current IZ=\",round(Iz,1),\"mA\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-15.9" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The regulated voltage Vo: 15.0 V\n" + ] + } + ], + "source": [ + "#for the given circuit:\n", + "R1=20.0 #resistace in Kohm\n", + "R2=30.0 #resistace in Kohm\n", + "Vz=8.3 #in volts(zener voltage)\n", + "V=0.7 #in volts(base-emitter voltage)\n", + "\n", + "#The regulated voltage Vo:\n", + "Vo=((R1+R2)*(Vz+V))/R2\n", + "print \"The regulated voltage Vo:\",Vo,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-15.10" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The regulated voltage Vo: 24.8 V\n" + ] + } + ], + "source": [ + "#for the given circuit:\n", + "R1=30.0 #resistace in Kohm\n", + "R=10.0 #resistace in Kohm\n", + "Vz=6.2 #in volts(zener voltage)\n", + "Vi=36 #in volts(Input voltage)\n", + "\n", + "#The regulated voltage Vo:\n", + "Vo=((1+(R1/R))*Vz)\n", + "print \"The regulated voltage Vo:\",Vo,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-15.11" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The regulated voltage Vl= 8.9 V\n", + "The load current Il= 89.0 mA\n", + "The source current Is= 109.2 mA\n", + "The collector current Ic= 20.2 mA\n" + ] + } + ], + "source": [ + "#from the given circuit:\n", + "Vz=8.2 #in volts(zener voltage)\n", + "Vi=22 #in volts(Input voltage)\n", + "Vbe=0.7 #in volts(base-emitter voltage)\n", + "Rl=100.0 #in ohm(load resistance)\n", + "Rs=120.0 #in ohm(source resistance)\n", + "\n", + "#THE load voltage Vl:\n", + "Vl=Vz+Vbe\n", + "print \"The regulated voltage Vl=\",Vl,\"V\"\n", + "\n", + "#the load current Il:\n", + "Il=(Vl/Rl)*1000\n", + "print \"The load current Il=\",Il,\"mA\"\n", + "\n", + "#the source current Is:\n", + "Is=((Vi-Vl)/Rs)*1000\n", + "print \"The source current Is=\",round(Is,1),\"mA\"\n", + "\n", + "#the collector current Ic:\n", + "Ic=(Is-Il)\n", + "print \"The collector current Ic=\",round(Ic,1),\"mA\"\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-15.13" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "8.34912 6.65088\n", + "The minimum input voltage Vi= 1.69824 V\n" + ] + } + ], + "source": [ + "Vm=15 #in volts(output voltage)\n", + "C=250 #in microFarad\n", + "Idc=400 #in mA(current drawn by load)\n", + "\n", + "#for the given transfomer:\n", + "Vr=(1.732*2.4*Idc)/C\n", + "Vdc=Vm-Vr \n", + "Vi=Vdc-Vr #minimum input voltage\n", + "\n", + "print \"The minimum input voltage Vi=\",round(Vi,1),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### NOTE: The Solution given in the book is wrong because the value of Vdc substituted in the book is 15V" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-15.14" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The load current Idc= 458.3 mA\n" + ] + } + ], + "source": [ + "#to maintain regulation for the circuit:\n", + "#Vi>=7.3V\n", + "Vimin=7.3 #in volts (minimum vltage of input voltage Vi)\n", + "Vm=15 #in volts(output voltage)\n", + "C=250 #in microFarad\n", + "#maximum value of Vr:\n", + "Vr=Vm-Vimin\n", + "\n", + "Vrms=Vr/(1.732) #rms value of peak voltage\n", + "\n", + "#Load current Idc:\n", + "Idc=(round(Vrms,1)*C)/2.4\n", + "print \"The load current Idc=\",round(Idc,1),\"mA\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-15.15" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The regulated voltage Vo: 13.99 V\n" + ] + } + ], + "source": [ + "#from the given circuit:\n", + "R1=240.0 #resistace in ohm\n", + "R2=2400 #resistace in ohm\n", + "Vref=1.25 #in volts(Reference voltage)\n", + "Iadj=100*(10**-6) #in ampere\n", + "\n", + "#The regulated voltage Vo:\n", + "Vo=(Vref*(1+(R2/R1)))+(Iadj*R2)\n", + "\n", + "print \"The regulated voltage Vo:\",Vo,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-15.16" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The regulated voltage Vo: 10.8 V\n" + ] + } + ], + "source": [ + "#from the given circuit:\n", + "R2=1.8*(10**3) #resistace in ohm\n", + "R1=240 #resistace in ohm\n", + "Vref=1.25 #in volts(Reference voltage)\n", + "Iadj=100*(10**-6) #in ampere\n", + "\n", + "#The regulated voltage Vo:\n", + "Vo=(Vref*(1+(R2/R1)))+(Iadj*R2)\n", + "\n", + "print \"The regulated voltage Vo:\",round(Vo,2),\"V\"" + ] + } + ], + "metadata": { + "anaconda-cloud": {}, + "kernelspec": { + "display_name": "Python [Root]", + "language": "python", + "name": "Python [Root]" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.12" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter17.ipynb b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter17.ipynb new file mode 100644 index 00000000..ec1a6f79 --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter17.ipynb @@ -0,0 +1,388 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter-17 PNPN and Other Devices" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-17.1(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Value of Rb1 at Ie=0A is= 3.0 Kohm\n", + "Value of Rb2 at Ie=0A is= 2.0 Kohm\n" + ] + } + ], + "source": [ + "#for the given circuit:\n", + "R1=50 #in Kohm\n", + "R2=0.1 #in Kohm\n", + "C=0.1 #in pF(capacitance)\n", + "V=12 #in volts\n", + "Ie=0 #in ampere\n", + "n=0.6 #intrinsic stand-off ratio\n", + "Rbb=5 #in Kohm\n", + "\n", + "#we know, intrinsic stand-off ratio(n)=(Rb1/(Rbb))\n", + "Rb1=0.6*Rbb\n", + "Rb2=Rbb-Rb1\n", + "\n", + "print\"Value of Rb1 at Ie=0A is=\",Rb1,\"Kohm\"\n", + "print\"Value of Rb2 at Ie=0A is=\",Rb2,\"Kohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-17.1(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The emitter firing potential= 1.2 V\n" + ] + } + ], + "source": [ + "#for the given circuit:\n", + "R1=50 #in Kohm\n", + "R2=0.1 #in Kohm\n", + "C=0.1 #in pF(capacitance)\n", + "V=12 #in volts\n", + "Ie=0 #in ampere\n", + "n=0.6 #intrinsic stand-off ratio\n", + "Rbb=5.0 #in Kohm\n", + "\n", + "#The emitter firing potential Vp:\n", + "Vp=0.7+(((Rb1+R2)*12)/(Rbb+R2))\n", + "\n", + "print \"The emitter firing potential=\",round(Vp,1),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-17.1(c)" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R1 is within the permissible range of values\n" + ] + } + ], + "source": [ + "V=12 #in volts\n", + "Vv=1 #in volts\n", + "Iv=10*(10**-3) #in ampere\n", + "Ip=10*(10**-6) #in ampere\n", + "Vp=8.0 #in volts\n", + "\n", + "limit1=(V-Vv)/Iv\n", + "limit2=(V-Vp)/Ip\n", + "\n", + "if(R1>limit1,R1<limit2):\n", + " print \"R1 is within the permissible range of values\"\n", + "else: \n", + " print \"R1 is not within the permissible range of values\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-17.1(d)" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "frequency of Oscillation= 196.1 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "#for the given circuit:\n", + "R1=50 #in Kohm\n", + "R2=0.1 #in Kohm\n", + "C=0.1 #in pF(capacitance)\n", + "V=12.0 #in volts\n", + "Rbb=5 #in Kohm\n", + "Rb1=100*(10**-3) #in Kohm\n", + "Vp=8.0 #in volts\n", + "\n", + "X=(V-Vv)/(V-Vp) #temporary variable\n", + "T1=R1*C*(math.log(X))\n", + "\n", + "T2=(Rb1+R2)*C*(math.log(Vp/Vv))\n", + "#Time period T:\n", + "T=T1+T2\n", + "\n", + "#frequency of Oscillation F:\n", + "F=(1/T)*1000 #to convert the result in Hz\n", + "print \"frequency of Oscillation=\",round(F,1),\"Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-17.1(f)" + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the value of Vr1 (during charging phase) is = 0.24 V\n", + "the value of Vr2 (at Vc=Vp) is = 3.65 V\n" + ] + } + ], + "source": [ + "#for the given circuit:\n", + "R2=0.1 #in Kohm\n", + "C=0.1 #in pF(capacitance)\n", + "V=12.0 #in volts\n", + "Rbb=5 #in Kohm\n", + "Rb1=100*(10**-3) #in Kohm\n", + "Vp=8.0 #in volts\n", + "\n", + "#During charging phase:\n", + "Vr2=(R2*V)/(R2+Rbb)\n", + "print \"the value of Vr1 (during charging phase) is =\",round(Vr2,2),\"V\"\n", + "\n", + "#When Vc=Vp:\n", + "Vr2=(R2*(Vp-0.7))/(R2+Rb1)\n", + "print \"the value of Vr2 (at Vc=Vp) is =\",Vr2,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-17.2" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The required value of Rb1= 20.0 Kohm\n", + "The required value of Vbb= 12.0 V\n" + ] + } + ], + "source": [ + "#for the silicon PUT:\n", + "n=0.8\n", + "Vp=10.3 #in volts\n", + "Rb2=5 #in Kohm\n", + "Vd=0.7 #in volts\n", + "#we know, n=Rb2/(Rb1+Rb2)\n", + "\n", + "Rb1=0.8*Rb2/0.2\n", + "print \"The required value of Rb1=\",round(Rb1,1),\"Kohm\"\n", + "\n", + "#we know, Vp=n*Vbb+Vd\n", + "Vbb=(Vp-Vd)/n\n", + "print \"The required value of Vbb=\",Vbb,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-17.3(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The required value of Vp= 8.7 V\n" + ] + } + ], + "source": [ + "Vbb=12 #in volts\n", + "Rk=100 #in ohm\n", + "Rb1=10.0 #in Kohm\n", + "Rb2=5.0 #in Kohm\n", + "Vd=0.7 #in volts\n", + "#we know,\n", + "n=Rb1/(Rb1+Rb2)\n", + "Vp=n*Vbb+Vd\n", + "\n", + "print \"The required value of Vp=\",Vp,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-17.3(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The required value of Rmax= 33.0 Kohm\n", + "The required value of Rmin= 2.0 Kohm\n" + ] + } + ], + "source": [ + "#from the parameters given in the quesion:\n", + "Vbb=12 #in volts\n", + "Ip=100*(10**-6) #in ampere\n", + "Vv=1 #in volts\n", + "Iv=5.5 #in mA\n", + "#calculating maximum value of Resistance R\n", + "Rmax=(Vbb-Vp)/Ip\n", + "print \"The required value of Rmax=\",Rmax/1000,\"Kohm\"\n", + "\n", + "#calculating minimum value of Resistance R\n", + "Rmin=(Vbb-Vv)/Iv\n", + "print \"The required value of Rmin=\",Rmin,\"Kohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-17.3(c)" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time period of Oscillation= 25.8 ms\n", + "Frequency of Oscillation= 38.8 Hz\n" + ] + } + ], + "source": [ + "import math\n", + "#from the parameters given in the quesion:\n", + "R=20 #in Kohm\n", + "C=1 #in microF\n", + "Vbb=12 #in volts\n", + "\n", + "x=Vbb/(Vbb-Vp)\n", + "#The reqired Timeperiod T:\n", + "T=R*C*round(math.log(x),2)\n", + "\n", + "print \"Time period of Oscillation=\",T,\"ms\"\n", + "#The required Frequency F:\n", + "F=1/T\n", + "F=F*1000 #converting result into Hz\n", + "print \"Frequency of Oscillation=\",round(F,1),\"Hz\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python [Root]", + "language": "python", + "name": "Python [Root]" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.12" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter2.ipynb b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter2.ipynb new file mode 100644 index 00000000..1d6ba377 --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter2.ipynb @@ -0,0 +1,884 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter-2 Diode Applications" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.1(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vdq= 0.78 V\n", + "Idq= 18.5 mA\n" + ] + } + ], + "source": [ + "#from the figure given in the question\n", + "E=10 #in volts (applied voltage)\n", + "r=0.5 #in kohm\n", + "\n", + "Id=E/r\n", + "V=E #V=E at Id=0\n", + "#sketching the load line and with the intersection of load line and the characterstics curve,we gqt Q-point\n", + "Vdq=0.78 #in volts\n", + "Idq=18.5 #in mA\n", + "print \"Vdq=\",Vdq,'V'\n", + "print \"Idq=\",Idq,'mA'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.1(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vr= 18.5 V\n" + ] + } + ], + "source": [ + "#from the results of example 2.1(a), we get\n", + "Ir=Idq=18.5 #in mA\n", + "r=1 #in kohm\n", + "Vr=Ir*r #in volts\n", + "print \"Vr=\",Vr,'V'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.2" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vdq= 0.7 V\n", + "Idq= 18.5 mA\n" + ] + } + ], + "source": [ + "#repeating the Example-2.1 with approximate equialent model for silicon diode, we get\n", + "Vdq=0.7 #in volts\n", + "Idq=18.5 #in mA\n", + "print \"Vdq=\",Vdq,'V'\n", + "print \"Idq=\",Idq,'mA'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.3" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vdq= 0 V\n", + "Idq= 20 mA\n" + ] + } + ], + "source": [ + "#repeating the Example-2.1 with ideal model for silicon diode, we get\n", + "Vdq=0 #in volts\n", + "Idq=20 #in mA\n", + "print \"Vdq=\",Vdq,'V'\n", + "print \"Idq=\",Idq,'mA'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.4" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vd= 0.7 V\n", + "Vr= 7.3 V\n", + "Id= 3.32 mA\n" + ] + } + ], + "source": [ + "#the applied voltage makes the diode forward biased, hence\n", + "Vd=0.7 #in volts (silicon diode)\n", + "E=8 #in volts (applied voltage)\n", + "r=2.2 #in kohm\n", + "Vr=E-Vd #volatge across resistance r\n", + "Ir=Vr/r #current through resistance r\n", + "Id=Ir #current through diode\n", + "print \"Vd=\",Vd,'V'\n", + "print \"Vr=\",Vr,'V'\n", + "print \"Id=\",round(Id,2),'mA'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.5" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vd= 8 V\n", + "Vr= 0 V\n", + "Id= 0.0 mA\n" + ] + } + ], + "source": [ + "#the applied voltage makes the diode reverse biased,hence, the circuit is open\n", + "E=8 #in volts (applied voltage)\n", + "r=2.2 #in kohm\n", + "Ir=0 #in mA(since no current flow across resistor in open circuit)\n", + "Vr=0 #in volts(since no voltage drop occur across resistor as Ir=0)\n", + "\n", + "Vd=E-Vr #volatge across diode\n", + "Id=Ir #current through diode\n", + "print \"Vd=\",Vd,'V'\n", + "print \"Vr=\",Vr,'V'\n", + "print \"Id=\",round(Id,2),'mA'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.6" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vd= 0.5 V\n", + "Vr= 0.0 V\n", + "Id= 0.0 mA\n" + ] + } + ], + "source": [ + "#since the applied voltage is less than than the threshold voltage of diode,hence the diode is in off state.\n", + "#considering the diode as open circuit\n", + "E=0.5 #in volts (applied voltage)\n", + "r=1.2 #in kohm\n", + "Ir=0 #in mA(since no current flow across resistor in open circuit)\n", + "Id=Ir #in mA(series configuration)\n", + "Vr=Ir*r #volatge across resistance r\n", + "Vd=E-Vr #volatge across diode\n", + "print \"Vd=\",Vd,'V'\n", + "print \"Vr=\",Vr,'V'\n", + "print \"Id=\",round(Id,2),'mA'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.7" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vo= 9.5 V\n", + "Id= 13.97 mA\n" + ] + } + ], + "source": [ + "#the applied voltage makes both the diode forward biased, hence\n", + "Vd=0.7 #in volts (silicon diode)\n", + "Vdred=1.8 #in volts (red diode)\n", + "E=12 #in volts (applied voltage)\n", + "r=680 #in ohm\n", + "\n", + "Vo=E-Vd-Vdred\n", + "Ir=Vo/r #in A\n", + "Ir=Ir*1000 #in mA\n", + "Id=Ir #in mA(series configuration)\n", + "print \"Vo=\",Vo,'V'\n", + "print \"Id=\",round(Id,2),'mA'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.8" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Id= 0 mA\n", + "Vd2= 20.0 V\n", + "Vo= 0.0 V\n" + ] + } + ], + "source": [ + "#he applied volatge puts the silicon diode forward biased and germanium diode in reverse bias,hnce an open circuit occur.\n", + "E=20 #in volts (applied voltage)\n", + "r=5.6 #in kohm\n", + "Id=0 #in mA(current flowing in an open circuit is 0)\n", + "Vsi=0 #in volts(since current throgh it is 0)\n", + "Ir=Id #in mA(series configuration)\n", + "Vo=Ir*r\n", + "#applying Kirchoff's Voltage Law:- E-Vsi-Vge-Vo=0,Therefore\n", + "Vge=E-Vsi-Vo #voltage across germanium diode\n", + "print \"Id=\",Id,'mA'\n", + "print \"Vd2=\",Vge,'V'\n", + "print \"Vo=\",Vo,'V'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.9" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "I= 2.07 mA\n", + "V1= 9.74 V\n", + "V2= 4.56 V\n", + "Vo= -0.44 V\n" + ] + } + ], + "source": [ + "#the applied voltage sets the diode in forward bias,therefore\n", + "Vd=0.7 #in volts (silicon diode)\n", + "E1=10 #in volts (applied voltage)\n", + "E2=-5 #in volts (applied voltage)\n", + "r1=4.7 #in kohm\n", + "r2=2.2 #in kohm\n", + "\n", + "#applying Kirchoff's Voltage Law to the input section of the circuit:-\n", + "Ic=(E1-E2-Vd)/(r1+r2)\n", + "Vr1=Ic*r1 #voltage across r1\n", + "Vr2=Ic*r2 #voltage across r2\n", + "#applying Kirchoff's Voltage Law to the output section of the circuit:-\n", + "Vo=Vr2+E2\n", + "print \"I=\",round(Ic,2),'mA'\n", + "print \"V1=\",round(Vr1,2),'V'\n", + "print \"V2=\",round(Vr2,2),'V'\n", + "print \"Vo=\",round(Vo,2),'V'" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "## Example-2.10" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vo= 0.7 V\n", + "I1= 28.18 mA\n", + "Id1= 14.09 mA\n", + "Id2= 14.09 mA\n" + ] + } + ], + "source": [ + "#the applied volatge sets both the parallel diode in forward bias,hence\n", + "E=10 #in volts\n", + "r=0.33 #in kohm\n", + "V1=0.7 #in volts (silicon diode)\n", + "V2=0.7 #in volts (silicon diode)\n", + "#applying Kirchoff's Voltage Law to the first loop of the circuit:-\n", + "I=(E-V1)/r #current in the circuit\n", + "#assuming diodes of similar characterstics, we have\n", + "Id1=I/2\n", + "Id2=I/2\n", + "Vo=V2 #Vo is the voltage across the diodes in parallel\n", + "print \"Vo=\",round(Vo,2),'V'\n", + "print \"I1=\",round(I,2),'mA'\n", + "print \"Id1=\",round(Id1,2),'mA'\n", + "print \"Id2=\",round(Id2,2),'mA'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.11" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Required Resistance= 300 ohm\n" + ] + } + ], + "source": [ + "#the applied volatge sets the green diode in forward bias and red diode in negative bias,hence\n", + "E=8 #in volts\n", + "Vled=2 #in volts(turn-on voltage)\n", + "I=20 #in mA\n", + "#applying Ohm's law:\n", + "R=((E-Vled)*1000)/I\n", + "print \"Required Resistance=\",R,'ohm'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.12" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Voltage Vo= 11.3 V\n" + ] + } + ], + "source": [ + "#the applied volatge sets the green and red diode forward bias ,hence\n", + "Vg=0.7 #in volts\n", + "Vr=0.7 #in volts\n", + "E=12 #in volts\n", + "R=2.2 #in kohm\n", + "#applying Kirchoff's voltage law,\n", + "Vo=E-Vr\n", + "print \"Voltage Vo=\",Vo,'V'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.13" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "I1= 0.212 mA\n", + "I2= 3.32 mA\n", + "Id2= 3.11 mA\n" + ] + } + ], + "source": [ + "#the applied volatge sets both the diodes forward bias ,hence\n", + "Vk1=0.7 #in volts (silicon diode)\n", + "Vk2=0.7 #in volts (silicon diode)\n", + "E=20 #in volts\n", + "R1=3.3 #in kohm\n", + "R2=5.6 #in kohm\n", + "#applying Kirchoff's Voltage Law to the 2nd loop section of the circuit:-\n", + "I1=Vk1/R1 \n", + "#applying Kirchoff's Voltage Law to the 1st loop section of the circuit:-\n", + "V2=E-Vk1-Vk2\n", + "I2=V2/R2\n", + "#applying Kirchoff's current Law at the junction node of two diodes:-\n", + "Id2=I2-I1\n", + "print \"I1=\",round(I1,3),'mA'\n", + "print \"I2=\",round(I2,2),'mA'\n", + "print \"Id2=\",round(Id2,2),'mA'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.14" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vo= 9.3 V\n", + "I= 9.3 mA\n" + ] + } + ], + "source": [ + "#from the circuit given in the question\n", + "E1=10 #in volts (applied voltage)\n", + "E2=0 #in volts (applied voltage)\n", + "r=1 #in kohm\n", + "Vd1=0.7 #in volts (silicon diode)\n", + "Vd2=0.7 #in volts (silicon diode)\n", + "Vo=E1-Vd1\n", + "I=(E1-Vd1)/r #current in the circuit\n", + "print \"Vo=\",round(Vo,2),'V'\n", + "print \"I=\",round(I,2),'mA'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.15" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vo= 0.7 V\n", + "I= 9.3 mA\n" + ] + } + ], + "source": [ + "#from the circuit given in the question,\n", + "E1=10 #in volts (applied voltage)\n", + "E2=0 #in volts (applied voltage)\n", + "E3=10 #in volts (applied voltage)\n", + "r=1 #in kohm\n", + "Vd1=0.7 #in volts (silicon diode)\n", + "Vd2=0.7 #in volts (silicon diode)\n", + "Vo=E2+Vd2\n", + "I=(E3-Vo)/r #current in the circuit\n", + "#Diode1 is in off state,because Vanode=Vo=0.7V and Vcathode=10V,hence Reverse biased\n", + "print \"Vo=\",round(Vo,2),'V'\n", + "print \"I=\",round(I,2),'mA'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.24" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Reference voltage Vo1= 4.0 V\n", + "Reference voltage Vo2= 10.0 V\n", + "power delivered by supply= 800.0 mW\n", + "power absorbed by LED= 80.0 mW\n", + "power absorbed by zener diode= 120.0 mW\n" + ] + } + ], + "source": [ + "#from the circuit given in the question,\n", + "E=40 #in volts (applied voltage)\n", + "Vk=0.7 #in volts (white led )\n", + "Vled=4 #in volts (silicon diode)\n", + "R=1.3 #in kohm\n", + "Vz1=6 #in volts (zener diode)\n", + "Vz2=3.3 #in volts (zener diode)\n", + "Vo1=Vz2+Vk \n", + "Vo2=Vo1+Vz1\n", + "print \"Reference voltage Vo1=\",round(Vo1,2),'V'\n", + "print \"Reference voltage Vo2=\",round(Vo2,2),'V'\n", + "Ir=(E-Vo2-Vled)/R #current across led\n", + "Ps=E*Ir #power delivered by supply\n", + "Pled=Vled*Ir # power absorbed by led\n", + "Pz=Vz1*Ir #power absorbed by diode\n", + "print \"power delivered by supply=\",round(Ps,0),'mW'\n", + "print \"power absorbed by LED=\",round(Pled,1),'mW'\n", + "print \"power absorbed by zener diode=\",round(Pz,1),'mW'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.25" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "#Case-1:positive voltage supplied>20V. therefore zener diode is forward biased\n", + "Vo=20 #in volts(volatge across parallel zener diode is 20volts)\n", + "\n", + "#Case-2:negative voltage supplied. therefore zener diode is reverse biased\n", + "Vo=0 #in volts(volatge across parallel zener diode is 0volts because of open circuit)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.26(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vl 8.73 V\n", + "Vr 7.27 V\n", + "Iz 0 A\n", + "Pz 0 W\n" + ] + } + ], + "source": [ + "Vi=16 #in volts(applied voltage)\n", + "R=1 #in kohms\n", + "Rl=1.2 #in kohms\n", + "Vz=10 #in volts(zener diode)\n", + "#removing the diode and calclating voltage across the open circuit\n", + "V=(Rl*Vi)/(R+Rl)\n", + "#since V=8.73V<Vz,therefore diode is in off state\n", + "Vl=V #voltage across resistor Rl\n", + "Vr=Vi-Vl #voltage across resistor R\n", + "Iz=0 #in A(current through diode=0A due to open circuit)\n", + "Pz=Iz*Vz #in W(power dissipiated by zener diode)\n", + "\n", + "print \"Vl\",round(Vl,2),'V'\n", + "print \"Vr\",round(Vr,2),'V'\n", + "print \"Iz\",Iz,'A'\n", + "print \"Pz\",Pz,'W'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.26(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vl 10.0 V\n", + "Vr 6.0 V\n", + "Iz 2.67 mA\n", + "Pz 26.67 mW\n" + ] + } + ], + "source": [ + "Vi=16 #in volts(applied voltage)\n", + "R=1 #in kohms\n", + "Rl=3.0 #in kohms\n", + "Vz=10 #in volts(zener diode)\n", + "#removing the diode and calclating voltage across the open circuit\n", + "V=(Rl*Vi)/(R+Rl)\n", + "#since V=12V>Vz,therefore diode is in on state\n", + "Vl=Vz #voltage across resistor Rl\n", + "Vr=Vi-Vl #voltage across resistor R\n", + "Il=Vl/Rl #current through resistor Rl\n", + "Ir=Vr/R #current through resistor R\n", + "Iz=Ir-Il #in mA(current through diode=0A due to open circuit)\n", + "Pz=Iz*Vz #in mW(power dissipiated by zener diode)\n", + "\n", + "print \"Vl\",round(Vl,2),'V'\n", + "print \"Vr\",round(Vr,2),'V'\n", + "print \"Iz\",round(Iz,2),'mA'\n", + "print \"Pz\",round(Pz,2),'mW'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.27(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Range of Rl is 250 ohm to 1250 ohm\n", + "Il= 8 mA\n" + ] + } + ], + "source": [ + "Vi=50 #in volts(applied voltage)\n", + "R=1 #in kohms\n", + "Vz=10 #in volts(zener diode)\n", + "Izm=32 #in mA(maximum current through zener diode)\n", + "Rlmin=(R*1000*Vz)/(Vi-Vz) #in ohm (minimum value of Rl)\n", + "Vr=Vi-Vz #voltage across resistor R\n", + "Ir=Vr/R #current through resistor R\n", + "Ilmin=Ir-Izm\n", + "Rlmax=Vz*1000/Ilmin #in ohm (maximum value of Rl)\n", + "print \"Range of Rl is\",Rlmin,\"ohm to \",(Rlmax),\"ohm\"\n", + "print \"Il=\",Ilmin,\"mA\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.27(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum wattage rating of the diode= 320 mW\n" + ] + } + ], + "source": [ + "Vz=10 #in volts(zener diode)\n", + "Izm=32 #in mA(maximum current through zener diode)\n", + "Pmax=Vz*Izm\n", + "print \"maximum wattage rating of the diode=\",Pmax,\"mW\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-2.28" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Range of voltage Vi is 23.67 V to 36.87 V\n" + ] + } + ], + "source": [ + "R=220 #in ohms\n", + "Rl=1.2 #in kohm\n", + "Vz=20 #in volts(zener diode)\n", + "Vl=Vz #in volts(parallel connection)\n", + "Izm=60 #in mA(maximum current through zener diode)\n", + "Vimin=(((Rl*1000)+R)*Vz)/(Rl*1000) #in volts(minimum value of Volatge Vi)\n", + "Il=Vl/Rl #in mA(current through resistor Rl)\n", + "Irmax=Izm+Il #maximum value of current through resistor R\n", + "Vimax=((Irmax/1000)*R)+Vz #maximum value of volatge Vi\n", + "print \"Range of voltage Vi is\",round(Vimin,2),\"V to \",round(Vimax,2),\"V\"" + ] + } + ], + "metadata": { + "anaconda-cloud": {}, + "kernelspec": { + "display_name": "Python [Root]", + "language": "python", + "name": "Python [Root]" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.12" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter3.ipynb b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter3.ipynb new file mode 100644 index 00000000..5dc4aeac --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter3.ipynb @@ -0,0 +1,231 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter-3 Bipolar Junction Transistors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-3.1(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collector current(Ic)= 3 mA\n" + ] + } + ], + "source": [ + "Ie=3 #in mA(emitter current)\n", + "Vcb=10 #in volts(collector-base voltage)\n", + "#from the characterstics given in the question\n", + "#looking at the intersection of line Vcb=10V and Ie=3mA,\n", + "Ic=3 #in mA(collector current)\n", + "print \"Collector current(Ic)=\",Ic,\"mA\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-3.1(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collector current(Ic)= 3 mA\n", + "Change in Ic is negligible\n" + ] + } + ], + "source": [ + "Ie=3 #in mA(emitter current)\n", + "Vcb=2 #in volts(collector-base voltage)\n", + "#from the characterstics given in the question\n", + "#looking at the intersection of line Vcb=2V and Ie=3mA,\n", + "Ic=3 #in mA(collector current)\n", + "print \"Collector current(Ic)=\",Ic,\"mA\"\n", + "print \"Change in Ic is negligible\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-3.1(c)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vbe= 0.74 V\n" + ] + } + ], + "source": [ + "Ic=4 #in mA(collector current)\n", + "Vcb=20 #in volts(collector-base voltage)\n", + "#from the characterstics given in the question\n", + "#from the 2nd charcterstics,\n", + "Ie=Ic\n", + "#looking at the intersection of line Vcb=20V and Ie=Ic=4mA,\n", + "Vbe=0.74 #in volts(base-emitter voltage)\n", + "print \"Vbe=\",Vbe,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-3.1(d)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vbe= 0.7 V\n" + ] + } + ], + "source": [ + "Ic=4 #in mA(collector current)\n", + "Vcb=20 #in volts(collector-base voltage)\n", + "#from the characterstics given in the question\n", + "#from the 1st charcterstics,\n", + "Ie=Ic\n", + "#from the 2nd charcterstics,Vbe is always 0.7V for any Ie\n", + "Vbe=0.7 #in volts(base-emitter voltage)\n", + "print \"Vbe=\",Vbe,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-3.2(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "collector current(Ic)= 3.4 mA\n" + ] + } + ], + "source": [ + "Ib=30 #in microA (base current)\n", + "Vce=10 #in volts(collector-emitter voltage)\n", + "#from the characterstics given in the question,\n", + "#looking at the intersection of line Vce=10V and Ib=30microA,\n", + "Ic=3.4 #in mA(collector current)\n", + "print \"collector current(Ic)=\",Ic,\"mA\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-3.2(b)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "collector current(Ic)= 2.5 mA\n" + ] + } + ], + "source": [ + "Vce=15 #in volts(collector-emitter voltage)\n", + "Vbe=0.7 #in volts(collector-emitter voltage)\n", + "#from the characterstics of Vbe vs Ib given in the question,\n", + "#looking at the intersection of line Vce=15V and Vbe=0.7V,\n", + "\n", + "Ib=20 #in microA(base current)\n", + "\n", + "#from the characterstics of Vce vs Ic given in the question,\n", + "#looking at the intersection of line Vce=15V and Ib=0.7 microA,\n", + "\n", + "Ic=2.5 #in mA(collector current)\n", + "print \"collector current(Ic)=\",Ic,\"mA\"" + ] + } + ], + "metadata": { + "anaconda-cloud": {}, + "kernelspec": { + "display_name": "Python [Root]", + "language": "python", + "name": "Python [Root]" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.12" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter4.ipynb b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter4.ipynb new file mode 100644 index 00000000..3c0e05d2 --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter4.ipynb @@ -0,0 +1,88 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4- DC Biasing - BJTs" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-4.1 Page No-165" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a.Base current Ibq= 47.08 microA and Collector current Icq= 2.35 mA\n", + "b.Collector-Emitter voltage Vceq= 6.82 V\n", + "c.Base voltage Vb= 0.7 V and Collector Voltage Vc= 6.82 V\n", + "d.Base-Collector voltage Vbcq= -6.12 V\n" + ] + } + ], + "source": [ + "#from the given data:\n", + "Vcc=12.0 #supply voltage in volts\n", + "Vbe=0.7 #base emitter voltage in volts\n", + "Rb=240.0 #base Resistance in kohm\n", + "B=50\n", + "Rc=2.2 #collector resistance in kohm\n", + "\n", + "#Calculation:\n", + "Ib=(Vcc-Vbe)/Rb #base current in microA\n", + "Ic=B*Ib #collector current in mA\n", + "Vce=Vcc-Ic*Rc #collector-emitter voltage in volts\n", + "Vb=Vbe #base volate in volts\n", + "Vc=Vce #collector voltage in volts\n", + "Vbc=Vb-Vc #bse-collector voltage in volts\n", + "\n", + "print \"a.Base current Ibq=\",round(Ib*1000,2),\"microA and Collector current Icq=\",round(Ic,2),\"mA\"\n", + "print \"b.Collector-Emitter voltage Vceq=\",round(Vce,2),\"V\"\n", + "print \"c.Base voltage Vb=\",Vb,\"V and Collector Voltage Vc=\",round(Vc,2),\"V\"\n", + "print \"d.Base-Collector voltage Vbcq=\",round(Vbc,2),\"V\"\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python [Root]", + "language": "python", + "name": "Python [Root]" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.12" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter6.ipynb b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter6.ipynb new file mode 100644 index 00000000..cb1df91c --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter6.ipynb @@ -0,0 +1,66 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter- 6 Field Effect Transistors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example-6.4 Page No-398" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The required Value of k= 0.061 mA/v2\n" + ] + } + ], + "source": [ + "#from the given data in the question:\n", + "Id=3.0 #Drain current in mA\n", + "Vgs=10.0 #Gate-source voltage in volts\n", + "Vth=3.0 #threshold voltage in volts\n", + "\n", + "k=Id/((Vgs-Vth)**2) #constant in A/V2\n", + "\n", + "print \"The required Value of k=\",round(k,3),\"mA/v2\"" + ] + } + ], + "metadata": { + "anaconda-cloud": {}, + "kernelspec": { + "display_name": "Python [Root]", + "language": "python", + "name": "Python [Root]" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.12" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter9.ipynb b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter9.ipynb new file mode 100644 index 00000000..544903c1 --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/Chapter9.ipynb @@ -0,0 +1,532 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter-9 BJT and JFET Frequency Response" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example- 9.1 Page number-539" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a: 6.0\n", + "b: 3.0\n", + "c: -2.0\n", + "d: -1.0\n" + ] + } + ], + "source": [ + "import math\n", + "e=2.718\n", + "print \"a:\",math.log10(10**6)\n", + "print \"b:\",round(math.log(e**3),1)\n", + "print \"c:\",math.log10(10**-2)\n", + "print \"d:\",round(math.log(e**-1),1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example- 9.2 Page number-539" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a: 1.806\n", + "b: 4.159\n", + "c: 3.204\n", + "d: 3.903\n" + ] + } + ], + "source": [ + "import math\n", + "print \"a:\",round(math.log10(64),3)\n", + "print \"b:\",round(math.log(64),3)\n", + "print \"c:\",round(math.log10(1600),3)\n", + "print \"d:\",round(math.log10(8000),3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example- 9.3 Page number-540" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a: 39.81\n", + "b: 1.0408\n" + ] + } + ], + "source": [ + "import math\n", + "e=2.718\n", + "print \"a:\",round(10**(1.6),2)\n", + "print \"b:\",round(e**0.04,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example- 9.4 Page number-541" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a: -0.3\n", + "b: 1.204\n", + "c: 1.255\n" + ] + } + ], + "source": [ + "import math\n", + "x=4000.0/250.0\n", + "\n", + "print \"a:\",round(math.log10(0.5),1)\n", + "print \"b:\",round(math.log10(x),3)\n", + "print \"c:\",round(math.log10(0.6*30),3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example- 9.6 Page number-544" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnitude of gain: 100000.0\n" + ] + } + ], + "source": [ + "A=100.0 #Gain in dB\n", + "\n", + "#we know: A=20*log(x),therefore:\n", + "x=10**(A/20)\n", + "\n", + "print \"Magnitude of gain:\",x" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example- 9.7 Page number-544" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a:Power gain: -13.01 dB\n", + "b:Voltage gain: -20.0 dB\n" + ] + } + ], + "source": [ + "import math\n", + "#from the data given in the question:\n", + "Pi=10000 #input power in watt\n", + "Po=500.0 #output power in watt\n", + "Vi=1000 #input voltage in volts\n", + "Zo=20 #output impedance in ohm\n", + "\n", + "#Calculation:\n", + "Gp=10*math.log10(Po/Pi) #power gain in dB\n", + "Vo=math.sqrt(Po*Zo) #output voltage in volts\n", + "Gv=20*math.log10(Vo/Vi) #voltage gain in dB\n", + "\n", + "\n", + "print \"a:Power gain:\",round(Gp,2),\"dB\"\n", + "print \"b:Voltage gain:\",Gv,\"dB\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example- 9.8 Page number-544" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a:Input power : 126.5 dB\n", + "b:Input Voltage: 0.2 V\n" + ] + } + ], + "source": [ + "import math\n", + "#from the data given in the question:\n", + "Po=40.0 #output power in watt\n", + "Zo=10 #output impedance in ohm\n", + "Pi=25 #input power in dB\n", + "\n", + "#Calculation: \n", + "Piw=Po/(10**2.5) #input power in watt\n", + "Vo=math.sqrt(Po*Zo) #output voltage in volts\n", + "Vi=Vo/100 #input voltage in V\n", + "\n", + "\n", + "print \"a:Input power :\",round(Piw*1000,1),\"dB\"\n", + "print \"b:Input Voltage:\",Vi,\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example- 9.10 Page number-553" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Break frequency: 318.5 Hz\n", + "Gain: 0.501\n" + ] + } + ], + "source": [ + "#from the given figure:\n", + "C=0.1*(10**-6) #capacitance in farad\n", + "R=5*(10**3) #Resistance in ohm\n", + "Avd=-6.0 #gain in dB\n", + "\n", + "#calculation:\n", + "\n", + "f1=1/(2*3.14*R*C) #break frequency in Hz\n", + "Av=10**(Avd/20) #Gain\n", + "\n", + "print \"Break frequency:\",round(f1,1),\"Hz\"\n", + "print \"Gain:\",round(Av,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example- 9.11 Page number-558" + ] + }, + { + "cell_type": "code", + "execution_count": 99, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Value of re: 15.76 ohm\n", + "cut-off frequency due to source capacitance Cs: 6.87 Hz\n", + "cut-off frequency due to collector capacitance Cc: 25.68 Hz\n", + "cut-off frequency due to emitter capacitance Ce: 327.0 Hz\n", + "The cut-off frequency of the network: 327.0 Hz\n" + ] + } + ], + "source": [ + "#from the data given in the question:\n", + "Cs=10.0 #source capacitor in microF\n", + "Ce=20.0 #emitter capacitor in microF\n", + "Cc=1.0 #collector capacitor in microF\n", + "Rs=1.0 #source Resistance in kohm\n", + "Re=2.0 #emitter Resistance in kohm\n", + "Rc=4.0 #collector Resistance in kohm\n", + "R1=40.0 #in kohm\n", + "R2=10.0 #in kohm\n", + "Rl=2.2 #load resistance in kohm\n", + "B=100.0\n", + "Vcc=20.0 #supply voltage in volts\n", + "\n", + "#Calculation:\n", + "\n", + "#since,B*Re>>10*R2, we can apply voltage divider configuration:\n", + "Vb=(R2*Vcc)/(R2+R1) #Base voltage in Volts\n", + "Ve=Vb-0.7 #emitter voltage in volts\n", + "Ie=Ve/Re #emitter current in mA\n", + "re=26/Ie #in ohm\n", + "x=(B*re)/1000 #temporary value\n", + "t=(Rc*Rl)/(Rc+Rl) #effective resistance for Rc||Rl in kohm\n", + "Av=-round((t/re)*1000) #midband gain\n", + "\n", + "Y=(R1*R2)/(R1+R2) #temporary value\n", + "Zi=(Y*x)/(Y+x) #input impedance in kohm\n", + "\n", + "d=round(Zi/(Zi+Rs),4) #temporary value\n", + "Avs=round(d*Av,2) #new gain\n", + "\n", + "#calculating effect of capacitors:\n", + "Ri=Zi\n", + "Fls=1/(2*3.14*(Rs+Ri)*Cs) #cut-off frequency due to source capacitance in Hz\n", + "\n", + "Flc=1/(2*3.14*(Rc+Rl)*Cc) #cut-off frequency due to collector capacitance in Hz\n", + "\n", + "Rsnew=(Y*Rs)/(Y+Rs) #effective resistance of R1||R2||Rs\n", + "g=(Rsnew/B)*1000+re\n", + "Re=Re*1000 #emitter resistance in ohm\n", + "Recf=round((g*Re)/(g+Re),2) \n", + "Fle=1/(2*3.14*Recf*Ce) #cut-off frequency due to emitter capacitance in Hz\n", + "\n", + "print \"Value of re:\",round(re,2),\"ohm\"\n", + "print \"cut-off frequency due to source capacitance Cs:\",round(Fls*1000,2),\"Hz\"\n", + "print \"cut-off frequency due to collector capacitance Cc:\",round(Flc*1000,2),\"Hz\"\n", + "print \"cut-off frequency due to emitter capacitance Ce:\",round(Fle*(10**6),1),\"Hz\"\n", + "\n", + "print \"The cut-off frequency of the network:\",round(max(Fls*1000,Flc*1000,Fle*(10**6)),1),\"Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Note: The difference in result obtained is due to different precision of values taken at each step of the solution" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example- 9.12 Page number-566" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cut-off frequency due to source capacitance Cs: 46.16 Hz\n", + "cut-off frequency due to 1st coupling capacitance Cg: 15.77 Hz\n", + "cut-off frequency due to 2nd coupling capacitance Cs: 238.9 Hz\n", + "The cut-off frequency of the network: 238.9 Hz\n" + ] + } + ], + "source": [ + "#from the drawn characterstics graph:\n", + "Vgs=-2.0 #Gate source voltage in volts\n", + "Id=2 #Drain current in mA\n", + "Cg=0.01 #second coupling capacitor in microF\n", + "Cs=2.0 #source capacitor in microF\n", + "Cc=0.5 # second coupling capacitor in microF\n", + "Rsig=10.0 #input Resistance in kohm\n", + "Rg=1000.0 #gate Resistance in Mohm\n", + "Rd=4.7 #drain Resistance in kohm\n", + "Rs=1.0 #source resistancein kohm\n", + "Idss=8 #drain saturation current in mA\n", + "Vp=-4.0 #threshold voltage in volts\n", + "Vdd=20 #supply voltage in volts\n", + "Rl=2.2 #load resistance in kohm\n", + "\n", + "#Calculation:\n", + "gmo=(2*Idss)/Vp\n", + "gm=gmo*(1-((Vgs/Vp)))\n", + "Ro=Rd\n", + "#calculating effect of capacitors:\n", + "Flg=1/(2*3.14*Cg*(10**-3)*(Rsig+Rg)) #effect of Coupling capacitor\n", + "Flc=1/(2*3.14*Cc*(10**-3)*(Ro+Rl)) #effect of coupling capacitor\n", + "\n", + "p=-1/gm #temporary value\n", + "Req=((Rs*p)/(Rs+p))*1000 \n", + "Fls=1/(2*3.14*Req*Cs) #effect of source capacitor\n", + "\n", + "print \"cut-off frequency due to source capacitance Cs:\",round(Flc,2),\"Hz\"\n", + "print \"cut-off frequency due to 1st coupling capacitance Cg:\",round(Flg,2),\"Hz\"\n", + "print \"cut-off frequency due to 2nd coupling capacitance Cs:\",round(Fls*(10**6),1),\"Hz\"\n", + "\n", + "print \"The cut-off frequency of the network:\",round(max(Flc,Flg,Fls*(10**6)),1),\"Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example- 9.13 Page number-576" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cut-off frequency for input network Fhi: 738.36 kHz\n", + "cut-off frequency for output network Fho: 8.6 MHz\n", + "Beta cut-off frequency Fb: 2.53 Hz\n", + "Gain Bandwidth Product Ft: 252.6 Hz\n" + ] + } + ], + "source": [ + "#from the data given in the question:\n", + "Cs=10.0 #source capacitor in microF\n", + "Ce=20.0 #emitter capacitor in microF\n", + "Cc=1.0 #collector capacitor in microF\n", + "Rs=1.0 #source Resistance in kohm\n", + "Re=2.0 #emitter Resistance in kohm\n", + "Rc=4.0 #collector Resistance in kohm\n", + "R1=40.0 #in kohm\n", + "R2=10.0 #in kohm\n", + "Rl=2.2 #load resistance in kohm\n", + "B=100.0\n", + "Vcc=20.0 #supply voltage in volts\n", + "\n", + "Cbe=36.0 #base-emitter capacitor in pF\n", + "Cbc=4.0 #base-collector capacitor in pF\n", + "Cce=1.0 #collector-emitter capacitor in pF\n", + "Cwi=6 #in pF\n", + "Cwo=8 #in pF\n", + "Ri=1.32 #in kohm\n", + "Avmid=-90.0 #normal Gain\n", + "re=15.76 #in ohm\n", + "#calculation:\n", + "\n", + "\n", + "y=(R1*R2)/(R1+R2) #temporary value\n", + "z=(Rs*y)/(Rs+y) #temporary value\n", + "Rthi=(Ri*z)/(Ri+z) #effective input resistance in kohm\n", + "Rtho=(Rc*Rl)/(Rc+Rl) #effective output resistance in kohm\n", + "Ci=Cwi+Cbe+(Cbc*(1-Avmid)) #input capacitance in pF\n", + "Co=Cwo+Cce+(1-(1/Avmid))*Cbc #output capacitance in pF\n", + "\n", + "Fhi=1/(2*Rthi*3.14*Ci*(10**-6)) #cut-off frequency for input network\n", + "Fho=1/(2*Rtho*3.14*Co) #cut-off frequency for output network\n", + "\n", + "Fb=1/(2*3.14*B*re*(Cbe+Cbc)*(10**-6))\n", + "Ft=B*Fb\n", + "\n", + "print \"cut-off frequency for input network Fhi:\",round(Fhi,2),\"kHz\"\n", + "print \"cut-off frequency for output network Fho:\",round(Fho*1000,2),\"MHz\"\n", + "print \"Beta cut-off frequency Fb:\",round(Fb,2),\"Hz\"\n", + "print \"Gain Bandwidth Product Ft:\",round(Ft,1),\"Hz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Note: The difference in result obtained is due to different precision of values taken at each step of the solution" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python [Root]", + "language": "python", + "name": "Python [Root]" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.12" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/screenshots/Ac-r_yJl7SyA.png b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/screenshots/Ac-r_yJl7SyA.png Binary files differnew file mode 100644 index 00000000..f7e4ea5c --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/screenshots/Ac-r_yJl7SyA.png diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/screenshots/Fixe_nEc9eao.png b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/screenshots/Fixe_nEc9eao.png Binary files differnew file mode 100644 index 00000000..25d17484 --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/screenshots/Fixe_nEc9eao.png diff --git a/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/screenshots/Outp_lOhRXkd.png b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/screenshots/Outp_lOhRXkd.png Binary files differnew file mode 100644 index 00000000..8e7ffb04 --- /dev/null +++ b/Electronic_Devices_&Circuit_Theory_by_R._L._Boylestad_&_Louis_Nashlesky/screenshots/Outp_lOhRXkd.png |