"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"# variable declaration\n",
"V_BE=0.7; # voltage in volt\n",
"B_DC=150; # voltage in volt\n",
"V_BB=5; # voltage in volt\n",
"V_CC=10; # voltage in volt\n",
"R_B=10*10**3; # resistance in ohm\n",
"R_C=100; # resistance in ohm\n",
"\n",
"#calculation\n",
"I_B=(V_BB-V_BE)/R_B; #base current in amperes\n",
"I_C=B_DC*I_B; #collector current in amperes\n",
"I_E=I_C+I_B; #emitter current in amperes\n",
"V_CE=V_CC-I_C*R_C; #collector to emitter voltage in volts\n",
"V_CB=V_CE-V_BE; #collector to base voltage in volts\n",
"\n",
"# result\n",
"print \"base current = %.5f amperes\" %I_B\n",
"print \"collector current = %.4f amperes\" %I_C\n",
"print \"emitter current = %.5f amperes\" %I_E\n",
"print \"collector to emitter voltage =%.2f volts\" %V_CE\n",
"print \"collector to base voltage =%.2f volts\" %V_CB"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"base current = 0.00043 amperes\n",
"collector current = 0.0645 amperes\n",
"emitter current = 0.06493 amperes\n",
"collector to emitter voltage =3.55 volts\n",
"collector to base voltage =2.85 volts"
]
}
],
"prompt_number": 3
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# variable declaration\n",
"V_CE_sat=0.2; # voltage in volt\n",
"V_BE=0.7; # voltage in volt\n",
"V_BB=3; # voltage in volt\n",
"V_CC=10; # voltage in volt\n",
"B_DC=50; # voltage in volt\n",
"R_B=10*10**3; # resistance in ohm\n",
"R_C=1*10**3; # resistance in ohm\n",
"\n",
"#calculation\n",
"I_C_sat=(V_CC-V_CE_sat)/R_C; # saturation current\n",
"I_B=(V_BB-V_BE)/R_B; # base current\n",
"I_C=B_DC*I_B; # current in ampere\n",
"\n",
"# result\n",
"if I_C>I_C_sat:\n",
" print \"transistor in saturation\"\n",
"else:\n",
" print \"transistor not in saturation\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"transistor in saturation"
]
}
],
"prompt_number": 5
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 4.5, Page Number: 127
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"#Variable declaration\n",
"P_D_max=250*10**-3; #max power rating of transistor in watts\n",
"V_CE=6; #voltage in volt\n",
"\n",
"#Calculation\n",
"I_Cu=P_D_max/V_CE; #Current (Amp)\n",
"I_C=I_Cu*1000;\n",
"\n",
"#Result\n",
"print \"collector current that can be handled by the transistor = %.1f mA\" %I_C\n",
"print \"\\nRemember that this is not necessarily the maximum IC. The transistor\"\n",
"print \"can handle more collectore current if Vce is reduced as long as PDmax\"\n",
"print \"is not exceeded.\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"collector current that can be handled by the transistor = 41.7 mA\n",
"\n",
"Remember that this is not necessarily the maximum IC. The transistor\n",
"can handle more collectore current if Vce is reduced as long as PDmax\n",
"is not exceeded."
]
}
],
"prompt_number": 6
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 4.6, Page Number: 127
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#Variable declaration\n",
"P_D_max=800*10**-3; #max power rating of transistor in watts\n",
"V_BE=0.7; #voltage in volt\n",
"V_CE_max=15; #voltage in volt\n",
"I_C_max=100*10**-3; #Current (Amp)\n",
"V_BB=5; #voltage in volt\n",
"B_DC=100; #voltage in volt\n",
"R_B=22*10**3; # resistance in ohm\n",
"R_C=10**3; # resistance in ohm\n",
"\n",
"#Calculation\n",
"I_B=(V_BB-V_BE)/R_B; # base current\n",
"I_C=B_DC*I_B; #collector current \n",
"V_R_C=I_C*R_C; #voltage drop across R_C\n",
"V_CC_max=V_CE_max+V_R_C; #Vcc max in volt\n",
"P_D=I_C*V_CE_max; #max power rating\n",
"\n",
"#Result\n",
"if P_DExample 4.7, Page Number: 128
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#Variable declaration\n",
"df=5*10**-3; #derating factor in watts per degree celsius\n",
"T1=70; #temperature 1\n",
"T2=25; #temperature 2\n",
"P_D_max=1; #in watts\n",
"\n",
"#Calculation\n",
"del_P_D=df*(T1-T2); #change due to temperature\n",
"P_D=P_D_max-del_P_D; # power dissipation\n",
"\n",
"#Result\n",
"print \"Power dissipated max at a temperature of 70 degree celsius = %.3f watts\" %P_D"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Power dissipated max at a temperature of 70 degree celsius = 0.775 watts"
]
}
],
"prompt_number": 8
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"#Variable declaration\n",
"V_CC=10.0; #voltage in volt\n",
"B_DC=200.0; #voltage in volt\n",
"R_C=1.0*10**3; #resistance in ohm\n",
"V_IN=0.0; #voltage in volt\n",
"\n",
"#Calculation\n",
"V_CE=V_CC; #equal voltage\n",
"print \"when V_IN=0, transistor acts as open switch(cut-off) and collector emitter voltage = %.2f volt\" %V_CE\n",
"#now when V_CE_sat is neglected\n",
"I_C_sat=V_CC/R_C; #saturation current\n",
"I_B_min=I_C_sat/B_DC; #minimum base current\n",
"print \"\\nminimum value of base current to saturate transistor = %.5f ampere\" %I_B_min\n",
"V_IN=5; #voltage in volt\n",
"V_BE=0.7; #voltage in volt\n",
"V_R_B=V_IN-V_BE; #voltage across base resiatance\n",
"R_B_max=V_R_B/I_B_min;\n",
"\n",
"\n",
"#Result\n",
"kw=round (R_B_max)\n",
"print \"\\nmaximum value of base resistance when input voltage is 5V = %d ohm\" %kw"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"when V_IN=0, transistor acts as open switch(cut-off) and collector emitter voltage = 10.00 volt\n",
"\n",
"minimum value of base current to saturate transistor = 0.00005 ampere\n",
"\n",
"maximum value of base resistance when input voltage is 5V = 86000 ohm"
]
}
],
"prompt_number": 10
}
],
"metadata": {}
}
]
}