summaryrefslogtreecommitdiff
path: root/Electronic_Devices_by_T_L_Floyd
diff options
context:
space:
mode:
authorPrashant S2020-04-14 10:25:32 +0530
committerGitHub2020-04-14 10:25:32 +0530
commit06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Electronic_Devices_by_T_L_Floyd
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
parent476705d693c7122d34f9b049fa79b935405c9b49 (diff)
downloadall-scilab-tbc-books-ipynb-master.tar.gz
all-scilab-tbc-books-ipynb-master.tar.bz2
all-scilab-tbc-books-ipynb-master.zip
Merge pull request #1 from prashantsinalkar/masterHEADmaster
Initial commit
Diffstat (limited to 'Electronic_Devices_by_T_L_Floyd')
-rw-r--r--Electronic_Devices_by_T_L_Floyd/1-semiconductor_basics.ipynb105
-rw-r--r--Electronic_Devices_by_T_L_Floyd/10-Amplifier_Frequency_Response.ipynb579
-rw-r--r--Electronic_Devices_by_T_L_Floyd/11-Thyristors_and_Other_Devices.ipynb157
-rw-r--r--Electronic_Devices_by_T_L_Floyd/12-The_Operational_Amplifier.ipynb373
-rw-r--r--Electronic_Devices_by_T_L_Floyd/13-Basic_Opamp_Circuits.ipynb376
-rw-r--r--Electronic_Devices_by_T_L_Floyd/14-Special_Purpose_Opamp_Circuits.ipynb293
-rw-r--r--Electronic_Devices_by_T_L_Floyd/15-Active_Filters.ipynb259
-rw-r--r--Electronic_Devices_by_T_L_Floyd/16-Oscillators.ipynb222
-rw-r--r--Electronic_Devices_by_T_L_Floyd/17-Voltage_Regulators.ipynb249
-rw-r--r--Electronic_Devices_by_T_L_Floyd/18-Programmable_Analog_Arrays.ipynb56
-rw-r--r--Electronic_Devices_by_T_L_Floyd/2-diode_applications.ipynb519
-rw-r--r--Electronic_Devices_by_T_L_Floyd/3-Special_purpose_diodes.ipynb319
-rw-r--r--Electronic_Devices_by_T_L_Floyd/4-Bipolar_Junction_Transistors.ipynb290
-rw-r--r--Electronic_Devices_by_T_L_Floyd/5-Transistor_Bias_Circuits.ipynb311
-rw-r--r--Electronic_Devices_by_T_L_Floyd/6-BJT_Amplifiers.ipynb439
-rw-r--r--Electronic_Devices_by_T_L_Floyd/7-Field_Effect_Transistors.ipynb490
-rw-r--r--Electronic_Devices_by_T_L_Floyd/8-FET_Amplifiers.ipynb291
-rw-r--r--Electronic_Devices_by_T_L_Floyd/9-Power_Amplifiers.ipynb290
18 files changed, 5618 insertions, 0 deletions
diff --git a/Electronic_Devices_by_T_L_Floyd/1-semiconductor_basics.ipynb b/Electronic_Devices_by_T_L_Floyd/1-semiconductor_basics.ipynb
new file mode 100644
index 0000000..7388cd6
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/1-semiconductor_basics.ipynb
@@ -0,0 +1,105 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: semiconductor basics"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.1: Different_diode_models.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex-1.1(a)\n",
+"V_bias=10;\n",
+"R_limit=1000;\n",
+"r_d =10;\n",
+"//Voltages in Volts, Currents in Amperes, Resistances in Ohms\n",
+"//IDEAL MODEL\n",
+"disp('IDEAL MODEL')\n",
+"V_f=0;\n",
+"I_f=V_bias/R_limit;\n",
+"V_R_limit=I_f*R_limit;\n",
+"disp(V_f,'forward voltage in volts');\n",
+"disp(I_f,'forward current in amperes');\n",
+"disp(V_R_limit,'voltage across limiting resistor in volts');\n",
+"//PRACTICAL MODEL\n",
+"disp('PRACTICAL MODEL');\n",
+"V_f=0.7;\n",
+"I_f=(V_bias-V_f)/R_limit;\n",
+"V_R_limit=I_f*R_limit;\n",
+"disp(V_f,'forward voltage in volts');\n",
+"disp(I_f,'forward current in amperes');\n",
+"disp(V_R_limit,'voltage across limiting resistor in volts');\n",
+"//COMPLETE MODEL\n",
+"disp('COMPLETE MODEL')\n",
+"I_f=(V_bias-0.7)/(R_limit+r_d');\n",
+"V_f=0.7+I_f*r_d';\n",
+"V_R_limit=I_f*R_limit;\n",
+"disp(V_f,'forward voltage in volts');\n",
+"disp(I_f,'forward current in amperes');\n",
+"disp(V_R_limit,'voltage across limiting resistor in volts');\n",
+"//Ex1.1(b)\n",
+"V_bias=5;\n",
+"I_R=1*10^-6;\n",
+"//IDEAL MODEL\n",
+"disp('IDEAL MODEL');\n",
+"I_r=0;\n",
+"V_R=V_bias;\n",
+"V_R_limit=I_r*R_limit;\n",
+"disp(I_r,'reverse current in amperes')\n",
+"disp(V_R,'reverse voltage in volts')\n",
+"disp(V_R_limit,'voltage across limiting resistor in volts')\n",
+"//PRACTICAL MODEL\n",
+"disp('PRACTICAL MODEL')\n",
+"I_r=0;\n",
+"V_R=V_bias;\n",
+"V_R_limit=I_r*R_limit;\n",
+"disp(I_r,'reverse current in amperes')\n",
+"disp(V_R,'reverse voltage in volts')\n",
+"disp(V_R_limit,'voltage across limiting resistor in volts')\n",
+"//COMPLETE MODEL\n",
+"disp('COMPLETE MODEL')\n",
+"I_r=I_R;\n",
+"V_R_limit=I_r*R_limit;\n",
+"V_R=V_bias-V_R_limit;\n",
+"disp(I_r,'reverse current in amperes')\n",
+"disp(V_R,'reverse voltage in volts')\n",
+"disp(V_R_limit,'voltage across limiting resistor in volts')"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/10-Amplifier_Frequency_Response.ipynb b/Electronic_Devices_by_T_L_Floyd/10-Amplifier_Frequency_Response.ipynb
new file mode 100644
index 0000000..9b7ee23
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/10-Amplifier_Frequency_Response.ipynb
@@ -0,0 +1,579 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10: Amplifier Frequency Response"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.10: input_RC_circuit_BJT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.10\n",
+"B_ac=125;\n",
+"C_be=20*10^-12;\n",
+"C_bc=2.4*10^-12;\n",
+"R1=22*10^3;\n",
+"R2=4.7*10^3;\n",
+"R_E=470;\n",
+"R_S=600;\n",
+"R_L=2.2*10^3;\n",
+"V_CC=10;\n",
+"V_B=(R2/(R1+R2))*V_CC;\n",
+"V_E=V_B-0.7;\n",
+"I_E=V_E/R_E;\n",
+"r_e=25*10^-3/I_E;\n",
+"//total resistance of input circuit is parallel combination of R1,R2,R_s,B_ac*r_e\n",
+"R_in_tot=B_ac*r_e*R1*R2*R_S/(B_ac*r_e*R1*R2+B_ac*r_e*R1*R_S+B_ac*r_e*R2*R_S+R1*R2*R_S);\n",
+"R_c=R_C*R_L/(R_C+R_L)\n",
+"A_v_mid=R_c/r_e;\n",
+"C_in_Miller=C_bc*(A_v_mid+1)\n",
+"C_in_tot=C_in_Miller+C_be;\n",
+"f_c=1/(2*%pi*R_in_tot*C_in_tot);\n",
+"disp(R_in_tot, 'total resistance of circuit in ohms')\n",
+"disp(C_in_tot,'total capacitance in farads')\n",
+"disp(f_c,'critical frequency in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.11: Critical_frequency_BJT_output.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.11\n",
+"C_bc=2.4*10^-12; //from previous question\n",
+"A_v=99; //from previous question\n",
+"R_C=2.2*10^3;\n",
+"R_L=2.2*10^3;\n",
+"R_c=R_C*R_L/(R_C+R_L);\n",
+"C_out_Miller=C_bc*(A_v+1)/A_v;\n",
+"f_c=1/(2*%pi*R_c*C_bc); //C_bc is almost equal to C_in_Miller\n",
+"disp(R_c,'equivalent resistance in ohms')\n",
+"disp(C_out_Miller,'equivalent capacitance in farads')\n",
+"disp(f_c,'critical frequency in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.12: FET_capacitors.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.12\n",
+"C_iss=6*10^-12;\n",
+"C_rss=2*10^-12;\n",
+"C_gd=C_rss;\n",
+"C_gs=C_iss-C_rss;\n",
+"disp(C_gd,'gate to drain capacitance in farads')\n",
+"disp(C_gs,'gate to source capacitance in farads')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.13: Critical_frequency_FET_input.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.13;\n",
+"C_iss=8*10^-12;\n",
+"C_rss=3*10^-12;\n",
+"g_m=6500*10^-6; //in Siemens\n",
+"R_D=1*10^3;\n",
+"R_L=10*10^6;\n",
+"R_s=50;\n",
+"C_gd=C_rss;\n",
+"C_gs=C_iss-C_rss;\n",
+"R_d=R_D*R_L/(R_D+R_L);\n",
+"A_v=g_m*R_d;\n",
+"C_in_Miller=C_gd*(A_v+1);\n",
+"C_in_tot=C_in_Miller+C_gs;\n",
+"f_c=1/(2*%pi*C_in_tot*R_s);\n",
+"disp(f_c,'critical frequency of input RC circuit in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.14: Critical_frequency_FET_input.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.14\n",
+"C_gd=3*10^-12; //from previous question\n",
+"A_v=6.5; //from previous question\n",
+"R_d=1*10^3; //from previous question\n",
+"C_out_Miller=C_gd*(A_v+1)/A_v;\n",
+"f_c=1/(2*%pi*R_d*C_out_Miller);\n",
+"disp(f_c,'critical frequency of the output circuit in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.15: Bandwidth.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.15\n",
+"f_cu=2000;\n",
+"f_cl=200;\n",
+"BW=f_cu-f_cl;\n",
+"disp(BW,'bandwidth in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.16: Bandwidth_transistor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.16;\n",
+"f_T=175*10^6; //in hertz\n",
+"A_v_mid=50;\n",
+"BW=f_T/A_v_mid;\n",
+"disp(BW,'bandwidth in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.17: Bandwidth_2stage_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.17\n",
+"f_cl=1*10^3; //lower critical frequency of 2nd stage in hertz\n",
+"f_cu=100*10^3; //upper critical frequency of 1st stage in hertz\n",
+"BW=f_cu-f_cl;\n",
+"disp(BW,'bandwidth in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.18: Bandwidth_2stage_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.18\n",
+"n=2; //n is the number of stages of amplifier\n",
+"f_cl=500;\n",
+"f_cu=80*10^3;\n",
+"f_cl_new=f_cl/(sqrt(2^(1/n)-1));\n",
+"f_cu_new=f_cu*(sqrt(2^(1/n)-1));\n",
+"BW=f_cu_new-f_cl_new;\n",
+"disp(BW,'bandwidth in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.1: Gain_in_decibel.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.1\n",
+"//P out/P in=250;\n",
+"A_p_dB=gain_in_decibel_power(250)\n",
+"disp(A_p_dB,'Power gain when power gain is 250')\n",
+"A_p_dB=gain_in_decibel_power(100)\n",
+"disp(A_p_dB,'Power gain when power gain is 100')\n",
+"A_v_dB=gain_in_decibel_voltage(10)\n",
+"disp(A_v_dB,'Voltage gain when voltage gain is 10')\n",
+"A_v_dB=gain_in_decibel_power(0.5)\n",
+"disp(A_v_dB,'Power gain when voltage gain is 0.5')\n",
+"A_v_dB=gain_in_decibel_voltage(0.707)\n",
+"disp(A_v_dB,'Voltage gain when voltage gain is 0.707')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.2: Critical_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.2\n",
+"//input voltage=10V\n",
+"//at -3dB voltage gain from table is 0.707\n",
+"v_out=0.707*10;\n",
+"disp(v_out,'output voltage in volts at -3dB gain')\n",
+"//at -6dB voltage gain from table is 0.5\n",
+"v_out=0.5*10;\n",
+"disp(v_out,'output voltage in volts at -6dB gain')\n",
+"//at -12dB voltage gain from table is 0.25\n",
+"v_out=0.25*10;\n",
+"disp(v_out,'output voltage in volts at -12dB gain')\n",
+"//at -24dB voltage gain from table is 0.0625\n",
+"v_out=0.0625*10;\n",
+"disp(v_out,'output voltage in volts at -24dB gain')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.3: Lower_critical_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.3\n",
+"R_in=1*10^3;\n",
+"C1=1*10^-6;\n",
+"A_v_mid=100; //mid range voltage gain\n",
+"f_c=1/(2*%pi*R_in*C1);\n",
+"//at f_c, capacitive reactance is equal to resistance(X_C1=R_in)\n",
+"attenuation=0.707;\n",
+"//A_v is gain at lower critical frequency\n",
+"A_v=0.707*A_v_mid;\n",
+"disp(f_c,'lower critical frequency in hertz')\n",
+"disp(attenuation,'attenuation at lower critical frequency')\n",
+"disp(A_v,'gain at lower critical frequency')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.4: Voltage_gains.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.4\n",
+"A_v_mid=100;\n",
+"//At 1Hz frequency,voltage gain is 3 dB less than at midrange. At -3dB, the voltage is reduced by a factor of 0.707\n",
+"A_v=0.707*A_v_mid;\n",
+"disp(A_v,'actual voltage gain at 1Hz frequency')\n",
+"//At 100Hz frequency,voltage gain is 20 dB less than at critical frequency (f_c ). At -20dB, the voltage is reduced by a factor of 0.1\n",
+"A_v=0.1*A_v_mid;\n",
+"disp(A_v,'actual voltage gain at 100Hz frequency')\n",
+"//At 10Hz frequency,voltage gain is 40 dB less than at critical frequency (f_c). At -40dB, the voltage is reduced by a factor of 0.01\n",
+"A_v=0.01*A_v_mid;\n",
+"disp(A_v,'actual voltage gain at 10Hz frequency')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.5: Output_RC_circuit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.5\n",
+"R_C=10*10^3;\n",
+"C3=0.1*10^-6;\n",
+"R_L=10*10^3;\n",
+"A_v_mid=50;\n",
+"f_c=1/(2*%pi*(R_L+R_C)*C3);\n",
+"disp(f_c,'lower critical frequency in hertz')\n",
+"//at midrange capacitive reactance is zero\n",
+"X_C3=0;\n",
+"attenuation=R_L/(R_L+R_C); \n",
+"disp(attenuation,'attenuation at midrange frequency')\n",
+"//at critical frequency, capacitive reactance equals total resistance\n",
+"X_C3=R_L+R_C;\n",
+"attenuation=R_L/(sqrt((R_C+R_L)^2+X_C3^2));\n",
+"disp(attenuation,'attenuation at critical frequency')\n",
+"A_v=0.707*A_v_mid;\n",
+"disp(A_v,'gain at critical frequency')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.6: Bypass_RC_circuit_BJT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.6\n",
+"B_ac=100;\n",
+"r_e=12;\n",
+"R1=62*10^3;\n",
+"R2=22*10^3;\n",
+"R_S=1*10^3;\n",
+"R_E=1*10^3;\n",
+"C2=100*10^-6;\n",
+"//Base circuit impedance= parallel combination of R1, R2, R_S\n",
+"R_th=(R1*R2*R_S)/(R1*R2+R2*R_S+R_S*R1);\n",
+"//Resistance looking at emitter\n",
+"R_in_emitter=r_e+(R_th/B_ac);\n",
+"//resistance of equivalent bypass RC is parallel combination of R_E,R_in_emitter\n",
+"R=(R_in_emitter*R_E)/(R_E+R_in_emitter);\n",
+"f_c=1/(2*%pi*R*C2);\n",
+"disp(f_c,'critical frequency of bypass RC circuit in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.7: input_RC_circuit_FET.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.7\n",
+"V_GS=-10;\n",
+"I_GSS=25*10^-9;\n",
+"R_G=10*10^6;\n",
+"C1=0.001*10^-6;\n",
+"R_in_gate=abs((V_GS/I_GSS));\n",
+"R_in=(R_in_gate*R_G)/(R_G+R_in_gate);\n",
+"f_c=1/(2*%pi*R_in*C1);\n",
+"disp(f_c,'critical frequency in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.8: Low_frequency_response_FET.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.8\n",
+"V_GS=-12;\n",
+"I_GSS=100*10^-9;\n",
+"R_G=10*10^6;\n",
+"R_D=10*10^3;\n",
+"C1=0.001*10^-6;\n",
+"C2=0.001*10^-6;\n",
+"R_in_gate=abs((V_GS/I_GSS));\n",
+"R_in=(R_in_gate*R_G)/(R_G+R_in_gate);\n",
+"R_L=R_in; //according to question\n",
+"f_c_input=1/(2*%pi*R_in*C1);\n",
+"disp(f_c_input,'critical frequency of input RC circuit in hertz')\n",
+"f_c_output=1/(2*%pi*(R_D+R_L)*C2)\n",
+"disp(f_c_output,'critical frequency of output RC circuit in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.9: Low_frequency_response_BJT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex10.9\n",
+"B_ac=100;\n",
+"r_e=16;\n",
+"R1=62*10^3;\n",
+"R2=22*10^3;\n",
+"R_S=600;\n",
+"R_E=1*10^3;\n",
+"R_C=2.2*10^3;\n",
+"R_L=10*10^3;\n",
+"C1=0.1*10^-6;\n",
+"C2=10*10^-6;\n",
+"C3=0.1*10^-6;\n",
+"//input RC circuit\n",
+"R_in=(B_ac*r_e*R1*R2)/(B_ac*r_e*R1+B_ac*r_e*R2+R1*R2);\n",
+"f_c_input=1/(2*%pi*(R_S+R_in)*C1);\n",
+"disp(f_c_input,'input frequency in hertz')\n",
+"//For bypass circuit; Base circuit impedance= parallel combination of R1, R2, R_S\n",
+"R_th=(R1*R2*R_S)/(R1*R2+R2*R_S+R_S*R1);\n",
+"//Resistance looking at emitter\n",
+"R_in_emitter=r_e+(R_th/B_ac);\n",
+"//resistance of equivalent bypass RC is parallel combination of R_E,R_in_emitter\n",
+"R=(R_in_emitter*R_E)/(R_E+R_in_emitter);\n",
+"f_c_bypass=1/(2*%pi*R*C2);\n",
+"disp(f_c_bypass,'critical frequency of bypass RC circuit in hertz')\n",
+"f_c_output=1/(2*%pi*(R_C+R_L)*C3)\n",
+"disp(f_c_output,'output frequency circuit in hertz')\n",
+"R_c=R_C*R_L/(R_C+R_L);\n",
+"A_v_mid=R_c/r_e;\n",
+"attenuation=R_in/(R_in+R_S);\n",
+"A_v=attenuation*A_v_mid; //overall voltage gain\n",
+"A_v_mid_dB=20*log10(A_v); \n",
+"disp(A_v_mid_dB,'overall voltage gain in dB')"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/11-Thyristors_and_Other_Devices.ipynb b/Electronic_Devices_by_T_L_Floyd/11-Thyristors_and_Other_Devices.ipynb
new file mode 100644
index 0000000..4b01dc1
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/11-Thyristors_and_Other_Devices.ipynb
@@ -0,0 +1,157 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11: Thyristors and Other Devices"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.1: Four_layer_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex11.1\n",
+"V_AK=20; //VOLTAGE ACROSS ANODE\n",
+"I_A=1*10^-6;\n",
+"R_AK=V_AK/I_A;\n",
+"disp(R_AK,'RESISTANCE IN OHMS')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.2: Anode_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex11.2\n",
+"R_S=10^3;\n",
+"V_BIAS=110;\n",
+"V_BE=0.7;\n",
+"V_CE_sat=0.1;\n",
+"V_A=V_BE+V_CE_sat; //VOLTAGE ACROSS ANODE\n",
+"V_R_s=V_BIAS-V_A; //VOLTAGE ACROSS R_S\n",
+"I_A=V_R_s/R_S;\n",
+"disp(I_A,'Anode current in amperes')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.3: Unijunction_transistor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex11.3\n",
+"n=0.6;\n",
+"V_BB=20;\n",
+"V_pn=0.7;\n",
+"V_P=n*V_BB+V_pn;\n",
+"disp(V_P,'peak point emitter voltage in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.4: turn_on_off_UJT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex11.4\n",
+"V_BB=30;\n",
+"V_P=14;\n",
+"I_P=20*10^-6;\n",
+"V_V=1;\n",
+"I_V=10*10^-3;\n",
+"x=(V_BB-V_P)/I_P;\n",
+"y=(V_BB-V_V)/I_V;\n",
+"disp('ohms',x,'R1 should be less than',)\n",
+"disp('ohms',y,'R1 should be more than')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.5: Critical_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex11.5\n",
+"n2=1.3; //cladding index\n",
+"n1=1.35; //core index\n",
+"theta=acos(n2/n1);\n",
+"t=theta*180/%pi;\n",
+"disp(t,'critical angle in 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
+}
diff --git a/Electronic_Devices_by_T_L_Floyd/12-The_Operational_Amplifier.ipynb b/Electronic_Devices_by_T_L_Floyd/12-The_Operational_Amplifier.ipynb
new file mode 100644
index 0000000..7c36a22
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/12-The_Operational_Amplifier.ipynb
@@ -0,0 +1,373 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12: The Operational Amplifier"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.10: Gain_and_phase_lag.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex12.10\n",
+"A_v1=40; //all gains are in decibels\n",
+"A_v2=32;\n",
+"A_v3=20;\n",
+"f_c1=2*10^3;\n",
+"f_c2=40*10^3;\n",
+"f_c3=150*10^3;\n",
+"f=f_c1;\n",
+"A_ol_mid=A_v1+A_v2+A_v3;\n",
+"theta_1=phase_shift(f,f_c1);\n",
+"theta_2=phase_shift(f,f_c2);\n",
+"theta_3=phase_shift(f,f_c3);\n",
+"theta_tot=theta_1+theta_2+theta_3;\n",
+"disp(A_ol_mid,'open loop midrange gain in decibels')\n",
+"disp(theta_tot,'total phase lag in degrees')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.11: Closed_loop_bandwidth.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex12.11\n",
+"A_ol_mid=150000; //open loop midrange gain\n",
+"B=0.002; //feedback attenuation\n",
+"BW_ol=200; //open loop bandwidth\n",
+"BW_cl=BW_ol*(1+B*A_ol_mid);\n",
+"disp(BW_cl,'closed loop bandwidth in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.12: Amplifier_bandwidth.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex12.12\n",
+"BW=3*10^6; //unity gain bandwidth\n",
+"A_ol=100; //open loop gain\n",
+"disp('non-inverting amplifier')\n",
+"R_f=220*10^3;\n",
+"R_i=3.3*10^3;\n",
+"A_cl=1+(R_f/R_i); //closed loop gain\n",
+"BW_cl=BW/A_cl;\n",
+"disp(BW_cl,'closed loop bandwidth in hertz')\n",
+"disp('inverting amplifier')\n",
+"R_f=47*10^3;\n",
+"R_i=1*10^3;\n",
+"A_cl=-R_f/R_i;\n",
+"BW_cl=BW/(abs(A_cl));\n",
+"disp(BW_cl,'closed loop bandwidth in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.1: CMRR_opamp.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex12.1\n",
+"A_ol=100000; //open loop voltage gain\n",
+"A_cm=0.2; //common mode gain\n",
+"CMRR=A_ol/A_cm;\n",
+"CMRR_dB=20*log10(CMRR);\n",
+"disp(CMRR,'CMRR')\n",
+"disp(CMRR_dB,'CMRR in decibels')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.2: Slew_rate.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex12.2\n",
+"del_t=1; // in microseconds\n",
+"//lower limit is -9V and upper limit is 9V from the graph\n",
+"del_V_out=9-(-9);\n",
+"slew_rate=del_V_out/del_t;\n",
+"disp(slew_rate,'slew rate in volts per microseconds')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.3: Non_inverting_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex12.3\n",
+"R_f=100*10^3;\n",
+"R_i=4.7*10^3;\n",
+"A_cl_NI=1+(R_f/R_i);\n",
+"disp(A_cl_NI,'closed loop voltage gain')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.4: Inverting_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex12.4\n",
+"R_i=2.2*10^3;\n",
+"A_cl=-100; //closed loop voltage gain\n",
+"R_f=abs(A_cl)*R_i;\n",
+"disp(R_f,'value of R_f in ohms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.5: Impedance_noninverting_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex12.5\n",
+"Z_in=2*10^6;\n",
+"Z_out=75;\n",
+"A_ol=200000;\n",
+"R_f=220*10^3;\n",
+"R_i=10*10^3;\n",
+"B=R_i/(R_i+R_f); //B is attenuation\n",
+"Z_in_NI=(1+A_ol*B)*Z_in;\n",
+"Z_out_NI=Z_out/(1+A_ol*B);\n",
+"A_cl_NI=1+(R_f/R_i);\n",
+"disp(Z_in_NI,'input impedance in ohms')\n",
+"disp(Z_out_NI,'output impedance in ohms')\n",
+"disp(A_cl_NI,'closed loop voltage gain')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.6: Voltage_follower_impedance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex12.6\n",
+"B=1; //voltage follower configuration\n",
+"A_ol=200000;\n",
+"Z_in=2*10^6;\n",
+"Z_out=75;\n",
+"Z_in_VF=(1+A_ol)*Z_in;\n",
+"Z_out_VF=Z_out/(1+A_ol);\n",
+"disp(Z_in_VF,'input impedance in ohms')\n",
+"disp(Z_out_VF,'output impedance in ohms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.7: Impedance_inverting_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex12.7\n",
+"R_i=1*10^3;\n",
+"R_f=100*10^3;\n",
+"Z_in=4*10^6;\n",
+"Z_out=50;\n",
+"A_ol=50000;\n",
+"B=R_i/(R_i+R_f); //attenuation\n",
+"Z_in_I=R_i; //almost equal to R_i\n",
+"Z_out_I=Z_out/(1+(A_ol*B));\n",
+"A_cl_I=-R_f/R_i;\n",
+"disp(Z_in_I,'input impedance in ohms')\n",
+"disp(Z_out_I,'output impedance in ohms')\n",
+"disp(A_cl_I,'closed loop voltage gain')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.8: Open_Loop_gain.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex12.8\n",
+"f_c_ol=100;\n",
+"A_ol_mid=100000;\n",
+"f=0;\n",
+"A_ol=open_loop_gain(A_ol_mid,f,f_c_ol)\n",
+"disp(A_ol,'open loop gain when f=0Hz');\n",
+"f=10;\n",
+"A_ol=open_loop_gain(A_ol_mid,f,f_c_ol)\n",
+"disp(A_ol,'open loop gain when f=10Hz')\n",
+"f=100;\n",
+"A_ol=open_loop_gain(A_ol_mid,f,f_c_ol)\n",
+"disp(A_ol,'open loop gain when f=100Hz')\n",
+"f=1000;\n",
+"A_ol=open_loop_gain(A_ol_mid,f,f_c_ol)\n",
+"disp(A_ol,'open loop gain when f=1000Hz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.9: phase_RC_lag.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex12.9\n",
+"f_c=100;\n",
+"f=1;\n",
+"theta=phase_shift(f,f_c);\n",
+"disp(theta,'phase lag when f=1Hz (in degrees)')\n",
+"f=10;\n",
+"theta=phase_shift(f,f_c);\n",
+"disp(theta,'phase lag when f=10Hz (in degrees)')\n",
+"f=100;\n",
+"theta=phase_shift(f,f_c);\n",
+"disp(theta,'phase lag when f=100Hz (in degrees)')\n",
+"f=1000;\n",
+"theta=phase_shift(f,f_c);\n",
+"disp(theta,'phase lag when f=1000Hz (in degrees)')\n",
+"f=10000;\n",
+"theta=phase_shift(f,f_c);\n",
+"disp(theta,'phase lag when f=10000Hz (in 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
+}
diff --git a/Electronic_Devices_by_T_L_Floyd/13-Basic_Opamp_Circuits.ipynb b/Electronic_Devices_by_T_L_Floyd/13-Basic_Opamp_Circuits.ipynb
new file mode 100644
index 0000000..9b762b7
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/13-Basic_Opamp_Circuits.ipynb
@@ -0,0 +1,376 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13: Basic Opamp Circuits"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.1: Comparator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex13.1\n",
+"R2=1*10^3;\n",
+"R1=8.2*10^3;\n",
+"V=15;\n",
+"V_REF=R2*V/(R1+R2);\n",
+"disp(V_REF,'V_REF in volts')\n",
+"V_max=12; //maximum output level of op-amp\n",
+"V_min=-12; //minimum output voltage of comparator\n",
+"f=1; //assume frequency of input wave to be 1 hertz\n",
+"t=0:0.001:3;\n",
+"V_in=5*sin(2*%pi*f.*t)\n",
+"clf();\n",
+"subplot(121)\n",
+"xtitle('Input to comparator-1')\n",
+"plot(t,V_in)\n",
+"subplot(122)\n",
+"xtitle('Output of Comparator-1')\n",
+"a=bool2s(V_in>=V_REF)\n",
+"b=~a;\n",
+"y=V_max*a+V_min*b;\n",
+"plot(t,y)\n",
+"disp(V_max,'max output voltage in volts')\n",
+"disp(V_min,'min output voltage in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.2: Trigger_points.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex13.2\n",
+"R1=100*10^3;\n",
+"R2=R1;\n",
+"V_out_max=5;\n",
+"V_UTP=R2*V_out_max/(R1+R2);\n",
+"V_LTP=-V_out_max*R2/(R1+R2);\n",
+"disp(V_UTP,'upper trigger point in volts')\n",
+"disp(V_LTP,'lower trigger point in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.3: Comparator_hysteris_Zener_bounding.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex13.3\n",
+"R1=100*10^3;\n",
+"R2=47*10^3;\n",
+"V_R1=4.7+0.7; //one zener is always forward biased with forward voltage 0.7V \n",
+"//V_R1 can be positive or negative\n",
+"I_R1=V_R1/R1; \n",
+"I_R2=I_R1;\n",
+"V_R2=R2*I_R2;\n",
+"V_out=V_R1+V_R2; //positive or negative\n",
+"V_UTP=R2*V_out/(R1+R2);\n",
+"V_LTP=-V_out*R2/(R1+R2);\n",
+"f=1; //assume frequency of input as 1 Hertz\n",
+"t=0:0.001:1;\n",
+"T=1/f;\n",
+"V_in=5*sin(2*%pi*f.*t)\n",
+"subplot(121)\n",
+"xtitle('Input to comparator-2')\n",
+"plot(t,V_in)\n",
+"subplot(122)\n",
+"xtitle('Output of Comparator-2')\n",
+"t1=(1/(2*%pi*f))*asin((V_UTP/5))\n",
+"a=bool2s(t<t1)\n",
+"b=bool2s(t>((T/2)+t1))\n",
+"a=bool2s(a|b)\n",
+"b=~a;\n",
+"y=V_out*a-V_out*b;\n",
+"plot(t,y)\n",
+"disp(V_out,'max output voltage in volts')\n",
+"disp(-V_out,'min output voltage in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.4: Summing_amplifier_unity_gain.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex13.4\n",
+"V_IN1=3;\n",
+"V_IN2=1;\n",
+"V_IN3=8;\n",
+"//all resistors are of equal value so weight of each input is 1\n",
+"V_OUT=-(V_IN1+V_IN2+V_IN3);\n",
+"disp(V_OUT,'output voltage in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.5: Summing_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex13.5\n",
+"R_f=10*10^3;\n",
+"R1=1*10^3;\n",
+"R2=R1;\n",
+"R=R1;\n",
+"V_IN1=0.2;\n",
+"V_IN2=0.5;\n",
+"V_OUT=-(R_f/R)*(V_IN1+V_IN2);\n",
+"disp(V_OUT,'output voltage of the summing amplifier in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.6: Averaging_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex13.6\n",
+"R_f=25*10^3;\n",
+"R1=100*10^3;\n",
+"R2=R1;\n",
+"R3=R1;\n",
+"R4=R1;\n",
+"R=R1;\n",
+"V_IN1=1;\n",
+"V_IN2=2;\n",
+"V_IN3=3;\n",
+"V_IN4=4;\n",
+"V_OUT=-(R_f/R)*(V_IN1+V_IN2+V_IN3+V_IN4);\n",
+"disp(V_OUT,'output voltage in volts')\n",
+"V_IN_avg=(V_IN1+V_IN2+V_IN3+V_IN4)/4;\n",
+"if abs(V_OUT)==V_IN_avg then\n",
+" disp('the amplifier produces an output whose magnitude is the mathematical average of the input voltages')\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.7: Scaling_adder.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex13.4\n",
+"V_IN1=3;\n",
+"V_IN2=2;\n",
+"V_IN3=8;\n",
+"R_f=10*10^3;\n",
+"R1=47*10^3;\n",
+"R2=100*10^3;\n",
+"R3=10*10^3;\n",
+"weight_of_input1=R_f/R1;\n",
+"weight_of_input2=R_f/R2;\n",
+"weight_of_input3=R_f/R3;\n",
+"V_OUT=-(weight_of_input1*V_IN1+weight_of_input2*V_IN2+weight_of_input3*V_IN3);\n",
+"disp(weight_of_input1,'weight_of_input1')\n",
+"disp(weight_of_input2,'weight_of_input2')\n",
+"disp(weight_of_input3,'weight_of_input3')\n",
+"disp(V_OUT,'output voltage in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.8: Opamp_integrator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex13.8\n",
+"R_i=10*10^3;\n",
+"C=0.01*10^-6;\n",
+"V_in=2.5-(-2.5);\n",
+"PW=100*10^-6; //pulse width\n",
+"T=2*PW;\n",
+"A=2.5;\n",
+"op_change_cap_charge=-V_in/(R_i*C);\n",
+"op_change_cap_discharge=V_in/(R_i*C);\n",
+"disp(op_change_cap_charge,'rate of change of output voltage with respect to time when capacitor is charging (in Volts per sec)')\n",
+"disp(op_change_cap_discharge,'rate of change of output voltage with respect to time when capacitor is discharging (in Volts per sec)')\n",
+"del_V_OUT=op_change_cap_discharge*PW;\n",
+"disp(-del_V_OUT,'when input is positive, the slope is negative, when input is negative , the slope is negative. So, the output is a triangular wave varying from zero to')\n",
+"subplot(121)\n",
+"xtitle('input voltage of op-amp differentiator')\n",
+"t=0:10^-7:2*T;\n",
+"a=bool2s(t>=T/2 & t<=T)\n",
+"b=bool2s(t>=1.5*T & t<=2*T)\n",
+"a=bool2s(a|b)\n",
+"b=~a;\n",
+"y=-A*b+A*a;\n",
+"plot(t,y)\n",
+"subplot(122)\n",
+"xtitle('output voltage of op-amp diferentiator')\n",
+"x=[];\n",
+"A=del_V_OUT;\n",
+"for t=0:10^-7:2*T \n",
+" tcor = t- floor(t/T)*T;\n",
+" if tcor >= 0 & tcor < (T/2) then\n",
+" x_temp = -A +(2*A/T)*tcor;\n",
+" end; \n",
+" if tcor >= (T/2) & tcor <T then\n",
+" x_temp = A - (2*A/T)*tcor;\n",
+" end\n",
+" x = [x, x_temp];\n",
+" end;\n",
+"t=0:10^-7:2*T;\n",
+"plot(t,x)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.9: Opamp_differentiator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex13.9\n",
+"R_f=2.2*10^3;\n",
+"C=0.001*10^-6;\n",
+"Vc=5-(-5);\n",
+"A=5;\n",
+"time_const=R_f*C;\n",
+"T=10*10^-6;\n",
+"t=T/2;\n",
+"slope=Vc/t;\n",
+"V_out=slope*time_const; //V_out is negative when input is positive and V_out is positive when input is negative\n",
+"disp(V_out,'output voltage in volts is a square wave with peak voltages positive and negative of')\n",
+"subplot(121)\n",
+"xtitle('input voltage for integrator op-amp')\n",
+"x=[];\n",
+"for t=0:10^-8:2*T\n",
+" tcor = t- floor(t/T)*T;\n",
+" if tcor >= 0 & tcor < (T/2) then\n",
+" x_temp = -A +(4*A/T)*tcor;\n",
+" end; \n",
+" if tcor >= (T/2) & tcor <T then\n",
+" x_temp = 3*A - (4*A/T)*tcor;\n",
+" end\n",
+" x = [x, x_temp];\n",
+" end;\n",
+" t=0:10^-8:2*T;\n",
+" plot(t,x)\n",
+"subplot(122)\n",
+"xtitle('output voltage of differentiator op-amp')\n",
+"a=bool2s(t>=T/2 & t<=T)\n",
+"b=bool2s(t>=1.5*T & t<=2*T)\n",
+"a=bool2s(a|b)\n",
+"b=~a;\n",
+"y=V_out*a-V_out*b;\n",
+"plot(t,y)\n",
+"disp(V_out,'max output voltage in volts')\n",
+"disp(-V_out,'min output voltage in volts')"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/14-Special_Purpose_Opamp_Circuits.ipynb b/Electronic_Devices_by_T_L_Floyd/14-Special_Purpose_Opamp_Circuits.ipynb
new file mode 100644
index 0000000..e350e2f
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/14-Special_Purpose_Opamp_Circuits.ipynb
@@ -0,0 +1,293 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 14: Special Purpose Opamp Circuits"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.10: Antilog_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex14.10\n",
+"I_EBO=40*10^-9;\n",
+"V_in=175.1*10^-3;\n",
+"R_f=68*10^3;\n",
+"V_OUT=-I_EBO*R_f*exp(V_in/0.025);\n",
+"disp(V_OUT,'output voltage in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.1: Gain_setting_resistor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex14.1\n",
+"R1=25*10^3;\n",
+"R2=R1;\n",
+"A_cl=500; //closed loop voltage gain\n",
+"R_G=2*R1/(A_cl-1);\n",
+"disp(R_G,'value of the external gain setting resistor in ohms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.2: Voltage_gain_Instrumentation_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex14.2\n",
+"R1=25.25*10^3; //internal resistors\n",
+"R2=R1;\n",
+"R_G=510;\n",
+"A_v=(2*R1/R_G)+1;\n",
+"disp(A_v,'voltage gain')\n",
+"BW=60*10^3;\n",
+"disp(BW,'bandwidth from graph, in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.3: Isolation_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex14.3\n",
+"disp('cannot be shown in scilab')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.4: Voltage_gain_Isolation_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex14.4\n",
+"R_f1=22*10^3;\n",
+"R_i1=2.2*10^3;\n",
+"R_f2=47*10^3;\n",
+"R_i2=10*10^3;\n",
+"A_v1=(R_f1/R_i1)+1; //voltage gain of input stage\n",
+"A_v2=(R_f2/R_i2)+1; //voltage gain of output stage\n",
+"A_v=A_v1*A_v2;\n",
+"disp(A_v,'total voltage gain of the isolation amplifier')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.5: Transconductance_OTA.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex14.5\n",
+"g_m=1000*10^-6;\n",
+"V_in=25*10^-3;\n",
+"I_out=g_m*V_in;\n",
+"disp(I_out,'output current in amperes')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.6: Voltage_gain_OTA.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex14.6\n",
+"V_BIAS=9;\n",
+"V=V_BIAS;\n",
+"R_BIAS=33*10^3;\n",
+"R_L=10*10^3;\n",
+"K=16; //in microSiemens per microAmpere\n",
+"I_BIAS=(V_BIAS-(-V)-1.4)/R_BIAS;\n",
+"g_m=K*I_BIAS;\n",
+"A_v=g_m*R_L;\n",
+"disp(A_v,'voltage gain')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.7: Output_OTA_amplitude_modulator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex14.7\n",
+"V_MOD_max=10;\n",
+"V_MOD_min=1;\n",
+"V=9;\n",
+"V_in=50*10^-3;\n",
+"R_BIAS=56*10^3;\n",
+"R_L=10*10^3;\n",
+"K=16; //in microSiemens per microAmpere\n",
+"I_BIAS_max=(V_MOD_max-(-V)-1.4)/R_BIAS;\n",
+"g_m_max=K*I_BIAS_max;\n",
+"A_v_max=g_m_max*R_L;\n",
+"V_out_max=A_v_max*V_in;\n",
+"I_BIAS_min=(V_MOD_min-(-V)-1.4)/R_BIAS;\n",
+"g_m_min=K*I_BIAS_min;\n",
+"A_v_min=g_m_min*R_L;\n",
+"V_out_min=A_v_min*V_in;\n",
+"t=0:0.01:4;\n",
+"f=1; //assume frequency 1 hertz\n",
+"y=((V_out_max/4-V_out_min/4)*sin(2*%pi*f.*t)+(V_out_min/2+V_out_max/2)/2).*sin(2*9*%pi*f.*t);\n",
+"plot(t,y)\n",
+"xtitle('OTA amplitude modulator')\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.8: Output_log_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex14.8\n",
+"V_in=2;\n",
+"I_R=50*10^-9;\n",
+"R1=100*10^3;\n",
+"//voltage output for log amplifier\n",
+"V_OUT=-0.025*log(V_in/(I_R*R1));\n",
+"disp(V_OUT,'output voltage in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.9: Transistor_log_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex14.9\n",
+"V_in=3;\n",
+"I_EBO=40*10^-9;\n",
+"R1=68*10^3;\n",
+"//voltage output for log amplifier\n",
+"V_OUT=-0.025*log(V_in/(I_EBO*R1));\n",
+"disp(V_OUT,'output voltage in volts')"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/15-Active_Filters.ipynb b/Electronic_Devices_by_T_L_Floyd/15-Active_Filters.ipynb
new file mode 100644
index 0000000..2c204c6
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/15-Active_Filters.ipynb
@@ -0,0 +1,259 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 15: Active Filters"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.1: Band_pass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//EX15.1\n",
+"f0=15*10^3; //center frequency in hertz\n",
+"BW=1*10^3;\n",
+"Q=f0/BW;\n",
+"if Q>10 then\n",
+" disp(Q,'narrow band filter')\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.2: Butterworth_response.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex15.2\n",
+"R2=10*10^3;\n",
+"R1=0.586*R2; //FOR BUTTERWORTH RESPONSE\n",
+"disp(R1,'R1 in ohms')\n",
+"disp('5.6kilo ohm will be ideally close to maximally flat butterworth response')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.3: Sallen_Key_lowpass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex15.3\n",
+"R_A=1*10^3;\n",
+"R2=1*10^3;\n",
+"R_B=R_A;\n",
+"R=R_A;\n",
+"C_A=0.022*10^-6;\n",
+"C_B=C_A;\n",
+"C=C_A;\n",
+"f_c=1/(2*%pi*R*C); //critical frequency\n",
+"R1=0.586*R2; //for butterworth response\n",
+"disp(f_c,'critical frequency in hertz')\n",
+"disp(R1,'value of R1 in ohms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.4: 4_pole_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex15.4\n",
+"f_c=2860;\n",
+"R=1.8*10^3;\n",
+"C=1/(2*%pi*f_c*R);\n",
+"R2=R;\n",
+"R1=0.152*R2; //BUTTERWORTH RESPONSE IN FIRST STAGE\n",
+"R4=R;\n",
+"R3=1.235*R4; //BUTTERWORTH RESPONSE IN SECOND STAGE\n",
+"disp(C,'capacitance in farads');\n",
+"disp(R1,'R1 in ohms for butterworth response in first stage')\n",
+"disp(R3,'R3 in ohms for butterworth response in second stage')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.5: Sallen_Key_highpass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex15.5\n",
+"f_c=10*10^3; //critical frequency in hertz\n",
+"R=33*10^3; //Assumption\n",
+"R2=R;\n",
+"C=1/(2*%pi*f_c*R);\n",
+"R1=0.586*R2; //for butterworth response\n",
+"disp(C,'Capacitance in Farads')\n",
+"disp(R1,'R1 in ohms taking R2=33kilo-ohms')\n",
+"R1=3.3*10^3; //Assumption\n",
+"R2=R1/0.586; //butterworth response\n",
+"disp(R2,'R2 in ohms taking R1=3.3kilo-ohms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.6: Cascaded_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex15.6\n",
+"R1=68*10^3;\n",
+"R2=180*10^3;\n",
+"R3=2.7*10^3;\n",
+"C=0.01*10^-6;\n",
+"f0=(sqrt((R1+R3)/(R1*R2*R3)))/(2*%pi*C);\n",
+"A0=R2/(2*R1);\n",
+"Q=%pi*f0*C*R2;\n",
+"BW=f0/Q;\n",
+"disp(f0,'center frequency in hertz')\n",
+"disp(A0,'maximum gain')\n",
+"disp(BW,'bandwidth in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.7: State_variable_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex15.7\n",
+"R4=10^3;\n",
+"C1=0.022*10^-6;\n",
+"R7=R4;\n",
+"C2=C1;\n",
+"R6=R4;\n",
+"R5=100*10^3;\n",
+"f_c=1/(2*%pi*R4*C1); //critical frequency in hertz for each integrator\n",
+"f0=f_c //center frequency\n",
+"Q=(1+(R5/R6))/3;\n",
+"BW=f0/Q;\n",
+"disp(f0,'center frequency in hertz')\n",
+"disp(Q,' value of Q')\n",
+"disp(BW,'bandwidth in hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.8: Band_stop_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex15.8\n",
+"R4=12*10^3;\n",
+"C1=0.22*10^-6;\n",
+"R7=R4;\n",
+"C2=C1;\n",
+"R6=3.3*10^3;\n",
+"Q=10;\n",
+"f0=1/(2*%pi*R7*C2);\n",
+"R5=(3*Q-1)*R6;\n",
+"disp(f0,'center frequency in hertz')\n",
+"disp(R5,'R5 in ohms')\n",
+"disp('Nearest value is 100 kilo-ohms')"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/16-Oscillators.ipynb b/Electronic_Devices_by_T_L_Floyd/16-Oscillators.ipynb
new file mode 100644
index 0000000..38fb85a
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/16-Oscillators.ipynb
@@ -0,0 +1,222 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 16: Oscillators"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.1: Wien_bridge_oscillator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex16.1\n",
+"R1=10*10^3;\n",
+"R2=R1;\n",
+"R=R1;\n",
+"C1=0.01*10^-6;\n",
+"C2=C1;\n",
+"C=C1;\n",
+"R3=1*10^3;\n",
+"r_ds=500;\n",
+"f_r=1/(2*%pi*R*C);\n",
+"disp(f_r,'resonant frequency of the Wein-bridge oscillator in Hertz')\n",
+"//closed loop gain A_v=3 to sustain oscillations\n",
+"A_v=3;\n",
+"//A_v=(R_f+R_i)+1 where R_i is composed of R3 and r_ds\n",
+"R_f=(A_v-1)*(R3+r_ds);\n",
+"disp(R_f,'value of R_f in ohms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.2: Phase_shift_oscillator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex16.2\n",
+"A_cl=29; //A_cl=R_f/R_i;\n",
+"R3=10*10^3;\n",
+"R_f=A_cl*R3;\n",
+"disp(R_f,'value of R_f in ohms')\n",
+"//let R1=R2=R3=R and C1=C2=C3=C\n",
+"R=R3;\n",
+"C3=0.001*10^-6;\n",
+"C=C3;\n",
+"f_r=1/(2*%pi*sqrt(6)*R*C);\n",
+"disp(f_r,'frequency of oscillation in Hertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.3: FET_Colpitts_oscillator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex16.3\n",
+"C1=0.1*10^-6;\n",
+"C2=0.01*10^-6;\n",
+"L=50*10^-3; //in Henry\n",
+"C_T=C1*C2/(C1+C2); //total capacitance\n",
+"f_r=1/(2*%pi*sqrt((L*C_T)));\n",
+"disp(f_r,'frequency of oscillation in Hertz when Q>10')\n",
+"Q=8; //when Q drops to 8\n",
+"f_r=(1/(2*%pi*sqrt((L*C_T))))*sqrt((Q^2/(1+Q^2)));\n",
+"disp(f_r,'frequency of oscillation in hertz when Q=8')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.4: Triangular_wave_oscillator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex16.4\n",
+"R1=10*10^3;\n",
+"R2=33*10^3;\n",
+"R3=10*10^3;\n",
+"C=0.01*10^-6;\n",
+"f_r=(1/(4*R1*C))*(R2/R3);\n",
+"disp(f_r,'frequency of oscillation in hertz')\n",
+"//the value of R1 when frequency of oscillation is 20 kHz\n",
+"f=20*10^3;\n",
+"R1=(1/(4*f*C))*(R2/R3);\n",
+"disp(R1,'value of R1 in ohms to make frequency 20 kiloHertz')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.5: Sawtooth_VCO.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex16.5\n",
+"V=15;\n",
+"C=0.0047*10^-6;\n",
+"R3=10*10^3;\n",
+"R4=R3;\n",
+"R2=10*10^3;\n",
+"R1=68*10^3;\n",
+"R_i=100*10^3;\n",
+"V_G=R4*V/(R3+R4); //gate voltage at which PUT turns on\n",
+"V_p=V_G; //neglecting 0.7V, this the peak voltage of sawtooth wave\n",
+"disp(V_p,'neglecting 0.7V, this the peak voltage of sawtooth wave in volts')\n",
+"V_F=1; //minimum peak value of sawtooth wave\n",
+"V_pp=V_p-V_F;\n",
+"disp(V_pp,'peak to peak amplitude of the sawtooth wave in volts')\n",
+"V_IN=-V*R2/(R1+R2);\n",
+"f=(abs(V_IN)/(R_i*C))*(1/(V_pp));\n",
+"disp(f,'frequency of the sawtooth wave')\n",
+"T=1/f;\n",
+"xtitle('Sawtooth voltage controlled oscillator')\n",
+"x=[];\n",
+"for t=0:1*10^-5:4*10^-3 \n",
+" tcor = t- floor(t/T)*T;\n",
+" x_temp = (V_pp/T)*tcor + 1;\n",
+" x = [x, x_temp];\n",
+" end;\n",
+" t=0:1*10^-5:4*10^-3\n",
+" plot(t,x)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.6: 555_timer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex16.6\n",
+"R1=2.2*10^3;\n",
+"R2=4.7*10^3;\n",
+"C_ext=0.022*10^-6;\n",
+"f_r=1.44/((R1+2*R2)*C_ext);\n",
+"disp(f_r,'frequency of the 555 timer in hertz')\n",
+"duty_cycle=((R1+R2)/(R1+2*R2))*100;\n",
+"disp(duty_cycle,'duty cycle in percentage')"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/17-Voltage_Regulators.ipynb b/Electronic_Devices_by_T_L_Floyd/17-Voltage_Regulators.ipynb
new file mode 100644
index 0000000..c271210
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/17-Voltage_Regulators.ipynb
@@ -0,0 +1,249 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 17: Voltage Regulators"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.1: Percentage_line_regulation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex17.1\n",
+"Del_V_out=0.25;\n",
+"V_out=15;\n",
+"Del_V_in=5; //All voltages in Volts\n",
+"line_regulation=((Del_V_out/V_out)/Del_V_in)*100;\n",
+"disp(line_regulation,'line regulation in %/V')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.2: Load_regulation_percentage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex17.2\n",
+"V_NL=12; //No load output voltage in Volts\n",
+"V_FL=11.9; //Full load output voltage in Volts\n",
+"I_F=10; //Full load current in milli-Amperes\n",
+"load_regulation=((V_NL-V_FL)/V_FL)*100;\n",
+"load_reg=load_regulation/I_F;\n",
+"disp('load regulation as percentage change from no load to full load')\n",
+"disp(load_regulation)\n",
+"disp('load regulation as percentage change per milliampere')\n",
+"disp(load_reg);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.3: Series_regulator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex17.3\n",
+"//All voltages are in Volts and Resistances in Ohms\n",
+"V_REF=5.1 //Zener voltage\n",
+"R2=10*10^3;\n",
+"R3=10*10^3;\n",
+"V_out=(1+(R2/R3))*V_REF;\n",
+"disp(V_out,'output voltage in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.4: Overload_protectio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex-17.4\n",
+"R4=1; //Resistance in Ohms\n",
+"I_L_max=0.7/R4;\n",
+"disp(I_L_max,'maximum current provided to load(in amperes)')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.5: Shunt_regulator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex17.5\n",
+"V_IN=12.5; //maximum input voltage in volts\n",
+"R1=22; //In Ohms\n",
+"//Worst case of power dissipation is when V_OUT=0V\n",
+"V_OUT=0;\n",
+"V_R1=V_IN-V_OUT; //Voltage across R1\n",
+"P_R1=(V_R1*V_R1)/R1; //maximum power dissipated by R1\n",
+"disp(P_R1,'maximum power dissipated by R1 in WATTS')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.6: Positive_linear_voltage_regulator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex17.6\n",
+"disp('SAME AS EX-2.8 in CHAPTER-2')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.7: External_pass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex17.7\n",
+"I_max=700*10^-3; //in Amperes\n",
+"R_ext=0.7/I_max;\n",
+"disp(R_ext,'value of resistor in Ohms for which max current is 700mA')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.8: Power_rating_7824.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex17.8\n",
+"V_OUT=24; //Output voltage in Volts\n",
+"R_L=10; //Load resistance in Ohms\n",
+"V_IN=30; //Input voltage in Volts\n",
+"I_max=700*10^-3; //maximum interal current in Amperes\n",
+"I_L=V_OUT/R_L; //load current in amperes\n",
+"I_ext=I_L-I_max; //current through the external pass transistor in Amperes\n",
+"P_ext_Qext=I_ext*(V_IN-V_OUT); //power dissipated\n",
+"disp(P_ext_Qext,'power dissiated(in WATTS) by the external pass transistor')\n",
+"disp('For safety purpose, we choose a power transistor with rating more than this, say 15W')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.9: Current_regulator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex17.9\n",
+"V_out=5; //7805 gives output voltage of 5V\n",
+"I_L=1; //constant current of 1A\n",
+"R1=V_out/I_L;\n",
+"disp(R1,'The value of current-setting resistor in ohms is')"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/18-Programmable_Analog_Arrays.ipynb b/Electronic_Devices_by_T_L_Floyd/18-Programmable_Analog_Arrays.ipynb
new file mode 100644
index 0000000..d7783e7
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/18-Programmable_Analog_Arrays.ipynb
@@ -0,0 +1,56 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 18: Programmable Analog Arrays"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18.1: Switching_capacitor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex18.1\n",
+"C=1000*10^-12; //Switche capacitor value in farads\n",
+"R=1000; //resistance in ohms\n",
+"T=R*C; //Time period\n",
+"f=1/T; //Frequency at which switch should operate\n",
+"disp(f,'Frequency at which each switch should operate(in hertz)' )\n",
+"disp('Duty cycle should be 50%')"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/2-diode_applications.ipynb b/Electronic_Devices_by_T_L_Floyd/2-diode_applications.ipynb
new file mode 100644
index 0000000..456a028
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/2-diode_applications.ipynb
@@ -0,0 +1,519 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: diode applications"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.10: Negative_diode_limiter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex2.10\n",
+"//let input wave be V_in=V_p_in*sin(2*%pi*f*t) \n",
+"f=1; //Frequency is 1Hz\n",
+"T=1/f;\n",
+"R_1=100; //Resistances in ohms\n",
+"R_L=1000; //Load\n",
+"V_p_in=10; //Peak input voltage\n",
+"V_th=0.7; //knee voltage of diode\n",
+"clf();\n",
+"V_p_out=V_p_in*(R_L/(R_L+R_1)); //peak output voltage\n",
+"disp(V_p_out,'peak output voltage in volts')\n",
+"//let n be double the number of cycles of output shown in graph\n",
+"for n=0:1:6\n",
+" t=T.*n/2:0.0005:T.*(n+1)/2 //time for each half cycle\n",
+" V_in=V_p_in*sin(2*%pi*f.*t);\n",
+" Vout=V_in*(R_L/(R_L+R_1));\n",
+" if modulo(n,2)==0 then //positive half, diode reverse biased\n",
+" y=Vout;\n",
+" else //negative half, diode forward biased\n",
+" a=bool2s(Vout<-0.7); //puts zero to elements for which diode will conduct\n",
+" b=bool2s(Vout>-0.7);\n",
+" y=-V_th*a+b.*Vout;\n",
+" end\n",
+" plot(t,y)\n",
+" end\n",
+"xtitle('Negative limiter graph')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.11: Posiive_Negative_Limiter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex2.11\n",
+"//let input wave be V_in=V_p_in*sin(2*%pi*f*t) \n",
+"f=1; //Frequency is 1Hz\n",
+"T=1/f;\n",
+"V_p_in=10; //Peak input voltage\n",
+"V_th=0.7; //knee voltage of diode\n",
+"clf();\n",
+"//let n be double the number of cycles of output shown in graph\n",
+"for n=0:1:8\n",
+" t=T.*n/2:0.0005:T.*(n+1)/2 //time for each half cycle\n",
+" V_in=V_p_in*sin(2*%pi*f.*t);\n",
+" Vout=V_in;\n",
+" if modulo(n,2)==0 then //positive half,D1 conducts till V_in=5.7V\n",
+" a=bool2s(Vout<5.7); \n",
+" b=bool2s(Vout>5.7); \n",
+" y=a.*Vout+5.7*b; //output follows input till 5.7V then is constant at 5.7V\n",
+" else //negative half, D2 conducts till V_in=-5.7V\n",
+" a=bool2s(Vout<-5.7); \n",
+" b=bool2s(Vout>-5.7);\n",
+" y=-5.7*a+b.*Vout; //output follows input till -5.7V then stays constant at -5.7V\n",
+" end\n",
+" plot(t,y,'r')\n",
+" \n",
+" plot(t,V_in,'-.')\n",
+" end\n",
+" hl=legend(['output','input']);\n",
+" xtitle('Positive and Negative diode limiter')\n",
+" disp('max output voltage is 5.7V')\n",
+" disp('min output voltage is -5.7V')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.12: Positive_diode_limiter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex2.12\n",
+"//Positive diode limiter\n",
+"//Let input wave be V_in=V_p_in*sin(2*%pi*f*t)\n",
+"f=1; //let frequency be 1Hz\n",
+"T=1/f;\n",
+"V_p_in=18; //peak input voltage is 18V\n",
+"V_supply=12;\n",
+"R2=100;\n",
+"R3=220; //resistances in ohms\n",
+"V_bias=V_supply*(R3/(R2+R3));\n",
+"V=V_bias+0.7; //waveform clipped at V\n",
+"clf();\n",
+"//let n be double the number of cycles of output wave shown in graph\n",
+"for n=0:1:8\n",
+" t=n*T/2:0.0005:T.*(n+1)/2;\n",
+" V_in=V_p_in*sin(2*%pi*f.*t);\n",
+" Vout=V_in;\n",
+" if modulo(n,2)==0 then //positive half, diode conucts till V\n",
+" a=bool2s(Vout<V);\n",
+" b=bool2s(Vout>V);\n",
+" y=a.*Vout+V*b;\n",
+" else //negative half cycle, output follows input\n",
+" y=Vout;\n",
+" end\n",
+" plot(t,y)\n",
+"end\n",
+"xtitle('Positive diode limiter graph')\n",
+"disp(V,'diode limiting the voltage at this voltage')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.13: Negative_Clamper.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex2.13\n",
+"//Negative Clamping circuit\n",
+"//let input voltage be V_in=V_p_in*sin(2*%pi*f*t)\n",
+"f=1; //let frequency be 1Hz\n",
+"T=1/f;\n",
+"V_p_in=24;\n",
+"V_DC=-(V_p_in-0.7); //DC level added to output\n",
+"disp(V_DC,'V_DC in volts= ')\n",
+"for n=0:1:8\n",
+" t=n*T/2:0.0005:T.*(n+1)/2;\n",
+" V_in=V_p_in*sin(2*%pi*f.*t);\n",
+" Vout=V_DC+V_in;\n",
+" plot(t,Vout)\n",
+"end\n",
+"xtitle('Negative clipper graph')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.1: Average_value_half_wave_rectifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex2.1\n",
+"//Average value of half wave rectifier\n",
+"V_p=50; //Peak value is 50V\n",
+"V_avg=V_p/%pi;\n",
+"disp(V_avg,'average value of half wave rectifier in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2_a: half_wave_rectifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example-2.2(a)\n",
+"//let V_in=5*sin(2*%pi*f.*t) be input wave ,hence frequency=1Hz\n",
+"f=1;\n",
+"V_p_in=5;\n",
+"V_pout=V_p_in-0.7;;\n",
+"disp(V_pout,'half wave rectifier output in volts')\n",
+"t_d=(asin(0.7/V_p_in))/(2*%pi*f)\n",
+"//t_d is the time till which diode will be reverse biased ie, till it reaches knee voltage\n",
+"T=1/f;\n",
+"clf();\n",
+"//let n be double the number of cycles of output shown in graph\n",
+"for n=0:1:8\n",
+" t=T.*n/2:0.0005:T.*(n+1)/2 //time for each half cycle\n",
+" if modulo(n,2)==0 then //positive half cycle, diode is forward biased\n",
+" V_in=V_p_in*sin(2*%pi*f.*t)\n",
+" Vout=V_in-0.7 //0.7 is knee voltage of diode\n",
+" a=bool2s(Vout>0) //replace elements of Vout by 0 till input is 0.7\n",
+" y=a.*Vout\n",
+" else //negative half cycle, diode is reverse biased\n",
+" [p,q]=size(t);\n",
+" y=zeros(p,q);\n",
+" end\n",
+" plot(t,y)\n",
+"end\n",
+"xtitle('half wave rectifier output')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2_b: half_wave_rectifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Example-2.2(b)\n",
+"//let V_in=100*sin(2*%pi*f.*t) be input wave ,hence frequency=1Hz\n",
+"f=1;\n",
+"T=1/f;\n",
+"V_p_in=100;\n",
+"V_pout=(V_p_in-0.7);\n",
+"disp(V_pout,'output of half wave rectifier in volts')\n",
+"t_d=(asin(0.7/V_p_in))/(2*%pi*f) \n",
+"//t_d is the time till which diode will be reverse biased ie, till it reaches knee voltage\n",
+"clf();\n",
+"//let n be double the number of cycles of output shown in graph\n",
+"for n=0:1:7\n",
+" t=T.*n/2:0.0005:T.*(n+1)/2 // time for each half cycle\n",
+" if modulo(n,2)==0 then //positive half cycle\n",
+" V_in=V_p_in*sin(2*%pi*f.*t)\n",
+" Vout=V_in-0.7 //0.7 is knee voltage of diode\n",
+" a=bool2s(Vout>0) //replace elements of Vout by 0 till input is 0.7\n",
+" y=a.*Vout\n",
+" else //negative half cycle\n",
+" [p,q]=size(t);\n",
+" y=zeros(p,q);\n",
+" end\n",
+" plot(t,y)\n",
+"end\n",
+"xtitle('half wave rectifier output')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3: Rectifier_peak_value.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex2.3\n",
+"V_p_in=156; //Peak input voltage\n",
+"V_p_pri=156; //Peak voltage of primary of transformer\n",
+"n=1/2; //Turn ratio is 2:1\n",
+"V_p_sec=n*V_p_pri;\n",
+"V_p_out=(V_p_sec-0.7);\n",
+"disp(V_p_out,'peak output voltage of half wave rectifier in volts') //Peak output voltage"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4: Average_value_full_wave_rectifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex2.4\n",
+"//Average value of output of full wave rectifier\n",
+"V_p=15; //Peak voltage\n",
+"V_avg=(2*V_p)/%pi;\n",
+"disp(V_avg,'Average value of output of full wave rectifier in volts') //Result"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.5: PIV_full_wave.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex2.5\n",
+"//Assume frequency of input to be 1Hz\n",
+"f=1;\n",
+"T=1/f;\n",
+"V_p_pri=100; //Peak voltage across primary winding\n",
+"n=1/2; //tun ratio is 2:1\n",
+"V_p_sec=n*V_p_pri;\n",
+"V_sec=V_p_sec/2; //voltage across each secondary is half the total voltage\n",
+"clf();\n",
+"subplot(121)\n",
+"xtitle('voltage across each secondary')\n",
+"t=0:0.0005:2;\n",
+"x=V_sec*sin(2*%pi*f.*t);\n",
+"plot(t,x)\n",
+"subplot(122)\n",
+"xtitle('voltage across load')\n",
+"//let n be double the number of cycles of output shown in graph\n",
+"for n=0:1:4\n",
+" t=n.*T/2:0.0005:(n+1).*(T/2);\n",
+"V_pout=V_sec-0.7;\n",
+"V=V_pout*sin(2*%pi*f.*t)\n",
+"a=bool2s(V*(-1)^n>0);\n",
+"y=(-1)^n.*a.*V;\n",
+"plot(t,y)\n",
+"end\n",
+"disp(V_pout,'full wave rectifier output voltage')\n",
+"PIV=2*V_pout+0.7;\n",
+"disp(PIV,'PIV in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.6: Bridge_Rectifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex-2.6\n",
+"V_rms=12; //rms secondary voltage\n",
+"V_p_sec=sqrt(2)*V_rms; //peak secondary voltage\n",
+"V_th=0.7; //knee voltage of diode\n",
+"V_p_out=V_p_sec-2*V_th; //in one cycle, 2 diodes conduct\n",
+"PIV=V_p_out+V_th; //applying KVL\n",
+"disp('Peak output voltage in volts= ');\n",
+"disp(V_p_out);\n",
+"disp('PIV across each diode in volts= ');\n",
+"disp(PIV)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7: Ripple_Bridge_rectifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex2.7\n",
+"R_l=2200; //load resistance in Ohm\n",
+"C=50*10^-6; //capacitance in Farad\n",
+"V_rms=115; //rms of primary\n",
+"V_p_pri=sqrt(2)*V_rms; //peak voltage across primary\n",
+"n=0.1; //turn ratio is 10:1\n",
+"V_p_sec=n*V_p_pri; //primary voltage across secondary\n",
+"V_p_rect=V_p_sec-1.4 //unfiltered peak rectified voltage\n",
+"//we subtract 1.4 because in each cycle 2 diodes conduct & 2 do not\n",
+"f=120; //frequency of full wave rectified voltage\n",
+"V_r_pp=(1/(f*R_l*C))*V_p_rect; //peak to peak ripple voltage\n",
+"V_DC=(1-(1/(2*f*R_l*C)))*V_p_rect;\n",
+"r=V_r_pp/V_DC;\n",
+"disp(r,'Ripple factor')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.8: Voltage_Regulator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex2.8\n",
+"V_REF=1.25; //in volts\n",
+"V_R1=V_REF;\n",
+"R1=220; //in ohms\n",
+"I_ADJ=50*10^-6 //in amperes\n",
+"// MAX VALUE OF R2=5000 Ohms\n",
+"//V_out=V_REF*(1+(R2/R1))+I_ADJ*R2\n",
+"R2_min=0;\n",
+"V_out_min=V_REF*(1+(R2_min/R1))+I_ADJ*R2_min;\n",
+"R2_max=5000;\n",
+"V_out_max=V_REF*(1+(R2_max/R1))+I_ADJ*R2_max;\n",
+"disp(V_out_min,'minimum output voltage in volts');\n",
+"disp(V_out_max,'maximum output voltage in volts');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.9: Load_regulation_percentage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex2.9\n",
+"V_NL=5.18 //No load output voltage\n",
+"V_FL=5.15 //Full load output voltage\n",
+"load_reg=((V_NL-V_FL)/V_FL)*100 //In percentage\n",
+"disp('load regulation percent= ')\n",
+"disp(load_reg)"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/3-Special_purpose_diodes.ipynb b/Electronic_Devices_by_T_L_Floyd/3-Special_purpose_diodes.ipynb
new file mode 100644
index 0000000..e685cfe
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/3-Special_purpose_diodes.ipynb
@@ -0,0 +1,319 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: Special purpose diodes"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.1: Zener_impedance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex3.1\n",
+"del_V_Z=50*10^-3; //in volts, from graph\n",
+"del_I_Z=5*10^-3; //in amperes, from rgraph\n",
+"Z_Z=del_V_Z/del_I_Z;\n",
+"disp(Z_Z,'zener impedance in ohms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.2: Zener_Voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex3.2\n",
+"I_ZT=37*10^-3; //IN AMPERES\n",
+"V_ZT=6.8; //IN VOLTS\n",
+"Z_ZT=3.5; //IN OHMS\n",
+"I_Z=50*10^-3; //IN AMPERES\n",
+"DEL_I_Z=I_Z-I_ZT;\n",
+"DEL_V_Z=DEL_I_Z*Z_ZT;\n",
+"V_Z=V_ZT+DEL_V_Z;\n",
+"disp(V_Z,'voltage across zener terminals (in volts) when current is 50 mA')\n",
+"I_Z=25*10^-3; //IN AMPERES\n",
+"DEL_I_Z=I_Z-I_ZT;\n",
+"DEL_V_Z=DEL_I_Z*Z_ZT;\n",
+"V_Z=V_ZT+DEL_V_Z;\n",
+"disp(V_Z,'voltage across zener terminals (in volts) when current is 25 mA')\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.3: Temperature_coefficient.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex3.3\n",
+"V_Z=8.2; //8.2 volt zener diode\n",
+"TC=0.0005; //Temperature coefficient (per degree celsius)\n",
+"T1=60; //Temperatures in celsius\n",
+"T2=25;\n",
+"DEL_T=T1-T2;\n",
+"del_V_Z=V_Z*TC*DEL_T;\n",
+"voltage=V_Z+del_V_Z;\n",
+"disp(voltage,'zener voltage at 60 degree celsius')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4: Zener_power_dissipation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex3.4\n",
+"P_D_max=400*10^-3; //power in watts\n",
+"df=3.2*10^-3 //derating factor in watts per celsius\n",
+"del_T=(90-50); //in celsius, temperature difference\n",
+"P_D_derated=P_D_max-df*del_T;\n",
+"disp(P_D_derated,'maximum power dissipated at 90 degree celsius')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.5: Zener_voltage_regulator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex3.5\n",
+"V_Z=5.1;\n",
+"I_ZT=49*10^-3;\n",
+"I_ZK=1*10^-3;\n",
+"Z_Z=7;\n",
+"R=100;\n",
+"P_D_max=1;\n",
+"//At I_ZK, output voltage\n",
+"V_out=V_Z-(I_ZT-I_ZK)*Z_Z;\n",
+"V_IN_min=I_ZK*R+V_out;\n",
+"I_ZM=P_D_max/V_Z;\n",
+"//at I_ZM, output voltage\n",
+"V_out=V_Z+(I_ZM-I_ZT)*Z_Z;\n",
+"V_IN_max=I_ZM*R+V_out;\n",
+"disp(V_IN_max,'maximum input voltage in volts that can be regulated by the zener diode')\n",
+"disp(V_IN_min,'minimum input voltage in volts that can be regulated by the zener diode')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.6: Regulation_Variable_load.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex3.6\n",
+"V_Z=12;\n",
+"V_IN=24;\n",
+"I_ZK=1*10^-3;\n",
+"I_ZM=50*10^-3;\n",
+"Z_Z=0;\n",
+"R=470;\n",
+"//when I_L=0, I_Z is max and is equal to the total circuit current I_T\n",
+"I_T=(V_IN-V_Z)/R;\n",
+"I_Z_max=I_T;\n",
+"if I_Z_max<I_ZM then\n",
+" I_L_min=0;\n",
+"end\n",
+"I_L_max=I_T-I_ZK;\n",
+"R_L_min=V_Z/I_L_max;\n",
+"disp(R_L_min,'minimum value of load resistance in ohms')\n",
+"disp(I_L_min,'minimum curent in amperes')\n",
+"disp(I_L_max,'maximum curent in amperes')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.7: Zener_regulation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex3.7\n",
+"V_IN=24;\n",
+"V_Z=15;\n",
+"I_ZK=0.25*10^-3;\n",
+"I_ZT=17*10^-3;\n",
+"Z_ZT=14;\n",
+"P_D_max=1;\n",
+"//output voltage at I_ZK\n",
+"V_out_1=V_Z-(I_ZT-I_ZK)*Z_ZT;\n",
+"disp(V_out_1,'output voltage in volts at I_ZK')\n",
+"I_ZM=P_D_max/V_Z;\n",
+"//output voltage at I_ZM\n",
+"V_out_2=V_Z+(I_ZM-I_ZT)*Z_ZT;\n",
+"disp(V_out_2,'output voltage in volts a I_ZM')\n",
+"R=(V_IN-V_out_2)/I_ZM;\n",
+"disp(R,'value of R in ohms for maximum zener current, no load')\n",
+"disp('closest practical value is 130 ohms')\n",
+"R=130;\n",
+"//for minimum load resistance(max load current) zener current is minimum (I_ZK)\n",
+"I_T=(V_IN-V_out_1)/R;\n",
+"I_L=I_T-I_ZK;\n",
+"R_L_min=V_out_1/I_L;\n",
+"disp(R_L_min,'minimum load resistance in ohms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.8: Zener_limiting.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Ex3.8\n",
+"//let input wave be V_in=V_p_in*sin(2*%pi*f*t) \n",
+"f=1; //Frequency is 1Hz\n",
+"T=1/f;\n",
+"V_p_in=10; //Peak input voltage\n",
+"V_th=0.7; //forward biased zener\n",
+"V_Z1=5.1;\n",
+"V_Z2=3.3;\n",
+"clf();\n",
+"subplot(121)\n",
+"//let n be double the number of cycles of output shown in graph\n",
+"for n=0:1:4\n",
+" t=T.*n/2:0.0005:T.*(n+1)/2 //time for each half cycle\n",
+" V_in=V_p_in*sin(2*%pi*f.*t);\n",
+" Vout=V_in;\n",
+" if modulo(n,2)==0 then //positive half, conducts till V_in=5.8V\n",
+" a=bool2s(Vout<(V_Z1+V_th)); \n",
+" b=bool2s(Vout>(V_Z1+V_th)); \n",
+" y=a.*Vout+(V_Z1+V_th)*b; //output follows input till 5.8V then is constant at 5.8V\n",
+" else //negative half, conducts till V_in=-4V\n",
+" a=bool2s(Vout<-(V_Z2+V_th)); \n",
+" b=bool2s(Vout>-(V_Z2+V_th));\n",
+" y=-(V_Z2+V_th)*a+b.*Vout; //output follows input till -4V then stays constant at -4V\n",
+" end\n",
+" plot(t,y)\n",
+" end\n",
+"xtitle('zener limiting circuit-1')\n",
+"disp((V_Z1+V_th),'max voltage in volts')\n",
+"disp(-(V_Z2+V_th),'min voltage in volts')\n",
+"subplot(122)\n",
+"xtitle('zener limiting circuit-2')\n",
+"V_p_in=20;\n",
+"V_Z1=6.2;\n",
+"V_Z2=15;\n",
+"//let n be double the number of cycles of output shown in graph\n",
+"for n=0:1:4\n",
+" t=T.*n/2:0.0005:T.*(n+1)/2 //time for each half cycle\n",
+" V_in=V_p_in*sin(2*%pi*f.*t);\n",
+" Vout=V_in;\n",
+" if modulo(n,2)==0 then //positive half, conducts till V_in=6.9V\n",
+" a=bool2s(Vout<(V_Z1+V_th)); \n",
+" b=bool2s(Vout>(V_Z1+V_th)); \n",
+" y=a.*Vout+(V_Z1+V_th)*b; //output follows input till 6.9V then is constant at 6.9V\n",
+" else //negative half, conducts till V_in=-15.7V\n",
+" a=bool2s(Vout<-(V_Z2+V_th)); \n",
+" b=bool2s(Vout>-(V_Z2+V_th));\n",
+" y=-(V_Z2+V_th)*a+b.*Vout; //output follows input till -15.7V then stays constant at -15.7V\n",
+" end\n",
+" plot(t,y)\n",
+" end\n",
+" disp((V_Z1+V_th),'max voltage in volts')\n",
+"disp(-(V_Z2+V_th),'min voltage in volts')"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/4-Bipolar_Junction_Transistors.ipynb b/Electronic_Devices_by_T_L_Floyd/4-Bipolar_Junction_Transistors.ipynb
new file mode 100644
index 0000000..8137269
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/4-Bipolar_Junction_Transistors.ipynb
@@ -0,0 +1,290 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Bipolar Junction Transistors"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: DC_beta.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex4.1\n",
+"I_C=3.65*10^-3; //collector current in amperes\n",
+"I_B=50*10^-6; //base current in amperes\n",
+"B_DC=I_C/I_B;\n",
+"I_E=I_B+I_C;\n",
+"disp(B_DC,'B_DC')\n",
+"disp(I_E,'emitter current in amperes')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: Current_Voltage_Analysis.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex4.2\n",
+"V_BE=0.7;\n",
+"B_DC=150;\n",
+"V_BB=5;\n",
+"V_CC=10;\n",
+"R_B=10*10^3;\n",
+"R_C=100;\n",
+"I_B=(V_BB-V_BE)/R_B;\n",
+"I_C=B_DC*I_B;\n",
+"I_E=I_C+I_B;\n",
+"V_CE=V_CC-I_C*R_C;\n",
+"V_CB=V_CE-V_BE;\n",
+"disp(I_B,'base current in amperes')\n",
+"disp(I_C,'collector current in amperes')\n",
+"disp(I_E,'emitter current in amperes')\n",
+"disp(V_CE,'collector to emitter voltage in volts')\n",
+"disp(V_CB,'collector to base voltage in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: Collector_characteristic_curve.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex4.3\n",
+"disp('cant be shown')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: DC_loadline.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex4.4\n",
+"V_CE_sat=0.2;\n",
+"V_BE=0.7;\n",
+"V_BB=3;\n",
+"V_CC=10;\n",
+"B_DC=50;\n",
+"R_B=10*10^3;\n",
+"R_C=1*10^3;\n",
+"I_C_sat=(V_CC-V_CE_sat)/R_C;\n",
+"I_B=(V_BB-V_BE)/R_B;\n",
+"I_C=B_DC*I_B;\n",
+"if I_C>I_C_sat then\n",
+" disp('transistor in saturation')\n",
+"else\n",
+" disp('transistor not in saturation')\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: Transistor_rating.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex4.5\n",
+"P_D_max=250*10^-3; //max power rating of transistor in watts\n",
+"V_CE=6;\n",
+"I_C=P_D_max/V_CE;\n",
+"disp(I_C,'collector current that can be handled by the transistor(in amperes)')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: Maximum_Transistor_Rating.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex4.6\n",
+"P_D_max=800*10^-3;\n",
+"V_BE=0.7;\n",
+"V_CE_max=15;\n",
+"I_C_max=100*10^-3;\n",
+"V_BB=5;\n",
+"B_DC=100;\n",
+"R_B=22*10^3;\n",
+"R_C=10^3;\n",
+"I_B=(V_BB-V_BE)/R_B;\n",
+"I_C=B_DC*I_B;\n",
+"V_R_C=I_C*R_C; //voltage drop across R_C\n",
+"V_CC_max=V_CE_max+V_R_C;\n",
+"P_D=I_C*V_CE_max;\n",
+"if P_D<P_D_max then\n",
+" disp(V_CC_max,'V_CC in volts')\n",
+" disp('V_CE_max will be exceeded first becauseentire supply voltage V_CC will be dropped across the transistor')\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: Derating_Power_maximum.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex4.7\n",
+"df=5*10^-3; //derating factor in watts per degree celsius\n",
+"T1=70;\n",
+"T2=25;\n",
+"P_D_max=1; //in watts\n",
+"del_P_D=df*(T1-T2);\n",
+"P_D=P_D_max-del_P_D;\n",
+"disp(P_D,'Power dissipated max at a temperature of 70 degree celsius(in watts)')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8: Transistor_amplification.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex4.8\n",
+"R_C=1*10^3;\n",
+"r_e=50;\n",
+"V_b=100*10^-3;\n",
+"A_v=R_C/r_e;\n",
+"V_out=A_v*V_b;\n",
+"disp(A_v,'voltage gain')\n",
+"disp(V_out,'ac output voltage in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9: Collector_in_saturation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex4.9\n",
+"V_CC=10;\n",
+"B_DC=200;\n",
+"R_C=10^3;\n",
+"V_IN=0;\n",
+"V_CE=V_CC;\n",
+"disp(V_CE,'when V_IN=0, transistor acts as open switch(cut-off) and collector emitter voltage in volts is')\n",
+"//now when V_CE_sat is neglected\n",
+"I_C_sat=V_CC/R_C;\n",
+"I_B_min=I_C_sat/B_DC;\n",
+"disp(I_B_min,'minimum value of base current in amperes to saturate transistor')\n",
+"V_IN=5;\n",
+"V_BE=0.7;\n",
+"V_R_B=V_IN-V_BE; //voltage across base resiatance\n",
+"R_B_max=V_R_B/I_B_min;\n",
+"disp(R_B_max,'maximum value of base resistance in ohms when input voltage is 5V')"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/5-Transistor_Bias_Circuits.ipynb b/Electronic_Devices_by_T_L_Floyd/5-Transistor_Bias_Circuits.ipynb
new file mode 100644
index 0000000..13aa34a
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/5-Transistor_Bias_Circuits.ipynb
@@ -0,0 +1,311 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Transistor Bias Circuits"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1: DC_bias.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex5.1\n",
+"V_BB=10;\n",
+"V_CC=20;\n",
+"B_DC=200;\n",
+"R_B=47*10^3;\n",
+"R_C=330;\n",
+"V_BE=0.7;\n",
+"I_B=(V_BB-V_BE)/R_B;\n",
+"I_C=B_DC*I_B; //Q POINT\n",
+"V_CE=V_CC-I_C*R_C; //Q POINT\n",
+"I_C_sat=V_CC/R_C;\n",
+"I_c_peak=I_C_sat-I_C;\n",
+"I_b_peak=I_c_peak/B_DC;\n",
+"disp(I_C,'q point of I_C in amperes')\n",
+"disp(V_CE,'Q point of V_CE in volts')\n",
+"disp(I_b_peak,'peak base current in amperes')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2: Input_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex5.2\n",
+"B_DC=125;\n",
+"R_E=10^3;\n",
+"R_IN_base=B_DC*R_E;\n",
+"disp(R_IN_base,'DC input resistance in ohms, looking in at the base of transistor')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3: Voltage_divider_bias.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex5.3\n",
+"B_DC=100;\n",
+"R1=10*10^3;\n",
+"R2=5.6*10^3;\n",
+"R_C=1*10^3;\n",
+"R_E=560;\n",
+"V_CC=10;\n",
+"V_BE=0.7\n",
+"R_IN_base=B_DC*R_E;\n",
+"//We can neglect R_IN_base as it is equal to 10*R2\n",
+"disp(R_IN_base,'input resistance seen from base, which can be neglected as it is 10 times R2')\n",
+"V_B=(R2/(R1+R2))*V_CC;\n",
+"V_E=V_B-V_BE;\n",
+"I_E=V_E/R_E;\n",
+"I_C=I_E;\n",
+"V_CE=V_CC-I_C*(R_C+R_E);\n",
+"disp(V_CE,'V_CE in volts')\n",
+"disp(I_C,'I_C in amperes')\n",
+"disp('Since V_CE>0V, transistor is not in saturation')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4: Voltage_bias_PNP.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex5.4\n",
+"V_EE=10;\n",
+"V_BE=0.7;\n",
+"B_DC=150;\n",
+"R1=22*10^3;\n",
+"R2=10*10^3;\n",
+"R_C=2.2*10^3;\n",
+"R_E=1*10^3;\n",
+"R_IN_base=B_DC*R_E; //R_IN_base>10*R2,so it can be neglected\n",
+"disp(R_IN_base,'input resistance in ohms as seen from base. it can be neglected as it is greater than 10 times R2')\n",
+"V_B=(R1/(R1+R2))*V_EE;\n",
+"V_E=V_B+V_BE;\n",
+"I_E=(V_EE-V_E)/R_E;\n",
+"I_C=I_E;\n",
+"V_C=I_C*R_C;\n",
+"V_EC=V_E-V_C;\n",
+"disp(I_C,'I_C collector current in amperes')\n",
+"disp(V_EC,'V_EC emitter-collector voltage in Volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5: PNP_Transistor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex5.5\n",
+"R1=68*10^3;\n",
+"R2=47*10^3;\n",
+"R_C=1.8*10^3;\n",
+"R_E=2.2*10^3;\n",
+"V_CC=-6;\n",
+"V_BE=0.7;\n",
+"B_DC=75;\n",
+"R_IN_base=B_DC*R_E;\n",
+"disp('input resistance as seen from base is not greater than 10 times R2 so it should be taken into account')\n",
+"//R_IN_base in parallel with R2\n",
+"V_B=((R2*R_IN_base)/(R2+R_IN_base)/(R1+(R2*R_IN_base)/(R2+R_IN_base)))*V_CC;\n",
+"V_E=V_B+V_BE;\n",
+"I_E=V_E/R_E;\n",
+"I_C=I_E;\n",
+"V_C=V_CC-I_C*R_C;\n",
+"V_CE=V_C-V_E;\n",
+"disp(I_C,'collector current in amperes')\n",
+"disp(V_CE,'collector emitter voltage in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6: Qpoint_base_bias.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex5.6\n",
+"V_CC=12;\n",
+"R_B=100*10^3;\n",
+"R_C=560;\n",
+"//FOR B_DC=85 AND V_BE=0.7V\n",
+"B_DC=85;\n",
+"V_BE=0.7;\n",
+"I_C_1=B_DC*(V_CC-V_BE)/R_B;\n",
+"V_CE_1=V_CC-I_C_1*R_C;\n",
+"//FOR B_DC=100 AND V_BE=0.6V\n",
+"B_DC=100;\n",
+"V_BE=0.6;\n",
+"I_C_2=B_DC*(V_CC-V_BE)/R_B;\n",
+"V_CE_2=V_CC-I_C_2*R_C;\n",
+"%_del_I_C=((I_C_2-I_C_1)/I_C_1)*100;\n",
+"%_del_V_CE=((V_CE_2-V_CE_1)/V_CE_1)*100;\n",
+"disp(%_del_I_C,'percent change in collector current')\n",
+"disp(%_del_V_CE,'percent change in collector emitter voltage')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.7: Emitter_bias.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex5.7\n",
+"V_CC=20;\n",
+"R_C=4.7*10^3;\n",
+"R_E=10*10^3;\n",
+"V_EE=-20;\n",
+"R_B=100*10^3;\n",
+"//FOR B_DC=85 AND V_BE=0.7V\n",
+"B_DC=85;\n",
+"V_BE=0.7;\n",
+"I_C_1=(-V_EE-V_BE)/(R_E+(R_B/B_DC));\n",
+"V_C=V_CC-I_C_1*R_C;\n",
+"I_E=I_C_1;\n",
+"V_E=V_EE+I_E*R_E;\n",
+"V_CE_1=V_C-V_E;\n",
+"disp(I_C_1)\n",
+"disp(V_CE_1)\n",
+"//FOR B_DC=100 AND V_BE=0.6V\n",
+"B_DC=100;\n",
+"V_BE=0.6;\n",
+"I_C_2=(-V_EE-V_BE)/(R_E+(R_B/B_DC));\n",
+"V_C=V_CC-I_C_2*R_C;\n",
+"I_E=I_C_2;\n",
+"V_E=V_EE+I_E*R_E;\n",
+"V_CE_2=V_C-V_E;\n",
+"disp(I_C_2)\n",
+"disp(V_CE_2)\n",
+"%_del_I_C=((I_C_2-I_C_1)/I_C_1)*100;\n",
+"%_del_V_CE=((V_CE_2-V_CE_1)/V_CE_1)*100;\n",
+"disp(%_del_I_C,'percent change in collector currrent')\n",
+"disp(%_del_V_CE,'percent change in collector emitter voltage')\n",
+"//plz note that the answers differ because of the number of places after the decimal that scilab generates"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.8: Q_point.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex5.8\n",
+"V_CC=10;\n",
+"B_DC=100;\n",
+"R_C=10*10^3;\n",
+"R_B=100*10^3;\n",
+"V_BE=0.7;\n",
+"I_C=(V_CC-V_BE)/(R_C+(R_B/B_DC));\n",
+"V_CE=V_CC-I_C*R_C;\n",
+"disp(I_C,'Q point of collector current in amperes')\n",
+"disp(V_CE,'Q point of collector-emitter voltage in volts' )"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/6-BJT_Amplifiers.ipynb b/Electronic_Devices_by_T_L_Floyd/6-BJT_Amplifiers.ipynb
new file mode 100644
index 0000000..0353ff8
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/6-BJT_Amplifiers.ipynb
@@ -0,0 +1,439 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: BJT Amplifiers"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.10: Darlington_emitter_follower.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex6.10\n",
+"V_CC=12;\n",
+"V_BE=0.7;\n",
+"R_C=10^3;\n",
+"r_e_ce=5; //for common emitter amplifier\n",
+"R1=10*10^3;\n",
+"R2=22*10^3;\n",
+"R_E=22;\n",
+"R_L=8;\n",
+"B_DC=100;\n",
+"B_ac=100;\n",
+"V_B=((R2*B_DC^2*R_E/(R2+B_DC^2*R_E))/(R1+(R2*B_DC^2*R_E/(R2+B_DC^2*R_E))))*V_CC;\n",
+"V_E=V_B-2*V_BE;\n",
+"I_E=V_E/R_E;\n",
+"r_e=25*10^-3/I_E; //for darlington emitter-follower\n",
+"P_R_E=I_E^2*R_E; //power dissipated by R_E\n",
+"P_Q2=(V_CC-V_E)*I_E //power dissipated by transistor Q2\n",
+"R_e=R_E*R_L/(R_E+R_L); //ac emitter resistance of darlington emitter follower\n",
+"R_in_tot=R1*R2*B_ac^2*(R_e+r_e)/(R1*R2+R1*B_ac^2*(r_e+R_e)+R2*B_ac^2*(r_e+R_e)); //total input resistance of darlington\n",
+"R_c=R_C*R_in_tot/(R_C+R_in_tot); //effective ac resistance\n",
+"A_v_CE=R_c/r_e_ce;\n",
+"disp(A_v_CE,'voltage gain of common emitter amplifier')\n",
+"A_v_EF=R_e/(r_e+R_e);\n",
+"disp(A_v_EF,'voltage gain of darlington emitter follower')\n",
+"A_v=A_v_CE*A_v_EF;\n",
+"disp(A_v,'overall voltage gain')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.11: Common_base_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex6.11\n",
+"B_DC=250;\n",
+"R_C=2.2*10^3;\n",
+"R_E=1*10^3;\n",
+"R_L=10*10^3;\n",
+"R1=56*10^3;\n",
+"R2=12*10^3;\n",
+"V_BE=0.7;\n",
+"V_CC=10;\n",
+"//since B_DC*R_E>>R2\n",
+"V_B=(R2/(R1+R2))*V_CC;\n",
+"V_E=V_B-V_BE;\n",
+"I_E=V_E/R_E;\n",
+"r_e=25*10^-3/I_E;\n",
+"R_in=r_e; //input resistance\n",
+"R_c=R_C*R_L/(R_C+R_L); //ac collector resistance\n",
+"A_v=R_c/r_e;\n",
+"//current gain is almost 1\n",
+"//power gain is approximately equal to voltage gain\n",
+"A_p=A_v;\n",
+"A_i=1;\n",
+"disp(R_in,'input resistance in ohms')\n",
+"disp(A_v,'voltage gain')\n",
+"disp(A_i,'current gain')\n",
+"disp(A_p,'power gain')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.12: Voltage_gain_decibel.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex6.12\n",
+"A_v1=10;\n",
+"A_v2=15;\n",
+"A_v3=20;\n",
+"A_v=A_v1*A_v2*A_v3; //overall voltage gain\n",
+"disp(A_v,'overall voltage gain')\n",
+"A_v1_dB=gain_in_decibel_voltage(A_v1);\n",
+"A_v2_dB=gain_in_decibel_voltage(A_v2);\n",
+"A_v3_dB=gain_in_decibel_voltage(A_v3);\n",
+"A_v_dB=A_v1_dB+A_v2_dB+A_v3_dB;\n",
+"disp(A_v_dB,'total voltage gain in decibels')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1: Linear_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex6.1\n",
+"disp('graph question, cannot be solved in scilab')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2: AC_Emitter_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex6.2\n",
+"I_E=2*10^-3;\n",
+"r_e=25*10^-3/I_E;\n",
+"disp(r_e,'ac emitter resistance in ohms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3: Base_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex6.3\n",
+"I_E=3.8*10^-3;\n",
+"B_ac=160;\n",
+"R1=22*10^3;\n",
+"R2=6.8*10^3;\n",
+"R_s=300;\n",
+"V_s=10*10^-3;\n",
+"r_e=25*10^-3/I_E;\n",
+"R_in_base=B_ac*r_e;\n",
+"R_in_tot=(R1*R2*R_in_base)/(R_in_base*R1+R_in_base*R2+R1*R2);\n",
+"V_b=(R_in_tot/(R_in_tot+R_s))*V_s;\n",
+"disp(V_b,'voltage at the base of the transistor in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4: Emitter_bypass_capacitor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex6.4\n",
+"R_E=560;\n",
+"f=2*10^3; //minimum value of frequency in hertz\n",
+"X_C=R_E/10; //minimum value of capacitive reactance\n",
+"C2=1/(2*%pi*X_C*f);\n",
+"disp(C2,'value of bypass capacitor in farads')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5: Effect_bypass_capacitor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+" //ex6.5\n",
+"r_e=6.58; //from ex6.3\n",
+"R_C=1*10^3;\n",
+"R_E=560;\n",
+"A_v=R_C/(R_E+r_e);\n",
+"disp(A_v,'gain without bypass capacitor')\n",
+"A_v=R_C/r_e;\n",
+"disp(A_v,'gain in the presence of bypass capacitor')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.6: Gain_with_load.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex6.6\n",
+"R_C=10^3;\n",
+"R_L=5*10^3;\n",
+"r_e=6.58;\n",
+"R_c=(R_C*R_L)/(R_C+R_L);\n",
+"disp(R_c,'ac collector resistor in ohms')\n",
+"A_v=R_c/r_e;\n",
+"disp(A_v,'gain with load')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.7: Gain_swamped_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex6.7\n",
+"R_C=3.3*10^3;\n",
+"R_E1=330;\n",
+"A_v=R_C/R_E1;\n",
+"disp(A_v,'approximate voltage gain as R_E2 is bypassed by C2')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.8: Common_emitter_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex6.8\n",
+"B_DC=150;\n",
+"B_ac=175;\n",
+"V_CC=10;\n",
+"V_s=10*10^-3;\n",
+"R_s=600;\n",
+"R1=47*10^3;\n",
+"R2=10*10^3;\n",
+"R_E1=470;\n",
+"R_E2=470;\n",
+"R_C=4.7*10^3;\n",
+"R_L=47*10^3;\n",
+"R_IN_base=B_DC*(R_E1+R_E2);\n",
+"//since R_IN_base is ten times more than R2,it can be neglected in DC voltage calculation\n",
+"V_B=(R2/(R2+R1))*V_CC;\n",
+"V_E=V_B-0.7;\n",
+"I_E=V_E/(R_E1+R_E2);\n",
+"I_C=I_E;\n",
+"V_C=V_CC-I_C*R_C;\n",
+"disp(V_C,'dc collector voltage in volts')\n",
+"r_e=25*10^-3/I_E;\n",
+"//base resistance\n",
+"R_in_base=B_ac*(r_e+R_E1);\n",
+"//total input resistance\n",
+"R_in_tot=(R1*R2*R_in_base)/(R1*R2+R_in_base*R1+R_in_base*R2);\n",
+"attenuation=R_in_tot/(R_s+R_in_tot);\n",
+"//ac collector resistance\n",
+"R_c=R_C*R_L/(R_C+R_L);\n",
+"//voltage gain from base to collector\n",
+"A_v=R_c/R_E1;\n",
+"//overall voltage gain A_V\n",
+"A_V=A_v*attenuation;\n",
+"//rms voltage at collector V_c\n",
+"V_c=A_V*V_s;\n",
+"Max_V_c_p=V_C+sqrt(2)*V_c;\n",
+"Min_V_c_p=V_C-sqrt(2)*V_c;\n",
+"V_out_p=sqrt(2)*V_c;\n",
+"//assume frequency to be 1Hz\n",
+"f=1;\n",
+"t=0:0.0005:4;\n",
+"y=V_C+V_c*sin(2*%pi*f.*t);\n",
+"clf();\n",
+"subplot(121)\n",
+"xtitle('Collector Voltage')\n",
+"plot(t,y)\n",
+"subplot(122)\n",
+"xtitle('source and output ac voltage')\n",
+"x=-V_s*sin(2*f*%pi.*t);\n",
+"z=V_out_p*sin(2*%pi*f.*t);\n",
+"plot(t,x,'r')\n",
+"plot(t,z,'-.')\n",
+"h1=legend(['source voltage';'output voltage'])\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9: Current_gain.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex6.9\n",
+"R_E=10^3;\n",
+"R_L=10^3;\n",
+"R1=18*10^3;\n",
+"R2=18*10^3;\n",
+"B_ac=175;\n",
+"V_CC=10;\n",
+"V_BE=0.7;\n",
+"V_in=1;\n",
+"//ac emitter resistance R_e\n",
+"R_e=(R_E*R_L)/(R_E+R_L);\n",
+"//resistance from base R_in_base\n",
+"R_in_base=B_ac*R_e;\n",
+"//total input resiatance R_in_tot\n",
+"R_in_tot=(R1*R2*R_in_base)/(R1*R2+R1*R_in_base+R2*R_in_base);\n",
+"disp(R_in_tot,'total input resistance in ohms')\n",
+"V_E=((R2/(R1+R2))*V_CC)-V_BE;\n",
+"I_E=V_E/R_E;\n",
+"r_e=25*10^-3/I_E;\n",
+"A_v=R_e/(r_e+R_e);\n",
+"disp(A_v,'voltage gain')\n",
+"//ac emitter current I_e\n",
+"//V_e=A_v*V_b=1V\n",
+"V_e=1;\n",
+"I_e=V_e/R_e;\n",
+"I_in=V_in/R_in_tot;\n",
+"A_i=I_e/I_in; //current gain\n",
+"disp(A_i,'current gain')\n",
+"A_p=A_i; //power gain\n",
+"//since R_L=R_E, one half of the total power is disspated to R_L\n",
+"A_p_load=A_p/2;\n",
+"disp(A_p_load,'power gain delivered to load')"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/7-Field_Effect_Transistors.ipynb b/Electronic_Devices_by_T_L_Floyd/7-Field_Effect_Transistors.ipynb
new file mode 100644
index 0000000..d38a8e2
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/7-Field_Effect_Transistors.ipynb
@@ -0,0 +1,490 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: Field Effect Transistors"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.10: Graphical_analysis.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex7.10\n",
+"R_S=680;\n",
+"I_D=0;\n",
+"V_GS=I_D*R_S; //FOR I_D=0A\n",
+"disp(V_GS,'V_GS in Volts, at I_D=0A')\n",
+"I_DSS=4*10^-3;\n",
+"I_D=I_DSS;\n",
+"V_GS=I_D*R_S; //FOR I_D=4mA\n",
+"disp(V_GS,'V_GS in Volts, at I_D=4mA')\n",
+"disp('Plotting load line using the values of V_GS at I_D=0 and 4mA, we find the intersection of load line with transfer characteristic to get Q-point values of V_GS=-1.5V and I_D=2.25mA')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.11: Voltage_Divider_bias.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex7.11\n",
+"V_DD=12;\n",
+"V_D=7;\n",
+"R_D=3.3*10^3;\n",
+"R_S=2.2*10^3;\n",
+"R_1=6.8*10^6;\n",
+"R_2=1*10^6;\n",
+"I_D=(V_DD-V_D)/R_D;\n",
+"V_S=I_D*R_S;\n",
+"V_G=(R_2/(R_1+R_2))*V_DD;\n",
+"V_GS=V_G-V_S;\n",
+"disp(I_D,'Drain current in amperes')\n",
+"disp(V_GS,'Gate to source voltage in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.12: Graph_voltage_divider.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex7.12\n",
+"R_1=2.2*10^6;\n",
+"R_2=R_1;\n",
+"V_DD=8;\n",
+"R_S=3.3*10^3;\n",
+"V_GS=(R_2/(R_1+R_2))*V_DD; //FOR I_D=0A\n",
+"V_G=V_GS;\n",
+"disp(V_GS,'V_GS in Volts, at I_D=0A')\n",
+"I_D=(V_G-0)/R_S; //FOR V_GS=0V\n",
+"disp(I_D,'I_D in Amperes,at V_GS=0V')\n",
+"disp('Plotting load line using the value of V_GS=4V at I_D=0 and I_D=1.2mA at V_GS=0V, we find the intersection of load line with transfer characteristic to get Q-point values of V_GS=-1.8V and I_D=1.8mA')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.13: DMOSFET.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex7.13\n",
+"I_DSS=10*10^-3;\n",
+"V_GS_off=-8;\n",
+"V_GS=-3;\n",
+"I_D=value_of_I_D(10*10^-3,-3,-8)\n",
+"disp(I_D,'Drain current when V_GS=-3V in Amperes')\n",
+"V_GS=3;\n",
+"I_D=value_of_I_D(10*10^-3,3,-8)\n",
+"disp(I_D,'Drain current when V_GS=3V in Amperes')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.14: EMOSFET.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//EX7.14\n",
+"I_D_on=500*10^-3;\n",
+"V_GS=10;\n",
+"V_GS_th=1;\n",
+"K=value_of_K(500*10^-3,10,1)\n",
+"V_GS=5;\n",
+"I_D=K*(V_GS-V_GS_th)^2;\n",
+"disp(I_D,'Drain current')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.15: DMOSFET_bias.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex7.15\n",
+"I_DSS=12*10^-3;\n",
+"V_DD=18;\n",
+"R_D=620;\n",
+"I_D=I_DSS;\n",
+"V_DS=V_DD-I_D*R_D;\n",
+"disp(V_DS,'Drain to sorce voltage in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.16: EMOSFET_bias.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex7.16\n",
+"I_D_on=200*10^-3;\n",
+"V_DD=24;\n",
+"R_D=200;\n",
+"V_GS=4;\n",
+"V_GS_th=2;\n",
+"R_1=100*10^3;\n",
+"R_2=15*10^3;\n",
+"K=value_of_K(200*10^-3,4,2)\n",
+"V_GS=(R_2/(R_1+R_2))*V_DD;\n",
+"I_D=K*(V_GS-V_GS_th)^2;\n",
+"V_DS=V_DD-I_D*R_D;\n",
+"disp(V_DS,'Drain to Source voltage in Volts')\n",
+"disp(V_GS,'Gate to Source voltage in Volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.17: EMOSFET_drain_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//EX7.17\n",
+"V_GS_on=3;\n",
+"V_GS=8.5; //DISPLAYED ON METER\n",
+"V_DS=V_GS;\n",
+"V_DD=15;\n",
+"R_D=4.7*10^3;\n",
+"I_D=(V_DD-V_DS)/R_D;\n",
+"disp(I_D,'Drain current in Amperes')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.1: cutoff_FET.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex7.1\n",
+"V_GS_off=-4;\n",
+"I_DSS=12*10^-3;\n",
+"R_D=560;\n",
+"V_P=-1*V_GS_off;\n",
+"V_DS=V_P;\n",
+"I_D=I_DSS;\n",
+"V_R_D=I_D*R_D; //voltage across resistor\n",
+"V_DD=V_DS+V_R_D;\n",
+"disp(V_DD,'The value of V_DD required to put the device in the constant current area of operation of JFET')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2: Drain_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex7.2\n",
+"disp('The p-channel JFET requires a positive gate to source voltage. The more positive the voltage, the lesser the drain current. Any further increase in V_GS keeps the JFET cut off, so I_D remains 0')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.3: JFET_current_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex7.3\n",
+"I_DSS=9*10^-3;\n",
+"V_GS_off=-8;\n",
+"V_GS=0;\n",
+"I_D=value_of_I_D(9*10^-3,0,-8);\n",
+"disp(I_D,'Value of I_D for V_GS=0V')\n",
+"I_D=value_of_I_D(9*10^-3,-1,-8);\n",
+"disp(I_D,'Value of I_D for V_GS=-1V')\n",
+"I_D=value_of_I_D(9*10^-3,-4,-8);\n",
+"disp(I_D,'Value of I_D for V_GS=-4V')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.4: JFET_transconductance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex7.4\n",
+"I_DSS=3*10^-3;\n",
+"V_GS_off=-6;\n",
+"y_fs_max=5000*10^-6;\n",
+"V_GS=-4;\n",
+"g_m0=y_fs_max;\n",
+"g_m=g_m0*(1-(V_GS/V_GS_off));\n",
+"I_D=value_of_I_D(3*10^-3,-4,-6)\n",
+"disp(g_m,'forward transconductance in Siemens')\n",
+"disp(I_D,'value of I D in amperes')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5: JFET_input_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"V_GS=-20;\n",
+"I_GSS=-2*10^-9;\n",
+"R_IN=abs((-20/(2*10^-9)))\n",
+"disp(R_IN,'Input Resistance in Ohms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.6: Self_bias.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex7.5\n",
+"V_DD=15;\n",
+"V_G=0;\n",
+"I_D=5*10^-3;\n",
+"R_D=1*10^3;\n",
+"R_G=10*10^6;\n",
+"R_S=220;\n",
+"V_S=I_D*R_S;\n",
+"V_D=V_DD-I_D*R_D;\n",
+"V_DS=V_D-V_S;\n",
+"V_GS=V_G-V_S;\n",
+"disp(V_DS,'Drain to source voltage in volts');\n",
+"disp(V_GS,'Gate to source voltage in volts');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.7: Q_point_JFET.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex7.6\n",
+"I_D=6.25*10^-3;\n",
+"V_GS=-5;\n",
+"R_G=abs((V_GS/I_D))\n",
+"disp(R_G,'Gate resistance in Ohms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.8: Self_bias_Q_point.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//EX7.8\n",
+"I_DSS=25*10^-3;\n",
+"V_GS_off=15;\n",
+"V_GS=5;\n",
+"I_D=value_of_I_D(25*10^-3,5,15)\n",
+"R_S=abs((V_GS/I_D))\n",
+"disp(I_D,'Drain current in Amperes')\n",
+"disp(R_S,'Source resistance in Ohms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.9: Midpoint_bias.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex7.9\n",
+"I_DSS=12*10^-3;\n",
+"V_GS_off=-3;\n",
+"V_DD=12;\n",
+"V_D=6;\n",
+"I_D=I_DSS/2; //MIDPOINT BIAS\n",
+"V_GS=V_GS_off/3.4; //MIDPOINT BIAS\n",
+"R_S=abs((V_GS/I_D))\n",
+"R_D=(V_DD-V_D)/I_D\n",
+"disp(R_S,'Source Resistance in Ohms')\n",
+"disp(R_D,'Drain Resistance in Ohms')"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/8-FET_Amplifiers.ipynb b/Electronic_Devices_by_T_L_Floyd/8-FET_Amplifiers.ipynb
new file mode 100644
index 0000000..4f359df
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/8-FET_Amplifiers.ipynb
@@ -0,0 +1,291 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8: FET Amplifiers"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.10: Common_gate_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex8.10\n",
+"V_DD=-15; //p=channel MOSFET\n",
+"g_m=2000*10^-6; //minimum value from datasheets\n",
+"R_D=10*10^3;\n",
+"R_L=10*10^3;\n",
+"R_S=4.7*10^3;\n",
+"R_d=(R_D*R_L)/(R_D+R_L); //effective drain resistance\n",
+"A_v=g_m*R_d;\n",
+"R_in_source=1/g_m;\n",
+"R_in=(R_in_source*R_S)/(R_in_source+R_S); //signal souce sees R_S in parallel with input resistance at source terminal(R_in_source)\n",
+"disp(A_v,'minimum voltage gain')\n",
+"disp(R_in,'Input resistance seen from signal source in ohms')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.1: Voltage_gai.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex8.1\n",
+"g_m=4*10^-3;\n",
+"R_d=1.5*10^3;\n",
+"A_v=g_m*R_d;\n",
+"disp(A_v,'Voltage gain')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.2: Rds_effect.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex8.2\n",
+"r_ds=10*10^3;\n",
+"R_d=1.5*10^3; //from previous question\n",
+"g_m=4*10^-3; //from previous question\n",
+"A_v=g_m*((R_d*r_ds)/(R_d+r_ds));\n",
+"disp(A_v,'Voltage gain')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.3: External_source_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex8.3\n",
+"R_s=560;\n",
+"R_d=1.5*10^3;\n",
+"g_m=4*10^-3;\n",
+"A_v=(g_m*R_d)/(1+(g_m*R_s))\n",
+"disp(A_v,'Voltage gain')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.4: Unloaded_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex8.4\n",
+"V_DD=12;\n",
+"V_in=100*10^-3;\n",
+"R_D=3.3*10^3;\n",
+"I_DSS=12*10^-3;\n",
+"V_GS_off=-3;\n",
+"R_S=910;\n",
+"a=(R_S^2)/(V_GS_off^2); //we take V_GS_off positive so that we take current negative\n",
+"b=(-1)*(((2*R_S)/(V_GS_off))-(1/I_DSS));\n",
+"c=1;\n",
+"p1=poly([c b a],'x','c')\n",
+"A=roots(p1)\n",
+"I_D=(-1)*A(1); //make the value of current positive\n",
+"V_D=V_DD-I_D*R_D;\n",
+"V_GS=-I_D*R_S;\n",
+"g_m0=(2*I_DSS)/(abs(V_GS_off));\n",
+"g_m=g_m0*(1-(V_GS/V_GS_off));\n",
+"V_out=g_m*R_D*V_in; //rms value\n",
+"v_out=V_out*1.414*2; //peak to peak dc value\n",
+"disp(v_out,'output dc voltage (peak to peak) in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.5: AC_load_effect.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex8.5\n",
+"R_D=3.3*10^3;\n",
+"R_L=4.7*10^3;\n",
+"R_d=(R_D*R_L)/(R_D+R_L); //Equivalent drain resistance\n",
+"g_m=3.25*10^-3; //from previous question\n",
+"V_in=100*10^-3; //previous question\n",
+"V_out=g_m*R_d*V_in;\n",
+"disp(V_out,'Output voltage rms value in Volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.6: Input_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex8.6\n",
+"I_GSS=30*10^-9;\n",
+"V_GS=10;\n",
+"R_G=10*10^6;\n",
+"R_IN_gate=V_GS/I_GSS;\n",
+"R_in=(R_IN_gate*R_G)/(R_IN_gate+R_G); //parallel combination\n",
+"disp(R_in,'Input resistance in ohms, as seen by signal source')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.7: DMOSFET_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex8.7\n",
+"I_DSS=200*10^-3;\n",
+"g_m=200*10^-3;\n",
+"V_in=500*10^-3;\n",
+"V_DD=15;\n",
+"R_D=33;\n",
+"R_L=8.2*10^3;\n",
+"I_D=I_DSS; //Amplifier is zero biased\n",
+"V_D=V_DD-I_D*R_D;\n",
+"R_d=(R_D*R_L)/(R_D+R_L);\n",
+"V_out=g_m*R_d*V_in;\n",
+"disp(V_D,'DC output voltage in Volts')\n",
+"disp(V_out,'AC output voltage in volts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.9: EMOSFET_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex8.9\n",
+"R_1=47*10^3;\n",
+"R_2=8.2*10^3;\n",
+"R_D=3.3*10^3;\n",
+"R_L=33*10^3;\n",
+"I_D_on=200*10^-3;\n",
+"V_GS=4;\n",
+"V_GS_th=2;\n",
+"g_m=23*10^-3;\n",
+"V_in=25*10^-3;\n",
+"V_DD=15;\n",
+"V_GS=(R_2/(R_1+R_2))*V_DD;\n",
+"K=value_of_K(200*10^-3,4,2);\n",
+"I_D=K*(V_GS-V_GS_th)^2;\n",
+"V_DS=V_DD-I_D*R_D;\n",
+"R_d=(R_D*R_L)/(R_D+R_L);\n",
+"V_out=g_m*V_in*R_d;\n",
+"disp(V_DS,'Drain to source voltage in volts(V_DS)')\n",
+"disp(I_D,'Drain current (I_D) inAmperes')\n",
+"disp(V_GS,'Gate to source voltage (V_GS) in volts')\n",
+"disp(V_out,'AC output voltage in volts')"
+ ]
+ }
+],
+"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/Electronic_Devices_by_T_L_Floyd/9-Power_Amplifiers.ipynb b/Electronic_Devices_by_T_L_Floyd/9-Power_Amplifiers.ipynb
new file mode 100644
index 0000000..7ec4f08
--- /dev/null
+++ b/Electronic_Devices_by_T_L_Floyd/9-Power_Amplifiers.ipynb
@@ -0,0 +1,290 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9: Power Amplifiers"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.1: classA_power_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex9.1\n",
+"V_CC=15;\n",
+"R_C=1*10^3;\n",
+"R_1=20*10^3;\n",
+"R_2=5.1*10^3;\n",
+"R_3=5.1*10^3;\n",
+"R_4=15*10^3;\n",
+"R_E_1=47;\n",
+"R_E_2=330;\n",
+"R_E_3=16;\n",
+"R_L=16; //SPEAKER IS THE LOAD;\n",
+"B_ac_Q1=200;\n",
+"B_ac_Q2=B_ac_Q1;\n",
+"B_ac_Q3=50;\n",
+"//R_c1=R_C||[R_3||R_4||B_acQ2*B_ac_Q3*(R_E_3||R_L)] is ac collector resistance\n",
+"R=(R_E_3*R_L)/(R_E_3+R_L);\n",
+"R=B_ac_Q2*B_ac_Q3*R;\n",
+"R=(R*R_4)/(R+R_4);\n",
+"R=(R*R_3)/(R+R_3);\n",
+"R_c1=(R*R_C)/(R_C+R); //ac collector resistance\n",
+"//V_B=((R_2||(B_acQ1*(R_E_1+R_E_2)))/(R_1+(R_2||B_acQ1*(R_E_1+R_E_2))))*V_CC;\n",
+"//This is the base voltage;\n",
+"//LET R=(R_2||(B_acQ1*(R_E_1+R_E_2)))\n",
+"R=(R_2*B_ac_Q1*(R_E_1+R_E_2))/(R_2+B_ac_Q1*(R_E_1+R_E_2));\n",
+"V_B=R*V_CC/(R_1+R);\n",
+"I_E=(V_B-0.7)/(R_E_1+R_E_2);\n",
+"r_e_Q1=25*10^-3/I_E;\n",
+"A_v1=(-1)*(R_c1)/(R_E_1+r_e_Q1); //voltage gain of 1st stage\n",
+"//total input resistance of 1st stage is R_in_tot_1=R_1||R_2||B_ac_Q1*(R_E_1+r_e_Q1);\n",
+"R_in_tot_1=(R_1*(R_2*B_ac_Q1*(R_E_1+r_e_Q1)/(R_2+B_ac_Q1*(R_E_1+r_e_Q1))))/(R_1+(R_2*B_ac_Q1*(R_E_1+r_e_Q1)/(R_2+B_ac_Q1*(R_E_1+r_e_Q1))));\n",
+"A_v2=1; //gain of darlington voltage-follower\n",
+"A_v_tot=A_v1*A_v2; //total gain\n",
+"A_p=(A_v_tot^2)*(R_in_tot_1/R_L); //power gain\n",
+"disp(A_v_tot,'Voltage gain')\n",
+"disp(A_p,'Power gain')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.2: class_A_efficiency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex9.2\n",
+"V_in=176*10^-3;\n",
+"R_in=2.9*10^3; //total input resistance from previous question\n",
+"A_p=42429; //power gain from previous question\n",
+"V_CC=15;\n",
+"I_CC=0.6; //emitter current\n",
+"P_in=V_in^2/R_in;\n",
+"P_out=P_in*A_p;\n",
+"P_DC=I_CC*V_CC;\n",
+"eff=P_out/P_DC;\n",
+"disp(eff,'efficiency')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.3: class_AB_pushpull.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex9.3\n",
+"V_CC=20;\n",
+"R_L=16;\n",
+"V_out_peak=V_CC;\n",
+"I_out_peak=V_CC/R_L;\n",
+"disp(V_out_peak,'ideal maximum peak output voltage in volts')\n",
+"disp(I_out_peak,'ideal maximum current in amperes')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4: Single_supply_pushpull.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex9.4\n",
+"V_CC=20;\n",
+"R_L=16;\n",
+"V_out_peak=V_CC/2;\n",
+"I_out_peak=V_out_peak/R_L;\n",
+"disp(V_out_peak,'ideal maximum output peak voltage in volts')\n",
+"disp(I_out_peak,'ideal maximum current in amperes')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.5: Power_of_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex9.5\n",
+"V_CC=20;\n",
+"R_L=8;\n",
+"B_ac=50;\n",
+"r_e=6;\n",
+"V_out_peak=V_CC/2;\n",
+"V_CEQ=V_out_peak;\n",
+"I_out_peak=V_CEQ/R_L;\n",
+"I_c_sat=I_out_peak;\n",
+"P_out=0.25*I_c_sat*V_CC;\n",
+"P_DC=(I_c_sat*V_CC)/%pi;\n",
+"R_in=B_ac*(r_e+R_L);\n",
+"disp(P_out,'maximum ac output power in Watts');\n",
+"disp(P_DC,'maximum DC output power in Watts');\n",
+"disp(R_in,'input resistance in ohms');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.6: MOSFET_pushpull_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex9.6\n",
+"V_DD=24;\n",
+"V_in=100*10^-3;\n",
+"R1=440;\n",
+"R2=5.1*10^3;\n",
+"R3=100*10^3;\n",
+"R4=10^3;\n",
+"R5=100;\n",
+"R7=15*10^3;\n",
+"R_L=33;\n",
+"V_TH_Q1=2;\n",
+"V_TH_Q2=-2;\n",
+"I_R1=(V_DD-(-V_DD))/(R1+R2+R3);\n",
+"V_B=V_DD-I_R1*(R1+R2); //BASE VOLTAGE\n",
+"V_E=V_B+0.7; //EMITTER VOLTAGE\n",
+"I_E=(V_DD-V_E)/(R4+R5); //EMITTER CURRENT\n",
+"V_R6=V_TH_Q1-V_TH_Q2; //VOLTAGE DROP ACROSS R6\n",
+"I_R6=I_E; \n",
+"R6=V_R6/I_R6;\n",
+"r_e=25*10^-3/I_E; //UNBYPASSED EMITTER RESISTANCE\n",
+"A_v=R7/(R5+r_e); //VOLTAGE GAIN\n",
+"V_out=A_v*V_in;\n",
+"P_L=V_out^2/R_L;\n",
+"disp(R6,'value of resistance R6 in ohms fot AB operation')\n",
+"disp(P_L,'power across load in watts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.7: class_C_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex9.7\n",
+"f=200*10^3; //frequency in hertz\n",
+"I_c_sat=100*10^-3;\n",
+"V_ce_sat=0.2;\n",
+"t_on=1*10^-6;\n",
+"T=1/f; //time period of signal\n",
+"P_D_avg=(t_on/T)*I_c_sat*V_ce_sat;\n",
+"disp(P_D_avg,'average power dissipation in Watts')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.8: class_C_efficiency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//ex9.8\n",
+"P_D_avg=4*10^-3; //from previous question\n",
+"V_CC=24;\n",
+"R_c=100;\n",
+"P_out=(0.5*V_CC^2)/R_c;\n",
+"n=(P_out)/(P_out+P_D_avg); //n is efficiency\n",
+"disp(n,'efficiency')"
+ ]
+ }
+],
+"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
+}