# Chapter 1 : DC Circuits¶

## Example 1.1 Page No : 1.5¶

In [1]:
# Variables
R = 3.;				#kohm
V = 220;				#V

# Calculations and Results
#First Case
I = V/R;				#mA
print "1st case : Current in the circuit(mA) : %.f"%I

#Second Case
Req = R+R;				#ohm(Equivalent Resistance)
I = V/Req;				#mA
print "2nd case : Current in the circuit(mA) : %.f"%I

1st case : Current in the circuit(mA) : 73
2nd case : Current in the circuit(mA) : 37


## Example 1.2 Page No : 1.6¶

In [4]:
# Variables
I = 1.5;				#A
R1 = 2;				#ohm
R2 = 3;				#ohm
R3 = 8;				#ohm

# Calculations and Results
V1 = I*R1;				#V
V2 = I*R2;				#V
V3 = I*R3;				#V
print "Voltage across R1(V) : %.2f"%V1
print "Voltage across R2(V) : %.2f"%V2
print "Voltage across R3(V) : %.2f"%V3

V = V1+V2+V3;				#V(Supply voltage)
print "Supply Voltage(V) : %.2f"%V

Voltage across R1(V) : 3.00
Voltage across R2(V) : 4.50
Voltage across R3(V) : 12.00
Supply Voltage(V) : 19.50


## Example 1.3 Page No : 1.6¶

In [6]:
# Variables
Vs = 100.;				#V(Supply voltage)
R1 = 40.;				#ohm
R2 = 50.;				#ohm
R3 = 70.;				#ohm

# Calculations
R = R1+R2+R3;				#ohm(Equivalent Resistance)
I = Vs/R;				#A(Current in the circuit)

# Results
print "Circuit current(A) : %.2f"%I

Circuit current(A) : 0.62


## Example 1.4 Page No : 1.7¶

In [8]:
# Variables
Vo = 10.;				#V(Output voltage)
Vin = 30;				#V(Input voltage)
R2 = 100;				#ohm

# Calculations
#V2/V = R2/(R1+R2)				#Voltage divider rule
R1 = (Vin*R2-Vo*R2)/Vo;				#ohm

# Results
print "Resistance of R1(ohm) : %.2f"%R1

Resistance of R1(ohm) : 200.00


## Example 1.5 Page No : 1.11¶

In [2]:
# Variables
V = 110.;				#V
R1 = 22.;				#ohm
R2 = 44.;				#ohm

# Calculations
I1 = V/R1;				#A
I2 = V/R2;				#A
I = I1+I2;				#A

# Results
print "Supply current(A) : %.2f"%I

Supply current(A) : 7.50


## Example 1.6 Page No : 1.11¶

In [3]:
# Variables
V = 12.;				#V
R1 = 6.8;				#ohm
R2 = 4.7;				#ohm
R3 = 2.2;				#ohm

# Calculations
R = 1./(1/R1+1/R2+1/R3);				#ohm(Effective Resistance)
I = V/R;				#A(Supply current)

# Results
print "Effective Resistance(ohm) : %.2f"%R
print "Supply current(A) : %.2f"%I

Effective Resistance(ohm) : 1.23
Supply current(A) : 9.77


## Example 1.7 Page No : 1.12¶

In [4]:
# Variables
I = 8.;				#A
R2 = 2.;				#ohm

# Calculations and Results
# Part (a)
R1 = 2.;				#ohm
I2 = I*R1/(R1+R2);				#A
print "(a) Current in 2 ohm Resistance(A) : %.2f"%I2

# Part (b)
R1 = 4.;				#ohm
I2 = I*R1/(R1+R2);				#A
print "(b) Current in 2 ohm Resistance(A) : %.2f"%I2

(a) Current in 2 ohm Resistance(A) : 4.00
(b) Current in 2 ohm Resistance(A) : 5.33


## Example 1.8 Page No : 1.14¶

In [5]:
# Variables
I1 = 3;				#A
I2 = -4;				#A
I4 = 2;				#A

# Calculations
#I1-I2+I3-I4 = 0				#from KCL
I3 = -I1+I2+I4;				#A

# Results
print "Current I3(A) : %.2f"%I3

Current I3(A) : -5.00


## Example 1.9 Page No : 1.15¶

In [6]:
# Variables
G1 = 20.;				#dB
G2 = 30.;				#dB
G3 = 40.;				#dB

# Calculations and Results
Ap1 = 10**(G1/10);				#Power Gain
print "Power gain for 20 dB : %.2f"%Ap1
Av1 = 10**(G1/20);				#Voltage Gain
print "Voltage gain for 20 dB : %.2f"%Av1
Ap2 = 10**(G2/10);				#Power Gain
print "Power gain for 30 dB : %.2f"%Ap2
Av2 = 10**(G2/20);				#Voltage Gain
print "Voltage gain for 30 dB : %.2f"%Av2
Ap3 = 10**(G3/10);				#Power Gain
print "Power gain for 40 dB : %.2f"%Ap3
Av3 = 10**(G3/20);				#Voltage Gain
print "Voltage gain for 40 dB : %.2f"%Av3

Power gain for 20 dB : 100.00
Voltage gain for 20 dB : 10.00
Power gain for 30 dB : 1000.00
Voltage gain for 30 dB : 31.62
Power gain for 40 dB : 10000.00
Voltage gain for 40 dB : 100.00


## Example 1.10 Page No : 1.15¶

In [7]:
# Variables
I1 = 2.5;				#A
I2 = -1.5;				#A

# Calculations
#I1+I2+I3 = 0				#from KCL
I3 = -I1-I2;				#A

# Results
print "Current I3(A) : %.2f"%I3

Current I3(A) : -1.00


## Example 1.11 Page No : 1.16¶

In [8]:
# Variables
I1 = 3;				#A
I3 = 1;				#A
I6 = 1;				#A

# Calculations
#I1-I2-I3 = 0				#from KCL at point a
I2 = I1-I3;				#A
#I2+I4-I6 = 0				#from KCL at point b
I4 = I6-I2;				#A
#I3-I4-I5 = 0				#from KCL at point c
I5 = I3-I4;				#A

# Results
print "Current I2(A) : %.2f"%I2
print "Current I4(A) : %.2f"%I4
print "Current I5(A) : %.2f"%I5

Current I2(A) : 2.00
Current I4(A) : -1.00
Current I5(A) : 2.00


## Example 1.12 Page No : 1.17¶

In [10]:
# Variables
R1 = 30;				#ohm
R2 = 60.;				#ohm
R3 = 30;				#ohm
I3 = 1;				#A

# Calculations
I1 = I3*(R2+R3)/R2;				#A
I2 = I1-I3;				#A

# Results
print "Current I1(A) : %.2f"%I1
print "Current I2(A) : %.2f"%I2

Current I1(A) : 1.50
Current I2(A) : 0.50


## Example 1.13 Page No : 1.18¶

In [11]:
# Variables
E = 12;				#V
V2 = 8;				#V
V4 = 2;				#V

# Calculations
V1 = E-V2;				#V
#-V2+V3+V4 = 0;				#for Loop B
V3 = V2-V4;				#V

# Results
print "Voltage V1(V) : %.2f"%V1
print "Voltage V3(V) : %.2f"%V3

Voltage V1(V) : 4.00
Voltage V3(V) : 6.00


## Example 1.14 Page No : 1.19¶

In [12]:
# Variables
V = 20.;				#V
R1 = 25;				#ohm
R2 = 40;				#ohm
R3 = 15;				#ohm
R4 = 10;				#ohm

# Calculations
VAC = R3*V/(R1+R3);				#V
VBC = R4*V/(R2+R4);				#V
#0 = VAB+VBC-VAC;				#/from KVL
VAB = -VBC+VAC;				#V

# Results
print "Voltage VAB(V) : %.2f"%VAB

Voltage VAB(V) : 3.50


## Example 1.15 Page No : 1.20¶

In [13]:
# Variables
E1 = 10;				#V
V2 = 6;				#V
V3 = 8;				#V

# Calculations
#E1 = V1+V2;				#KCL for left loop
V1 = E1-V2;				#V
#-E2 = -V2-V3;				#KCL for right loop
E2 = V2+V3;				#Vc

# Results
print "Voltage V1(V) : %.2f"%V1
print "Voltage E2(V) : %.2f"%E2

Voltage V1(V) : 4.00
Voltage E2(V) : 14.00