{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 3: Special Diodes" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.10: Value_of_Change_in_output_voltage.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Exa 3.10\n", "format('v',7)\n", "clc;\n", "clear;\n", "close;\n", "// given data\n", "R_Z= 7;// in Ω\n", "I_Z1=12.2;// in mA\n", "I_Z2=60.2;// in mA\n", "deltaV_Z=(I_Z2-I_Z1)*R_Z;// in mV\n", "deltaV_Z= deltaV_Z*10^-3;// in V\n", "Vz= 12;// in V\n", "// The output voltage,\n", "Vout= Vz+deltaV_Z;// in V\n", "disp(Vout,'The output voltage in V is : ');" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.11: Value_of_IS_IL_IZ.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Exa 3.11\n", "format('v',6)\n", "clc;\n", "clear;\n", "close;\n", "// given data\n", "Vz= 12;// in V\n", "Vin= 15;// in V\n", "R_S= 200;// in Ω\n", "R_L= 1*10^3;// in Ω\n", "// The value of I_S \n", "I_S= (Vin-Vz)/R_S;// in A\n", "// The value of I_L \n", "I_L= Vz/R_L;// in A\n", "// The value of I_Z \n", "I_Z= I_S-I_L;// in A\n", "I_S= I_S*10^3;// in mA\n", "I_L= I_L*10^3;// in mA\n", "I_Z= I_Z*10^3;// in mA\n", "disp(I_S,'The value of I_S in mA is : ')\n", "disp(I_L,'The value of I_L in mA is : ')\n", "disp(I_Z,'The value of I_Z in mA is : ')\n", "\n", "\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.12: Value_of_IS_IL_IZ.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Exa 3.12\n", "format('v',6)\n", "clc;\n", "clear;\n", "close;\n", "// given data\n", "disp('(i) For 15 V input voltage');\n", "Vin= 15;// in V\n", "Vz= 12;// in V\n", "R_S= 200;// in Ω\n", "R_L= 1*10^3;// in Ω\n", "// The value of I_S \n", "I_S= (Vin-Vz)/R_S;// in A\n", "// The value of I_L \n", "I_L= Vz/R_L;// in A\n", "// The value of I_Z \n", "I_Z= I_S-I_L;// in A\n", "I_S= I_S*10^3;// in mA\n", "I_L= I_L*10^3;// in mA\n", "I_Z= I_Z*10^3;// in mA\n", "disp(I_S,'The value of I_S in mA is : ')\n", "disp(I_L,'The value of I_L in mA is : ')\n", "disp(I_Z,'The value of I_Z in mA is : ')\n", "disp('(ii) For 20 V input voltage');\n", "Vin= 20;// in V\n", "// The value of I_S \n", "I_S= (Vin-Vz)/R_S;// in A\n", "// The value of I_L \n", "I_L= Vz/R_L;// in A\n", "// The value of I_Z \n", "I_Z= I_S-I_L;// in A\n", "I_S= I_S*10^3;// in mA\n", "I_L= I_L*10^3;// in mA\n", "I_Z= I_Z*10^3;// in mA\n", "disp(I_S,'The value of I_S in mA is : ')\n", "disp(I_L,'The value of I_L in mA is : ')\n", "disp(I_Z,'The value of I_Z in mA is : ')\n", "disp('(iii) For 25 V input voltage');\n", "Vin= 25;// in V\n", "// The value of I_S \n", "I_S= (Vin-Vz)/R_S;// in A\n", "// The value of I_L \n", "I_L= Vz/R_L;// in A\n", "// The value of I_Z \n", "I_Z= I_S-I_L;// in A\n", "I_S= I_S*10^3;// in mA\n", "I_L= I_L*10^3;// in mA\n", "I_Z= I_Z*10^3;// in mA\n", "disp(I_S,'The value of I_S in mA is : ')\n", "disp(I_L,'The value of I_L in mA is : ')\n", "disp(I_Z,'The value of I_Z in mA is : ')\n", "disp('(iv) For 30 V input voltage');\n", "Vin= 30;// in V\n", "// The value of I_S \n", "I_S= (Vin-Vz)/R_S;// in A\n", "// The value of I_L \n", "I_L= Vz/R_L;// in A\n", "// The value of I_Z \n", "I_Z= I_S-I_L;// in A\n", "I_S= I_S*10^3;// in mA\n", "I_L= I_L*10^3;// in mA\n", "I_Z= I_Z*10^3;// in mA\n", "disp(I_S,'The value of I_S in mA is : ')\n", "disp(I_L,'The value of I_L in mA is : ')\n", "disp(I_Z,'The value of I_Z in mA is : ')\n", "disp('(v) For 35 V input voltage');\n", "Vin= 35;// in V\n", "// The value of I_S \n", "I_S= (Vin-Vz)/R_S;// in A\n", "// The value of I_L \n", "I_L= Vz/R_L;// in A\n", "// The value of I_Z \n", "I_Z= I_S-I_L;// in A\n", "I_S= I_S*10^3;// in mA\n", "I_L= I_L*10^3;// in mA\n", "I_Z= I_Z*10^3;// in mA\n", "disp(I_S,'The value of I_S in mA is : ')\n", "disp(I_L,'The value of I_L in mA is : ')\n", "disp(I_Z,'The value of I_Z in mA is : ')\n", "\n", "\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.1: LED_current.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Exa 3.1\n", "format('v',5)\n", "clc;\n", "clear;\n", "close;\n", "// given data\n", "Vin= 12;// in V\n", "V_LED= 2;// in V\n", "Rs= 470;// in Ω\n", "Vs= Vin-V_LED;// in V\n", "// The LED current \n", "I= Vs/Rs;// in A\n", "I= I*10^3;// in mA\n", "disp(I,'The LED current in mA is : ')\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.2: LED_current.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Exa 3.2\n", "format('v',5)\n", "clc;\n", "clear;\n", "close;\n", "// given data\n", "Vin= 5;// in V\n", "V_LED= 2;// in V\n", "Rs= 470;// in Ω\n", "Vs= Vin-V_LED;// in V\n", "// When supply voltage is 5 V, the LED current\n", "I= Vs/Rs;// in A\n", "I= I*10^3;// in mA\n", "disp(I,'When supply voltage is 5 V, the LED current in mA is : ')\n", "Vin= 10;// in V\n", "Vs= Vin-V_LED;// in V\n", "// When supply voltage is 10 V, the LED current\n", "I= Vs/Rs;// in A\n", "I= I*10^3;// in mA\n", "disp(I,'When supply voltage is 10 V, the LED current in mA is : ')\n", "Vin= 15;// in V\n", "Vs= Vin-V_LED;// in V\n", "// When supply voltage is 15 V, the LED current\n", "I= Vs/Rs;// in A\n", "I= I*10^3;// in mA\n", "disp(I,'When supply voltage is 15 V, the LED current in mA is : ')\n", "Vin= 20;// in V\n", "Vs= Vin-V_LED;// in V\n", "// When supply voltage is 20 V, the LED current\n", "I= Vs/Rs;// in A\n", "I= I*10^3;// in mA\n", "disp(I,'When supply voltage is 20 V, the LED current in mA is : ')\n", "\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.4: Tuning_range.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Exa 3.4\n", "format('v',5)\n", "clc;\n", "clear;\n", "close;\n", "// given data\n", "C1= 560;//transistor capacitance at 1V in pF\n", "C2= 30;//transistor capacitance at 10V in pF\n", "// The tuning range \n", "tuningRange= C1/C2;\n", "disp(tuningRange,'The tuning range is : ')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.5: Minimum_and_maximum_zener_current.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Exa 3.5\n", "format('v',5)\n", "clc;\n", "clear;\n", "close;\n", "// given data\n", "Vin_min= 20;// in V\n", "Vin_max= 40;// in V\n", "Vz= 10;// in V\n", "Rs= 820;// in Ω\n", "// The minimum zener current,\n", "Iz_min= (Vin_min-Vz)/Rs;// in A\n", "// The maximum zener current, \n", "Iz_max= (Vin_max-Vz)/Rs;// in A\n", "// The output voltage,\n", "Vout= Vz;// in V\n", "Iz_min= Iz_min*10^3;// in mA\n", "Iz_max= Iz_max*10^3;// in mA\n", "disp(Iz_min,'The minimum zener current in mA is : ');\n", "disp(Iz_max,'The maximum zener current in mA is : ');\n", "disp(Vout,'The output voltage in V is : ')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.6: Minimum_and_maximum_output_voltage.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Exa 3.6\n", "format('v',5)\n", "clc;\n", "clear;\n", "close;\n", "// given data\n", "Rs= 820;// in Ω\n", "Rz= 17;// in Ω\n", "R_T= Rs+Rz;// in Ω\n", "Vz= 10;// in V\n", "Vin_min= 20;// in V\n", "Vin_max= 40;// in V\n", "// The minimum zener current \n", "Iz_min= (Vin_min-Vz)/R_T;// in A\n", "// The maximum zener current \n", "Iz_max= (Vin_max-Vz)/R_T;// in A\n", "// The minimum output voltage \n", "Vout_min= Vz+Iz_min*Rz;// in V\n", "// The maximum output voltage \n", "Vout_max= Vz+Iz_max*Rz;// in V\n", "Iz_min= Iz_min*10^3;// in mA\n", "Iz_max= Iz_max*10^3;// in mA\n", "disp(Iz_min,'The minimum zener current in mA is : ')\n", "disp(Iz_max,'The maximum zener current in mA is : ')\n", "disp(Vout_min,'The minimum output voltage in V is : ')\n", "disp(Vout_max,'The maximum output voltage in V is : ')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.7: Maximum_current.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Exa 3.7\n", "format('v',5)\n", "clc;\n", "clear;\n", "close;\n", "// given data\n", "P= 100;// power rating in mW\n", "V= 6.2;// in V\n", "// The maximum current rating \n", "I_ZM= P/V;// in mA\n", "disp(I_ZM,'The maximum current rating in mA is : ')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.8: Value_of_IS_IL_IZ.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Exa 3.8\n", "format('v',5)\n", "clc;\n", "clear;\n", "close;\n", "// given data\n", "Vz= 12;// in V\n", "Vout= Vz;// in V\n", "Vin= 25;// in V\n", "R_S= 180;// in Ω\n", "R_L= 200;// in Ω\n", "// The value of I_S \n", "I_S= (Vin-Vout)/R_S;// in A\n", "// The value of I_L \n", "I_L= Vout/R_L;// in A\n", "// The value of I_Z \n", "I_Z= I_S-I_L;// in A\n", "I_S= I_S*10^3;// in mA\n", "I_L= I_L*10^3;// in mA\n", "I_Z= I_Z*10^3;// in mA\n", "disp(I_S,'The value of I_S in mA is : ')\n", "disp(I_L,'The value of I_L in mA is : ')\n", "disp(I_Z,'The value of I_Z in mA is : ')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 3.9: Values_of_all_currents.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Exa 3.9\n", "format('v',5)\n", "clc;\n", "clear;\n", "close;\n", "// given data\n", "disp('(i) For 200 Ω load resistance');\n", "R_L= 200;// in Ω\n", "Vz= 12;// in V\n", "Vout= Vz;// in V\n", "Vin= 25;// in V\n", "R_S= 180;// in Ω\n", "// The value of I_S \n", "I_S= (Vin-Vout)/R_S;// in A\n", "// The value of I_L \n", "I_L= Vout/R_L;// in A\n", "// The value of I_Z \n", "I_Z= I_S-I_L;// in A\n", "I_S= I_S*10^3;// in mA\n", "I_L= I_L*10^3;// in mA\n", "I_Z= I_Z*10^3;// in mA\n", "disp(I_S,'The value of I_S in mA is : ')\n", "disp(I_L,'The value of I_L in mA is : ')\n", "disp(I_Z,'The value of I_Z in mA is : ')\n", "disp('(ii) For 400 Ω load resistance');\n", "R_L= 400;// in Ω\n", "// The value of I_S \n", "I_S= (Vin-Vout)/R_S;// in A\n", "// The value of I_L \n", "I_L= Vout/R_L;// in A\n", "// The value of I_Z \n", "I_Z= I_S-I_L;// in A\n", "I_S= I_S*10^3;// in mA\n", "I_L= I_L*10^3;// in mA\n", "I_Z= I_Z*10^3;// in mA\n", "disp(I_S,'The value of I_S in mA is : ')\n", "disp(I_L,'The value of I_L in mA is : ')\n", "disp(I_Z,'The value of I_Z in mA is : ')\n", "disp('(iii) For 600 Ω load resistance');\n", "R_L= 600;// in Ω\n", "// The value of I_S \n", "I_S= (Vin-Vout)/R_S;// in A\n", "// The value of I_L \n", "I_L= Vout/R_L;// in A\n", "// The value of I_Z \n", "I_Z= I_S-I_L;// in A\n", "I_S= I_S*10^3;// in mA\n", "I_L= I_L*10^3;// in mA\n", "I_Z= I_Z*10^3;// in mA\n", "disp(I_S,'The value of I_S in mA is : ')\n", "disp(I_L,'The value of I_L in mA is : ')\n", "disp(I_Z,'The value of I_Z in mA is : ')\n", "disp('(iv) For 800 Ω load resistance');\n", "R_L= 800;// in Ω\n", "// The value of I_S \n", "I_S= (Vin-Vout)/R_S;// in A\n", "// The value of I_L \n", "I_L= Vout/R_L;// in A\n", "// The value of I_Z \n", "I_Z= I_S-I_L;// in A\n", "I_S= I_S*10^3;// in mA\n", "I_L= I_L*10^3;// in mA\n", "I_Z= I_Z*10^3;// in mA\n", "disp(I_S,'The value of I_S in mA is : ')\n", "disp(I_L,'The value of I_L in mA is : ')\n", "disp(I_Z,'The value of I_Z in mA is : ')\n", "disp('(v) For 1 kΩ load resistance');\n", "R_L= 1*10^3;// in Ω\n", "// The value of I_S \n", "I_S= (Vin-Vout)/R_S;// in A\n", "// The value of I_L \n", "I_L= Vout/R_L;// in A\n", "// The value of I_Z \n", "I_Z= I_S-I_L;// in A\n", "I_S= I_S*10^3;// in mA\n", "I_L= I_L*10^3;// in mA\n", "I_Z= I_Z*10^3;// in mA\n", "disp(I_S,'The value of I_S in mA is : ')\n", "disp(I_L,'The value of I_L in mA is : ')\n", "disp(I_Z,'The value of I_Z in mA is : ')\n", "\n", "\n", "" ] } ], "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 }