# Chapter - 1 : Introduction To Electronics Diode Fundamentals¶

## Example 1.1 : Page No 27¶

In :
from __future__ import division
# Given data
T1 = 25 # in degree C
T2 = 100 # in degree C
del_T = T2-T1 # in degree C
V= 0.7 # barrier potential t 25°C in V
del_V = -(2)*del_T # in mV
del_V= del_V*10**-3 # in V
V_B = V- abs(del_V) # in V
print "(i)  When the junction temperature is 100 °C, the barrier potential of a silicon diode = %0.2f V" %V_B
T2 = 0 # in degree C
del_T = T2-T1 # in degree C
del_V = -(2)*del_T # in mV
del_V= del_V*10**-3 #in V
V_B = V+del_V # in V
print "(ii) When the junction temperature is 0 °C, the barrier potential of a silicon diode = %0.2f V" %V_B

(i)  When the junction temperature is 100 °C, the barrier potential of a silicon diode = 0.55 V
(ii) When the junction temperature is 0 °C, the barrier potential of a silicon diode = 0.75 V


## Example 1.2 : Page No 30¶

In :
# Given data
T1 = 25 # in degree C
T2 = 100 # in degree C
del_T = T2-T1 # in degree C
I_S = (2)**7 *5 # in nA
I_S = (1.07)**5*I_S # in nA
print "The saturation current at 100 degree C = %0.f nA" %round(I_S)

The saturation current at 100 degree C = 898 nA


## Example 1.3 : Page No 33¶

In :
# Given data
V_L = 10 # in V
R_L = 1*10**3 # in Ω
I_L = V_L/R_L # in A
I_L = I_L*10**3 # mA
print "The load voltage = %0.f volts" %V_L
print "The load current = %0.f mA" %I_L

The load voltage = 10 volts
The load current = 10 mA


## Example 1.4 : Page No 37¶

In :
# Given data
v1 = 10 # in V
v2 = 0.7 # in V
V_L = v1-v2 # in V
print "The load voltage = %0.1f V" %V_L
R_L = 1*10**3 # in Ω
I_L = V_L/R_L # in A
print "The load current = %0.1f mA" %(I_L*10**3)
P_D = v2*I_L # in watt
print "The diode Power = %0.2f mW" %(P_D*10**3)

The load voltage = 9.3 V
The load current = 9.3 mA
The diode Power = 6.51 mW


## Example 1.5 : Page No 39¶

In :
# Given data
R_L1 = 1*10**3 # in ohm
R_L2 = 0.23 # in ohm
R_T = R_L1+R_L2 # in ohm
v1 = 10 # in V
v2 = 0.7 # in V
V_T = v1-v2 # in V
I_L = V_T/R_T # in A
print "The load current = %0.2f mA" %(I_L*10**3)
V_L = I_L*R_L1 # in V
print "The load voltage = %0.1f V" %V_L

The load current = 9.30 mA
The load voltage = 9.3 V


## Example 1.6 : Page No 45¶

In :
# Given data
V_o = 0.7 # in V
print "The value of V_o = %0.1f V" %V_o
E = 10 # in V
V_D = V_o # in V
R = 330 # in ohm
I1 = (E - V_D)/R # in A
I1 = I1*10**3 # in mA
print "The value of I1 = %0.2f mA" %I1
I_D1 = I1/2 # in mA
print "The value of I_D1 = %0.2f mA" %I_D1
I_D2 = I_D1 # in mA
print "The value of I_D2 = %0.2f mA" %I_D2

The value of V_o = 0.7 V
The value of I1 = 28.18 mA
The value of I_D1 = 14.09 mA
The value of I_D2 = 14.09 mA


## Example 1.7 : Page No 46¶

In :
# Given data
V_i = 12 # in V
V_D1 = 0.7 # in V
V_D2 = 0.3 # in V
R = 5.6*10**3 # in ohm
V_o  = V_i - V_D1 - V_D2 # in V
print "The value of Vo voltage = %0.f V" %V_o
I_D = V_o/R # in A
I_D = I_D*10**3 # in mA
print "The value of I_D = %0.2f mA" %I_D

The value of Vo voltage = 11 V
The value of I_D = 1.96 mA


## Example 1.8 : Page No 47¶

In :
# Given data
V1 = 24 # in V
V2 = 6 # in V
V_D1 = 0.7 # in V
R = 3*10**3 # in ohm
I = (V1 - V2 - V_D1)/R # in A
I = I * 10**3 # in mA
print "The current = %0.2f mA" %I

The current = 5.77 mA


## Example 1.9 : Page No 48¶

In :
# Given data
r= 20 # in Ω
R_B= 15 # in Ω
V_K1= 0.2 # in V
V_K2= 0.6 # in V
V= 100 # in V
R1= 10*10**3 # in Ω
# Vo= V_K1+r*I1 = V_K2+R_B*I2
# Resulting current I= I1+I2 or
# (V-Vo)/(R1) = (Vo-V_K1)/r + (Vo-V_K2)/R_B
Vo= (r*R_B*V+R1*R_B*V_K1+R1*r*V_K2)/(R1*R_B+R1*r+r*R_B) # in V
I1= (Vo-V_K1)/r # in A
I2= (V_K2-Vo)/R_B # in A
print "The value of I1 = %0.2f mA" %(I1*10**3)
print "The value of I2 = %0.2f mA" %(I2*10**3)

The value of I1 = 15.69 mA
The value of I2 = 5.74 mA


## Example 1.10 : Page No 49¶

In :
# Given data
I_D = 10 # in mA
I_D = I_D * 10**-3 # in A
V_D = 0.5 # in V
r_F1 = V_D/I_D # in ohm
print "The value of r_F1 = %0.f ohm" %r_F1
I_D = 20 # in mA
I_D = I_D * 10**-3 # in A
V_D = 0.8 # in V
r_F2 = V_D/I_D # in ohm
print "The value of r_F2 = %0.f ohm" %r_F2
I_D = -1 # in µA
I_D = I_D * 10**-6 # in A
V_D = -10 # in V
r_R = V_D/I_D # in ohm
print "The value of r_R = %0.f Mohm" %(r_R*10**-6)

# Note: There is calculation error to evaluate the value of r_F1. So the asnwer in the book is wrong.

The value of r_F1 = 50 ohm
The value of r_F2 = 40 ohm
The value of r_R = 10 Mohm


## Example 1.11 : Page No 49¶

In :
# Given data
R= 5.6*10**3 # in Ω
I_D = 0 # in A
V_D = 0 # in V
E= 12 # in V
Vo= I_D*R # in V
print "The value of I_D = %0.f A" %I_D
print "The value of Vo = %0.f V" %Vo
V_D1 = 0 # in V
V_D2 = E -V_D1 - Vo # in  V
print "The value of V_D2 = %0.f V" %V_D2

The value of I_D = 0 A
The value of Vo = 0 V
The value of V_D2 = 12 V


## Example 1.12 : Page No 50¶

In :
# Given data
E = 20 # in V
V_D1 = 0.7 # in V
V_D2 = 0.7 # in V
V2 = E - V_D1  - V_D2 # in V
R1 = 3.3*10**3 # in ohm
R2 = 5.6*10**3 # in ohm
I2 = V2/R2 # in A
I2 = I2*10**3 # in mA
print "The current through resistor R2 = %0.2f mA" %I2
I1 = V_D2/R1
I1 = I1 * 10**3 # in mA
print "The current through resistor R1 = %0.2f mA" %I1
I_D2 = I2-I1 # in mA
print "The current through diode D2 = %0.2f mA" %I_D2

The current through resistor R2 = 3.32 mA
The current through resistor R1 = 0.21 mA
The current through diode D2 = 3.11 mA


## Example 1.13 : Page No 51¶

In :
# Given data
V1 = 12 # in V
V2 = 0.3 # in V
V_o = V1-V2 # in V
print "The output voltage = %0.1f V" %V_o

The output voltage = 11.7 V


## Example 1.14 : Page No 52¶

In :
# Given data
print "Part (a) Analysis using approximate diode model"
V_D = 0.7 # in V
print "The value of V_D = %0.1f V" %V_D
E = 30 # in V
V_R = E-V_D # in V
print "The value of V_R = %0.1f V" %V_R
R = 2.2 * 10**3 # in ohm
I_D = V_R/R
I_D = I_D * 10**3 # in mA
print "The value of I_D = %0.2f mA" %I_D
print "Part (b) Analysis using ideal diode model"
V_D = 0 # in V
print "The value of V_D = %0.f V" %V_D
V_R = E # in V
print "The value of V_R = %0.f V" %V_R
I_D = V_R/R
I_D = I_D * 10**3 # in mA
print "The value of I_D = %0.2f mA" %I_D

Part (a) Analysis using approximate diode model
The value of V_D = 0.7 V
The value of V_R = 29.3 V
The value of I_D = 13.32 mA
Part (b) Analysis using ideal diode model
The value of V_D = 0 V
The value of V_R = 30 V
The value of I_D = 13.64 mA


## Example 1.15 : Page No 54¶

In :
# Given data
V1 = 20 # in V
V2 = 0.7 # in V
V = V1-V2 # in V
R = 20 # in ohm
I = V/R # in A
print "The current through resistance = %0.3f A" %I

The current through resistance = 0.965 A


## Example 1.16 : Page No 54¶

In :
# Given data
R1= 2 # in kΩ
R2= 2 # in kΩ
V=19 # in V
V_o = (V*R1)/(R1+R2) # in V
print "The output voltage = %0.1f V" %V_o

The output voltage = 9.5 V


## Example 1.17 : Page No 55¶

In :
# Given data
V1 = 0.7 # in V
V2 = 5 # in V
V_o = V1-V2 # in V
R = 2.2*10**3 # in ohm
I_D = -V_o/R
I_D = I_D * 10**3 # in mA
print "The output voltage = %0.1f volts" %V_o
print "The current through diode = %0.2f mA" %I_D

The output voltage = -4.3 volts
The current through diode = 1.95 mA


## Example 1.18 : Page No 56¶

In :
# Given data
V_gamma = 0.7 # in V
R1 = 5*10**3 # in ohm
R2 = 10*10**3 # in ohm
V=5 # in V
print "Part (a)"
I_R2 = (V-V_gamma-(-V))/(R1+R2) # in A
I_D2 = I_R2 # in A
print "The value of I_D1 and I_D2 = %0.2f mA" %(I_D2*10**3)
V_o = V - (I_D2 * R1) # in V
print "The value of Vo = %0.1f V" %V_o
V_A = V_o - V_gamma # in V
print "The value of V_A = %0.1f V" %V_A
print "Part (b)"
V_I = 4 # in V
V_A= V_I-V_gamma # in V
Vo= V_A+V_gamma # in V
I_R1= (V-Vo)/R1 # in A
I_D2= I_R1 # in A
print "The value of I_D2 = %0.1f mA" %(I_D2*10**3)
I_R2= (V_A-(-V))/R2 # in A
I_D1= I_R2-I_R1 # in A
print "The value of I_D1 = %0.2f mA" %(I_D1*10**3)
print "The value of Vo = %0.f volts" %Vo

Part (a)
The value of I_D1 and I_D2 = 0.62 mA
The value of Vo = 1.9 V
The value of V_A = 1.2 V
Part (b)
The value of I_D2 = 0.2 mA
The value of I_D1 = 0.63 mA
The value of Vo = 4 volts


## Example 1.19 : Page No 58¶

In :
# Given data
V_S = 6 # in V
V_D = 0.7 # in V
R = 10 # in K ohm
R = R*10**3 # in ohm
I_T = (V_S-V_D)/R # in A
print "The total current = %0.f µA" %(I_T*10**6)

The total current = 530 µA


## Example 1.20 : Page No 58¶

In :
# Given data
V_S = 5 # in V
V_D = 0.7 # in V
R1 = 1.2 * 10**3 # in ohm
R2 = 2.2 * 10**3 # in ohm
I_T = (V_S-V_D)/(R1+R2)
I_T = I_T * 10**3 # in mA
print "The total circuit current = %0.2f mA" %I_T

The total circuit current = 1.26 mA


## Example 1.21 : Page No 59¶

In :
# Given data
V_S = 4 # in V
V_D1 = 0.7 # in V
V_D2 = 0.7 # in V
R = 5.1*10**3 # in ohm
I_T = (V_S-V_D1-V_D2)/R # in A
print "The total current = %0.f µA" %round(I_T*10**6)

The total current = 510 µA


## Example 1.22 : Page No 59¶

In :
# Given data
V_S = 10 # in V
R1 = 1.5*10**3 # in ohm
R2 = 1.8*10**3 # in ohm
I_T = V_S/(R1+R2) # in A
print "Using the ideal diode, the total current = %0.2f mA" %(I_T*10**3)
V_D1 = 0.7 # in V
V_D2 = 0.7 # in V
I_T = (V_S-V_D1-V_D2)/(R1+R2) # in A
print "Using the pracitcal diode, the total current = %0.2f mA" %(I_T*10**3)

Using the ideal diode, the total current = 3.03 mA
Using the pracitcal diode, the total current = 2.61 mA


## Example 1.23 : Page No 60¶

In :
# Given data
V_S = 5 # in V
V2 = 3 # in V
R = 500 # in ohm
I_D2 = (V_S-V2)/R # in A
I_D2 = I_D2 * 10**3 # in mA
print "The diode current = %0.f mA" %I_D2

The diode current = 4 mA


## Example 1.24 : Page No 60¶

In :
# Given data
V_S = 2 # in V
R = 100 # in ohm
I_D = V_S/R
I_D = I_D * 10**3 # in mA
print "Part (a)"
print "The diode current = %0.f mA" %I_D
V_K = 0.7 # in V
I_D1 = (V_S-V_K)/R
I_D1 = I_D1*10**3 # in mA
print "Part (b)"
print "The diode current = %0.f mA" %I_D1
R_f = 30 # in ohm
I_D2 = (V_S - V_K)/(R+R_f)
I_D2 = I_D2 * 10**3 # in mA
print "Part (c)"
print "The diode current = %0.f mA" %I_D2

Part (a)
The diode current = 20 mA
Part (b)
The diode current = 13 mA
Part (c)
The diode current = 10 mA


## Example 1.25 : Page No 61¶

In :
# Given data
R1= 1 # in kΩ
R2= 0.47 # in kΩ
V_o1 = 0.7 # in V
print "The value of Vo1 = %0.1f V" %V_o1
V_o2 = 0.3 # in V
print "The value of Vo2 = %0.1f V" %V_o2
I1 = (20-V_o1)/R1 # in mA
I2 = (V_o2-V_o1)/R2 # in mA
I = I1 + I2 # in mA
print "The current = %0.2f mA" %I

The value of Vo1 = 0.7 V
The value of Vo2 = 0.3 V
The current = 18.45 mA


## Example 1.26 : Page No 62¶

In :
# Given data
V1 = 10 # in V
V2 = 0.7 # in V
R1 = 1*10**3 # in ohm
R2 = 2*10**3 # in ohm
I = (V1-V2)/(R1+R2) # in A
V_o = I * R2 # in V
print "The output voltage = %0.1f V" %V_o
I_D = I/2 # in A
print "The diode current = %0.2f mA" %(I_D*10**3)

The output voltage = 6.2 V
The diode current = 1.55 mA


## Example 1.27 : Page No 63¶

In :
# Given data
V1 = 20 # in V
V2 = 0.7 # in V
R = 4.7*10**3 # in ohm
I = (V1-V2)/R # in A
I_D = I/2 # in A
print "The diode current = %0.2f mA" %(I_D*10**3)
V_o = I_D*R # in V
print "The output voltage = %0.2f V" %V_o
#Note : The answer in the book is wrong.

The diode current = 2.05 mA
The output voltage = 9.65 V


## Example 1.28 : Page No 64¶

In :
# Given data
V1 = 15 # in V
V2 = 0.7 # in V
V3 = 5 # in V
R = 2.2 # in K ohm
I_D = (V1-V2+V3)/R # in mA
print "The diode current = %0.2f mA" %I_D
V_o = (R * I_D) - V3 # in V
print "The output voltage = %0.1f V" %V_o

The diode current = 8.77 mA
The output voltage = 14.3 V


## Example 1.29 : Page No 65¶

In :
# Given data
V1 = 16 # in V
V2 = 0.7 # in V
V3 = V2 # in V
V4 = 12 # in V
R = 4.7 # in K ohm
I = (V1-V2-V3-V4)/R # in mA
print "The current = %0.3f mA" %I
V_o = (I * 10**-3 * R * 10**3) + V4 # in V
print "The output voltage = %0.1f V" %V_o

The current = 0.553 mA
The output voltage = 14.6 V