initial thoughts
I read in a book that the sign you add to the voltage when using KVL
is the first sign you encounter when moving along the loop (of
arbitrary direction). And that if you encounter a negative sign first
(of a voltage) then that voltage equals -R*I (a negative sign is
added)
Books may bive you a lot of rules to memorize. Learn the powerful key concepts and how to apply them to any situation without aid or help from others. Learn to navigate on your own. You only have to know a few things.
KCL is powerful. KVL is powerful. Learn those well. Superposition is also powerful. Learn that, too. And stick with the passive sign convention. There are other conventions. But learning more than one, at least for now, will just get in your way.
proper annotation and problem setup
V3 is the voltage across 5ohm resistor and Va is voltage across 1ohm
resistor. I3 is current through 5ohm resistor, I2 for 20k ohm resistor
and I1 for the other two resistors.
Here's with the added work I would have expected from you:
Note that all devices are labeled (it's just confusing to have numbers and to have to identify things that way.) I've labeled in the currents you designated, using the passive sign convention. To be consistent, I also labeled \$V_{_\text{A}}\$ with the same passive sign convention (you weren't clear about this.)
In addition, I added one possible group of mesh currents, assuming you may want to solve this using KVL/mesh. Your presentation is not KVL/mesh. It's different. So you have to be careful with it.
Also, I've labeled the nodes for the case where you may want to use nodal (KCL) analysis.
So the schematic is all set up now for a variety of ways of solving.
your way
For loop including 3k, 1k and 5k ohm resistors: -V3 + V1 + Va = 0. V3
= -5000I3, V1 = 3000I1, Va = 1000*I1
Thus I get: 5I3 + 4I1 = 0 FIRST EQUATION
Let's stay with your currents and list out what we know:
- \$V_2=I_1\cdot\left(R_{_\text{A}}+R_1\right)\$
- \$V_2=I_2\cdot R_2\$
- \$V_2=I_3\cdot R_3 \left[=V_3\right]\$
- \$I_{_\text{Z}}=I_1+I_2+I_3\$
This is four equations and four unknowns. You know a few more things from the above, but it just duplicates information and doesn't add any. For example, \$V_2=V_3\$, as you have defined them. But we don't need \$V_3\$. It's just another name.
Let's use SymPy to solve this:
e1 = Eq( V2, I1*(Ra+R1) )
e2 = Eq( V2, I2*R2 )
e3 = Eq( V2, I3*R3 )
e4 = Eq( Iz, I1 + I2 + I3 )
solve( [ e1, e2, e3, e4 ], [ I1, I2, I3, V2 ] )
{I1: Iz*R2*R3/(R1*R2 + R1*R3 + R2*R3 + R2*Ra + R3*Ra),
I2: (Iz*R1*R3 + Iz*R3*Ra)/(R1*R2 + R1*R3 + R2*R3 + R2*Ra + R3*Ra),
I3: (Iz*R1*R2 + Iz*R2*Ra)/(R1*R2 + R1*R3 + R2*R3 + R2*Ra + R3*Ra),
Vz: (Iz*R1*R2*R3 + Iz*R2*R3*Ra)/(R1*R2 + R1*R3 + R2*R3 + R2*Ra + R3*Ra)}
for i,j in solve( [ e1, e2, e3, e4 ], [ I1, I2, I3, V2 ] ).items():
....: i, j.subs( { R1:3e3, R2:20e3, R3:5e3, Ra:1e3, Iz:10e-3 })
....:
(I1, 0.00500000000000000)
(I2, 0.00100000000000000)
(I3, 0.00400000000000000)
(V2, 20.0000000000000)
KVL/mesh
This could have also been set up using the mesh currents I used.
(Note here that the passive sign convention for the blue mesh currents is its own thing and ignores the passive sign convention applied to the green-labeled currents that you set up. Regardless, we use the passive sign convention as is appropriate for the approach under consideration.)
- \$0\:\text{V}-R_1\cdot I_{_\text{B}}-R_{_\text{A}}\cdot I_{_\text{B}}-V_{_\text{Z}}=0\:\text{V}\$
- \$0\:\text{V}+V_{_\text{Z}}-R_3\cdot \left(I_{_\text{C}}-I_{_\text{D}}\right)=0\:\text{V}\$
- \$0\:\text{V}-R_3\cdot \left(I_{_\text{D}}-I_{_\text{C}}\right)-R_2\cdot I_{_\text{D}}=0\:\text{V}\$
- \$I_{_\text{Z}}=I_{_\text{C}}-I_{_\text{B}}\$
Let's use SymPy to solve this:
e5 = Eq( 0 - R1*Ib - Ra*Ib - Vz, 0 )
e6 = Eq( 0 + Vz - R3*(Ic-Id), 0 )
e7 = Eq( 0 - R3*(Id-Ic) - R2*Id, 0 )
e8 = Eq( Iz, Ic-Ib )
solve( [ e5, e6, e7, e8 ], [ Ib, Ic, Id, Vz ] )
{Ib: -Iz*R2*R3/(R1*R2 + R1*R3 + R2*R3 + R2*Ra + R3*Ra),
Ic: (Iz*R1*R2 + Iz*R1*R3 + Iz*R2*Ra + Iz*R3*Ra)/(R1*R2 + R1*R3 + R2*R3 + R2*Ra + R3*Ra),
Id: (Iz*R1*R3 + Iz*R3*Ra)/(R1*R2 + R1*R3 + R2*R3 + R2*Ra + R3*Ra),
Vz: (Iz*R1*R2*R3 + Iz*R2*R3*Ra)/(R1*R2 + R1*R3 + R2*R3 + R2*Ra + R3*Ra)}
sage: for i,j in solve( [ e5, e6, e7, e8 ], [ Ib, Ic, Id, Vz ] ).items():
....: i, j.subs( { R1:3e3, R2:20e3, R3:5e3, Ra:1e3, Iz:10e-3 })
....:
(Ib, -0.00500000000000000)
(Ic, 0.00500000000000000)
(Id, 0.00100000000000000)
(Vz, 20.0000000000000)
Note that \$I_{_\text{Z}}=5\:\text{mA}-\left(-5\:\text{mA}\right)=10\:\text{mA}\$. Confirming point. Also keep in mind that \$V_{_\text{Z}}\$, the voltage across the current source, is the same as \$V_2\$.
KCL/nodal
This is pretty easy:
- \$\frac{V_2}{R_{_\text{A}}}+\frac{V_2}{R_2}+\frac{V_2}{R_3}=\frac{V_1}{R_{_\text{A}}}+I_{_\text{Z}}\$
- \$\frac{V_1}{R_{_\text{A}}}+\frac{V_1}{R_1} =\frac{V_2}{R_{_\text{A}}}\$
There are only two unknown nodes. So just two equations.
Let's use SymPy to solve this:
e9 = Eq( V2/Ra + V2/R2 + V2/R3, V1/Ra + Iz )
e10 = Eq( V1/Ra + V1/R1, V2/Ra )
solve( [ e9, e10 ], [ V1, V2 ] )
{V1: Iz*R1*R2*R3/(R1*R2 + R1*R3 + R2*R3 + R2*Ra + R3*Ra),
V2: (Iz*R1*R2*R3 + Iz*R2*R3*Ra)/(R1*R2 + R1*R3 + R2*R3 + R2*Ra + R3*Ra)}
for i,j in solve( [ e9, e10 ], [ V1, V2 ] ).items():
....: i, j.subs( { R1:3e3, R2:20e3, R3:5e3, Ra:1e3, Iz:10e-3 })
....:
(V1, 15.0000000000000)
(V2, 20.0000000000000)
summary
It all just works. You just need to get into the routine, is all.
If you wanted to just do it quickly without all that math involved, then you could just take \$5\:\text{k}\Omega\,\vert\vert\, 20\:\text{k}\Omega\,\vert\vert\, \left(1\:\text{k}\Omega+3\:\text{k}\Omega\right)=2\:\text{k}\Omega\$. Knowing the current, you know that \$V_2=10\:\text{mA}\cdot 2\:\text{k}\Omega=20\:\text{V}\$. And given the passive sign convention, you know that since the current arrow points into the top, then \$V_2\$ must be positive with respect to the bottom wire at the other end of the current source. You can work out the rest from there.