diff options
Diffstat (limited to 'Basic_Electronics_by_D_De')
-rw-r--r-- | Basic_Electronics_by_D_De/1-Semiconductor_Fundamentals.ipynb | 1194 | ||||
-rw-r--r-- | Basic_Electronics_by_D_De/2-Diode_Fundamentals.ipynb | 1514 | ||||
-rw-r--r-- | Basic_Electronics_by_D_De/3-Diode_Circuits.ipynb | 1076 | ||||
-rw-r--r-- | Basic_Electronics_by_D_De/4-BJT_Fundamentals.ipynb | 557 | ||||
-rw-r--r-- | Basic_Electronics_by_D_De/5-BJT_Circuits.ipynb | 337 | ||||
-rw-r--r-- | Basic_Electronics_by_D_De/6-Field_Effect_Transistor.ipynb | 980 | ||||
-rw-r--r-- | Basic_Electronics_by_D_De/7-FET_Circuits.ipynb | 1904 | ||||
-rw-r--r-- | Basic_Electronics_by_D_De/8-Special_Semiconductor_Devices.ipynb | 471 |
8 files changed, 8033 insertions, 0 deletions
diff --git a/Basic_Electronics_by_D_De/1-Semiconductor_Fundamentals.ipynb b/Basic_Electronics_by_D_De/1-Semiconductor_Fundamentals.ipynb new file mode 100644 index 0000000..535aa7d --- /dev/null +++ b/Basic_Electronics_by_D_De/1-Semiconductor_Fundamentals.ipynb @@ -0,0 +1,1194 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Semiconductor Fundamentals" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10: Position_of_Fermi_energy_at_0K.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Position of Fermi energy at 0K\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-10 in page 34\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"h=1.5*10^-34; // Constant of calculation in Js\n", +"m_c=0.067*0.91*10^-30; // Effective mass of conduction electron in Kg\n", +"n_0=10^24; // Electron concentration at 0K /m^3\n", +"\n", +"// Calculation\n", +"E_f= ((h^2*(3*%pi^2*n_0)^(2/3))/(2*m_c));\n", +"A=E_f/(1.6*10^-19);\n", +"\n", +"printf('Position of Fermi level at 0K is %0.4f eV',A);\n", +"\n", +"// Result\n", +"// Fermi energy at 0K as measured from edge of conduction band is 0.11 eV\n", +"// Fermi energy is placed 0.11 eV above the edge of conduction band\n", +"// Fermi energy is within the conduction band" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11: Time_taken_to_reach_Brillouin_zone.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Time taken to reach Brillouin zone\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-11 in page 46\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"h=1.05*10^-34; // Constant of calculation in Js\n", +"Kb=1.112*10^8; // Wave vector at Brillouin xone along x-axis /cm\n", +"E_0=10^4; // External electric field applied in V/cm\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"\n", +"// Calculation\n", +"tou=(h*Kb)/(e*E_0);\n", +"\n", +"printf('Time taken by electron is %0.3e s',tou);\n", +"\n", +"// Result\n", +"// Time taken by electron to reach Brillouin zone is 7.297 ps" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12: Calculate_drift_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate drift velocity\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-12 in page 46\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"m_c=0.067*0.91*10^-30; // Effective electron mass in Kg\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"E_0=10^5; // External electric field in KV/m\n", +"tou1=10^-13; // First Brillouin zone time in s\n", +"tou2=10^-12; // Second Brillouin zone time in s\n", +"tou3=10^-11; // Third Brillouin zone time in s\n", +"\n", +"// Calculation\n", +"v_01=(e*tou1*E_0)/m_c;\n", +"v_02=(e*tou2*E_0)/m_c;\n", +"v_03=(e*tou3*E_0)/m_c;\n", +"\n", +"printf('(a)Drift velocity in first case is %0.2e m/s\n',v_01);\n", +"printf('(b)Drift velocity in second case is %0.2e m/s\n',v_02);\n", +"printf('(c)Drift velocity in third case is %0.2e m/s',v_03);\n", +"\n", +"// Result\n", +"// (a) Drift velocity in first case is 2.62*10^4 cm/s\n", +"// (b) Drift velocity in second case is 2.62*10^5 cm/s\n", +"// (c) Drift velocity in third case is 2.62*10^6 cm/s" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13: Compute_conductivity_drift_velocity_current_density.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Compute conductivity,drift velocity,current density\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-13 in page 47\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"mu=35.2*10^-4; // Mobility of electrons in m^2/Vs\n", +"n_0=7.87*10^28; // Number of free electrons per cubic meter\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"E_0=30*10^2; // External electric field applied in V/m\n", +"\n", +"// Calculation\n", +"sigma=n_0*e*mu;\n", +"printf('(a)Mobility = %0.1e m^2/Vs\n',mu);\n", +"printf('Conductivity of the specimen is %0.2e s/m\n\n',sigma);\n", +"V_0=mu*E_0;\n", +"J=sigma*E_0;\n", +"printf('(b)Electric field Eo = %0.0e V/m\n',E_0);\n", +"printf('Drift velocity of free electrons is %0.2f m/s\n',V_0);\n", +"printf('Current density is %0.2e A/meter^3',J);\n", +"\n", +"// Result\n", +"// (a) Conductivity of specimen is 4.43*10^7 s/m\n", +"// (b) Drift velocity of free electrons is 10.56 m/s\n", +"// (c) Current density is 13.3*10^10 A/meter cube" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14: Calculate_drift_velocity_in_copper_conductor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate drift velocity in copper conductor\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-14 in page 47\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"A=10^-5; // Cross sectional area in m^2\n", +"I=100; // Current flowing in A\n", +"n_0=8.5*10^28; // Free electron concentration of copper per cubic meter\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"\n", +"// Calculation\n", +"V_d=I/(n_0*A*e);\n", +"\n", +"printf('The drift velocity in copper is %0.3e m/s',V_d);\n", +"\n", +"// Result\n", +"// Drift velocity in copper is 7.353*10^-4 m/s" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16: Calculate_drift_velocity_in_copper.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate drift velocity in copper\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-16 in page 47\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"tou=10^-14; // Relaxation time in s\n", +"m_c=0.02*9.1*10^-31; // Effective mass of electron in Kg\n", +"E_0=0.1; // Electric field across conductor in V/m\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"\n", +"// Calculation\n", +"V_0=(e*E_0*tou)/m_c;\n", +"\n", +"printf('The drift velocity of electrons in copper is %0.3f m/s',V_0);\n", +"\n", +"// Result\n", +"// Drift velocity of electrons in copper is 0.009 m/s" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.17: Equilibrium_hole_concentration_in_Si.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Equilibrium hole concentration in Si\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-17 in page 48\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"n_0=10^17; // Free electron concentration /cm^3\n", +"n_i=1.5*10^10; // Constant of calculation\n", +"// Calculation\n", +"p_0= n_i^2/n_0;\n", +"\n", +"printf('Equilibrium hole concentration is %0.2e cm^-3',p_0);\n", +"\n", +"// Result\n", +"// Equilibrium hole concentration in Si sample is 2.25*10^3 cm^-3" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.18: Time_taken_to_reach_Brillouin_zone.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Time taken to reach Brillouin zone\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-18 in page 48\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"h=1.05*10^-34; // Constant of calculation in Js\n", +"kB=1.112*10^8; // Brillouin zone edge along x-axis\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"E_0=10^4; // External electric field in V/m\n", +"\n", +"// Calculation\n", +"tou=(h*kB)/(e*E_0);\n", +"printf('Time taken to reach Brillouin zone is %0.3e s',tou);\n", +"\n", +"// Result\n", +"// Time taken by GaAs electron to reach Brillouin zone is 7.298 ps" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1: Calculate_wave_vector_carried_by_photo.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate wave vector carried by photon\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-1 in page 7\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"c=3*10^8; // Speed of light in m/s\n", +"h=6.64*10^-34;// Planks constant in Js\n", +"E_photon=2*1.6*10^-19; // Energy of photon in J\n", +"\n", +"//Calculations\n", +"lambda=(c*h)/E_photon; \n", +"k=(2*%pi/lambda);\n", +"\n", +"printf('The wavelenght of a 2.0eV photon = %0.3e m\n',lambda);\n", +"printf('The magnitude of k vector = %0.2e m^-1',k);\n", +"\n", +"// Results\n", +"// The wavelength of a 2.0 eV photon is 6225 Angstrom\n", +"// The magnitude of k-vector is 1.01 * 10^7 m^-1" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.20: Electron_hole_concentration_at_minimum_conductivity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Electron,hole concentration at minimum conductivity\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-20 in page 49\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"mu_n=1350; // Mobility of electrons in cm^2/Vs\n", +"mu_p=450; // Movility of holes in cm^2/Vs\n", +"n_i=1.5*10^10; // Intrinsic carrier concentration /cm^3\n", +"\n", +"// Calculation\\n", +"//Minimum conductivity of Si when slightly p-type has been proved in text\n", +"//Thus the electron and hole concentrations are derived as below\n", +"n_0=n_i*sqrt(mu_p/mu_n); \n", +"p_0=n_i*sqrt(mu_n/mu_p); \n", +"\n", +"printf('(a)Electron concentration is %0.2e cm^-3\n',n_0);\n", +"printf('(b)Hole concentration is %0.2e cm^-3',p_0);\n", +"\n", +"// Result \n", +"// (a) Electron concentration is 8.66*10^9 cm^-3\n", +"// (b) Hole concentration is 2.6*10^10 cm^-3" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.21: Position_of_Fermi_level_at_room_temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Position of Fermi level at room temperature\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-22 in page 50\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"C_Ge=4.41*10^22; // Concentration of Ge atom /cm^3\n", +"N_D=4.41*10^15; // Number of free donor atoms \n", +"N_C=8.87*10^18; // Number of conduction electrons assuming full ionization\n", +"K_BT=0.026; // Measured in eV at room temperature\n", +"\n", +"// Calculation\n", +"E_F=K_BT*log(N_D/N_C);\n", +"\n", +"printf('Position of fermi level is %0.4f',E_F);\n", +"\n", +"// Result\n", +"// Position of Fermi level from edge of conduction band is -0.1977\n", +"// Thus E_F is below E_C" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.22: Mobility_of_free_electrons_in_Alluminium.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Mobility of free electrons in Alluminium\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-22 in page 50\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"n_0=18*10^28; // Derived from the given formula in textbook\n", +"rho=3.44*10^-6; // Resistivity in ohm-cm\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"\n", +"// Calculation\n", +"mu=10^2/(n_0*e*rho);\n", +"\n", +"printf('Mobility of free electrons is %0.0e m^2/V-s',mu);\n", +"\n", +"// Result\n", +"// Mobility of free electrons in Alluminium is 10^-3 m^2/V-s" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.23: Percentage_of_increse_in_carrier_concentration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Percentage of increse in carrier concentration\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-23 in page 51\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"kT=0.026; // Value at T=300K\n", +"T=300; // Room temperature in K\n", +"dT=1/300; // Rate of change of temperature\n", +"E_g=0.785; // Band gap energy in germanium in eV\n", +"\n", +"// Calculation\n", +"dni=((1.5+(E_g/(2*kT)))*dT)*100; \n", +"\n", +"printf('Rise in intrinsic carrier concentration is %0.1f percent/degree',dni);\n", +"\n", +"// Result\n", +"// Percentage rise in intrinsic carrier concentration is 5.5 %/degree" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.24: Previous_problem_calculated_for_intrinsic_silicon.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Previous problem calculated for intrinsic silicon\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-24 in page 51\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"kT=0.026; // Value at T=300K\n", +"T=300; // Room temperature in K\n", +"dT=1/300; // Rate of change of temperature\n", +"E_g=1.21; // Band gap energy in silicon in eV\n", +"\n", +"// Calculation\n", +"dni=((1.5+(E_g/(2*kT)))*dT)*100; \n", +"\n", +"printf('Rise in intrinsic carrier concentration is %0.1f percent/degree',dni);\n", +"\n", +"// Result\n", +"// Percentage rise in intrinsic carrier concentration is 8.3 %/degree" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.25: Find_drift_velocity_mobility_conductivity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find drift velocity,mobility,conductivity\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-25 in page 51\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"A=0.835*10^-6; // Cross section of wire in m^2\n", +"J=2.4*10^6; // Current density in A/m^2\n", +"n_0=8.4*10^27; // Concentration of electrons in copper in electrons/m^3\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"ohm=0.0214; // Resistance per meter\n", +"E_0=2*ohm; // Electric field in V/m\n", +"\n", +"// Calculations\n", +"v_0=(J)/(n_0*e);\n", +"printf('(a)The drift velocity is %0.2e m/s\n',v_0);\n", +"mu=v_0/E_0;\n", +"printf('(b)The mobility of electrons is %0.2e m^2/V-s\n',mu);\n", +"sigma=(n_0*10*e*mu);\n", +"printf('(c)Therefore the conductivity is %0.2e /ohm-m',sigma);\n", +"\n", +"// Result\n", +"// (a) The drift velocity is 1.78*10^-3 m/s\n", +"// (b) Mobility in this case is 4.16*10^-2 m^2/V-s\n", +"// (c) Conductivity is 5.61*10^8 1/ohm-m" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.26: Determine_concentration_of_electrons_and_holes.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Determine concentration of electrons and holes\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-26 in page 52\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"N_D=2*10^14; // Number of donor atoms in atoms/cm^2\n", +"N_A=3*10^14; // Number of acceptor atoms in atoms/cm^2\n", +"ni=2.5*10^19; // number of intrinsic atoms in atoms/cm^2\n", +"\n", +"// Calculation\n", +"p_0=(0.5*10^14)+sqrt(0.25*10^28 + 6.25*10^26);\n", +"n_0=-(0.5*10^14)+sqrt(0.25*10^28 + 6.25*10^26);\n", +"printf('(a)Concentration of free electrons is %0.3e cm^-3\n',n_0);\n", +"printf('(b)Concentration of holes is %0.3e cm^-3\n',p_0);\n", +"printf('since p_0>n_0 the sample is p-type\n');\n", +"printf('When N_A=N_D=10^15,\n n_0=p_0 from the neutrality equation\n');\n", +"printf('Thus the germanium sample in this question is intrinsic by compensation');\n", +"printf('When N_D=10^16,\n');\n", +"p_0=(6.25*10^26)/10^16;\n", +"printf('(c)p_0=%0.2e cm^-3\n',p_0);\n", +"printf('Since n_0>p_0,germanium sample in this case is n-type');\n", +"\n", +"// Result\n", +"// (a) Number of free electrons are 0.058*10^14 cm^-3 \n", +"// (b) Number of holes are 1.058*10^14 cm^-3\n", +"// Semiconductor can be made intrinsic without doping or by equal doping" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.27: Concentration_of_holes_and_electrons.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Concentration of holes and electrons\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-27 in page 52\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"sigma=100; // Conductivity of p-type germanium\n", +"e=1.6*10^-19; // Charge on an electron in eV\n", +"mu_p=1800; // Mobility of holes in cm^2/Vs\n", +"ni=2.5*10^13; // Number of intrinsic atoms in germanium\n", +"mu_n=1300; // Mobility of electrons in cm^2/Vs\n", +"sigma1=0.1; // Conductivity in n-type silicon in /ohm-cm\n", +"ni1=1.5*10^10; // Number of intrinsic atoms in silicon\n", +"P_p=3.47*10^17; // Constant of calculation\n", +"\n", +"// Calculation\n", +"printf('For Germanium:\n');\n", +"p_0=sigma/(e*mu_p);\n", +"n_0=(ni^2)/P_p;\n", +"printf('(a)Concentration of holes is %0.2e cm^-3\n',p_0);\n", +"printf('(b)Concentration of electrons is %0.2e m^-3\n',n_0);\n", +"printf('For Silicon:\n');\n", +"n_0=sigma1/(e*mu_n);\n", +"p_0=(ni1^2)/(4.81*10^14);\n", +"printf('(c)Concentration of electrons is %0.2e cm^-3\n',n_0);\n", +"printf('(d)Concentration of holes is %0.2e m^-3',p_0);\n", +"\n", +"// Result\n", +"// (a) For Ge,Hole conc. = 3.47*10^17 cm^-3, Electron conc. = 1.8*10^15 m^-3\n", +"// (b) For Si,Hole conc. = 4.68*10^5 cm^-3, Electron conc. = 4.81*10^14 cm^-3" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.28: To_prove_resistivity_is_45_ohm_cm.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// To prove,resistivity is 45 ohm-cm\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-28 in page 53\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"ni=2.5*10^13; // Intrinsic concentration /cm^3\n", +"mu=5600; // Sum of mobilities of holes and electrons\n", +"e=1.6*10^-19; // Charge on an electron in C \n", +"\n", +"// Calculation\n", +"sigma=e*ni*mu;\n", +"printf('Conductivity of germanium is %0.3f (s/cm)^-1\n',sigma);\n", +"rho=1/sigma;\n", +"printf('Therefore resistivity is %0.1f ohm-cm',rho);\n", +"\n", +"// Result\n", +"// Conductivity of germanium = 0.0232 (s/cm)^-1\n", +"// Resistivity = 44.6 ohm-cm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.29: Find_conductivity_of_intrinsic_germanium.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find conductivity of intrinsic germanium\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-29 in page 53\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"ni=2.5*10^13; // Intrinsic concentration /cm^3\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"mu_n=3800; // Mobility of electrons in cm^2/Vs\n", +"mu_p=1800; // Mobility of holes in cm^2/Vs\n", +"N_D=4.41*10^15; // Concentration of donor atoms in Ge /cm^3\n", +"\n", +"// Calculation\n", +"sigma=(ni*e)*(mu_n+mu_p);\n", +"printf('(a)Intrinsic conductivity=%0.4f s/cm\n',sigma);\n", +"p_0=(ni^2)/N_D;\n", +"printf('p_0=%0.2e /cm^3\n',p_0);\n", +"sigma1=N_D*e*mu_n;\n", +"printf('(b)Since n_0>p_0, Conductivity=%0.2f s/cm\n',sigma1);\n", +"n_0=(ni^2)/N_D;\n", +"printf('With given acceptor impurity,\nn_0=%0.2e /cm^3\n',n_0);\n", +"sigma2=N_D*e*mu_p;\n", +"printf('(c)Since p_0>n_0, Conductivity=%0.2f s/cm',sigma2);\n", +"\n", +"// Result\n", +"// (a) Conductivity in first case is 0.0224 s/cm\n", +"// (b) Conductivity in second case is 2.68 s/cm\n", +"// (c) Conductivity in third case is 1.27 s/cm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2: Calculate_semiconductor_band_gap.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate semiconductor band gap\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-2 in page 7\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"lambda=0.5*10^-6; // Wavelength of emitted light in m\n", +"c=3*10^8; // Speed of light in vacuum in m/s\n", +"h=1.05*10^-34;// Constant of calculation\n", +"\n", +"// Calculation\n", +"E_g= (2*%pi*h*c)/lambda;\n", +"A= E_g*10^19/1.6;\n", +"\n", +"printf('The material band gap has to be %0.3f eV',A);\n", +"\n", +"// Result\n", +"//The material band gap is 2.474 eV\n", +"// Semiconductors like C,BN,GaN,SiC meet this criterion" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: Calculate_E_k_relation_of_conduction_electrons.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate E-k relation of conduction electrons\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-3 in page 20\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"m_c=0.1*0.91*10^-30; // Effective mass of conduction electron in kg\n", +"k=0.3*10^10; // Wave vector in /m\n", +"h=1.05*10^-34; // Constant of calculation in Js\n", +"\n", +"// Calculation\n", +"E= (h^2*k^2)/(2*m_c);\n", +"A= E/(1.6*10^-19);\n", +"\n", +"printf('Energy of conduction electrons = %0.1f eV',A);\n", +"\n", +"// Result\n", +"//Energy of the conduction electrons in vertically upward direction is 3.4 eV" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: Energies_of_electrons_in_conduction_band.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Energies of electrons in conduction band\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-4 in page 21\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"k=0.01*10^10; // k-vector value /m\n", +"h=1.05*10^-34; // Constant of calculation Js\n", +"m_0=0.91*10^-30; // Mass of conduction electron Kg\n", +"m_c1=0.067*m_0; // Effective mass of GaAs conduction electron Kg\n", +"m_c2=0.01*m_0; // Effective mass if InAs conduction electron Kg\n", +"\n", +"// Calculation\n", +"E_1=(h^2*(9*k^2))/(2*m_c1);\n", +"A_1=(E_1)/(1.6*10^-19);\n", +"\n", +"printf('(a)Energy of conduction electron in GaAs = %0.2e eV\n',A_1);\n", +"\n", +"E_2=(h^2*(9*k^2))/(2*m_c2);\n", +"A_2=(E_2)/(1.6*10^-19);\n", +"\n", +"printf('(b)Energy of conduction electron in InAs = %0.3e eV',A_2);\n", +"\n", +"// Results\n", +"// (a) Energy of conduction electron in GaAs is 50.9 meV\n", +"// (b) Energy of conduction electron in InAs is 340.7 meV\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5: Energies_of_electrons_in_conduction_band.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Energies of electrons in conduction band\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-5 in page 21\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"h=1.05*10^-34; // Constant of calculation Js\n", +"k=0.1,0.1,0,0; // Values of k-vector\n", +"m_c=0.067*0.091*10^-30; // Effective mass of conduction electron\n", +"\n", +"// Calculation\n", +"E=(h^2*(((0.1*10^10)^2)+((0.1*10^10)^2)))/(2*m_c);\n", +"A= E/(1.6*10^-19);\n", +"\n", +"printf('Energy of conduction electron is %0.3f eV',A);\n", +"\n", +"// Result\n", +"// Energy of conduction electron in the vertically upward direction = 11.302 eV\n", +"// The non parabolic E-k dispersion relation is more appropriate here" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6: Estimation_of_smallest_k_vector_along_x_direction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Estimation of smallest k-vector along x-direction\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-6 in page 21\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"x=1; // x-coordiante\n", +"y=1; // y-coordinate\n", +"z=1; // z-coordinate\n", +"E=0.3*1.6*10^-19; // Energy separation in eV\n", +"m_c=0.067*0.91*10^-30; // Effective mass of conduction electron in kg\n", +"h=1.05*10^-34; // Constant of calculation in Js\n", +"\n", +"// Calculation\n", +"k_x=(2*m_c*E)/(3*h^2);\n", +"A=sqrt(k_x);\n", +"\n", +"printf('K vector along (111) direction is %0.1e m^-1',A);\n", +"\n", +"// Result\n", +"//Value of k-vector along (111) direction is 4.2*10^8 m^-1\n", +"//Parabolic expression has been used to compute the k-vector" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7: Energies_of_electrons_in_conduction_band.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Energies of electrons in conduction band\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-7 in page 22\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"k=0.01*10^10; // k-vector value /m\n", +"h=1.05*10^-34; // Constant of calculation Js\n", +"m_0=0.91*10^-30; // Mass of conduction electron Kg\n", +"m_c1=0.067*m_0; // Effective mass of GaAs conduction electron Kg\n", +"m_c2=0.01*m_0; // Effective mass if InAs conduction electron Kg\n", +"\n", +"// Calculation\n", +"E_1=(h^2*(9*k^2))/(2*m_c1);\n", +"A_1=(E_1)/(1.6*10^-19);\n", +"\n", +"printf('(a)Energy of conduction electron in GaAs = %0.2e eV\n',A_1);\n", +"\n", +"E_2=(h^2*(9*k^2))/(2*m_c2);\n", +"A_2=(E_2)/(1.6*10^-19);\n", +"\n", +"printf('(b)Energy of conduction electron in InAs = %0.3e eV',A_2);\n", +"\n", +"// Results\n", +"// (a) Energy of conduction electron in GaAs is 50.9 meV\n", +"// (b) Energy of conduction electron in InAs is 340.7 meV" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8: Find_position_of_Fermi_level.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find position of Fermi level\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-8 in page 33\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"n_0=6*10^17; // Electron concentration in the conduction band /cm^3\n", +"k_bT=0.026; // Expressed in eV at room temperature\n", +"N_c=4.45*10^17; // Constant of Calculation /cm^3\n", +"\n", +"// Calculation\n", +"E_f=k_bT*log(n_0/N_c);\n", +"A=E_f*10^3;\n", +"\n", +"printf('Position of Fermi level is %0.2f meV',A);\n", +"\n", +"// Result\n", +"// Position of Fermi level is 7.77 meV\n", +"// Intrinsic carrier density is lesser than dopant density\n", +"// Hence semiconductor is non-degenerate" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9: Find_Fermi_level_at_room_temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find Fermi level at room temperature\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 1-9 in page 34\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Data given\n", +"k=1; // Assumed constant \n", +"m_e=2*k; // Effective mass of an electron in Kg\n", +"m_h=k; // Effective mass of only heavy hole in Kg\n", +"k_bT=0.026; // Expressed in eV at room temperature\n", +"\n", +"// Calculation\n", +"E_f=(3/4)*0.026*log(m_e/m_h);\n", +"printf('E_f = ((-E_g/2) - %0.3f) eV\n',E_f);\n", +"printf('Thus Fermi level is below center of forbidden gap by 0.014 eV');\n", +"\n", +"// Result\n", +"// Fermi level in the intrinsic semiconductor is ((-E_g/2) - 0.014) eV" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Basic_Electronics_by_D_De/2-Diode_Fundamentals.ipynb b/Basic_Electronics_by_D_De/2-Diode_Fundamentals.ipynb new file mode 100644 index 0000000..8887a74 --- /dev/null +++ b/Basic_Electronics_by_D_De/2-Diode_Fundamentals.ipynb @@ -0,0 +1,1514 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Diode Fundamentals" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.10: Reverse_saturation_point_of_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Reverse saturation point of current\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-10 in page 93\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"b=2.11; // Constant\n", +"Lsigma=3*10^-4; // Constant\n", +"Vt=0.026; // Threshold voltage in V\n", +"A=1.5*10^-6; // Cross sectional area in mm^2\n", +"sigmai=2.24; // Intrinsic conductivity /ohm-cm\n", +"\n", +"// Calculation\n", +"I_0=((A*Vt*b*sigmai^2)/(1+b)^2)*((1/0.45)+(1/0.015));\n", +"\n", +"printf('Reverse saturation point of current is %0.2e A',I_0);\n", +"\n", +"// Result\n", +"// Reverse saturation point of current is 2.94 mu-A" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.12: Find_reverse_saturation_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find reverse saturation current\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-12 in page 94\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"A=5*10^-2; // Cross sectional area in m^2\n", +"b=2.6; // Constant of calculation\n", +"Lsigma=10^-4; // Constant of calculation\n", +"sigmai=4.32*10^-6; // Intrinsic conductivity in ohm/cm\n", +"Vt=0.026; // Constant in eV\n", +"\n", +"// Calculation\n", +"I_0=A*Vt*(b/(1+b)^2)*sigmai^2*(2*10^4);\n", +"\n", +"printf('The reverse saturation current = %0.2e A',I_0);\n", +"\n", +"// Result\n", +"// The reverse saturation current = 97.25 pA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.13: Ratio_of_reverse_saturation_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Ratio of reverse saturation current\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-13 in page 95\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"b1=2.6; // Constant of calculation\n", +"b2=2.11;// Constant of calculation\n", +"sigmai1=4.32*10^-6; // Intrinsic conductivity for Si /ohm-cm\n", +"sigmai2=2.24*10^-2; // Intrinsic conductivity for Ge /ohm-cm\n", +"\n", +"// Calculation\n", +"printf('For Si:\n');\n", +"Y1=((b1*sigmai1^2)/(1+b1)^2)*(2*10^4);\n", +"printf('Y_Si = %0.2e ohm-cm^2\n',Y1);\n", +"printf('For Ge:\n');\n", +"Y2=((b2*sigmai2^2)/(1+b2)^2)*(2*10^2);\n", +"printf('Y_Ge = %0.2e ohm-cm^2\n',Y2);\n", +"Y=Y2/Y1;\n", +"printf('Therefore the ratio is %0.1e',Y);\n", +"\n", +"\n", +"// Result\n", +"// Y_Si = 7.49*10^-8 ohm-cm^2\n", +"// Y_Ge = 2.189*10^-2 ohm-cm^2\n", +"// Ratio = 0.29*10^6" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.14: Calculate_the_current_flowing.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate the current flowing\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-14 in page 96\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"I_0=9*10^-7; // Current flowing in A\n", +"V=0.1; // Applied forward bias in V\n", +"\n", +"// Calculation\n", +"I=I_0*(exp(40*V)-1);\n", +"printf('Current flowing through diode = %0.2e A',I);\n", +"\n", +"// Result\n", +"// Current flowing through the diode under forward bias = 48.15 mu-A" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.15: Find_voltage_to_be_applied.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find voltage to be applied\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-15 in page 96\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"J_0=500*10^-3; // Saturation current density in mA/m^2\n", +"J=10^5; // Forward current density in A/m^2\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"etaK=1.38*10^-23; // Constant of calculation\n", +"T=350; // Temperature in K\n", +"\n", +"// Calculation\n", +"A=2.303*log10(2*10^5);\n", +"V=(A*etaK*T)/e;\n", +"\n", +"printf('Voltage to be applied = %0.4f V',V);\n", +"\n", +"// Result\n", +"// The voltage to be applied = 0.3685 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.16: Find_current_when_forward_biased.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find current when forward biased\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-16 in page 97\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"k_T=1.38*10^-23; // Constant of calculation\n", +"T=293; // Temperature in K\n", +"I_s=1.5*10^-13; // Saturation current in A\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"V=0.55; // Forward bias voltage in V\n", +"\n", +"// Calculation\n", +"printf('At T = 20 degrees:\n');\n", +"V_T=(k_T*T)/e;\n", +"I=I_s*(exp(V/0.02527)-1);\n", +"printf('V_T = %0.4f V\n',V_T);\n", +"printf('(a)I = %0.3e A\n',I);\n", +"printf('At T = 100 degrees:\n');\n", +"V_T=(k_T*373)/e;\n", +"printf('V_T = %0.4f V\n',V_T);\n", +"printf('I_s doubles 8 times ie I_s = 256.Therefore,\n');\n", +"I=1.5*256*10^-13*(exp(0.55/0.032)-1);\n", +"printf('(b)I = %0.3f A',I);\n", +"\n", +"// Result\n", +"// (a) At T=20 degrees, I = 4.251*10^-4 A\n", +"// (b) At T=100 degrees, I = 0.001 A" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.17: Calculate_current_and_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate current and voltage \n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-17 in page 97\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"I1=2*10^-6; // Saturation current in A\n", +"I2=4*10^-6; // Saturation current in A\n", +"Vz=100; // Breakdown voltages are equal\n", +"eta=2; // Constant of calculation \n", +"\n", +"// Calculation\n", +"printf('At V=90V,none of the diodes will break down.I is determined by the diode with the smallest I_0\n');\n", +"printf('Thus for D1,I = 1 mu-A and for D2,I = -1 mu-A\n');\n", +"V2=eta*0.026*log(1-(I1/I2));\n", +"printf('(a)V2 = %0.1e V\n',V2);\n", +"printf('(b)V1 = -89.964 V');\n", +"\n", +"// Result\n", +"// (a) V2 = -36 mV\n", +"// (b) V1 = -89.964 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.18: Calculate_forward_currents_for_voltages.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate forward currents for voltages\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-18 in page 98\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vt=0.026; // Thermal voltage at room temperature in eV\n", +"V=[0.1 0.2 0.3]; // Given voltages in V\n", +"\n", +"// Calculation\n", +"V1=0.026*-2.3;\n", +"printf('(a)V=%0.2f V\n',V1);\n", +"R=(exp(1.92)-1)/(exp(-1.92)-1);\n", +"printf('(b)Ration of forward bias current to reverse bias current=%0.2f\n',R);\n", +"printf('(c):\n')\n", +"for i=1:3\n", +" I=15*(exp(V(i)/0.026)-1);\n", +" printf('I = %0.3e A\n',I);\n", +"end\n", +"\n", +"// Result\n", +"// (a) V = -0.060 V\n", +"// (b) Ratio = -6.83\n", +"// (c) Forward currents = 0.687 mA, 32.86 mA and 1.539 A respectively" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.19: Factor_to_be_multiplied_with_reverse_saturation_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Factor to be multiplied with reverse saturation current\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-19 in page 98\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"T1=25; // Initial temperature for Ge in degree celcius\n", +"T2=70; // Final temperature for Ge in degree celcius\n", +"T_2=150; // Final temperature for Si in degree celcius\n", +"\n", +"// Calculation\n", +"printf('(a)Let the reverse saturation current for Ge at 25 degrees be Io(25)\n');\n", +"A=2^((T2-T1)/10);\n", +"printf('The factor to be multiplied when temperature is raised to 70 degrees is %0.0f\n',A);\n", +"printf('Therefore, Io(70) = %0.0f*Io(25)\n\n',A);\n", +"printf('(b)Let the reverse saturation current for Si at 25 degrees be Io(25)\n');\n", +"A1=2^((T_2-T1)/10);\n", +"printf('The factor to be multiplied when temperature is raised to 150 degrees is %0.0f\n',A1);\n", +"printf('Therefore, Io(150) = %0.0f*Io(25)',A1);\n", +"\n", +"// Results\n", +"// (a) Io(70) = 23*Io(25)\n", +"// (b) Io(150) = 5793*Io(25)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: Calculate_width_of_depletion_layer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate height of potential-energy barrier\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-1 in page 77\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"rho1=1.5; // Resistivity of p-side of Ge diode in ohm-cm\n", +"rho2=1; // Resistivity of n-side of Ge diode in ohm-cm\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"mu_p=1800; // Mobility of holes\n", +"mu_n=3800; // Mobility of electrons\n", +"\n", +"// Calculation\n", +"N_A=1/(rho1*e*mu_p);\n", +"N_D=1/(rho2*e*mu_n);\n", +"printf('(a) rho = 2 ohm-cm\n');\n", +"printf('N_A=%0.2e /cm^3\n',N_A);\n", +"printf('N_D=%0.2e /cm^3\n',N_D);\n", +"printf('The height of the potential energy barrier is:\n');\n", +"V_0=0.026*log((N_A*N_D)/(2.5*10^13)^2);\n", +"printf('V_0=%0.3f eV\n\n',V_0);\n", +"printf('(b)For silicon:\n');\n", +"N_A1=1/(rho1*e*500);\n", +"N_D1=1/(2*e*1300);\n", +"printf('N_A=%0.2e /cm^3\n',N_A1);\n", +"printf('N_D=%0.2e /cm^3\n',N_D1);\n", +"V_01=0.026*log((N_A1*N_D1)/(1.5*10^10)^2);\n", +"printf('The height of the potential energy barrier is:\n');\n", +"printf('V_0=%0.3f eV',V_01);\n", +"\n", +"// Result\n", +"// (a) For Ge, V_0 = 0.226 eV \n", +"// (b) For Si, V_0 = 0.655 eV" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.20: Leakage_resistance_shunting_the_diode.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Leakage resistance shunting the diode\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-20 in page 99\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"// Kirchoff's law has been applied and equations solved to get final expression\n", +"\n", +"// Calculation\n", +"I_R=(0.08*5*10^-6)/0.15;\n", +"R=10/I_R;\n", +"printf('Leakage resistance = %0.2e Mohm',R);\n", +"\n", +"// Result\n", +"// Leakage resistance shunting the diode = 3.75 Mohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.21: Maximum_reverse_bias_voltage_to_be_maintained.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Maximum reverse-bias voltage to be maintained\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-21 in page 99\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Rt=0.15*10^-3; // Thermal resistance of mechanical contact between diode and surroundings in mW/degree celcius\n", +"T1=25; // Ambient temperature in degree celcius\n", +"T2=35; // Rise in ambient temperature in degree celcius\n", +"I_25=5*10^-6; // Reverse saturation current at 25 degrees in mu-A\n", +"\n", +"// Calculation\n", +"Po=Rt*(T2-T1);\n", +"printf('P_out = %0.2e mW\n',Po);\n", +"printf('We know that reverse saturation current doubles for every 10 degree rise in temperature\n');\n", +"I_35=2*I_25;\n", +"V=Po/I_35;\n", +"printf('Thus the maximum reverse bias voltage to be maintained is %0.0f V',V);\n", +"\n", +"// Result\n", +"// Maximum reverse bias voltage that can be maintained across diode is 150V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.22: Factor_to_be_multiplied_with_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Factor to be multiplied with current\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-22 in page 100\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"V_T=0.0364; // Thermal voltage in V\n", +"// Simplified expression for I has been derived\n", +"I_25=0.01; // Current at 25 degrees in mA\n", +"I_150=2.42; // Current at 150 degrees in mA\n", +"\n", +"// Calculation\n", +"printf('At 150 degrees:\n');\n", +"I=5792*(exp(0.4/0.0728)-1);\n", +"printf('I = %0.0f * Io(25)\n',I);\n", +"printf('At 25 degrees:\n');\n", +"I=exp(0.4/0.0514)-1;\n", +"printf('I = %0.0f * Io(25)\n',I);\n", +"R=I_150/I_25;\n", +"printf('Factor to be multiplied with current = %0.0f',R);\n", +"\n", +"// Result\n", +"// When temp is increased from 25-150 degrees,current has to be multiplied by 242" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.24: Find_the_diffusion_length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find the diffusion length\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-24 in page 101\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"C_D=1.5*10^-6; // Diffusion capacitance in F\n", +"D_p=13; // Constant \n", +"eta=2; // Constant\n", +"V_t=0.026; // Voltage at room temperature in V\n", +"I=1*10^-3; // Current in mA\n", +"\n", +"// Calculation\n", +"L_p=sqrt((C_D*D_p*eta*V_t)/I);\n", +"\n", +"printf('Diffusion length = %0.3e m',L_p);\n", +"\n", +"// Result\n", +"// Diffusion length = 31.84*10^-3 m" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.25: Find_static_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find static resistance\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-25 in page 103\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"I_0=20*10^-6; // Current in micro A\n", +"V_F=0.2; // Forward voltage in V\n", +"\n", +"// Calculation\n", +"I=I_0*(exp(40*V_F)-1);\n", +"r_dc=(0.0343/(80*10^-6))*exp(0.2/0.0343);\n", +"\n", +"printf('Forward current through the diode = %0.3e A\n',I);\n", +"printf('Static resistance = %0.3e ohm',r_dc);\n", +"\n", +"// Result\n", +"// Forward current = 59.599 mA\n", +"// Static resistance = 0.146 Mohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.26: Dynamic_resistance_in_Forward_Reverse_direction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Dynamic resistance in forward,reverse direction\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-26 in page 103\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"T=398; // Temperature in K\n", +"I_0=80*10^-6; // Current in micro A\n", +"eta=1; // Constant\n", +"V_F=[-0.2 0.2]; // Forward voltages in Volts\n", +"V_T=0.0343; // Thermal voltage in volts\n", +"\n", +"// Calculation\n", +"alp=[1 2];\n", +"for i=1:2\n", +" R_ac=(V_T/I_0)*exp(V_F(i)/V_T);\n", +" printf('(%0.0f)Dynamic resistance = %0.3e ohm\n',alp(i),R_ac);\n", +"end\n", +"\n", +"// Result\n", +"// (a) Dynamic resistance in forward direction = 1.258 ohm\n", +"// (b) Dynamic resistance in reverse direction = 0.146 Mohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.27: Dynamic_resistance_at_forward_bias.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Dynamic resistance at forward bias\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-27 in page 103\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"k_BT=25.86*10^-3; // Constant\n", +"I_0=1.5*10^-6; // Current in microA\n", +"V=0.15; // Forward bias voltage in volts\n", +"V_T=0.02586; // Thermal voltage in volts\n", +"\n", +"// Calculation\n", +"R_ac=k_BT/(I_0*exp(V/V_T));\n", +"\n", +"printf('Dynamic resistance = %0.2f W',R_ac);\n", +"\n", +"// Result\n", +"// Dynamic resistance at forward bias = 52.17 W" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.28: Maximum_forward_current_forward_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Maximum forward current,forward resistance\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-28 in page 104\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"P_max=2.5; // Maximum power in watt\n", +"V_f=0.9; // Forward voltage in V\n", +"I_max=2.2; // Maximum current in A\n", +"\n", +"// Calculation\n", +"I_fmax=P_max/V_f;\n", +"R_f=P_max/(I_max)^2;\n", +"\n", +"printf('(a)Maximum forward current = %0.2f A\n',I_fmax);\n", +"printf('(b)Forward diode resistance = %0.3f ohm',R_f);\n", +"\n", +"// Result\n", +"// Forward current = 2.78 A\n", +"// Diode forward resistance = 0.517 ohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.29: Height_of_potential_energy_barrier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Height of potential energy barrier\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-29 in page 104\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"rho1=2; // Resistivity of p-side in ohm-cm\n", +"rho2=1; // Resistivity of n-side in ohm-cm\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"\n", +"// Calculation\n", +"N_A1=1/(rho1*e*1800); \n", +"N_D1=1/(rho2*e*3800); \n", +"N_A2=1/(rho1*e*500);\n", +"N_D2=1/(rho2*e*1300); \n", +"V_01=0.026*log((N_A1*N_D1)/(2.5*10^13)^2);\n", +"V_02=0.026*log((N_A2*N_D2)/(1.5*10^10)^2);\n", +"printf('(a)For Ge:\n');\n", +"printf('N_A = %0.2e /cm^3\nN_D = %0.2e /cm^3\n',N_A1,N_D1);\n", +"printf('Therefore barrier potential energy for Ge = %0.2f eV\n\n',V_01);\n", +"printf('(b)For Si:\n');\n", +"printf('N_A = %0.2e /cm^3\nN_D = %0.2e /cm^3\n',N_A2,N_D2);\n", +"printf('Therefore barrier potential energy for Si = %0.3f eV',V_02);\n", +"\n", +"// Result\n", +"// (a) Height of barrier potential energy for Ge = 0.22 eV\n", +"// (b) Height of barrier potential energy for Si = 0.667 eV" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2: Width_of_depletion_zone_at_300K.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Width of depletion zone at 300K\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-2 in page 83\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"N_d=10^16; // Donor concentration /cm^3\n", +"N_a=5*10^18; // Acceptor concentration /cm^3\n", +"ni=1.5*10^10; // Intrinsic concentration /cm^3\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"epsln=11.8*8.85*10^-14; // Constant of calculation\n", +"\n", +"// Calculation\n", +"V_0=0.0259*log((N_d*N_a)/(ni^2));\n", +"printf('The height of the barrier energy is %0.2f V\n',V_0);\n", +"\n", +"W=sqrt(2*((epsln*V_0)/(e)*((1/N_a)+(1/N_d))));\n", +"printf('Width of depletion zone is %0.3e cm',W);\n", +"\n", +"// Result\n", +"// The height of the barrier energy is 0.86 V\n", +"// Width of depletion zone in n-type Si is 3.354*10^-5 cm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.30: Dynamic_resistance_in_forward_reverse_direction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Dynamic resistance in forward,reverse direction\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-30 in page 105\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"V_T=0.0343; // Thermal voltage at 398K in V\n", +"eta=1; // Constant for Ge\n", +"\n", +"// Calculation\n", +"// Final expression for r derived after differentiating w.r.t V\n", +"r1=((35*10^-6)/(34.3*10^-3))*exp(5.83);\n", +"A1=1/r1;\n", +"r2=3.185*10^-6\n", +"A2=1/r2;\n", +"\n", +"printf('(a)Dynamic resistance in forward direction = %0.3f ohm\n',A1);\n", +"printf('(b)Dynamic resistance in reverse direction = %0.3e ohm',A2);\n", +"\n", +"// Result\n", +"// (a) Resistance in forward direction = 2.879 ohm\n", +"// (b) Resistance in reverse direction = 0.314 Mohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.31: Maximum_and_minimum_Zener_currents.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Maximum and minimum Zener currents\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-31 in page 110\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"V_z=10; // Zener voltage in V\n", +"R_s=1*10^3; // Shunt resistance in K-ohm\n", +"R_l=10*10^3; // Load resistance in K-ohm\n", +"Vi_max=40; // Maximum input voltage in V\n", +"Vi_min=25; // Minimum input voltage in V\n", +"\n", +"// Calculation\n", +"I_zmax=((Vi_max-V_z)/1000)-(5*10^-3);\n", +"I_zmin=((Vi_min-V_z)/R_s)-(5*10^-3);\n", +"\n", +"printf('Maximum value of zener current = %0.2e A\n',I_zmax);\n", +"printf('Minimum value of zener current = %0.2e A',I_zmin);\n", +"\n", +"// Result\n", +"// Maximum zener current = 25 mA\n", +"// Minimum zener current = 10 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.32: Find_the_range_for_R.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find the range for R\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-32 in page 110\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"P=250; // Maximum power dissipation in mW\n", +"V=15; // Supply voltage in V\n", +"\n", +"// Caluclation\n", +"I=(250*10^-3)/5;\n", +"printf('Maximum permissible current = %0.3e A\n',I);\n", +"printf('10 percent of 50mA = 5mA\n');\n", +"I1=I-(5*10^-3);\n", +"printf('Maximum current through diode to maintain constant voltage = %0.1e A',I1);\n", +"\n", +"// Result\n", +"// Maximum current to maintain constant voltage = 45mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.33: Find_breakdown_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find breakdown voltage\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-33 in page 111\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"E=1.5*10^5; // Electric field in V/cm\n", +"epsln=11.9*8.854*10^-16; // Constant\n", +"e=1.6*10^-19; // Charge on an electron in eV\n", +"N_d=2*10^15; // Doping concentration /cm^3\n", +"\n", +"// Calculation\n", +"W=(E*epsln)/(e*N_d);\n", +"V_b=(W*E)/2;\n", +"\n", +"printf('Width of depletion region = %0.3e m\n',W);\n", +"printf('Therefore,breakdown voltage Vbr = %0.4f V',V_b);\n", +"\n", +"// Result\n", +"// Breakdown voltage = 0.3704 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.35: Calculate_Vz.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate V_z\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-35 in page 112\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"// (a) Proof of V_z=51/sigma has been given\n", +"sigmai=1/45; // Intrinsic conductivity in 1/ohm-cm\n", +"sigmap=1/3.9; // Conductivity of p material in1/ohm-cm\n", +"I_0=6*10^-6; // Current in microA\n", +"\n", +"// Calculation\n", +"Vz1=51/sigmai;\n", +"Vz2=51/sigmap;\n", +"I=I_0*(exp(100/26)-1);\n", +"printf('(a)Proof of V_z=51/sigmap has been given\n');\n", +"printf('(b)When material is intrinsic, Vz = %0.3f V\n',Vz1);\n", +"printf('(c)When resistivity drops, Vz = %0.1f V\n',Vz2);\n", +"printf('(d)I = %0.3e A',I);\n", +"\n", +"// Result\n", +"// (a) Vz = 51/sigmap is proved\n", +"// (b) Vz1 = 2300V\n", +"// (c) Vz2 = 198.9V\n", +"// (d) I = 0.274 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.37: Find_the_ideality_factor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find the ideality factor\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-37 in page 112\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"I1=0.5*10^-3; // Diode current in mA at 340mV\n", +"I2=15*10^-3; // Diode current in mA at 465mV\n", +"kb_T=5*10^-3; // Constant in mV\n", +"\n", +"// Calculation\n", +"// After simplifying the current equation we get an expression for eta\n", +"eta=5/(2.303*log10(30));\n", +"\n", +"printf('Ideality factor = %0.2f',eta);\n", +"\n", +"// Result\n", +"// Ideality factor = 1.47" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.38: Temperature_coefficient_of_Avalanche_diode.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Temperature coefficient of Avalanche diode\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-38 in page 113\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"V=12; // Voltage of avalanche diode in V\n", +"T=1.7*10^-3; // Temperature coeff of Si diode\n", +"\n", +"// Calculation\n", +"A=(T/V)*100;\n", +"printf('Temperature coeff in percentage = %0.4f percent/degree-C',A);\n", +"\n", +"// Result\n", +"// Temperature coeff in percentage = 0.0142 %/degree-C" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.39: Limits_for_varying_V.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Limits for varying V\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-39 in page 113\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"I_d=5*10^-3; // Diode current in mA\n", +"R=2.5*10^3; // Resistance in K-ohm\n", +"I_T=40*10^-3; // Diode current in mA\n", +"\n", +"// Calculation\n", +"I_max=I_T-I_d;\n", +"printf('(a)I_max = %0.2e A\n',I_max);\n", +"printf('(b)Minimum I_d for good regulation is 5 mA,hence I_T=30 mA\n');\n", +"V_max1=(30*3.5)+60;\n", +"printf('V_max = %0.0f V\n',V_max1);\n", +"printf('Maximum I_d for good regulation is 40 mA,hence I_T=65 mA\n');\n", +"V_max2=(65*3.5)+60;\n", +"printf('V_max = %0.1f V',V_max2);\n", +"\n", +"// Result\n", +"// (a) I_max = 35 mA\n", +"// (b) V_max1 = 165 V \n", +"// (c) V_max2 = 287.5 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: Find_thermal_and_barrier_volatge.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find thermal and barrier volatge\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-3 in page 84\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"T=303; // Temperature in K\n", +"ni=1.5*10^16; // Intrinsic concentration /cm^3\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"k_BT=1.38*10^-23; // Measured in eV at 303K\n", +"N_A=10^22; // Acceptor concentration /cm^3\n", +"N_D=1.2*10^21; // Donor concentration /cm^3\n", +"\n", +"// Calculation\n", +"V_T=(k_BT*T)/e;\n", +"printf('Thermal voltage = %0.2e V\n',V_T);\n", +"ni1=ni^2;\n", +"printf('ni^2 = %0.3e\n',ni1);\n", +"V_0=V_T*log((N_A*N_D)/(ni1));\n", +"printf('Barrier voltage = %0.3f V',V_0);\n", +"\n", +"// Result\n", +"// Thermal voltage = 26.1 mV\n", +"// Barrier voltage = 0.635 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: Barrier_potential_for_silicon_junction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Barrier potential for silicon junction\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-4 in page 84\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"t=[70 0]; // Declaring the variables\n", +"t1=25; // Given temperature in K\n", +"\n", +"// Calculation\n", +"alp=[1 2];\n", +"for i=1:2\n", +"delta_V=-0.002*(t(i)-t1);\n", +"Vb=0.7+delta_V;\n", +"printf('(%0.0f)delta_V at %d degrees = %0.2f V\n',alp(i),t(i),delta_V);\n", +"printf('Thus the barrier potential at %d degress = %0.2f V\n',t(i),Vb);\n", +"end\n", +"\n", +"// Result\n", +"// (a) Barrier potential at 70 degrees is 0.61 V\n", +"// (b) Barrier potential at 0 degrees is 0.75 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: Find_depletion_layer_capacitance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find depletion layer capacitance\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-5 in page 86\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"epsln=12/(36*%pi*10^11); // Constant for Si in F/cm\n", +"A=8.11058*10^-1; // Cross sectional area in m^2\n", +"mu_p=500; // Mobility of holes\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"V_j=4.9; // Junction potential in V\n", +"\n", +"// Calculation\n", +"printf('(a)We have C_t/A = sqrt((e*epsnl)/2)*sqrt(Na/Vj)\n');\n", +"K=sqrt((e*epsln)/2);\n", +"printf('sqrt((e*epsln)/2) = %0.2e\n',K);\n", +"printf('Hence C_t = %0.2e * sqrt(Na/Vj) F/cm^2\n',K);\n", +"K1=K*10^12;\n", +"printf('Or C_t = %0.2e * sqrt(Na/Vj) pF/cm^2\n',K1);\n", +"N_A=1/(3*mu_p*e);\n", +"C_T=(2.9*10^-4)*sqrt(N_A/V_j)*(8.14*10^-3);\n", +"printf('(b)The depletion layer capacitance = %0.2f pF',C_T);\n", +"\n", +"// Result\n", +"// (a) The expression for depletion layer capacitance is proved\n", +"// (b) The depletion layer capacitance in silicon is 68.84 pF" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6: Compute_decrease_in_capacitance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Compute decrease in capacitance\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-6 in page 87\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"V=6.5; // Incresed bias voltage in V\n", +"lambda=(20*sqrt(5)); // Constant of calculation\n", +"\n", +"// Calculation\n", +"C_T=lambda/sqrt(V);\n", +"\n", +"printf('Transition capacitance of abrupt junction at 6.5 V = %0.2f pF\n',C_T);\n", +"printf('This corresponds to a decrese of 2.46 pF');\n", +"\n", +"// Result\n", +"// Transition capacitance = 17.54 pF\n", +"// This corresponds to a decrese of 2.46 pF" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7: Calculate_barrier_capacitance_of_Ge.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate barrier capacitance of Ge\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-7 in page 87\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"epsln=1.41*10^-12; // Dielectric constant\n", +"A=0.0225; // Junction area in cm^2\n", +"W=2*10^-4; // Space-charge thickness in cm\n", +"\n", +"// Calculation\n", +"C_T=epsln*(A/W);\n", +"\n", +"printf('Barrier capacitance = %0.2e F',C_T);\n", +"\n", +"// Result\n", +"// Barrier capacitance = 159.3 pF" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.8: Calculate_width_of_depletion_layer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate width of depletion layer\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 2-8 in page 87\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"V=[10.2 0.3 0.1]; // Applied voltages in V\n", +"epsln=16; // Constant of calculation\n", +"A=1*10^-6; // Cross sectional area in m^2\n", +"\n", +"// Calculation\n", +"alp=[1 2 3];\n", +"for i=1:3\n", +" W=sqrt((V(i)*10^-10)/14.3);\n", +" printf('(%0.0f)Width of depletion layer for %0.2f V = %0.2e mu-m\n\n',alp(i),V(i),W);\n", +"end\n", +"W=[8.5 1.45];\n", +"alp1=[1 2];\n", +"for j=1:2\n", +" C_T=(epsln*10^-9)/(36*%pi*W(j));\n", +" printf('(%0.0f)Space charge capacitance for %0.2f mu-m = %0.2e F\n\n',alp(j),W(j),C_T);\n", +"end\n", +"\n", +"// Result\n", +"// Widths of depletion layer are: \n", +"// (a) 8.5 mu-m\n", +"// (b) 1.45 mu-m \n", +"// (c) 0.84 mu-m respectively\n", +"// Space charge capacitances are:\n", +"// (a) 16.65 pF \n", +"// (b) 97.6 pF respectively" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Basic_Electronics_by_D_De/3-Diode_Circuits.ipynb b/Basic_Electronics_by_D_De/3-Diode_Circuits.ipynb new file mode 100644 index 0000000..96a4b05 --- /dev/null +++ b/Basic_Electronics_by_D_De/3-Diode_Circuits.ipynb @@ -0,0 +1,1076 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Diode Circuits" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.10: Full_scale_reading_of_dc_meter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Full scale reading of dc metere\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-10 in page 158\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"R=5020; // Total resistance in ohm\n", +"Vrms=5.58; // Input rms voltage in V\n", +"// Calculation\n", +"I_dc=(2*sqrt(2)*Vrms)/(%pi*5020);\n", +"V_0=R*I_dc;\n", +"printf('Full scale reading = %0.2f V',V_0);\n", +"\n", +"// Result\n", +"// Full scale reading = 5.58 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11: Find_dc_output_Peak_inverse_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find dc output,Peak inverse voltage\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-11 in page 159\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vi=220; // AC input voltage in V\n", +"N=10; // Turn ratio of transformer\n", +"\n", +"// Calculation\n", +"V2=Vi/N;\n", +"Vm=sqrt(2)*V2;\n", +"V_dc=0.318*Vm;\n", +"PIV=Vm;\n", +"\n", +"printf('(a)DC output voltage = %0.2f V\n',V_dc);\n", +"printf('(b)PIV = %0.2f V',Vm);\n", +"\n", +"// Result\n", +"// (a) Dc output voltage = 9.89V\n", +"// (b) PIV = 31.11 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.12: Determine_maximum_and_average_values_of_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Determine maximum and average values of power\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-12 in page 159\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"V1=230; // Input voltage in V\n", +"N=1/3; // Turn ratio\n", +"Rl=200; // Load resistance in ohms\n", +"\n", +"// Calculation\n", +"V2=V1*N;\n", +"Vm=sqrt(2)*V2;\n", +"Im=Vm/Rl;\n", +"P=Im^2*Rl;\n", +"Vdc=0.318*Vm;\n", +"Idc=Vdc/Rl;\n", +"Pdc=Idc^2*Rl;\n", +"printf('Maximum load power = %0.2f W\n',P);\n", +"printf('Average load power = %0.2f W',Pdc);\n", +"\n", +"// Result\n", +"// Maximum power = 58.78 W\n", +"// Average power = 5.94 W" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.13: Find_maximum_value_of_ac_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find maximum value of ac voltage\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-13 in page 160\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vdc=30; // DC voltage in V\n", +"Rf=25; // Internal resistance in ohms\n", +"Rl=500; // Load resistance in ohms\n", +"\n", +"// Calculation\n", +"Idc=Vdc/Rl;\n", +"Im=%pi*Idc;\n", +"Vi=Im^2*(Rf+Rl);\n", +"printf('Voltage required at the input = %0.2f V',Vi);\n", +"\n", +"// Result\n", +"// Voltage required at the input is = 18.65 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.14: Calculate_ac_voltage_rectification_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate ac voltage,rectification efficiency\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-14 in page 160\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vdc=100; // DC voltage in V\n", +"Rl=500; // Load resistance in ohms\n", +"Rf=20; // Internal resistance in ohms\n", +"\n", +"// Calculation\n", +"Idc=Vdc/Rl;\n", +"Im=Idc*%pi;\n", +"Vm=Im*(Rl+Rf);\n", +"eta=(0.406/(1+(Rf/Rl)))*100;\n", +"\n", +"printf('(a)AC voltage required = %0.2f V\n',Vm);\n", +"printf('(b)Rectification efficiency = %0.0f percent',eta);\n", +"\n", +"// Result\n", +"// (a) Vm = 326.73V\n", +"// (b) Rectification efficiency = 39 percent" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.15: Find_current_dc_voltage_voltage_across_load.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find current,dc voltage,voltage across load\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-15 in page 150\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vm=50; // Maximum voltage in V\n", +"f=50; // Frequency in Hz\n", +"Rf=20; // Internal resistance in ohms\n", +"Rl=5000; // Load resistance in ohms\n", +"\n", +"// Calculation\n", +"Im=Vm/(Rl+Rf);\n", +"printf('Since diode conducts only during pisitive half of the input,Im = %0.0e A\n',Im);\n", +"printf('(a)Hence i = 10*sin100*pi*t\n');\n", +"Vdc=(Im/%pi)*Rl;\n", +"printf('(b)V_dc = %0.1f V\n',Vdc);\n", +"printf('Hence V_0v=15.9sin100*pi*t\n');\n", +"printf('(c)When diode is reverse biased,voltage across diode = %0.1f*sin100*pi*t for 0<100*pi*t<pi and 0 for pi,100*pi*t<2*pi',Vdc);\n", +"\n", +"// Result\n", +"// (a) Current in the circuit = 10sin100*pi*t\n", +"// (b) DC output voltage across load = 15.9sin100*pi*t\n", +"// (c) Voltage across diode = 15.9sin100*pi*t for 0<100*pi*t and 0 for pi<100*pi*t<2*pi" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.16: Estimate_value_of_capacitance_needed.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Estimate value of capacitance needed\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-16 in page 161\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vrms=230; // RMS voltage in V\n", +"f=50; // Frequency in Hz\n", +"gamma_hwr=0.003; // Ripple factor assumed\n", +"I=0.5; // Load current in A\n", +"\n", +"// Calculation\n", +"Vm=sqrt(2)*Vrms;\n", +"Vdc=(Vm/%pi);\n", +"Rl=Vdc/I;\n", +"C=1/(2*sqrt(3)*f*gamma_hwr*Rl);\n", +"printf('Capacitance needed = %0.2e F',C);\n", +"\n", +"// Result\n", +"// Capacitance needed = 9.29 mF" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17: Calculate_the_ripple_factor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate the ripple factor\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-17 in page 161\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Rl=3.15*10^3; // Load resistance in K-ohms\n", +"Rf=20; // Internal resistance in ohms\n", +"Vm=230; // Maximum voltage in volts\n", +"f=50; // Frequency in Hertz\n", +"\n", +"// Calculation\n", +"Irms=0.707*(Vm/(Rl+Rf));\n", +"Idc=0.637*(Vm/(Rl+Rf));\n", +"gamma_fwr=sqrt((Irms/Idc)^2-(1));\n", +"\n", +"printf('Ripple factor = %0.2f',gamma_fwr);\n", +"\n", +"// Result\n", +"// Ripple factor = 0.48" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.18: Find_DC_output_voltage_pulse_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find DC output voltage,pulse frequency\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-18 in page 162\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vp=230; // Peak voltage in V\n", +"f=50; // Frequency in Hz\n", +"Rl=200; // Load resistance in ohms\n", +"N=1/4; // Turn ratio\n", +"\n", +"// Calculation\n", +"Vs=Vp*N;\n", +"Vm=Vs*sqrt(2);\n", +"Idc=(2*Vm)/(%pi*Rl);\n", +"Vdc=Idc*Rl;\n", +"fout=2*f;\n", +"printf('(a)DC output voltage = %0.2f V\n',Vdc);\n", +"printf('(b)Pulse frequency of output = %0.0f Hz',fout);\n", +"\n", +"// Result\n", +"// (a) Vdc = 51.77 V\n", +"// (b) F_out = 100 HZ" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.19: Find_maximum_dc_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find maximum dc voltage\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-19 in page 162\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vp=220; // Peak voltage in V\n", +"f=50; // Frequency in Hz\n", +"Rl=1.5*10^3; // Load resistance in ohms\n", +"N=0.1; // Turn ratio\n", +"\n", +"// Calculation\n", +"Vs=Vp*N;\n", +"Vrms=Vs*sqrt(2);\n", +"Vm=Vrms/2;\n", +"Idc=(2*Vm)/(%pi*Rl);\n", +"Vdc=Idc*Rl;\n", +"printf('Maximum dc output voltage = %0.2f V',Vdc);\n", +"\n", +"// Result\n", +"// Dc output voltage = 9.9 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1: Calculate_the_dc_load_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find current if diode is forwar-biased\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-1 in page 143\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"I=29.8*10^-3; // Current in mA\n", +"V=0.208; // Voltage in V\n", +"\n", +"// Calculation\n", +"I=(45-V)/(1.5*10^3);\n", +"printf('I = %0.2e A\n',I);\n", +"printf('For this current,V = 0.2 V\n');\n", +"printf('(a)Therefore I = 29.8 mA\n');\n", +"printf('(b)If battery is inserted with reverse polarity,voltage drop across the 1.5 K resistors is only 15 mV and may be neglected\n');\n", +"printf('(c)In forward direction, I=29.8 mA\n');\n", +"printf('In reverse direction we draw a load line from V=-30 V to I=-30 mA\n');\n", +"y=[-30 -25 -20 -15 -10 -5 0];\n", +"x=[-30 -25 -20 -15 -10 -5 0];\n", +"x=-30-y;\n", +"plot(x,y);\n", +"xlabel('Voltage');\n", +"ylabel('Current');\n", +"title('Current in forward direction');\n", +"I=-30*(20/30);\n", +"printf('Then,I = %0.0f mA\n',I);\n", +"printf('Current=20 mA as there is a 10 V drop');\n", +"\n", +"// Result\n", +"// Graph shows current in reverse direction\n", +"// I' = -20 mA\n", +"// Set axis positions to 'origin' in axis properties to view the graph correctly" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.20: Calculate_input_voltage_value_of_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate input voltage,value of filter\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-20 in page 163\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vdc=30; // DC voltage in volts\n", +"Rl=1000; // Load resistance in ohms\n", +"gamma_fwr=0.015; // Ripple factor\n", +"\n", +"// Calculation\n", +"Idc=Vdc/Rl;\n", +"C=2900/(gamma_fwr*Rl);\n", +"Vm=Vdc+((5000*Idc)/C);\n", +"Vi=(2*Vm)/sqrt(2);\n", +"printf('Value of capacitor filter = %0.0f mu-F',C);\n", +"printf('Input voltage required = %0.2f V\n',Vi);\n", +"\n", +"\n", +"// Result\n", +"// V_in = 43.52 V\n", +"// C = 193 mu-F" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.21: Calculate_inductance_for_L_section_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate inductance for L-section filter\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-21 in page 163\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"C=40*10^-6; // Capacitance in micro-F\n", +"r=0.0001; // Ripple factor\n", +"Vm=40; // Maximum voltage in V\n", +"Idc=0.1; // DC current in A\n", +"R=40; // Circuit resistance in ohms\n", +"\n", +"// Calculation\n", +"L=(1.76/C)*sqrt(0.472/r);\n", +"Vdc=((2*sqrt(2)*Vm)/%pi)-(Idc*R);\n", +"\n", +"printf('(a)Inductance L = %0.2e H\n',L);\n", +"printf('(b)Output voltage = %0.0f V',Vdc);\n", +"\n", +"// Result\n", +"// (a) L = 3.02*10^6 H\n", +"// (b) V_dc = 32 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.22: DC_output_voltage_and_ripple_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// DC output voltage and ripple voltage\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-22 in page 164\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"C=4; // Capacitances in micro-F\n", +"L=20; // Inductance choke in H\n", +"Il=50*10^-6; // Load current in micro-A\n", +"R=200; // Resistance of choke in ohm\n", +"\n", +"// Calculation\n", +"Vdc=(300*sqrt(2))-((4170/C)*0.05)-(0.05*R);\n", +"r=(3300*0.05)/(4*4*20*353);\n", +"Vrms=r*Vdc;\n", +"\n", +"printf('(a)Output voltage = %0.2f V\n',Vdc);\n", +"printf('(b)Ripple voltage = %0.3f V',Vrms);\n", +"\n", +"// Result\n", +"// (a) Output voltage = 362.13 V\n", +"// (b) Ripple voltage = 0.529 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.23: Sketch_steady_state_output.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Sketch steady state output\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-23 in page 168\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Rf=0; // Forward resistance of diode\n", +"Rr=2*10^6; // Reverse resistance of diode\n", +"\n", +"// Calculation\n", +"printf('Diode conducts when Vi<2.5 V\n');\n", +"printf('Diode is open when Vi>2.5 V and Vo = 2.5+((Vi-2.5)/3)\n');\n", +"printf('Diode conducts when Vi>2.5 V');\n", +"\n", +"// Result\n", +"// Diagram shows the output of the clipping circuit to a sinusoidal input" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.24: Sketch_output_voltage_Vo.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Sketch output voltage Vo\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-24 in page 169\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"// Data is provided in the diagrams\n", +"\n", +"// Calculation\n", +"printf('(a)When Vi<50 V, Second diode conducts\n');\n", +"Vo=100-((2/3)*27);\n", +"printf('Vo = %0.0f V\n',Vo);\n", +"printf('When 50<Vi<100 both diodes conduct and Vo=Vi.When Vi>100, only the first diode conducts.Hence Vo = 100 V\n');\n", +"printf('(b)When Vi<25 V,neither diodes conduct and Vo = 25 V.When Vi>25,upper diode conducts\n');\n", +"Vi=((100-25)*(3/2))+25;\n", +"printf('When Vo reaches 100 V, Vi rises to %0.1f V',Vi);\n", +"\n", +"// Result\n", +"// The output voltage is shown in the xcos diagrams" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.25: Devise_a_circuit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Devise a circuit\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-25 in page 169\n", +"\n", +"clear; clc; close;\n", +"\n", +"// The xcos diagram shows the devised circuit" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.27: Find_currents_and_voltages.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find currents and voltages\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-27 in page 179\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"//Diode acts as short circuited.Both diodes are forward biased\n", +"V1=0; // Voltage at junction 1 in V\n", +"V2=0; // Voltage at junction 2 in V\n", +" \n", +"//Calculation\n", +"I1=(20-V1)/(20*10^3);\n", +"I2=(V2-(-10))/(20*10^3);\n", +"\n", +"printf('I1 = %0.0e A\n',I1);\n", +"printf('I2 = %0.1e A',I2);\n", +"\n", +"// Result\n", +"// I1 = 1 mA\n", +"// I2 = 0.5 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.28: Find_voltage_across_diode.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find voltage across diode\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-28 in page 180\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"I=0.1075; // Cirremt across diode in A\n", +"Rd=1; // Internal resistance of diode in ohm\n", +"\n", +"// Calculation\n", +"Vd=I*Rd;\n", +"printf('Voltage across diode = %0.4f V',Vd);\n", +"\n", +"// Result\n", +"// Voltage across diode = 0.1075 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: Find_the_diode_currents.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find the diode currents\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-2 in page 144\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"R=10*10^3; // Resistance in K-ohms\n", +"\n", +"// Calculation\n", +"printf('(a) R = 10K.Assume both diodes are conducting.We have:\n');\n", +"printf('100 = 10.02*I1 + 10*I2 + 0.2\n 100 = 10.01*I2 + 10*I1 + 0.6\n');\n", +"function y=f(i);\n", +" y(1)=10.02*i(1)+10*i(2)+0.2-100\n", +" y(2)=10.015*i(2)+10*i(1)+0.6-100\n", +"endfunction\n", +"ans=fsolve([0.1;0.1],f);\n", +"I1=ans([1]);\n", +"I2=ans([2]);\n", +"printf('I1 = %0.3f A,I2 = %0.3f A\n',I1,I2);\n", +"printf('Solving,we find I2<0.Thus D is not ON\n');\n", +"I1=(100-0.2)/10.02;\n", +"printf('I1 = %0.2e A and I2 = 0\n\n',I1);\n", +"printf('(b) R=1K.Assume both diodes are ON,we have:\n');\n", +"printf('100 = 1.52*I1 + 1.5*I2 + 0.2\n 100 = 1.515*I2 + 1.5*I1 + 0.6\n');\n", +"function y1=g(j);\n", +" y1(1)=1.52*j(1)+1.5*j(2)+0.2-100\n", +" y1(2)=1.515*j(2)+1.5*j(1)+0.6-100\n", +"endfunction\n", +"ans1=fsolve([0.1;0.1],g);\n", +"I1=ans1([1]);\n", +"I2=ans1([2]);\n", +"printf('Solving,we find\nI1 = %0.3f A and I2 = %0.3f A.Hence assumption is valid',I1,I2);\n", +"\n", +"// Result\n", +"// Since both currents are positive,assumption is valid for I1 = 39.717 mA and I2 = 26.287 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.30: Calculate_R_Il_max.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate R,I_l(max)\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-30 in page 181\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"V_0=50; // Zener diode voltage in V\n", +"I_L=0; // Load current in A\n", +"\n", +"// Calculation\n", +"R=(150)/(40*10^-3);\n", +"printf('(a)R = %0.2e ohm\n',R);\n", +"printf('I_L = I_max when Id = Id_min = 10mA\n');\n", +"I_Lmax=40-10;\n", +"printf('(b)Maximum load current = %0.0f mA',I_Lmax);\n", +"\n", +"// Result\n", +"// (a) R = 3.75 K-ohms\n", +"// (b) I_Lmax = 30 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: Calculate_break_regio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate break region\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-3 in page 145\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"R=10^4; // Factor multiplied with dynamic resistance of diode\n", +"Vt=26; // Thermal voltage in volts\n", +"eta1=2; // Constant at room temperature for Si\n", +"eta2=1; // Constant at room temperature for Ge\n", +"\n", +"// Calculation\n", +"printf('r1/r2 = 10^4\n');\n", +"V1=eta1*Vt*4*2.3;\n", +"V2=eta2*Vt*4*2.3;\n", +"printf('Break region for silicon = %0.0f mV\n',V1);\n", +"printf('Break region for Germanium = %0.0f mV',V2);\n", +"\n", +"// Result\n", +"// Break region for silicon = 478 mV\n", +"// Break region for Germanium = 239 mV " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: Calculate_the_peak_load_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate the peak load current\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-4 in page 153\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Rf=30; // Internal resistance in ohms\n", +"Rl=990; // Load resistance in ohms\n", +"Vm=110; // Rms supply voltage in in V\n", +"\n", +"// Calculation\n", +"Im=(Vm/2)/(Rf+Rl);\n", +"I_dc=Im/%pi;\n", +"I_rms=Im/2;\n", +"V_dc=(Im*Rl)/%pi;\n", +"Pi=I_rms^2*(Rf+Rl);\n", +"R=(((Vm/%pi)-(I_dc*Rl))/(I_dc*Rl))*100;\n", +"\n", +"printf('(a)Im = %0.2e A\n',Im);\n", +"printf('(b)I_dc = %0.2e A\n',I_dc);\n", +"printf('(c)I_rms = %0.2e A\n',I_rms);\n", +"printf('(d)V_dc = %0.3e V\n',V_dc);\n", +"printf('(e)Input power = %0.2f W\n',Pi);\n", +"printf('(f)Percentage regulation = %0.3f percent',R);\n", +"\n", +"// Result\n", +"// (a) Im=53.9mA\n", +"// (b) Idc=17.2mA\n", +"// (c) Irms=27mA\n", +"// (d) Vdc=16.99V \n", +"// (e) Pi=0.74W \n", +"// (f) Percentage regulation=106%" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8: Calculate_the_dc_load_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate the dc load current\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 3-8 in page 157\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vm=280; // Supply voltage in V\n", +"Rl=2000; // Load resistance in ohms\n", +"Rf=500; // Internal resistance of the diodes in ohms\n", +"\n", +"// Calculation\n", +"Idc=(2*Vm)/(%pi*2500);\n", +"Idc_t=Idc/2;\n", +"printf('(a)I_dc = %0.2e A\n(b)I_dc(tube) = %0.2e A\n',Idc,Idc_t);\n", +"printf('(c)Voltage across conducting diode is sinusoidal with a peak value 0.2 Vm\n');\n", +"V_rms=0.905*(280*sqrt(2));\n", +"Pdc=Idc^2*Rl;\n", +"R=(Rf/Rl)*100;\n", +"printf('Rms voltage V_rms = %0.0f V\n',V_rms);\n", +"printf('(d)DC output power = %0.1f W\n',Pdc);\n", +"printf('(e)Percentage regulation = %0.0f percent',R);\n", +"\n", +"// Result\n", +"// (a) Idc = 71 mA,\n", +"// (b) Idc_tube = 35.7 mA, \n", +"// (c) V_rms = 358 V,\n", +"// (d) P_dc = 10.167W, \n", +"// (e) Percentage regulation = 25%" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Basic_Electronics_by_D_De/4-BJT_Fundamentals.ipynb b/Basic_Electronics_by_D_De/4-BJT_Fundamentals.ipynb new file mode 100644 index 0000000..809b56c --- /dev/null +++ b/Basic_Electronics_by_D_De/4-BJT_Fundamentals.ipynb @@ -0,0 +1,557 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: BJT Fundamentals" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10: Measurement_of_Circuit_Voltage_changes.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Measurement of Circuit Voltage changes\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 4-10 in page 211\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"Vb=-5; // Base Voltage of BJT in V\n", +"Rc=1*10^3; // Collector Resistance in K-ohms\n", +"Ie=2*10^-3; // Emitter Current of BJT in mA\n", +"delB=+0.4; // Change in Base Voltage\n", +"\n", +"// Calculations\n", +"delE=+0.4; \n", +"delC=0; \n", +"\n", +"printf('(a)Change in Emitter voltage is +%0.2f V\n',delE);\n", +"printf('(b)Change in Collector Voltage is %0.2f V\n',delC);\n", +"\n", +"// Results\n", +"// (a) Change in Emitter Voltage in the Circuit = +0.4 V\n", +"// (b) Change in Collector Voltage in the Circuit = 0.0 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11: To_Determine_mode_of_operation_of_BJT.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Determine mode of operation of BJT\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 4-11 in page 212\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"Vbe=0.7; // Base-Emitter Voltage in V\n", +"beta_bjt=100; // beta gain of BJ\n", +"\n", +"// Calculation\n", +"printf('Assume active mode for circuit 1\n');\n", +"Vb1=2; \n", +"Ve_1=Vb1-Vbe; \n", +"Ie1=1*10^-3;\n", +"Ic1=Ie1*(beta_bjt/(1+beta_bjt));\n", +"Ve1=6-(3*0.99);\n", +"printf('(a)Ve = %0.2f V\n(b)Ic = %0.2e A\n(c)Ve = %0.2f V\n',Ve_1,Ic1,Ve1);\n", +"printf('Thus the circuit operates in an active mode\n\n');\n", +"\n", +"printf('For circuit 2,assume active mode\n');\n", +"Vcc=1;\n", +"Ve2=Vcc+Vbe;\n", +"Ie2=(6-Ve2)/(10*10^3);\n", +"Vc=0+(10*0.43);\n", +"printf('(a)Ve = %0.1f V\n(b)Ie = %0.2e A\n(c)Vc = %0.2f V\n',Ve2,Ie2,Vc);\n", +"printf('This circuit operates in a saturated mode\n\n');\n", +"\n", +"printf('For circuit 3,assume active mode\n');\n", +"Ve3=-5+Vbe;\n", +"Ie3=(9.5-Ve3)/(200*10^3);\n", +"Ic=Ie3*(beta_bjt/(1+beta_bjt));\n", +"Vc3=-50+(0.492*20);\n", +"printf('(a)Ve = %0.1f V\n(b)Ie = %0.4e A\n(c)Ic = %0.3e A\n(d)Vc = %0.1f V\n',Ve3,Ie3,Ic,Vc3);\n", +"printf('The circuit operates in an active mode\n\n');\n", +"\n", +"printf('For circuit 4,assume active mode\n');\n", +"Ve4=-20.7;\n", +"Ie4=(30+Ve4)/(5*10^3);\n", +"Vc4=(-Ie4*(beta_bjt/(1+beta_bjt))*(2*10^3))-10;\n", +"printf('(a)Ie = %0.2e A\n(b)Vc = %0.2f V\n',Ie4,Vc4);\n", +"printf('The circuit operates in an active mode');\n", +"\n", +"// Result\n", +"// (a) Circuit 1 operates in active mode\n", +"// (b) Circuit 2 operates in saturation mode\n", +"// (c) Circuit 3 operates in active mode\n", +"// (d) Circuit 4 operates in active mode" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: Calculate_Base_and_Collector_Currents.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate Base and Collector Currents\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 4-1 in page 208\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"alpha=0.90; // Current Gain in CB mode\n", +"Ico=15*10^-6; // Reverse saturation Current in micro-A\n", +"Ie=4*10^-3; // Emitter Current in mA\n", +"\n", +"// Calculations\n", +"Ic=Ico+(alpha*Ie);\n", +"Ib=Ie-Ic; \n", +"\n", +"printf('(a)The value of the Base Current is %0.2e A \n',Ib);\n", +"printf('(b)The value of the Collector Current is %0.3e A \n',Ic);\n", +"\n", +"// Results\n", +"// (a) The value of the Base Current is 385 mu-A\n", +"// (b) The value of the Collector Current is 3.615 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: Calculate_alpha_using_beta.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate alpha using beta\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 4-2 in page 209\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"beta_bjt=90; // beta gain for the BJT\n", +"Ic=4*10^-3; // Collector Current in mA\n", +"\n", +"// Calculations\n", +"alpha=beta_bjt/(1+beta_bjt); \n", +"Ib=Ic/beta_bjt; \n", +"Ie=Ic+Ib; \n", +"\n", +"printf('(a)The Current gain alpha for BJT is %0.3f \n',alpha);\n", +"printf('(b)The value of the base Current is %0.2e A \n',Ib);\n", +"printf('(c)The value of the Emitter Current is %0.2e A \n',Ie);\n", +"\n", +"// Results\n", +"// (a) The Current Gain alpha for BJT is 0.989\n", +"// (b) The value of the Base Current is 44.44 mu-A\n", +"// (c) The value of the Emitter Current is 4.04 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: Collector_Current_in_C_E_mode.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Collector Current in C-E mode\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 4-3 in page 209\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"alpha=0.90; // Current Gain of BJT\n", +"Ico=15*10^-6; // Reverse Saturation Current of BJT in micro-A\n", +"Ib=0.5*10^-3; // Base Current in C-E mode in mA\n", +"\n", +"// Calculations\n", +"beta_bjt=alpha/(1-alpha);\n", +"Ic=(beta_bjt*Ib)+(beta_bjt+1)*Ico; \n", +"\n", +"printf('(a)The value of Current gain beta for BJT is %0.0f \n',beta_bjt);\n", +"printf('(b)The value of the Collector Current is %0.2e A \n',Ic);\n", +"\n", +"// Results\n", +"// (a) The value of Current Gain beta for BJT is 9\n", +"// (b) The value of the Collector Current is 4.65 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4: Calculate_beta_for_the_BJT.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate beta for the BJT\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 4-4 in page 209\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"Ib=20*10^-6; // Base current in micro-A\n", +"Ic=5*10^-3; // Collector Current in mA\n", +"\n", +"// Calculations\n", +"beta_bjt=Ic/Ib;\n", +"\n", +"printf('The Current gain beta for the Device is %0.0f \n',beta_bjt);\n", +"\n", +"// Results\n", +"// The Current Gain beta for the Device is 250" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5: To_Compute_Alpha_Beta_and_Emitter_Current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// To Compute alpha, beta and Emitter Current\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 4-5 in page 209\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"Ib=50*10^-6; // Base Current in mu-A\n", +"Ic=5*10^-3; // Collector Current in mA\n", +"\n", +"// Calculations\n", +"Ie=Ic+Ib; \n", +"beta_bjt=Ic/Ib;\n", +"alpha=Ic/Ie;\n", +"\n", +"printf('(a)The value of the Emitter Current is %0.2e A \n',Ie);\n", +"printf('(b)The value of beta gain of the BJT is %0.0f \n',beta_bjt);\n", +"printf('(c)The value of alpha gain of the BJT is %0.3f \n',alpha);\n", +"\n", +"// Results\n", +"// (a) The value of the Emitter Current is 5.05 mA\n", +"// (b) The value of the beta gain of the BJT is 100\n", +"// (c) The value of the alpha gain of the BJT is 0.990" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6: Calculate_alpha_reverse_and_beta_reverse.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate alpha reverse and beta reverse\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 4-6 in page 210\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"Ie=10*10^-3; // Emitter Current in mA\n", +"Ib=5*10^-3; // Base Current in mu-A\n", +"\n", +"// Calculations\n", +"Ic=Ie-Ib; \n", +"beta_reverse=Ib/Ic; \n", +"alpha_reverse=Ie/Ic; \n", +"\n", +"printf('The value of inverse beta of the BJT is %0.0f \n',beta_reverse);\n", +"printf('The value of inverse alpha of the BJT is %0.0f \n',alpha_reverse);\n", +"\n", +"// Results\n", +"// The value of inverse beta of the BJT is 1\n", +"// The value of inverse alpha of the BJT is 2" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7: Calculate_Labeled_Currents_and_Voltages.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate Labeled Currents and Voltages\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 4-7 in page 210\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"beta_bjt=100; // beta gain of BJT\n", +"Vbe=0.7; // Base-Emitter voltage of BJT in V\n", +"\n", +"//Calculation\n", +"Vcc1=10; \n", +"Vee1=-10; \n", +"Ve1=-0.7; \n", +"R1=10*10^3; \n", +"Ie1=(Vcc1-Vbe)/R1; \n", +"Ib1=Ie1/(beta_bjt+1);\n", +"Vc1=Vcc1-R1*(Ie1-Ib1); \n", +"Vcc2=10; \n", +"Vee2=-15; \n", +"Ve2=-0.7; \n", +"R2=5*10^3; \n", +"Ie2=(Vcc2-Vbe)/R2; \n", +"Ic2=(beta_bjt/(beta_bjt+1))*Ie2; \n", +"Vc2=Vee2+R2*(Ie2); \n", +"printf('Circuit 1:\n(a)Emitter Current=%0.2e A\n(b)Base Current=%0.2e A\n(c)Collector Voltage=%0.3f V\n\n',Ie1,Ib1,Vc1);\n", +"printf('Circuit 2:\n(a)Emitter Current=%0.2e A\n(b)Collector Current=%0.3e A\n(c)Collector Voltage=%0.3f V\n',Ie2,Ic2,Vc2);\n", +"\n", +"// Results\n", +"// (a) Circuit 1 : Emitter Current = 0.93 mA\n", +"// (b) Circuit 1 : Base Current = 9.2 mu-A\n", +"//(c) Circuit 1 : Collector Voltage = 0.792 V\n", +"\n", +"//(a) Circuit 2 : Emitter Current = 1.86 mA\n", +"//(b) Circuit 2 : Collector Current = 1.842 mA\n", +"//(c) Circuit 2 : Collector Voltage : -5.7 V\n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.8: Calculate_labeled_Voltages.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate labeled Voltages\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 4-8 in page 211\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"Vbe=0.7; // Base-Emitter voltage of BJT in V\n", +"Vcc2=10; // DC voltage across Collector in V\n", +"Vee2=-15; // DC voltage across Emitter in V\n", +"Rc2=5*10^3; // Collector Resistance in K-ohms\n", +"// Beta Current Gain of BJT is Infinity\n", +"\n", +"// Calculations\n", +"Vb1=0; \n", +"Ve1=-0.7;\n", +"Ve2=0.7; \n", +"Vc2=Vee2+Rc2*((Vcc2-Vbe)/Rc2); \n", +"\n", +"printf('Circuit 1:\n(a)Base Voltage = %0.1f V\n(b)Emitter Voltage = %0.1f V\n',Vb1,Ve1);\n", +"printf('Circuit 2:\n(a)Emitter Voltage = %0.1f V\n(b)Collector Voltage = %0.1f V\n',Ve2,Vc2);\n", +"\n", +"//Results\n", +"// Circuit 1 : Base Voltage = 0 V\n", +"// Circuit 1 : Emitter Voltage = -0.7 V\n", +"// Circuit 2 : Emitter Voltage = 0.7 V\n", +"// Circuit 2 : Collector Voltage = -5.7 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.9: Calculating_BJT_parameters_assuming_Vbe.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculating BJT parameters assuming Vbe\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 4-9 in page 211\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"Ve=1; // Emitter Voltage of BJT in V\n", +"Vbe=0.7; // Base-Emitter Voltage of BJT in V\n", +"Rb=20*10^3; // Base Resistance of Circuit in K-ohms\n", +"Rc=5*10^3; // Collector Resistance of Circuit in K-ohms\n", +"Re=5*10^3; // Emitter Resistance of Circuit in K-ohms\n", +"Vcc=5; // DC voltage across Collector in V\n", +"Vee=-5; // DC voltage across Emitter in V\n", +"\n", +"// Calculations\n", +"Vb=Ve-Vbe;\n", +"Ib=Vb/Rb; \n", +"Ie=(Vcc-1)/Re; \n", +"Ic=Ie-Ib;\n", +"Vc=(Rc*Ic)-Vcc;\n", +"beta_bjt=Ic/Ib;\n", +"alpha=Ic/Ie; \n", +"\n", +"printf('Circuit Parameters:\n(a)Base Voltage = %0.3f V\n(b)Base Current = %0.3e A\n(c)Emitter Current = %0.3e A\n(d)Collector Current = %0.3e A\n(e)Collector Voltage = %0.3f V\n(f)beta gain = %0.3f\n(g)alpha gain = %0.3f\n',Vb,Ib,Ie,Ic,Vc,beta_bjt,alpha);\n", +"\n", +"// Results\n", +"// For the BJT Circuit,\n", +"// (a) Base Voltage = 0.3 V\n", +"// (b) Base Current = 0.015 mA\n", +"// (c) Emitter Current = 0.8 mA\n", +"// (d) Collector Current = 0.785 mA\n", +"// (e) Collector Voltage = -1.075 volt\n", +"// (f) Beta gain = 52.3\n", +"// (g) Alpha gain = 0.98" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Basic_Electronics_by_D_De/5-BJT_Circuits.ipynb b/Basic_Electronics_by_D_De/5-BJT_Circuits.ipynb new file mode 100644 index 0000000..f3c3faa --- /dev/null +++ b/Basic_Electronics_by_D_De/5-BJT_Circuits.ipynb @@ -0,0 +1,337 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: BJT Circuits" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: Calculate_BJT_parameters_using_beta_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate BJT parameters using beta gain\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 5-1 in page 235\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Part 1\n", +"// Given Data\n", +"beta_bjt=100; // Beta Gain of BJT\n", +"Vcc=10; // DC voltage across Collector in V\n", +"Rb=100000; // Base Resistance of BJT in ohm\n", +"Rc=2000; // Collector Resistance of BJT in ohm\n", +"Vbe=0.7; // Base-Emitter voltage of BJT\n", +"\n", +"// Calculations\n", +"Ib=(Vcc-Vbe)/((beta_bjt*Rc)+Rc+Rb); \n", +"Ic=beta_bjt*Ib;\n", +"\n", +"Vce=Vcc-(Ib+Ic)*Rc;\n", +"\n", +"printf('Part 1 \n');\n", +"printf('(a)The value of Base Current in the BJT circuit is %0.3e A \n',Ib);\n", +"printf('(b)The value of Collector Current in the BJT circuit is %0.3e A \n',Ic);\n", +"printf('(c)The value of Collector-Emitter voltage in the circuit is %0.3f V \n',Vce);\n", +"\n", +"// Part 2\n", +"// Given Data\n", +"Vce2=7; // Collector-Emitter voltage of BJT\n", +"Vcc=10; // DC voltage across Collector in V\n", +"Rc=2000; // Collector Resistance of BJT in ohm\n", +"Vbe=0.7; // Base-Emitter voltage of BJT\n", +"Rc2=2000; // Collector Resistance of BJT in ohm\n", +"\n", +"// Calculations\n", +"constant=(Vcc-Vce2)/Rc;\n", +"Ib2=constant/101;\n", +"Ic2=100*Ib2; \n", +"Rb2=(Vcc-Vbe-(Rc2*constant))/Ib2;\n", +"\n", +"printf('\nPart 2 \n');\n", +"printf('(a)The value of the Base Resistance of the Circuit is %0.3e ohm \n ',Rb2);\n", +"\n", +"// Results\n", +"// Circuit 1: Value of Base Current of circuit = 0.031 mA\n", +"// Circuit 1: Value of Collector Current of circuit = 3.1 mA\n", +"// Circuit 1: Value of Collector-Emitter voltage of BJT circuit = 3.779 V\n", +"// Circuit 2: Value of BAse Resistance required = 424.24 K-ohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: To_establish_Operating_Point_and_Stability_Factor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// To establish Operating Point & Stability Factor\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 5-4 in page 238\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"beta_bjt=50; // Beta Gain of the BJT circuit\n", +"Vbe=0.7; // Base-Emitter voltage of BJT in V\n", +"Vcc=22.5; // DC voltage across Collector in V\n", +"Rc=5600; // Resistance across Collector in ohm\n", +"Vce=12; // Operating Collector-Emitter voltage of circuit in V\n", +"Ic=1.5*10^-3; // Operating Collector current of circuit in mA\n", +"sfactor=3; // Stability factor of the circuit\n", +"\n", +"// Calculations\n", +"Re=((Vcc-Vce)/Ic)-Rc; \n", +"constant=((beta_bjt+1)*(sfactor-1))/((beta_bjt+1)-sfactor); \n", +"Rb=constant*Re; \n", +"Ib=Ic/beta_bjt;\n", +"voltage=(Ib*Rb)+Vbe+((Ib+Ic)*Re); \n", +"R1=Rb*(Vcc/voltage); \n", +"R2=(R1*voltage)/(Vcc-voltage); \n", +"\n", +"printf('(a)The value of Emitter Resistance of the BJT circuit is %0.2e ohm \n',Re);\n", +"printf('(b)The value of Resistance-1 of the BJT circuit is %0.2e ohm \n',R1);\n", +"printf('(c)The value of Resistance-2 of the BJT circuit is %0.2e ohm \n',R2);\n", +"\n", +"// Results\n", +"// The value of Emitter Resistance of the BJT circuit is 1.4 K-ohm\n", +"// The value of Resistance-1 of the BJT circuit is 22.8 K-ohm\n", +"// The value of Resistance-2 of the BJT circuit is 3.4 K-ohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5: Design_Bias_Circuit_for_given_Stability_Factor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Design Bias Circuit for given Stability Factor\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 5-5 in page 239\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vcc=20; // Supply DC Voltage in V\n", +"Rc=1.5*10^3; // Collector Resistance in ohm\n", +"Vce=8; // Collector-Emitter Resistance in V\n", +"Ic=4*10^-3; // Collector Current in A\n", +"S=12; // Stability Factor of circuit\n", +"beta_bjt=50; // Beta Gain of BJT\n", +"\n", +"// Calculations\n", +"Ib=Ic/beta_bjt;\n", +"Re=(Vcc-Vce-Ic*Rc)/(Ib+Ic);\n", +"Rb=Re*((S*beta_bjt)/((beta_bjt+1)-S));\n", +"Ie=Ic+Ib;\n", +"Vbn=0.2+Ie*Re;\n", +"Vth=Vbn+Ib*Rb;\n", +"R1=(Vcc*Rb)/Vth;\n", +"Ir1=(Vcc-Vbn)/R1;\n", +"Ir2=Ir1-Ib;\n", +"R2=Vbn/Ir2;\n", +"\n", +"// For S=3\n", +"S_2=3;\n", +"Rc_2=1.47*10^3;\n", +"Re_2=Re;\n", +"Rb_2=Re*((S_2*beta_bjt)/((beta_bjt+1)-S_2));\n", +"Vth_2=Vbn+(Ib*Rb_2)+6.16;\n", +"R1_2=(Vcc*Rb_2)/Vth_2;\n", +"Ir1_2=(Vcc-Vbn)/R1_2;\n", +"Ir2_2=Ir1_2-Ib;\n", +"R2_2=Vbn/Ir2-2;\n", +"\n", +"printf('For S=12 \n');\n", +"printf('(a)Ib = %0.2e A \n(b)Ir1 = %0.2e A \n(c)Ir2 = %0.2e A \n',Ib,Ir1,Ir2);\n", +"printf('(d)Re = %0.2e ohm \n(e)Rb = %0.2e ohm \n(f)R1 = %0.2e ohm \n(g)R2 = %0.2e ohm \n',Re,Rb,R1,R2);\n", +"printf('(h)Base-Ground Voltage Vbn = %0.2f V \n(i)Thevenin Voltage Vth = %0.2f V \n',Vbn,Vth);\n", +"printf('\n For S=3 \n');\n", +"printf('(a)Re = %0.2e ohm \n(b)Rb = %0.2e ohm \n(c)R1 = %0.2e ohm \n(d)R2 = %0.2e ohm \n',Re_2,Rb_2,R1_2,R2_2);\n", +"printf('(e)Thevenin Voltage Vth = %0.2f V \n(f)Ir1 = %0.2e A \n(g)Ir2 = %0.2e A \n',Vth_2,Ir1_2,Ir2_2);\n", +"\n", +"// Results\n", +"// S=12\n", +"// (a) Ib=80 mu-A\n", +"// (b) Re=1.47 K-ohm\n", +"// (c) Rb=21.17 K-ohm\n", +"// (d) Vbn=5.91 V\n", +"// (e) Vth=7.60 V\n", +"// (f) R1=55.71 K-ohm\n", +"// (g) R2=37.16 K-ohm\n", +"// (h) IR1=0.253 mA\n", +"// (i) IR2=0.173 mA\n", +"// S=3\n", +"// (a) Rb=3.13 K-ohm\n", +"// (b) R1=10.16 K-ohm\n", +"// (c) IR1=1.387 mA\n", +"// (d) R2=4.52 K-ohm\n", +"// (e) IR2=1.307 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.8: Calculate_circuit_parameters_of_a_Emitter_Follower.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate circuit parameters of a Emitter Follower\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 5-8 in page 251\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Rs=0.5*10^3; // Source resistance in ohm\n", +"Rl=5*10^3; // Load resistance in ohm\n", +"hfe=50; // h-parameter value of the BJT\n", +"hie=1*10^3; // h-parameter value of the BJT in ohm\n", +"hoe=25*10^-6; // h-parameter value of the BJT in A/V\n", +"\n", +"// Calculations\n", +"Ai=(1+hfe)/(1+hoe*Rl);\n", +"Ri=hie+Ai*Rl;\n", +"Av=1-(hie/Ri);\n", +"Avs=Av*(Ri/(Ri+Rs));\n", +"\n", +"printf('(a)The current gain of circuit Ai = %0.1f \n',Ai);\n", +"printf('(b)The input resistance of circuit Ri = %0.2e ohm \n',Ri);\n", +"printf('(c)The voltage gain of circuit Av = %0.4f \n',Av);\n", +"printf('(d)The voltage gain of circuit Avs = %0.4f \n',Avs);\n", +"\n", +"// Results\n", +"// (a) The current gain of circuit Ai=45.3\n", +"// (b) The input resistance of circuit Ri=227 ohm\n", +"// (c) The voltage gain of circuit Av=0.9956\n", +"// (d) The voltage gain of circuit Avs=0.9934" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9: Design_of_an_Emitter_Follower.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Design of an Emitter Follower\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 5-9 in page 252\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Ri=500*10^3; // Input Resistance in ohm\n", +"Ro=20; // Output Resistance in ohm\n", +"hfe=50; // h-parameter of BJT\n", +"hie=1*10^3; // h-parameter of BJT in ohm\n", +"hoe=25*10^-6; // h-parameter of BJT in A/V\n", +"const=499*10^3; // Product of Ai and Rl in ohm\n", +"Av=0.999; // Voltage gain of circuit\n", +"const_2=10^6; // Product of Ai and Rl in ohm for Av=0.999\n", +"\n", +"// Calculations\n", +"Ai=1+hfe-(const*hoe);\n", +"Rl=const/Ai;\n", +"Rs=((hfe+1)*hoe*Ro)-hie;\n", +"Ri_2=hie/(1-Av);\n", +"Rl_2=(((1+hfe)/const_2)-1)/hoe;\n", +"\n", +"printf('The current gain of circuit=%0.1f \n',Ai);\n", +"printf('When Av=0.999, \n(a)Ri=%0.2e ohm \n(b)Rl=%0.2e ohm \n',Ri_2,Rl_2);\n", +"\n", +"// Results\n", +"// The current gain of circuit = 38.5\n", +"// For Av = 0.999, \n", +"// (a) Ri = 1 M-ohm, \n", +"// (b) Rl = -40.0 K-ohm" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Basic_Electronics_by_D_De/6-Field_Effect_Transistor.ipynb b/Basic_Electronics_by_D_De/6-Field_Effect_Transistor.ipynb new file mode 100644 index 0000000..9bd37b3 --- /dev/null +++ b/Basic_Electronics_by_D_De/6-Field_Effect_Transistor.ipynb @@ -0,0 +1,980 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Field Effect Transistor" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10: Find_pinch_off_saturation_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find pinch off,saturation voltage\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-10 in page 279\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Nd=3*10^21; // Donor concentration in /m^3\n", +"epsln=12; // Dielectric constant of silicon\n", +"epsln_0=12*8.85*10^-12; // Constant of calculation\n", +"e=1.6*10^-19; // Charge on an electron in C\n", +"a=2*10^-6; // Constant of calculation\n", +"\n", +"// Calculation\n", +"Vp=(e*Nd*(a)^2)/(2*epsln_0);\n", +"printf('(a)Pinch off voltage = %0.3f V\n',Vp);\n", +"Vds=Vp-2;\n", +"printf('(b)Saturation voltage = %0.3f V',Vds);\n", +"\n", +"// Result\n", +"// (a) Pinch off voltage = 9.040 V\n", +"// (b) Saturation voltage = 7.040 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.11: Determine_drain_source_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Determine drain-source resistance\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-11 in page 287\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Ids=10*10^-3; // Drain current in mA\n", +"Vp=-2; // Peak voltage in V\n", +"Vgs=[1 2]; // Gate-source voltage in V\n", +"\n", +"// Calculation\n", +"for i=1:2\n", +" rds=Vp^2/(2*Ids*(Vgs(i)-Vp));\n", +" printf('Rds = %0.1f ohm\n',rds);\n", +"end\n", +"\n", +"// Result\n", +"// Rds = 66.7 ohm, 50 ohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.12: Determine_approximate_Rds.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Determine approximate Rds\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-12 in page 287\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"K=0.25*10^-3; // Constant in mA/V^2\n", +"Vt=2; // Voltage in V\n", +"Vgs=[4 6 10]; // Drain-source voltage in V\n", +"\n", +"// Calculation\n", +"for i=1:3\n", +" rds=1/(2*K*(Vgs(i)-Vt));\n", +" printf('Rds = %0.0f ohm\n',rds);\n", +"end\n", +"\n", +"// Result\n", +"// Rds = 1 K-ohm, 500 ohm, 250 ohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.13: Find_Vgs_operating_region_Id_Rd.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find Vgs,operating region,Id,Rd\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-13 in page 288\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vdd=10; // Drain voltage in in V\n", +"Vds=6; // Drain-source voltage in V\n", +"K=0.2*10^-3; // Constant in mA/V^2\n", +"Vt=1; // Voltage given\n", +"\n", +"// Calculation\n", +"Vgs=Vds;\n", +"printf('(a)Vgs = %0.0f V\n',Vgs);\n", +"printf('Vds=6V>Vgs-Vt=5V\n');\n", +"Id=K*(Vgs-Vt)^2;\n", +"Rd=(Vdd-Vds)/Id;\n", +"printf('(b)Id = %0.0e A\n',Id);\n", +"printf('(c)Rd = %0.0f ohms',Rd);\n", +"\n", +"// Result\n", +"// (a) Vgs = 6 V\n", +"// (b) Id = 5 mA\n", +"// (c) Rd = 800 ohms" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14: Find_operating_region_Vgs_Vds_Rd.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find operating region,Vgs,Vds,Rd\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-14 in page 288\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"K=0.2*10^-3; // Constant in mA/V^2\n", +"Vt=1; // Given voltage in V\n", +"Vdd=10; // Drain voltage in V\n", +"Id=3.2*10^-3; // Drain current in mA\n", +"\n", +"// Calculation\n", +"printf('Vds=Vgs>Vgs-Vt=Active region operation\n');\n", +"Vgs=Vt+sqrt(Id/K);\n", +"Vds=Vgs;\n", +"Rd=(Vdd-Vds)/Id;\n", +"printf('(a)Vgs = %0.0f V,\n(b)Vds = %0.0f V,\n(c)Rd = %0.2e ohm',Vgs,Vds,Rd);\n", +"\n", +"// Result\n", +"// (a) Vgs = 5 V\n", +"// (b) Vds = 5 V\n", +"// (c) Rd = 1.56 K-ohms" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.15: Find_Id_when_Vgs_equals_4V.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find Id when Vgs=4V\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-15 in page 288\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"K=0.15*10^-3; // Constant in mA/V^2\n", +"Vt=2; // Given voltgae in V\n", +"Vdd=12; // Drain voltage in V\n", +"Vgs=4; // Gate-source voltage in V\n", +"\n", +"// Calculation\n", +"Vgg=sqrt(5.4/0.15)+2;\n", +"Id=K*(Vgs-Vt)^2;\n", +"printf('(a)Vgg = %0.0f V,\n(b)Id = %0.1e A',Vgg,Id);\n", +"\n", +"// Result\n", +"// (a) Vgg = 8 V\n", +"// (b) Id = 0.6 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.16: Determine_Rd.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Determine Rd\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-16 in page 289\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"K=0.25*10^-3; // Constant in mA/V^2\n", +"Vt=2; // Voltage given in V\n", +"Vdd=16; // Drain voltage in V\n", +"Vgg=[4 10]; // Gate voltage values in V\n", +"\n", +"// Calculation\n", +"for i=1:2\n", +" id=K*(Vgg(i)-2)^2;\n", +" rd=(16-(Vgg(i)-2))/id;\n", +" printf('Rd when Vgg is %d V = %0.1e ohm\n',Vgg(i),rd);\n", +"end\n", +"\n", +"// Result\n", +"// (a) Rd = 14 K-ohm\n", +"// (b) 500 ohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.17: Determine_Rd.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Determine Rd\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-17 in page 289\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"K=0.25*10^-3; // Constant in mA/V^2;\n", +"Vt=2; // Given voltage in V\n", +"Rd=1*10^3; // Drain resistance in ohms\n", +"Vdd=16; // Drain voltage in V\n", +"Vgg=4; // Gate voltage in V\n", +"\n", +"// Calculation\n", +"id=K*(4-Vt)^2;\n", +"Vd=(-1*10^3*id)+16;\n", +"printf('(a)Id = %0.0e A,\n(b)Vd = %0.0f V\n',id,Vd);\n", +"printf('Since Vds=15>Vgs-Vt=2,active region operation is confirmed');\n", +"\n", +"// Result\n", +"// (a) Id = 1 mA\n", +"// (b) Vds = 15 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.18: Find_Id_Vds1_Vds2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find Id,Vds1,Vds2\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-18 in page 289\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Ids1=8*10-3; // Drain-source current of M1 in mA\n", +"Vp=-4; // Peak voltage in V\n", +"Ids2=16*10^-3; // Drain-source current of M2 in mA\n", +"Vdd=11; // Drain voltage in V\n", +"Vgg=10; // Gate voltage in V\n", +"\n", +"// Calculation\n", +"Id=Ids2;\n", +"printf('(a)Id = %0.2e A\n',Id);\n", +"Vds=(28+sqrt(28^2-128))/2;\n", +"Vds1=(28-sqrt(28^2-128))/2;\n", +"printf('(b)Vds1 = %0.2f V, %0.2f V\n',Vds,Vds1);\n", +"printf('For ohmic operation Vds1 = 1.19 V\n');\n", +"Vds2=Vdd-1.19;\n", +"printf('(c)Vds2 = %0.2f V',Vds2);\n", +"\n", +"// Result\n", +"// (a) Id = 16 mA\n", +"// (b) Vds1 = 1.19 V\n", +"// (c) Vds2 = 9.81 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.19: Find_operating_region_Vgs_Vds_Id.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find operating region,Vgs,Vds,Id\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-19 in page 290\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Ids = 4*10^-3; // Drain-source current in mA\n", +"Vp=-4; // Peak voltage in V\n", +"Vdd=10; // Drain voltage in V\n", +"Rd=1*10^3; // Drain resistance in K-ohms\n", +"\n", +"// Calculation\n", +"printf('(a)Vd=Vgs<Vgs-Vp.Hence ohmic region operation is confirmed\n');\n", +"Vgs1=(-12+sqrt(12^2+160))/2;\n", +"Vgs2=(-12-sqrt(12^2+160))/2;\n", +"printf('(b)Vgs = %0.2f V,%0.2f V\n',Vgs1,Vgs2);\n", +"Vds=Vgs1;\n", +"id=(10-Vds)/(1*10^3);\n", +"printf('(c)Vds = %0.2f V,\n(d)Id = %0.2e A',Vds,id);\n", +"\n", +"// Result\n", +"// (a) Ohmic region operation is confirmed\n", +"// (b) Vgs = 2.72V\n", +"// (c) Vds = 2.72V\n", +"// (d) Id = 7.28mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1: Determine_approximate_drain_source_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Determine approximate drain-source resistance\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-1 in page 274\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"I_ds=10*10^-3; // Drain current in mA\n", +"Vp=-2; // Peak voltage in V\n", +"Vgs=[0 -0.5]; // Values of Vgs in V\n", +"\n", +"// Calculation\n", +"alp=[1 2];\n", +"for i=1:2\n", +" r=Vp^2/(2*I_ds*(Vgs(i)-Vp));\n", +" printf('(%0.0f)r_ds when Vgs = %d V is %0.2f ohm\n',alp(i),Vgs(i),r);\n", +"end\n", +"\n", +"// Result\n", +"// (a) When Vgs = 0 V, r_ds = 100 ohms\n", +"// (b) When Vgs = 0.5 V, r_ds = 133.33 ohms" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.20: Find_Vgs_Id_operating_region.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find Vgs,Id,operating region\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-20 in page 290\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Ids=4*10^-3; // Drain-source current in mA\n", +"Vp=-4; // Peak voltage in V\n", +"Vdd=10; // Drain voltage in V\n", +"Vds=6; // Drain-source voltage in V\n", +"\n", +"// Calculation\n", +"Vgs=Vds;\n", +"printf('(a)Vgs = %0.0f V\n',Vgs);\n", +"printf('(b)Vds=Vgs<Vgs-Vp.Hence ohmic region operation\n');\n", +"Id=4*10^-3*((2*(5/2)*(3/2))-(9/4));\n", +"printf('(c)Id = %0.1e A',Id);\n", +"\n", +"// Result\n", +"// (a) Vgs = 6 V\n", +"// Ohmic region operation is confirmed\n", +"// (c) Id = 21 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.21: Find_operating_region_Vgs_Vds_Id.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find operating region,Vgs,Vds,Id\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-21 in page 290\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"K=0.2*10^-3; // Constant in mA/V^2\n", +"Vt=1; // Voltage in V\n", +"Vdd=10; // Drain voltage in V\n", +"Rd=1*10^3; // Drain resistance in ohms\n", +"\n", +"// Calculation\n", +"printf('(a)Vds=Vgs>Vgs-Vt.Hence active region operation\n');\n", +"printf('0.2*Vgs^2+0.6*Vgs-9.8=0\n');\n", +"Vgs1=(-0.6+sqrt(0.6^2-4*0.2*-9.8))/(2*0.2);\n", +"Vgs2=(-0.6-sqrt(0.6^2-4*0.2*-9.8))/(2*0.2);\n", +"printf('(b)Vgs = %0.2f V or %0.2f V\n',Vgs1,Vgs2);\n", +"printf('Since 0<Vgs<10, Vgs = %0.2f V\n',Vgs1);\n", +"Id=(Vdd-5.66)/Rd;\n", +"printf('(c)Vds = Vgs = 5.66 V\n(d)Id = %0.2e A',Id);\n", +"\n", +"//Result\n", +"// (a) The region of operation is active\n", +"// (b) Vgs = 5.66 V\n", +"// (c) Vds = 5.66 V\n", +"// (c) Id = 4.34 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2: Find_Id_and_Vds.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find Id and Vds\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-2 in page 274\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Ids=12*10^-3; // Drain current in mA\n", +"Vp=-4; // Peak voltage in V\n", +"Vgs=-2; // Gate to source voltage in V\n", +"Rd=3*10^3; // Drain resistance in K-ohms\n", +"Vcc=15; // Supply voltage in V\n", +"\n", +"// Calculation\n", +"id=Ids*(1-(Vgs/Vp))^2;\n", +"Vds=-id*Rd+Vcc;\n", +"\n", +"printf('(a)Id = %0.0e A\n',id);\n", +"printf('(b)Vds = %0.0f V',Vds);\n", +"\n", +"// Result\n", +"// (a) Id = 3mA\n", +"// (b) Vds = 6V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3: Find_the_value_of_Rd.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find the value of Rd\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-3 in page 275\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Ids=12*10^-3; // Drain current in mA\n", +"Vp=-4; // Peak voltage in V\n", +"Rs=0; // Source resistance in ohms\n", +"Vds=0.1; // Drain-source voltage in V\n", +"Vgg=0; // Gate voltage in V\n", +"\n", +"// Calculation\n", +"id=Ids*(50*10^-3-625*10^-6);\n", +"Rd=(15-Vds)/id;\n", +"\n", +"printf('(a)i_d = %0.3e A\n',id);\n", +"printf('(b)Rd = %0.3e ohm',Rd);\n", +"\n", +"// Result\n", +"// (a) i_d = 592.6 mu-A\n", +"// (b) Rd = 25.15 k-ohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4: Find_id_Vds_slope_of_operation_of_JFET.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find id,Vds,slope of operation of JFET\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-4 in page 275\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Ids=12*10^-3; // Drain current in mA\n", +"Vp=-4; // Peak voltage in V\n", +"Rd=1*10^3; // Drain resistance in k-ohm\n", +"Vdd=15; // Drain voltage in V\n", +"\n", +"// Calculation\n", +"Id=Ids;\n", +"Vds=(-Rd*Id)+Vdd;\n", +"printf('Id = %0.2e A\n',Id);\n", +"printf('Vds = %0.0f V\n',Vds);\n", +"printf('Consider it to be operating in the ohmic region\n');\n", +"Vds1=(7+sqrt(49-45))/(3/2);\n", +"Vds2=(7-sqrt(49-45))/(3/2);\n", +"printf('Then Vds = %0.2f V,%0.2f V\n',Vds1,Vds2);\n", +"printf('6V is neglected since it is lesser than -Vp\n');\n", +"id=(15-Vds2)/(1*10^3);\n", +"Vds=Vds2;\n", +"printf('(a)Id = %0.3e A\n',id);\n", +"printf('(b)Vds = %0.2f V',Vds);\n", +"printf('Since Vds<Vgs-Vp,operation region is confirmed in the ohmic region');\n", +"\n", +"// Result\n", +"// (a) Id = 11.67 mA\n", +"// (b) Vds = 3.33 V\n", +"// (c) Operation region is in the ohmic region" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5: Find_id_Vgs_Rd_Vds.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find id,Vgs,Rd,Vds\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-5 in page 276\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Ids=10*10^-3; // Drain current in mA\n", +"Vp=-4; // Peak voltage in V\n", +"Vdd=12; // Drain voltage in V\n", +"Vgg=0; // Gate voltage in V\n", +"\n", +"// Calculation\n", +"id=10*10^-3*(1-(2/4))^2;\n", +"Vgs=(sqrt(9/10)-1)*4;\n", +"Rd=(12-7.5)/(0.625*10^-3);\n", +"Vds=12-2-(3*0.625);\n", +"printf('(a)Id = %0.2e A\n',id);\n", +"printf('(b)Vgs = %0.3f V\n',Vgs);\n", +"printf('(c)Rd = %0.2e ohm\n',Rd);\n", +"printf('(d)Vds = %0.3f V',Vds);\n", +"\n", +"// Result\n", +"// (a) Id = 2.5 mA\n", +"// Vgs = -0.205 V \n", +"// (c) Rd = 7.2 k-ohm \n", +"// (d) Vds = 8.125 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6: Determine_Vgs_Id_Vds_operating_region.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Determine Vgs,Id,Vds,operating region\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-6 in page 276\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Ids=16*10^-3; // Drain current in mA\n", +"Vp=-4; // Peak voltage in V\n", +"Vdd=18; // Drain voltage in V\n", +"Rd=500; // Drain resistance in ohms\n", +"\n", +"// Calculation\n", +"vgs1=(-10+sqrt(100-64))/2;\n", +"vgs2=(-10-sqrt(100-64))/2;\n", +"printf('(a)Vgs = %d V,%d V\n',vgs1,vgs2);\n", +"id=-vgs1/500;\n", +"Vds=18-((1*10^3)*(4*10^-3));\n", +"printf('(b)id = %0.0e A\n',id);\n", +"printf('(c)Vds = %0.0f V\n',Vds);\n", +"printf('Saturation region operation is confirmed from above results');\n", +"\n", +"// Result\n", +"// (a) Vgs = -2V\n", +"// (b) Id = 4 mA, \n", +"// (c) Vds = 14 V, " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.7: Determine_Vgs_Id_Vds.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Determine Vgs,Id,Vds\n", +"// Determine Vgs,Id,Vds,operating region\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-7 in page 277\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Ids=8*10^-3; // Drain current in mA\n", +"Vp=-4; // Peak voltage in V\n", +"Vdd=18; // Drain voltage in V\n", +"Rd=8*10^3; // Drain resistance in K-ohms\n", +"\n", +"// Calculation\n", +"vgs1=(-214+sqrt(214^2-(4*63*180)))/(2*63);\n", +"vgs2=(-214-sqrt(214^2-(4*63*180)))/(2*63);\n", +"printf('(a)Vgs = %0.2f V,%0.2f V\n',vgs1,vgs2);\n", +"id1=-vgs1/(1*10^3);\n", +"id2=-vgs2/(1*10^3);\n", +"printf('(b)Id = %0.2e A,%0.2e A\n',id1,id2);\n", +"Vds1=((-9*10^3)*id1)+18;\n", +"Vds2=((-9*10^3)*id2)+18;\n", +"printf('(c)Vds = %0.2f V,%0.2f V',Vds1,Vds2);\n", +"\n", +"// Result\n", +"// (a) Vgs = -1.53 V,-1.86 V\n", +"// (b) Id = 1.53 mA,1.86 mA\n", +"// (c) Vds = 4.23 V,1.26 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.8: Determine_R_Ids_Vgs.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Determine R,Ids,Vgs\n", +"// Determine Vgs,Id,Vds,operating region\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-8 in page 277\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vp=-3; // Peak voltage in V\n", +"Vgg=5; // Gate voltage in V\n", +"Ids=10*10^-3; // Drain current in mA\n", +"\n", +"// Calculation\n", +"R=5/(10*10^-3);\n", +"printf('(a)R = %0.0f ohm\n',R);\n", +"Ids=5/400;\n", +"Vds=(2*Ids*R)+15;\n", +"printf('(b)Idss = %0.2e A\n',Ids);\n", +"printf('(c)Vds = %0.0f V\n',Vds);\n", +"printf('This confirms active region\n');\n", +"Rid=14/2;\n", +"Vgs=Vgg-Rid;\n", +"printf('(d)Vgs = %0.0f V\n',Vgs);\n", +"printf('Vds=2>Vgs-Vp=-1.5+3=1.5 -> Active region');\n", +"\n", +"// Result\n", +"// (a) R = 500ohm, \n", +"// (b) Ids = 12.5mA,\n", +"// (c) Vgs = -2V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.9: Find_Id_Vgs_Vds_region_of_operation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find Id,Vgs,Vds,region of operation\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 6-9 in page 277\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Idss=4*10^-3; // Drain current in mA\n", +"Vp=-2; // Peak voltage in V\n", +"Vdd=10; // Supply voltage in V\n", +"Vgs=0; // Gate source voltage in V\n", +"\n", +"// Calculation\n", +"Id=Idss*(1-(Vgs/Vp));\n", +"printf('(a)Id = %0.0e A\n',Id);\n", +"printf('(b)Since Id=Idss, Vgs=0 V\n');\n", +"Vds=10-Vgs;\n", +"printf('(c)Vds = %0.0f V\n',Vds);\n", +"printf('Since Vds=10V>Vgs-Vp=2V,Active region operation of upper JFET is confirmed');\n", +"\n", +"// Result\n", +"// (a) Id = 4 mA,\n", +"// (b) Vgs = 0 V,\n", +"// (c) Vds = 10 V" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Basic_Electronics_by_D_De/7-FET_Circuits.ipynb b/Basic_Electronics_by_D_De/7-FET_Circuits.ipynb new file mode 100644 index 0000000..2c9a076 --- /dev/null +++ b/Basic_Electronics_by_D_De/7-FET_Circuits.ipynb @@ -0,0 +1,1904 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: FET Circuits" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11: Find_voltage_gain_output_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find voltage gain,output impedance\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-11 in page 320\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"// The Thevenin equivalent of fig. is derived\n", +"\n", +"// Calculation\n", +"A=(9.5*10)/(10+20);\n", +"R_0=(1/(10*10^3))+(1/(20*10^3));\n", +"R=1/R_0;\n", +"printf('(a)Voltage gain = %0.2f\n',A);\n", +"printf('(b)Output impedance = %0.2e',R);\n", +"\n", +"// Result\n", +"// (a) A = 3.17\n", +"// (b) R_0 = 6.67 K" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12: Find_voltage_gain_A1_and_A2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find voltage gain A1 and A2\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-12 in page 321\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Rd=30*10^3; // Drain resistance in K-ohm\n", +"Rs=2*10^3; // Source resistance in K-ohm\n", +"mu=19; // Constant for FET\n", +"rd=10*10^3; // Dynamic resistance in K-ohm\n", +"\n", +"// Calculation\n", +"A1=(-mu*(Rd+rd+((mu+1)*Rs))*Rd)/((rd+Rd)*(Rd+rd+(2*(mu+1)*Rs)));\n", +"A2=(mu*(mu+1)*Rs*Rd)/((rd+Rd)*(Rd+rd+(2*(mu+1)*Rs)));\n", +"printf('(a)For the given values of Rd,Rs,rd and mu we have:\n');\n", +"printf('A1 = %0.2f\nA2 = %0.2f\n\n',A1,A2);\n", +"printf('(b)If Rs-->infinity,\n');\n", +"A_1=(-mu*Rd)/(2*(rd+Rd));\n", +"printf('A1 = %0.2f = -A2\nOr A1 = -A2 = %0.2f',A_1,A_1);\n", +"\n", +"// Result\n", +"// (a) A1 = -9.5; A2 = 4.75\n", +"// (b) A1 = -A2 = -7.13" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13: Determine_Vgs_Id_Vds_Av.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Determine Vgs,Id,Vds,Av\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-13 in page 322\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Rd=12; // Drain resistance in K-ohms\n", +"Rg=1; // Gate resistance in M-ohms\n", +"Rs=0.47; // Source resistance in ohms\n", +"Vdd=30; // Drain voltage in volts\n", +"Idds=3*10^-3; // Drain-source current in mA\n", +"\n", +"// Calculation\n", +"printf('Vgs=-1.41* (1+ 2Vgs/2.4 + Vgs^2/2.4)\n');\n", +"Vgs1=(-1.175+sqrt(1.175^2-4*0.245*1.41))/(2*0.245);\n", +"Vgs2=(-1.175-sqrt(1.175^2-4*0.245*1.41))/(2*0.245);\n", +"printf('(a)Upon solving we get Vgs = %0.3f V or %0.3f V\n',Vgs1,Vgs2);\n", +"Id=3*(1-(2.398/2.4))^2;\n", +"Vds=Vdd-Id*(Rd+Rs);\n", +"gm=((2*Idds)/2.4)*(1-(2.398/2.4));\n", +"Av=gm*12;\n", +"printf('(b)Drain current Ids = %0.1e A\n',Id);\n", +"printf('(c)Vds = %0.2f V\n',Vds);\n", +"printf('(d)Small signal voltage gain Av = %0.2e',Av);\n", +"\n", +"// Result\n", +"// (a) Vgs = -2.398 V\n", +"// (b) Ids = 2.1*10^-6 A\n", +"// (c) Vds = 30 V\n", +"// (d) Av = 2.5*10^-5" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.14: Find_the_value_of_R1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find the value of R1\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-14 in page 322\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Idss=2*10^-3; // Drain-source current in mA\n", +"Vp=-1; // Voltage in volts\n", +"Rd=56*10^3; // Drain resistance in K-ohms\n", +"Vdn=10; // Drain to ground voltage in volts\n", +"Vdd=24; // Drain voltage in volts\n", +"\n", +"// Calculation\n", +"Id=(Vdd-Vdn)/Rd;\n", +"Vgs=-0.65;\n", +"R1=-Vgs/Id;\n", +"printf('R1 = %0.1e ohms',R1);\n", +"\n", +"// Result\n", +"// R1 = 2.6 K-ohms" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.15: Find_Vo_for_given_Vi.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find Vo for given Vi\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-15 in page 323\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Idss=5.6*10^-3; // Drain-source current in mA\n", +"Vp=-4; // Peak voltage in V\n", +"Vi=[0 10]; // Input voltage values in V\n", +"\n", +"// Calculation\n", +"alp=[1 2];\n", +"for i=1:2\n", +" Vg=(-2.8+sqrt(2.8^2-(4*0.35*5.6)))/(2*0.35);\n", +" Id=(Vi(i)+12-Vg)/10;\n", +" Vo=(10*Id)-12;\n", +" printf('(%0.0f)For Vi = %d V, Vo = %0.1f V\n',alp(i),Vi(i),Vo);\n", +"end\n", +"printf('If Vo = 0,\n');\n", +"Vgs=4*(sqrt(0.214)-1);\n", +"printf('(3)Then Vi = Vgs = %0.2f V',Vgs);\n", +"\n", +"// Result\n", +"// When Vi=0,Vo=4V\n", +"// When Vi=10,Vo=14V\n", +"// When Vo=0,Vi=-2.15V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.16: Calculate_quiescent_values_of_Id_Vgs_Vds.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate quiescent values of Id,Vgs,Vds\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-16 in page 324\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"// We find Thevenins equivalent to the left of the gate\n", +"\n", +"// Calculation\n", +"Rth=(1/(200*10^3))+(1/(1.3*10^6));\n", +"A=1/Rth;\n", +"Vth=(200/1500)*60;\n", +"printf('(a)Rth = %0.3e ohms and Vth = %0.0f V\n',A,Vth);\n", +"Vgs=(8+sqrt(8^2-(4*16)))/2;\n", +"Id=-2-(Vgs/4);\n", +"printf('(b)Vgs = %0.0f V and Id = %0.2f mA\n',Vgs,Id);\n", +"Vds=-60+((18+4)*2.25);\n", +"printf('(c)Vds = %0.1f V',Vds);\n", +"\n", +"// Result\n", +"// (a) Id = -3 mA\n", +"// (b) Vgs = 4 V\n", +"// (c) Vds = -10.5 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.20: Calculate_transconductance_amplification_factor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate transconductance,amplification factor\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-20 in page 328\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Id=2*10^-3; // Drain current in mA\n", +"Vgs=2; // Gate-source voltage in V\n", +"Rd=200*10^3; // Drain resistance in K-ohms\n", +"\n", +"// Calculation\n", +"gm=Id/Vgs;\n", +"mu=gm*Rd;\n", +"printf('(a)Transconductance gm = %0.0e A/V\n',gm);\n", +"printf('(b)Amplification factor mu = %0.0f',mu);\n", +"\n", +"// Result\n", +"// (a) gm = 1 mA/V\n", +"// (b) mu = 200" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.21: Calculate_dynamic_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate dynamic resistance\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-21 in page 328\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"mu=80; // Amplification factor\n", +"gm=400*10^-6; // Transconductance in micro-mho\n", +"\n", +"// Calculation\n", +"rd=mu/gm;\n", +"printf('Dynamic resistance Rd = %0.1e ohm',rd);\n", +"\n", +"// Result\n", +"// Rd = 0.2*10^6 ohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.22: Calculate_Rd_gm_mu.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate Rd,gm,mu\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-22 in page 329\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vds1=6; // Drain-source voltage when Vgs is zero\n", +"Vds2=16; // Drain-source voltage when Vgs is 0.3\n", +"Id1=12*10^-3; // Drain current in mA when Vgs is zero\n", +"Id2=12.3*10^-3; // Drain current in mA when Vgs is zero\n", +"\n", +"// Calculation\n", +"rd=(Vds2-Vds1)/(Id2-Id1);\n", +"gm=(Id2-Id1)/(0-0.3*10^-3);\n", +"mu=-gm*rd*10^-4;\n", +"printf('(a)Drain resistance Rd = %0.2e ohms\n',rd);\n", +"printf('(b)Transconductance gm = %0.0f(neglecting the sign)\n',-gm);\n", +"printf('(c)Amplification factor mu = %0.2f',mu);\n", +"\n", +"// Result\n", +"// (a) Rd = 33.33k-ohms\n", +"// (b) gm = 1\n", +"// (c) mu = 3.33" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.23: Find_the_value_of_Rs.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find the value of Rs\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-23 in page 329\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vgs=1.5; // Gate-source voltage in V\n", +"Id=2*10^-3; // Drain saturation current in mA\n", +"\n", +"// Calculation\n", +"Rs=Vgs/Id;\n", +"printf('Rs = %0.0f ohm',Rs);\n", +"\n", +"// Result\n", +"// Rs = 750 ohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.24: Find_voltage_gain_of_amplifier.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find voltage gain of amplifier\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-24 in page 329\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Rl=250; // Load resistance in k-ohms\n", +"gm=0.5; // Transconductance in mA/V\n", +"rd=200; // Dynamic resistance in k-ohms\n", +"\n", +"// Calculation\n", +"mu=rd*gm;\n", +"Av=(-mu*Rl)/(rd+Rl);\n", +"printf('Voltage gain Av = %0.2f',Av);\n", +"\n", +"// Result\n", +"// Voltage gain Av = -55.55" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.25: Find_pinch_off_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find pinch off voltage\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-25 in page 330\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Idss=10; // Drain-source current in mA\n", +"Vp=-4; // Original pinch off voltage in V\n", +"Vgs=-2; // Gate-source voltage in V\n", +"gm=4; // Transcondonductance in m-mho\n", +"\n", +"// Calculation\n", +"Ids=Idss*(1-(Vgs/Vp))^2;\n", +"A=(-2*Ids)/gm;\n", +"printf('Pinch off voltage Vp = %0.0f V',A);\n", +"\n", +"// Result\n", +"// Vp at gm = 4 m-mho is -1V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.26: Calculate_quiescent_values_of_Id_Vds_Vgs.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate quiescent values of Id,Vds,Vgs\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-26 in page 330\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Ids=20*10^-3; // Drain-souce current in mA\n", +"Vp=-4; // Pinch off voltage in volts\n", +"\n", +"// Calculation\n", +"printf('We get the equation:\n0.3125*Id^2-6*Id+20=0\n');\n", +"Id1=(6+sqrt(6^2-4*0.3125*20))/(2*0.3125);\n", +"Id2=(6-sqrt(6^2-4*0.3125*20))/(2*0.3125);\n", +"printf('Id = %0.1f mA and %0.1f mA\n',Id1,Id2);\n", +"printf('We consider only %0.1f mA\n',Id2);\n", +"Vgs=-Id2*0.5;\n", +"Vds=30-(Id2*(5+0.5));\n", +"printf('Vgs = %0.2f V\n(c)Vds = %0.2f V',Vgs,Vds);\n", +"\n", +"// Result\n", +"// Id = 4.3 mA\n", +"// Vgs = -2.15 V\n", +"// Vds = 6.35 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.27: Find_Id_Vds_Vgs_Av.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find Id,Vds,Vgs,Av\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-27 in page 331\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Idss=3; // Drain-source current in mA\n", +"Vp=-2.4; // Pinch off voltage in volts\n", +"\n", +"// Calculation\n", +"printf('Id^2-6.73*Id+5.76=0\n');\n", +"Id1=(6.73+sqrt(6.73^2-4*1*5.76))/2;\n", +"Id2=(6.73-sqrt(6.73^2-4*1*5.76))/2;\n", +"printf('Id = %0.2f mA or %0.2f mA\n',Id1,Id2);\n", +"printf('(a)The possible value is 1.01 mA\n');\n", +"Vgs=-Id2*1;\n", +"Vds=20-(1.09*(1+10));\n", +"printf('Vgs = %0.2f V\nVds = %0.2f V\n',Vgs,Vds);\n", +"gm=(-2/Vp)*sqrt(Id2*Idss);\n", +"Av=gm*10;\n", +"printf('(b)Voltage gain Av = %0.1f',Av);\n", +"\n", +"// Result\n", +"// Id = 1.01 mA\n", +"// Vgs = -1.01 V\n", +"// (a) Vds = 8.01 V\n", +"// (b) Av = 14.5" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.28: Calculate_Av_Zo_Zi.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate Av,Zo,Zi\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-28 in page 332\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Rd=15; // Drain resistance in k-ohms\n", +"Rg=1; // Gate resistance in M-ohms\n", +"rd=5; // Dynamic resistance in k-ohms\n", +"gm=5; // Transconductance in m-mho\n", +"Vdd=20; // Drain voltage in volts\n", +"\n", +"// Calculation\n", +"mu=rd*gm;\n", +"Av=(mu*Rd)/(rd+Rd);\n", +"Zo=rd;\n", +"Zi=Rg;\n", +"printf('(a)Av = %0.2f\n(b)Zo = %0.0f k-ohms\n(c)Zi = %0.0f M-ohms',Av,Zo,Zi);\n", +"\n", +"// Result\n", +"// (a) Av = 18.75\n", +"// (b) Zo = 5 K-ohms\n", +"// (c) Zi = 1 M-ohms" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.29: Calculate_Vo_Vi.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate Vo,Vi\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-29 in page 333\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Idss=5*10^-3; // Drain-source current in mA\n", +"Vp=-4.5; // Pinch off voltage in V\n", +"\n", +"// Calculation\n", +"printf('When Vi is zero:\n');\n", +"Vgs1=(-25.67+sqrt(25.67^2-(4*2.963*55)))/(2*2.963);\n", +"Vgs2=(-25.67-sqrt(25.67^2-(4*2.963*55)))/(2*2.963);\n", +"printf('(a)Vgs = %0.2f V or %0.2f V\n',Vgs1,Vgs2);\n", +"printf('Since the gate is connected to ground,Vo = -Vgs.Hence Vo = %0.2f V or %0.2f V\n',-Vgs1,-Vgs2);\n", +"printf('When Vo is zero:\n');\n", +"Id=5/(12*10^3);\n", +"Vgs=4.5*(0.288-1);\n", +"Vi=Vgs;\n", +"printf('(b)Vi = %0.1f V',Vi);\n", +"\n", +"// Result\n", +"// (a) When Vi is zero, Vo = 4.78V or 3.88V\n", +"// (b) When Vo is zero, Vi = -3.2V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: Find_amplification.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find amplification\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-2 in page 312\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"mu=30; // FET parameter\n", +"rd=5; // FET parameter\n", +"Rd=10; // FET parameter value in ohms\n", +"R=50; // Resistor value in ohms\n", +"\n", +"// Calculation\n", +"Av=(-299/50)/((1/rd)+(1/Rd)+(1/R));\n", +"printf('Amplification Av = %0.1f',Av);\n", +"\n", +"// Result\n", +"// Av = -18.7" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.30: Calculate_Av_Zo.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate Av,Zo\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-30 in page 334\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"gm=5; // Transconductance in mA/V\n", +"rd=10*10^3; // Dynamic resistance in K-ohms\n", +"mu=50; // Amplification factor\n", +"Rd=5*10^3; // Drain resistance in K-ohms\n", +"\n", +"// Calculation\n", +"Av=(-mu*Rd)/(rd+Rd+((mu+1)*0.1*10^3));\n", +"Avs=Av*(100/110);\n", +"Zo=rd+((mu+1)*0.1*10^3);\n", +"Zo1=(1/15.1)+(1/5);\n", +"A=1/Zo1;\n", +"printf('Av = %0.2f\n',Av);\n", +"printf('Over all voltage gain Avs = %0.1f\n',Avs);\n", +"printf('Output impedance = %0.2e K\n',Zo);\n", +"printf('Effective output impedance Zo = %0.2f k-ohms',A);\n", +"\n", +"// Result\n", +"// (a) Avs = -11.3\n", +"// (b) Zo = 3.75 K-ohms" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.31: Calculate_Vgsq_gm_Rs_Vdsq_Rl.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate Vgsq,gm,Rs,Vdsq,Rl\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-31 in page 335\n", +"clear; clc; close;\n", +"// Given data\n", +"Vp=-4; // Pinch off voltage in V\n", +"Idss=1.65*10^-3; // Drain-source current in mA\n", +"Idq=0.8*10^-3; // Desired operating point of current in mA\n", +"Av=10; // Voltage gain in dB\n", +"// Calculation\n", +"printf('We know that Id = Idss*(1-(Vgs/Vp))^2\n');\n", +"Vgs=4*(sqrt(0.485)-1);\n", +"gmo=(-2*Idss)/Vp;\n", +"gm=gmo*(1-(Vgs/Vp));\n", +"Rs=Vgs/-Idq;\n", +"Rl=Av/gm;\n", +"Vds=24-(Idq*Rl)-(Idq*Rs);\n", +"printf('(a)Vgsq = %0.3f V\n(b)gm = %0.3e A/V\n(c)Rs = %0.3e ohms\n(d)Rl = %0.2e ohms\n(e)Vds = %0.3f V\n',Vgs,gm,Rs,Rl,Vds);\n", +"printf('Therefore,\n(e)Vdsq = 16.48 V');\n", +"// Result\n", +"// (a) Vgsq = -1.214 V\n", +"// (b) gm = 0.575 mA/V\n", +"// (c) Rs = 1.518 K-ohm\n", +"// (d) Rl = 17.4 K-ohm\n", +"// (e) Vdsq = 16.48 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.32: Calculate_Zo_for_rd_equals_50_k_ohms.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate Zo for rd=50k-ohms\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-32 in page 337\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"rd=50*10^3; // Dynamic resistance in K-ohms\n", +"Rd=20*10^3; // Drain resistance in K-ohms\n", +"\n", +"// Calculation\n", +"Zo=(rd*Rd)/(rd+Rd);\n", +"printf('Output impedance Zo = %0.3e ohms',Zo);\n", +"\n", +"// Result\n", +"// Zo = 14.28 K-ohms" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.33: Find_voltage_gain_Current_gain_ratio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find voltage gain,Current gain ratio\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-33 in page 337\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Rd=5*10^3; // Drain resistance in K-ohms\n", +"Rg=500*10^3; // Gate resistance in K-ohms\n", +"mu=60; // Amplification factor\n", +"rds=30*10^3; // Dynamic resistance in K-ohms\n", +"\n", +"// Calculation\n", +"Av=(mu*Rd)/(Rd+rds);\n", +"Ai=(mu*Rg)/(rds+Rd);\n", +"printf('(a)Voltage gain Av = %0.2f\n(b)Current gain Ai = %0.2f',Av,Ai);\n", +"\n", +"// Reuslt\n", +"// (a) Av = 8.57\n", +"// (b) Ai = 857.14" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.34: Determine_Zo_draw_small_signal_model.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Determine Zo,draw small signal model\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-34 in page 338\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"gm=1; // Transconductance in m-mho\n", +"rd=50*10^3; // Dynamic resistance in K-ohms\n", +"Rd=5*10^3; // Drain resistance in K-ohms\n", +"\n", +"// Calculation\n", +"printf('The equivalent circuit at low-frequency small signal model is as shown in the figure\n');\n", +"Zo=(rd*Rd)/(Rd+rd);\n", +"printf('Zo = %0.2e ohms',Zo);\n", +"\n", +"// Result\n", +"// Zo = 4.54 K-ohms" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.35: Find_values_of_R2_Vdd_Vds.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find values of R2,Vdd,Vds\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-35 in page 338\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vp=-5; // Pinch off voltage in V\n", +"Idss=12*10^-3; // Drain-source current in mA\n", +"Vdd=18; // Drain voltage in V\n", +"Rs=2*10^3; // Source resistance in K-ohms\n", +"Rd=2*10^3; // Drain resistance in K-ohms\n", +"R2=90*10^3; // Original value of R2 in K-ohms\n", +"\n", +"// Calculation\n", +"Vgs1=(-5.3+sqrt(5.3^2-(4*0.48*10.35)))/(2*0.48);\n", +"Vgs2=(-5.3-sqrt(5.3^2-(4*0.48*10.35)))/(2*0.48);\n", +"printf('Vgs = %0.2f V or %0.2f V\nTherefore Vgs = -2.53 V\n',Vgs1,Vgs2);\n", +"Id=(3.306-Vgs2)/2;\n", +"Vds=18-(Id*Rd)-(Id*Rs);\n", +"r2=(13.47*400)/4.53;\n", +"vdd=((16-2.53)*(400+90))/90;\n", +"vds=vdd-16-16;\n", +"printf('(a)The new value of R2 is %0.1f K-ohm\n',r2);\n", +"printf('(b)The new value of Vdd = %0.2f V\n',vdd);\n", +"printf('(c)The new value of Vds = %0.2f V',vds);\n", +"\n", +"// Result\n", +"// (a) R2 = 1189.4 K-ohm\n", +"// (b) Vdd = 73.34 V\n", +"// (c) Vds = 41.34 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.36: Equation_for_drain_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Equation for drain current\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-36 in page 340\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given\n", +"Idss=12; // Drain source current in mA\n", +"Vgs=-5; // Gate source voltage in V when off\n", +"\n", +"// Calculation\n", +"printf('Equation for drain current:Id = %0.0f*(1-(Vgs/%0.0f))^2',Idss,Vgs);\n", +"x=[-5 -4 -3 -2 -1 0];\n", +"y=[12 11 10 9 8 7 6 5 4 3 2 1 0];\n", +"y=12*(1+(x/5))^2;\n", +"plot(x,y);\n", +"xlabel('Vgs');\n", +"ylabel('Id');\n", +"title('Transfer characteristics of FET');\n", +"\n", +"// Result\n", +"// Graph shows the transfer characteristics of FET for the given values\n", +"// Set axis properties to 'origin' to view graph correctly" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.37: Find_Vgs_Vp.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find Vgs,Vp\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-37 in page 340\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Idss=12; // Drain-source current in mA\n", +"Vgs_off=-6; // Gate-source voltage when FET is off\n", +"\n", +"// Calculation\n", +"Vgs=6*(sqrt(5/12)-1);\n", +"Vp=Vgs_off;\n", +"printf('(a)Vgs = %0.2f V\n(b)Vp = -Vgs(off) = 6V',Vgs);\n", +"\n", +"// Result\n", +"// (a) Vgs = -2.13 V\n", +"// (b) Vp = 6 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.38: Find_the_values_of_Rs_and_Rd.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find the values of Rs and Rd\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-38 in page 341\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Id=1.5*10^-3; // Drain current in mA\n", +"Vds=10; // Drain-source voltage in V\n", +"Idss=5*10^-3; // Drain-source current in mA\n", +"Vp=-2; // Pinch off voltage in V\n", +"Vdd=20; // Drain voltage in V\n", +"\n", +"// Calculation\n", +"Vgs=2*(sqrt(1.5/5)-1);\n", +"Vs=-Vgs;\n", +"Rs=Vs/Id;\n", +"Rd=(20-10.9)/Id;\n", +"printf('Rs = %0.1e ohms\nRd = %0.2e ohms',Rs,Rd);\n", +"\n", +"// Result\n", +"// Rs = 0.6 K-ohms\n", +"// Rd = 6.06 K-ohms" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.39: Find_the_value_of_Rs.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find the value of Rs\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-39 in page 341\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Id=2.5*10^-3; // Drain current in mA\n", +"Vds=8; // Drain-source voltage in V\n", +"Vdd=30; // Drain voltage in V\n", +"R1=1*10^6; // R1 value in M-ohms\n", +"R2=500*10^3; // R2 value in K-ohms\n", +"Idss=15*10^-3; // Drain-source current in mA\n", +"Vp=-5; // Pinch off voltage in volts\n", +"\n", +"// Calculation\n", +"Vgs=5*(sqrt(5/30)-1);\n", +"V2=(Vdd*R2)/(R1+R2);\n", +"Rs=(V2-Vgs)/Id;\n", +"printf('Rs = %0.2e ohms\n',Rs);\n", +"Rd=(Vdd-Vds-(Id*Rs))/Id;\n", +"printf('Rd = %0.2e ohms',Rd);\n", +"\n", +"// Result\n", +"// Rs = 5.18 K-ohms\n", +"// Rd = 3.62 K-ohms" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3: Find_amplification_with_40k_resistor_instead.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find amplification with 40k resistor instead\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-3 in page 313\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Av=-18.7; // Amplification from prev problem\n", +"R1=2.54; // Resistance value in ohms\n", +"R=40; // Load resistor in K-ohms\n", +"\n", +"// Calculation\n", +"Avs=(Av)*(R1/(R1+R));\n", +"printf('Amplification Avs = %0.2f',Avs);\n", +"\n", +"// Result\n", +"// Avs = -1.11" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.40: Calculate_voltage_gain_Av.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate voltage gain Av\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-40 in page 342\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"gm=2*10^-3; // Transconductance in mA/V\n", +"rd=10*10^3; // Dynamic resistance in K-ohms\n", +"Zc=31.83*10^3; // Capacitive impedance in K-ohms\n", +"Vth=16.67; // Thevenin voltage in V at 1 KHz\n", +"\n", +"// Calculation\n", +"R=(rd*25*10^3)/(rd+(25*10^3));\n", +"Av=-gm*R;\n", +"printf('(a)Av after neglecting capacitance = %0.2f\n',Av);\n", +"Rth=(rd*50*10^3)/(rd+50*10^3);\n", +"Av1=(-50*10^3*Vth)/((50*10^3+Rth)-%i*Zc);\n", +"printf('(b)Av after considering capacitance = %0.2f',Av1);\n", +"\n", +"// Result\n", +"// Av after neglecting capacitance = -14.28\n", +"// Av after considering capacitance = -11.01" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.41: Calculate_voltage_amplification_in_circuit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate voltage amplification in circuit\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-41 in page 343\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"gfs=2*10^-3; // Transconductance in mS\n", +"Rl=10*10^3; // Load resistance\n", +"\n", +"// Calculation\n", +"Av=gfs*Rl;\n", +"printf('Av = %0.0f',Av);\n", +"\n", +"// Result \n", +"// Av = 20" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.43: Find_the_value_of_Rs.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find the value of Rs\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-43 in page 344\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Idss=10*10^-3; // Drain-source current in mA\n", +"Vp=-5; // Pinch off voltage in V\n", +"\n", +"// Calculation\n", +"Vgs = 5*(sqrt(6.4/10)-1);\n", +"Rs=-Vgs/(6.4*10^-3);\n", +"printf('Rs = %0.0f ohms',Rs);\n", +"\n", +"// Result\n", +"// Rs = 156 ohms" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.44: Calculate_value_of_Id_Vgs_Vds.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate value of Id,Vgs,Vds\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-44 in page 345\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Idss=4*10^-3; // Drain-source current in mA\n", +"Vp=4; // Pinch off voltage in V\n", +"\n", +"// Calculation\n", +"Rth=(200*10^3*1.3*10^6)/((200*10^3)+(1.3*10^6));\n", +"Vth=(200/1500)*(1-60);\n", +"Vgs=1;\n", +"Id=(-8-Vgs)/4;\n", +"Vds=-60-((18+4)*Id);\n", +"printf('Id = %0.2f mA\nVgs = %0.0f V\nVds = %0.1f V',Id,Vgs,Vds);\n", +"\n", +"// Result\n", +"// Vgs = 1 V\n", +"// Vds = -10.5 V\n", +"// Id = -2.25 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.45: Calculate_input_admittance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate input admittance\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-45 in page 348\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"mu=20; // Amplification factor\n", +"rd=10*10^3; // Dynamic resistance in K-ohms\n", +"gm=2*10^-3; // Transconductance in mA/V\n", +"Cgs=3*10^-12; // Gate-source capacitance in pF\n", +"Cds=1*10^-12; // Drain-source capacitance in pF\n", +"Cgd=2*10^-12; // Gate-drain capacitance in pF\n", +"\n", +"// Calculation\n", +"printf('(a)Rd = 50 K\n');\n", +"printf('At f=1000Hz\n');\n", +"Ygs=%i*2*%pi*10^3*Cgs;\n", +"Yds=%i*2*%pi*10^3*Cds;\n", +"Ygd=%i*2*%pi*10^3*Cgd;\n", +"Yd=2*10^-6;\n", +"gd=10^-4;\n", +"Av=(-gm+Ygd)/(gd+Yd+Yds+Ygs);\n", +"C1=Cgs+(17.7*Cgd);\n", +"printf('Av = %0.1f\nC1 = %0.1e F\n\n',Av,C1);\n", +"printf('At f=10^6Hz\n');\n", +"Ygs1=%i*1.88*10^-6;\n", +"Yds1=%i*0.628*10^-6;\n", +"Ygd1=%i*1.26*10^-6;\n", +"Av1=(-gm+Ygd1)/(gd+Yd+Yds+Ygs);\n", +"R1=10^6/2.48;\n", +"C2=37.6*10^-12;\n", +"printf('Av = %0.1f\nR1 = %0.2e ohm\nC1=%0.1e F\n\n',Av1,R1,C2);\n", +"Zl=%i*5*10^4;\n", +"Yl=%i*2*10^-6;\n", +"printf('(b)Zl = j5*10^4;Yl = j2*10^-6\n');\n", +"printf('For f=1000Hz\n');\n", +"Av2=-gm/(gd+Yl);\n", +"C3=Cgs+(20.2*Cgd);\n", +"R2=20.8*10^6;\n", +"printf('Av = %0.2f\nR1 = %0.2e ohm\nC1 = %0.1e F\n\n',Av2,R2,C3);\n", +"printf('For f=10^6Hz\n');\n", +"Av3=(-200+(%i*1.26))/(10+(%i*3.88));\n", +"C4=Cgs+(18.4*Cgd);\n", +"R3=10^6/8.64;\n", +"printf('Av = %0.2f\nR1 = %0.2e ohm\nC1 = %0.2e F',Av3,R3,C4);\n", +"\n", +"// Result\n", +"// (a)Rd = 50 K\n", +"// At f=1000Hz\n", +"// Av = -19.6\n", +"// C1 = 3.8e-011 F\n", +"\n", +"// At f=10^6Hz\n", +"// Av = -19.6\n", +"// R1 = 4.03e+005 ohm\n", +"// C1=3.8e-011 F\n", +"\n", +"// (b)Zl = j5*10^4;Yl = j2*10^-6\n", +"// For f=1000Hz\n", +"// Av = -19.99\n", +"// R1 = 2.08e+007 ohm\n", +"// C1 = 4.3e-011 F\n", +"\n", +"// For f=10^6Hz\n", +"// Av = -17.34\n", +"// R1 = 1.16e+005 ohm\n", +"// C1 = 3.98e-011 F " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.47: Calculate_gain_and_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate gain and frequency\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-47 in page 351\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"gm=2*10^-3; // Transconductance in mA/V\n", +"Rs=100*10^3; // Source resistance in K-ohms\n", +"rd=50*10^3; // Dynamic resistance in K-ohms\n", +"Ct=9*10^-12; // Total capacitance in pF\n", +"gd=2*10^-5; // Constant\n", +"\n", +"// Calculation\n", +"omega=(gm+gd)/Ct;\n", +"f=omega/(2*%pi);\n", +"printf('(a)f = %0.1e Hz\n',f);\n", +"Av=gm*Rs/(1+(gm+gd)*Rs);\n", +"printf('For f=35.6MHz,\n');\n", +"Av1=(10^2*(sqrt(4.45)))/(202*sqrt(2));\n", +"printf('(b)Av = %0.3f',Av1);\n", +"\n", +"// Result\n", +"// (a) f = 35.6 MHz\n", +"// (b) Av = 0.738" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.48: Calculate_the_values_of_Id_Vgs_Vds.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate the values of Id,Vgs,Vds\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-48 in page 351\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vp=3; // Pinch off voltage in V\n", +"// Id = 0.2(Vgs-3)^2\n", +"\n", +"// Calculation\n", +"Id1=(25+7)/10;\n", +"Id2=(25-7)/10;\n", +"printf('Id = %0.1f mA or %0.1f mA\n',Id1,Id2);\n", +"printf('FET will be cut off at Id=3.2mA.Hence Id=1.8mA\n');\n", +"Vgs=0.5*(30-18);\n", +"Vds=30-(1.8*10);\n", +"printf('Vgs = %0.0f V\nVds = %0.0f V',Vgs,Vds);\n", +"\n", +"// Result\n", +"// Id = 1.8 mA\n", +"// Vgs = 6 V\n", +"// Vds = 12 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.52: Calculate_complex_voltage_gain_Input_admittance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate complex voltage gain,Input admittance\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-52 in page 355\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"mu=100; // Amplification factor\n", +"rd=40*10^3; // Dynamic resistance in K-ohms\n", +"gm=2.5*10^-3; // Transconductance in mA/V\n", +"Cgs=4*10^-12; // Gate-source capacitance in pF\n", +"Cds=0.6*10^-12; // Drain-source capacitance in pF\n", +"Cgd=2.4*10^-12; // Gate-drain capacitance in pF\n", +"\n", +"// Calculation\n", +"Ygs=%i*2*%pi*10^2*4*10^-12;\n", +"Yds=%i*2*%pi*10^2*0.6*10^-12;\n", +"Ygd=%i*2*%pi*10^2*2.4*10^-12;\n", +"gd=2.5*10^-5;\n", +"Yd=10^-5;\n", +"Av=(-2.5/3.5)*10^2;\n", +"Ci=Cgs+(1-Av)*Cgd;\n", +"printf('Av = %0.2f\nCi = %0.3e F\n',Av,Ci);\n", +"printf('For f=10^6 Hz,\n');\n", +"Ygs1=%i*2.51*10^-6;\n", +"Yds1=%i*0.377*10^-6;\n", +"Ygd=%i*1.51*10^-6;\n", +"Av=((-2.5*3.5*10^2)/12.30)+%i*((2.5*0.188*10^2)/12.30);\n", +"C1=Cgs+(72*Cgd);\n", +"G1=2*%pi*2.4*10^-12*3.82;\n", +"R1=1/G1;\n", +"printf('Av =');\n", +"disp(Av);\n", +"printf('C1 = %0.3e F\nR1 = %0.3e ohms',C1,R1);\n", +"\n", +"// Result\n", +"// Av = -71.4\n", +"// Ci = 177.8 pF\n", +"// At f=10^6 Hz,\n", +"// Av = -71.2+j3.82\n", +"// C1 = 177 pF\n", +"// R1 = 173.5 K-ohms" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.54: Find_the_maximum_transconductance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find the maximum transconductance\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-54 in page 358\n", +"clear; clc; close;\n", +"// Given data\n", +"Idss=1*10^-3; // Drain-source current in mA\n", +"Vp=-5; // Pinch off voltage in V\n", +"// Calculation\n", +"gm=(2*Idss)/-Vp;\n", +"printf('gm = %0.1e mho',gm);\n", +"// Result\n", +"// gm = 0.4 m-mho" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.55: Evaluate_Vds_and_Rd.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Evaluate Vds and Rd\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-55 in page 358\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"b=10^-4; // Constant in A/V^2\n", +"Vdd=10; // Drain voltage in V\n", +"Vt=1; // Voltage expressed in volts\n", +"Ids=0.5*10^-3; // Drain-source current in mA\n", +"\n", +"// Calculation\n", +"Vds=1+sqrt(5);\n", +"Rd=(Vdd-Vds)/Ids;\n", +"printf('Vds = Vgs = %0.2f V\nRd = %0.2e ohm',Vds,Rd);\n", +"\n", +"// Result\n", +"// Vds = 3.24 V\n", +"// Rd = 13.5 K-ohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.56: Verify_FET_operation_in_pinch_off_region.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Verify FET operation in pinch-off region\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-56 in page 358\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vp=-2; // Pinch off voltage in V\n", +"Idss=4*10^-3; // Drain-source current in mA\n", +"Rd=910; // Drain resistance in ohms\n", +"Rs=3*10^3; // Source resistance in K-ohms\n", +"R1=12*10^6; // R1 value in M-ohms\n", +"R2=8.57*10^6; // R2 value in M-ohms\n", +"Vdd=24; // Drain voltage in V\n", +"\n", +"// Calculation\n", +"Vgg = Vdd*R2/(R1+R2);\n", +"Id1=(73+sqrt(73^2-(4*9*144)))/(2*9);\n", +"Id2=(73-sqrt(73^2-(4*9*144)))/(2*9);\n", +"printf('Id = %0.2e A or %0.2e A\n',Id1,Id2);\n", +"printf('A value of 3.39 mA is selected\n');\n", +"Vgsq=10-(3.39*10^-3*3*10^3);\n", +"Vdsq=Vdd-(3.39*10^-3*3.91*10^3);\n", +"Vdgq=Vdsq-Vgsq;\n", +"printf('Vgsq = %0.2fV\nVdsq = %0.2fV\nVdgq = %0.3f V\n',Vgsq,Vdsq,Vdgq);\n", +"printf('Vdgq>Vd.Hence the FET is in the pinch off region');\n", +"\n", +"// Result\n", +"// FET operates in the pinch off region" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.57: Calculate_voltage_gain_Av.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate voltage gain Av\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-57 in page 359\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"gm=2*10^-3; // Transconductance in mA/V\n", +"rd=10*10^3; // Dynamic resistance in K-ohms\n", +"C=0.025*10^-6; // Capacitance in microF \n", +"\n", +"// Calculation\n", +"Rl=(30*30)/(30+30);\n", +"Av=(-gm*rd*Rl*10^3)/(Rl+rd);\n", +"f1=1/(2*%pi*37.5*10^3*C);\n", +"Avl=Av/sqrt(1+(f1/(5*10^3))^2);\n", +"printf('(a)Av = %0.0f\n(b)Avl = %0.2f',Av,Avl);\n", +"\n", +"// Result\n", +"// (a) Av = -30\n", +"// (b) Avl = -29.94" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.59: Design_a_source_follower.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Design a source follower\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-59 in page 361\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"Vds=14; // Drain-source voltage in V\n", +"Idq=3*10^-3; // Drain-source current in mA\n", +"Vdd=20; // Drain voltage in V\n", +"gm=2*10^-3; // Transconductance in mS\n", +"rd=50*10^3; // Dynamic resistance in K-ohms\n", +"Vgs=-1.5; // Gate-source voltage in V\n", +"\n", +"// Calculation\n", +"R=(20-14)/Idq;\n", +"R1=Vgs/-Idq;\n", +"R2=R-R1;\n", +"Ro=1/gm;\n", +"Av=R/(R+Ro);\n", +"R_1=1/(1-(Av*(R2/R)));\n", +"printf('R1 = %0.1e ohms\nR2 = %0.1e ohms\nRo = %0.1e ohms\n',R1,R2,Ro);\n", +"printf('Av = %0.1f*Av1\n',Av);\n", +"printf('Effective input resistance R1 = %0.1f*R3',R_1);\n", +"\n", +"// Result\n", +"// R1 = 0.5 K\n", +"// R2 = 1.5 K\n", +"// Ro = 0.5 K\n", +"// Av = 0.8*Av'\n", +"// R1(effective) = 2.5*R3" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6: Find_gain_if_v2_v1_are_zero.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Find gain if v2,v1 are zero\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 7-6 in page 315\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given data\n", +"mu=30; // FET parameter\n", +"rd=15; // Resistance value in k-ohms\n", +"Rd=1; // Drain resistance value in k-ohms\n", +"Rs=0.5; // Source resistance in k-ohms\n", +"\n", +"// Calculation\n", +"Av1=(-mu*(rd+Rd))/(Rd+((mu+1)^2*Rs)+((mu+2)*rd));\n", +"Av2=((mu/(mu+1))*(((mu+1)*Rs)+rd))/(((Rd+rd)/(mu+1))+((mu+1)*Rs)+rd);\n", +"printf('(a)Av when v2 is zero = %0.3f\n',Av1);\n", +"printf('(b)Av when v1 is zero = %0.3f',Av2);\n", +"\n", +"// Result\n", +"// (a) Av1 = -0.499\n", +"// (b) Av2 = 0.952" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Basic_Electronics_by_D_De/8-Special_Semiconductor_Devices.ipynb b/Basic_Electronics_by_D_De/8-Special_Semiconductor_Devices.ipynb new file mode 100644 index 0000000..a925f49 --- /dev/null +++ b/Basic_Electronics_by_D_De/8-Special_Semiconductor_Devices.ipynb @@ -0,0 +1,471 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Special Semiconductor Devices" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.10: Design_of_Triggering_Circuit_for_a_UJT.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Design of Triggering Circuit for a UJT\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 8-10 in page 390\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"Vs=30; // DC source voltage in V\n", +"eta=0.51; // Intrinsic stand off ratio\n", +"Ip=10*10^-6; // Peak Emitter current of UJT in mu-A\n", +"Vv=3.5; // Valley voltage in V\n", +"Iv=10*10^-3; // Valley current in A\n", +"f=60; // Source frequency in Hz\n", +"tg=50*10^-6; // width of triggering pulse in seconds\n", +"C=0.5*10^-6; // Assumption for circuit Capacitance in mu-F\n", +"Vd=0.5; // Fixed value of Vb in V\n", +"\n", +"// Calculations\n", +"Vp=(eta*Vs)+Vd;\n", +"Rlow=(Vs-Vp)/Ip; \n", +"Rup=(Vs-Vv)/Iv;\n", +"tou=1/f;\n", +"R=(tou/C)*(1/log(1/(1-eta))); \n", +"Rb1=tg/C; \n", +"Rb2=10^4/(eta*Vs); \n", +"\n", +"printf('(a)The value of Base-1 Resistance of UJT is %0.2f ohm \n',Rb1);\n", +"printf('(b)The value of Base-2 Resistance of UJT is %0.2f ohm \n',Rb2);\n", +"printf('(c)Circuit resistance of the arrangement is %0.2e ohm \n',R);\n", +"\n", +"// Results\n", +"// (a) The value of Base-1 Resistance of UJT is 100 ohm\n", +"// (b) The value of Base-2 Resistance of UJT is 654 ohm\n", +"// (c) Circuit resistance of the arrangement is 46.7 K-ohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.11: To_determine_Emitter_source_voltage_of_UJT.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// To determine Emitter source voltage of UJT\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 8-11 in page 391\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"Re=1*10^3; // Emitter Resistance of UJT in ohm\n", +"Iv=5*10^-3; // Valley current of UJT in A\n", +"Vv=2; // Valley voltage of UJT in V\n", +"\n", +"// Calculations\n", +"Ve=Vv;\n", +"Ie=Iv; \n", +"Vee=(Ie*Re)+Ve;\n", +"\n", +"printf('The value of Emitter source voltage of UJT for turn-off is %0.2f V',Vee);\n", +"\n", +"// Results\n", +"// The value of Emitter source voltage of UJT for turn-off is 7 V" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1: Calculate_the_Gate_Source_Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate the Gate Source Resistance\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 8-1 in page 376\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"P=0.5; // Value of Allowable Gate Power Dissipation in watt\n", +"Es=14; // Trigger Source Voltage in V\n", +"slope=130; // Slope of Gate-Cathode Characteristic line\n", +"\n", +"// Calculations\n", +"Ig=sqrt(P/slope); \n", +"Vg=slope*Ig;\n", +"Rs=(Es-Vg)/Ig; \n", +"\n", +"printf('(a)The value of Gate Resistance for the Circuit is %0.2e ohm \n',Rs);\n", +"printf('(b)The value of the Gate Voltage is %0.2e V \n',Vg);\n", +"printf('(c)The value of the Gate Current is %0.2e A \n',Ig);\n", +"\n", +"// Results\n", +"// (a) The value of Gate Resistance for the Circuit is 95.3 ohm\n", +"// (b) The value of the Gate Voltage is 8.06 V\n", +"// (c) The value of the Gate Current is 62 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2: Firing_angle_of_Thyristor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Firing angle of Thyristor\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 8-2 in page 377\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"Il=50^10*-3; // Latching current of the Thyristor in mA\n", +"t=50^10*-6; // Duration of firing pulse in second\n", +"Es=50; // DC voltage of the circuit in V\n", +"R=10; // Resistance of the circuit in ohm\n", +"L=0.25; // Inductance of the circuit in H\n", +"e=2.718282; // Constant of calculation\n", +"\n", +"// Calculations\n", +"tou=0.025; \n", +"i=(Es/R)*(1-exp((-(50*10^-6))/tou));\n", +"printf('(a) i = %0.3e A\n',i); \n", +"\n", +"if(i<Il)\n", +" printf('Since the Gate current is less than Latching Current, SCR will not get fired \n');\n", +"else\n", +" printf('Since the Gate current is more than Latching Current, SCR will get fired \n');\n", +"end\n", +"\n", +"// Results\n", +"// SCR will not get fired in the Circuit" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3: Calculate_width_of_Gating_pulse.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate width of Gating pulse\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 8-3 in page 377\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"Il=4*10^-3; // Latching current of SCR in A\n", +"V=100; // DC voltage of the circuit in V\n", +"L=0.1; // Inductance of the circuit in H\n", +"\n", +"// Calculations\n", +"t=(L/V)*Il;\n", +"\n", +"printf('Required width of the gating pulse is %0.2e s',t);\n", +"\n", +"// Results\n", +"// Required width of the gating pulse is 4 mu-s" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4: To_calculate_required_Gate_source_Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// To calculate required Gate source Resistance\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 8-4 in page 378\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"P=0.012; // Value of Allowable Gate Power Dissipation in watt\n", +"Es=10; // Trigger Source Voltage in V\n", +"slope=3*10^3; // Slope of Gate-Cathode Characteristic line\n", +"\n", +"// Calculations\n", +"Ig=sqrt(P/slope); \n", +"Vg=slope*Ig; \n", +"Rs=(Es-Vg)/Ig; \n", +"\n", +"printf('(a)The value of Gate Resistance for the Circuit is %0.0f ohm \n',Rs);\n", +"printf('(b)The value of the Gate Voltage is %0.2e V \n',Vg);\n", +"printf('(c)The value of the Gate Current is %0.2e A \n',Ig);\n", +"\n", +"\n", +"// Results\n", +"// (a) The value of Gate Resistance for the Circuit is 2 K-ohm\n", +"// (b) The value of the Gate Voltage is 6 V\n", +"// (c) The value of the Gate Current is 2 mA" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5: To_calculate_series_Resistance_across_SCR.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// To calculate series Resistance across SCR\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010 \n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 8-5 in page 378\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"Ig_min=0.5; // Minimum gate current for quick ON, in A\n", +"Vs=15; // Gate source voltage in V\n", +"slope=16; // Slope of Gate-Cathode Characteristic line\n", +"\n", +"// Calculations\n", +"Vg=slope*Ig_min; \n", +"Rg=(Vs-Vg)/Ig_min; \n", +"\n", +"printf('The value of Gate Resistance is %0.2f ohm \n',Rg);\n", +"\n", +"// Results\n", +"// The value of Gate Resistance is 14 ohm" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6: To_determine_critical_value_of_dv_by_dt.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// To determine critical value of dv/dt\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 8-6 in page 379\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"ij2=32*10^-3; // Limiting value of the charging current in A\n", +"Cj2=40*10^-12; // Capacitance of reverse biased junction J2 in F\n", +"\n", +"// Calculations\n", +"dv_dt=ij2/Cj2; \n", +"\n", +"printf('The value of dv/dt of the given SCR is %0.2e volt/second \n',dv_dt);\n", +"\n", +"// Results\n", +"// The value of dv/dt of the given SCR is 800 V/mu-s" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7: Calculate_surge_current_and_I2t_ratings.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Calculate surge current & I2t ratings\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 8-7 in page 379\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"ish=3000; // half cycle surge current rating of SCR in A\n", +"f=50; // Frequency of operation of supply in Hz\n", +"\n", +"// Calculations\n", +"I=ish*sqrt(2*f)/sqrt(4*f); \n", +"I2t_rate=(I*I)/(2*f); \n", +"\n", +"printf('(a)The surge current rating of one cycle for the SCR is %0.2f A \n',I);\n", +"printf('(b)The I2t rating of one cycle for the SCR is %0.2f A^2-second \n',I2t_rate);\n", +"\n", +"// Results\n", +"// (a) The surge current rating of one cycle for the SCR is 2121.32 A\n", +"// (b) The I2t rating of one cycle for the SCR is 45000 A^2-second" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8: Max_and_Min_firing_delays.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"// Max and Min firing delays\n", +"// Basic Electronics\n", +"// By Debashis De\n", +"// First Edition, 2010\n", +"// Dorling Kindersley Pvt. Ltd. India\n", +"// Example 8-8 in page 386\n", +"\n", +"clear; clc; close;\n", +"\n", +"// Given Data\n", +"Vc=40; // Breakdown voltage of DIAC in V\n", +"C=470*10^-9; // Capacitance in nF\n", +"E=240; // Rms voltage at 50 Hz in V\n", +"omga=2*%pi*50; // Angular frequency\n", +"\n", +"// Calculation\n", +"printf('When DIAC is not conducting:\n')\n", +"A=asind(40/335.8)+8.4;\n", +"Z=1/(omga*C);\n", +"R1=atand(1/(omga*1000*C));\n", +"Zd=sqrt(R1^(2+(1/omga^2*C^2)));\n", +"printf('Minimum delay = %0.2f degrees\n\n',A);\n", +"printf('When DIAC conducts:\n');\n", +"A1=asind(40/88.6)+74.84;\n", +"printf('Maximum delay = %0.2f degrees',A1);\n", +"\n", +"// Result\n", +"// Minimum delay = 15.24 degrees\n", +"// Maximum delay = 101.6 degrees" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |