summaryrefslogtreecommitdiff
path: root/Semiconductor_circuit_approximations_by_A.P._Malvino/ch12.ipynb
blob: 35cf535418feb842a4d0f2de33c50e61f28b9182 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 12 JFETS"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12.1 Page No 303"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The dc voltage from the drain to ground = 22.37 volts\n",
      "The source voltage to ground = 12.00 volts\n"
     ]
    }
   ],
   "source": [
    "# given data\n",
    "R1= 20##  kΩ\n",
    "R2= 10##  kΩ\n",
    "R_E= 10##  kΩ\n",
    "R_D= 8.2##  kΩ\n",
    "V_G= 10##  V\n",
    "V_BE= 0.7##  V\n",
    "V_GS= -2##  V\n",
    "V_DD= 30##  V\n",
    "V_B= R2*V_DD/(R1+R2)##  V\n",
    "I_E= (V_B-V_BE)/R_E##  mA\n",
    "I_D= I_E##  mA\n",
    "# The dc voltage from the drain to ground \n",
    "V_D= V_DD-I_D*R_D##  V\n",
    "# The source voltage to ground \n",
    "Vs= V_G-V_GS##  V\n",
    "print \"The dc voltage from the drain to ground = %.2f volts\"%V_D\n",
    "print \"The source voltage to ground = %.2f volts\"%Vs"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12.2 Page No 307"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Part (i) When V_GS= -1\n",
      "The value of gm = 3000.00 µS\n",
      "Part (ii) When I_D= 2.5 mA\n",
      "The value of gm = 1500.00 µS\n"
     ]
    }
   ],
   "source": [
    "# given data\n",
    "gmo= 3000##  µmhoS\n",
    "V_GSoff= -4##  V\n",
    "I_DSS= 10##  mA\n",
    "print \"Part (i) When V_GS= -1\"\n",
    "V_GS= -1##  V\n",
    "# The value of gm \n",
    "gm= gmo*(1-V_GS/V_GSoff)##  µS\n",
    "print \"The value of gm = %.2f µS\"%gm\n",
    "print \"Part (ii) When I_D= 2.5 mA\"\n",
    "I_D= 2.5##  mA\n",
    "# The value of gm \n",
    "gm= gmo*2*I_D/I_DSS##  µS\n",
    "print \"The value of gm = %.2f µS\"%gm"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12.3 Page No 311"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The output voltage = 12.79 mV\n"
     ]
    }
   ],
   "source": [
    "# given data\n",
    "gm= 2000##  µS\n",
    "gm=gm*10**-6##  S\n",
    "R_D= 4.7##  kΩ\n",
    "Vin= 2##  mV\n",
    "R_L= 10##  kΩ\n",
    "r_D= R_D*R_L/(R_D+R_L)##  kΩ\n",
    "r_D= r_D*10**3##  Ω\n",
    "A= gm*r_D## unit less\n",
    "# The output voltage \n",
    "Vout= A*Vin##  mV\n",
    "print \"The output voltage = %.2f mV\"%Vout\n",
    "\n",
    "# Note: The calculated value of A = %.2f the book is wrong. Correct value of A6.39, So the answer in the book is wrong."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12.4 Page No 311"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The voltage gain = 0.84\n"
     ]
    }
   ],
   "source": [
    "# given data\n",
    "R_D= 7.5##  kΩ\n",
    "R_L= 3##  kΩ\n",
    "r_s= R_D*R_L/(R_D+R_L)##  kΩ\n",
    "r_s= r_s*10**3##  Ω\n",
    "gm= 2500*10**-6##  S\n",
    "# The voltage gain \n",
    "A= gm*r_s/(1+gm*r_s)## unit less\n",
    "print \"The voltage gain = %.2f\"%A"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}