The simple rules used for analyzing networks with only one battery and a collection of resistors do not work as well when you introduce one or more additional batteries. The difficulty arises in trying to determine which batteries are powering the circuit, or discharging, and which one are charging. Consider the following example,
Is ε_{1}, the battery on the line between A and D, charging or discharging? What about ε_{2}, the battery between B and E? There is no easily apparent way to be certain until the circuit is tested and analyzed. To do this analysis we will use Kirchhoff's Rules.
Junction Rule
Kirchhoff's first rule states that the sum of the currents coming into a junction equals the sum of the currents going out of a junction.
This is a statement of conservation of charge (1 amp = 1 coulomb/sec) in a circuit. In our circuit diagram shown above, B and E are junctions while points A, C, D, and F are merely "corners" labeled to assist us in our discussion. Even though you may arbitrarily assign directions to the currents, the general rule is to draw currents "coming out" of the positive terminal of a battery. Later, if your choice of direction later turns out to be incorrect, the value of I will simply be negative. However, you must LEAVE it alone since a change of SIGN will result in incorrect values for V and R as you continue to analyze these remaining properties of your circuit. In the diagram shown above,

the current called I_{1} runs counterclockwise from B to E through corners A and D,

the current called I_{2} runs clockwise from E to B through corners C anf F, while

the current called I_{3} ONLY runs clockwise from E to B.
Remember that currents flow around corners (A, C, D, F) in a circuit but divide when they come to junctions (B, E) which denote parallel configurations.
At junction B, the only current "coming in" is I_{2} while the currents called I_{1} and I_{3} are "going out." We would write the Kirchhoff's junction equation as:
Notice at junction E that the currents called I_{1} and I_{3} are "coming in" while the only current "going out" is I_{2}.
Junctions B and E reflections of each other since they produce identical equations. Loop Rule
Kirchhoff's second rule states that the sum of the voltage changes around a closed path, or loop, in the circuit must add to zero.
This is a statement of conservation of energy (1 volt = 1 J/C) in a circuit.
In our circuit, there are three loops

ABCFEDA  the perimeter

ABEDA  the left side

CFEBC  the right side
Notice that each loop should begin and end at the same position in the circuit to be considered closed.


The rules for assigning SIGNS to the voltage changes across a resistor in a closed loop for Kirchhoff's loop rule are:
 V = IR if the direction of the current agrees with the direction of the loop.
 Conversely, V = +IR if the direction of the current opposes the direction of the loop.
The rules for assigning SIGNS to the voltage changes across a battery in a closed loop for Kirchoff’s loop rule are:

V = ε if the direction of the loop crosses a battery from + to  (high to low )

V = +ε if the direction of the loop crosses a battery from  to + (low to high)
Kirchoff’s loop rule is often used to determine the correct orientation of batteries in circuits which have more than one battery  that is, which battery or batteries are discharging and which one(s) might be charging.
Let's look at the first loop, ABCFEDA, which goes around the perimeter of the circuit.
Starting at A, we encounter no circuit elements until we reach C where the loop will next pass over resistors R_{2} and R_{3} in the same direction as the current I_{3}. After reaching point F we do not encounter any more circuit elements again until we reach D where we cross the battery 1 from "high to low" (+ to ) and then resistor R_{1} in the opposite direction as the current I_{1}. After which we return to A, our starting point.
I_{3}R_{2}  I_{3}R_{3}  ε_{1} + I_{1}R_{1} = 0
Now let's look at the second loop ABEDA which circles the left side of the circuit.
Starting at A, we encounter no circuit elements until we reach the positive terminal of the battery, ε_{2}. Here the loop will cross the battery 2 from "high to low" (+ to ). After reaching E we do not encounter any circuit elements until after we pass D where the loop initially crosses the battery 1 from "high to low" (+ to ) and then crosses the resistor R_{1} in the opposite direction as the current I_{1}. We then return to A, our starting point.
 ε_{2}  ε_{1} + I_{1}R_{1} = 0
Now let's look at the third loop CFEBC which circles the right side of the circuit.
Starting at C the loop will first pass over resistors R_{2} and R_{3} in the same direction as the current I_{3}. After reaching point F we do not encounter any more circuit elements again until we reach E where the loop will then cross the battery 2 from "low to high" ( to +) before returning to B and then C, our starting point.
I_{3}R_{2}  I_{3}R_{3} + ε_{2} = 0
Now let's put in some values for the batteries and the resistors to determine each of the unknown currents and answer our original questions of which battery (or batteries) is discharging and which are charging. Let's set each resistor equal to 10 Ω, battery 1 equal to 9V, and battery 2 equal to 6V.
ABCFEDA: 
I_{3}R_{2}  I_{3}R_{3}  ε_{1} + I_{1}R_{1} = 0



 I_{3}(10)  I_{3}(10)  9 + I_{1}(10) = 0
 I_{3}(20) + I_{1}(10)  9 = 0
 2I_{3} + I_{1} = 0.9

ABEDA: 
 ε_{2}  ε_{1} + I_{1}R_{1} = 0


 6  9 + I_{1}(10) = 0
10I_{1} = 15
I_{1} = 1.5 A

CFEBC: 
I_{3}R_{2}  I_{3}R_{3} + ε_{2} = 0

Since all three current values are positive:
1. we made the correct choice for each direction
2. we know that both batteries are discharging


 I_{3}(10)  I_{3}(10) + 6 = 0
 20I_{3} = 6
I_{3} = 0.3 A

Junction B:

I_{2} = I_{1} + I_{3} 

I_{2} = 1.5 + 0.3
I_{2} = 1.8 A

Check:

 2I_{3} + I_{1} = 0.9


 2(0.3) + 1.5 = 0.9
 0.6 + 1.5 = 0.9 yes!

