You are on page 1of 7

EECS 16B Designing Information Devices and Systems II

Fall 2017 Miki Lustig and Michel Maharbiz Homework 0


This homework is due August 29, 2017, at 11:59.

1. Op-amp review
Let us look at the circuit below:

(a) Write down all the branch and node equations using the golden rules of Op-Amps.
Solution: For an op-amp in negative feedback, the golden rules are (1) the voltage difference between
the two inputs is zero (V + = V − ), and (2) No current goes into the inputs of an op-amp.
Let’s label the unknown nodes in this circuit as node a to f , and branch currents I1 to I7 . Here we apply
the golden rule (2) to have all input currents of op-amps as 0. Check the following figure:

EECS 16B, Fall 2017, Homework 0 1


According to the golden rule (1), we could write down
Va = Vp
Vb = Vn
Ve = V f

Then we write down the node current equations based on Kirchhoff’s Current Law (KCL) (the sum
of total currents flowing into one node is the same as the sum of currents flowing out from that same
node.):

Vc −Vp Va −Vb Vp −Vn


I1 = I2 ⇒ = =
R2 R1 R1
Va −Vb V p −V n Vn −Vd
I2 = I3 ⇒ = =
R1 R1 R2
Vd −V f Vf
I4 = I5 ⇒ =
R3 R4
Ve −Vc Vout −Ve
I6 = I7 ⇒ =
R3 R4
You can define currents in whichever directions you like, but you should all arrive at the same conclu-
sion of |I1 | = |I2 | = |I3 |.
(b) Notice that there exists a symmetry between the two op-amps at the first stage of this circuit. What
are the directions of the currents going through the two R2 s? How do the currents of R2 s influence the
current through R1 ?
Solution: According the branch current equations: I1 = I2 , I2 = I3 , the currents going through the
two R2 s are the same but with opposite directions: one is from the output of the op-amp to the inverting
input, while the other is from the inverting input to the output. The current through R1 is the same as
the current through R2 s.
(c) What is the current through R1 ?
Solution: The current through R1 is I2 = (Vp −Vn )/R1 . If Vp −Vn is negative, the current will flow
in the opposite direction of what is drawn in the diagram.
(d) What are the output voltages of the two op-amps at the first stage?
V −V
Solution: For the upper op-amp, Vc = Va + I1 R2 , where I1 = pR1 n , and Va = Vp . Therefore, the
(Vp −Vn )
output voltage Vc of the upper op-amp is Vp + R1 R 2 .
V −V
For the lower op-amp, Vd = Vb − I3 R2 , where I3 = pR1 n , and Vb = Vn . Therefore, the output voltage
(Vp −Vn )
Vd of the lower op-amp is Vn − R1 R2 .
(e) Compute the voltage at the + terminal of the second-stage op-amp.
(Vd −V f ) Vf
Solution: From the solution of (a), we know R3 = R4 . Hence we could express V f with Vd as
follows:
R4
Vf = Vd ,
R3 + R4
(V −V )
and plug in the value of Vd we compute in (d), Vd = Vn − pR1 n R2 :
 
R4 Vp −Vn
Vf = Vn − R2 .
R3 + R4 R1

EECS 16B, Fall 2017, Homework 0 2


(f) What is Vout ?
Solution: There are two ways to compute Vout : (1) use all known values to derive the answer, or (2)
start with Vc and Vd as inputs (free variables) first, and then plug in the values of Vc and Vd in the end
of computation. Here we will show you (1), and in (h) you will see (2).
 
(Vp −Vn )
From (a) (golden rules), we have known Ve = V f , and from (e), we have derived V f = R3R+R4
4
Vn − R1 R2 .
(Vp −Vn ) Ve −Vc
Also, from (d) we have shown Vc = Vp + R1 R 2 . From (a), we have R3 = VoutR−V
4
e
. We can express
Vout with Ve and Vc :  
R4 R4
Vout = 1 + Ve − Vc .
R3 R3
After plugging in the values for Vc and Ve , we get Vout :

     
R4 R4 (Vp −Vn ) R4 (Vp −Vn )
Vout = 1 + Vn − R2 − Vp + R2
R3 R3 + R4 R1 R3 R1
 
R4 2R2 (Vp −Vn )
= Vn −Vp −
R3 R1
 
R4 2R2
=(Vn −Vp ) 1+
R3 R1

(g) If we broke R1 into two series resistors, each with a value of R21 What is the voltage at the node in
between each of these resistors?
Solution: The voltage across the resistor R1 is Vp −Vn , and the current flowing through R1 is
(Vp −Vn )
R1
. The voltage in the middle is
R1 (Vp −Vn ) Vp +Vn
Vp − =
2 R1 2
In other words, it is the average of Vp and Vn .
(h) Based on the above analysis, if Vp = −Vn we could introduce a "fake ground" in the middle of the
resistor R1 and come up with the following circuit:

EECS 16B, Fall 2017, Homework 0 3


Now, each of the first two op-amps is being used in a form that resembles building blocks that you
have seen before. What are the gains of those blocks?
What is Vout /(Vp −Vn ) for this revised circuit?
Solution: Usually we have the DC voltage inputs of Vp and Vn as Vp = −Vn . Hence the voltage in
the middle of R1 is 0. That’s why we introduce a fake ground here.
Let’s focus on the two op-amps in the first stage: they are exactly the same, except the input voltages.
According to the golden rules, the voltage at the "-" terminal must be the same as the "+" terminal. R2
and R21 here are forming voltage dividers for the output voltage of each op-amp. Hence the gains of the
two op-amps are 1 + 2R 2
R1 .
Then let’s take a look at the op-amp in the second stage. Suppose the two inputs for the whole block
are Vc and Vd , as we used before. Recall that Ve and V f must be the same (two inputs of the op-amp).
 
We have derived Ve = V f = R3R+R 4
4
Vd in (e), and we know V out = 1 + R4
R 3
Ve − RR43 Vc . Replace Ve with
R4
R3 +R4 Vd , we could conclude
R4
Vout = (Vd −Vc ).
R3
R4
Hence the gain of the third block in R3 .
   
Combine the above results, we have Vout = RR34 (Vd −Vc ), where Vc = 1 + 2R
R1
2
V p and Vd = 1 + 2R2
R1 Vn .
The overall gain  
Vout R4 2R2
=− 1+
(Vp −Vn ) R3 R1
(check the positions of Vp and Vn )
This entire circuit is called an instrumentation amplifier, which is the descendant of a combo of two
unity gain amplifiers followed by a differential amplifier.

2. KVL
Now consider the circuit shown below:

Figure 1: From Ulaby, Maharbiz, Furse. Circuits. Third Edition.

Determine the amount of power supplied by the voltage source.


Solution: A mesh is a loop in the circuit to which KVL is applied. We will use mesh current variables
I1 , I2 , andI3 as shown in the following diagram.

EECS 16B, Fall 2017, Homework 0 4


The current passing through a component in the circuit can be found from the superposition of mesh currents.

3. KCL
Now consider the circuit shown below:

Figure 2: From Ulaby, Maharbiz, Furse. Circuits. Third Edition

EECS 16B, Fall 2017, Homework 0 5


Determine the voltage Vx .
Solution:

4. Circuits and gaussian elimination

V1 R1 V2 R3 V3 R5 VC

+ V R2 R4
− C

Figure 3: Example Circuit

(a) Find a system of linear equations that could be solved to find the steady-state node voltages.
Solution:

V1 = V
V2 −V1 V2 V2 −V3
+ + =0
R1 R2 R3
V3 −V2 V3 V3 −VC
+ + =0
R3 R4 R5
Also, since in steady state no current flows through a capacitor, the current through R5 must be zero
and so there is no voltage drop across it and so VC = V3 . This means that we can get rid of the third
term of the last equation.
(b) Given that the component values are R1 = 500Ω, R2 = 3000Ω, R3 = 1000Ω, R4 = 2000Ω, and R5 =
4000Ω, solve the circuit equations using Gaussian elimination.
Solution: With the provided component values, the system of equations is:

V1 = V
V2 −V1 V2 V2 −V3 V2 V1 V3
+ + = − − =0
500 3000 1000 300 500 1000
V3 −V2 V3 3V3 V2
+ = − =0
1000 2000 2000 1000

EECS 16B, Fall 2017, Homework 0 6


The augmented matrix for the above system of equations is:
 
1 0 0 V
 − 1 1 1
− 1000 0 
500 300
1 3
0 − 1000 2000 0

This row-reduces down to:  


1 0 0 V
 0 1 0 3
4V

1
0 0 1 2V

(c) What’s the voltage VC across the capacitor? Solution: VC = V3 = 12 V


(d) How would you check your work? Do so.
Solution: Make sure KCL is satisfied at every node. For example, to check that KCL is satisfied at
V2 , use Ohm’s Law to calculate the three currents flowing out of the node and make sure they balance:
V2 −V1 V2 V2 −V3
0= + +
R1 R2 R3
V /4 3V /4 V /4
=− + +
500 3000 1000
= −2V +V +V = 0

This is effectively just plugging your answers back into your original system of equations to make sure
they work out. (Note that you can’t do this at V1 because the current through a voltage source can be
whatever is necessary to create the desired voltage.)

Contributors:

• Nathan Mailoa.

• Emily Naviasky.

• Brian Kilberg.

EECS 16B, Fall 2017, Homework 0 7

You might also like