Engineering · Circuit Analysis

Voltage Dividers & Kirchhoff's Laws

Ohm's Law tells you about one part. Two more rules tell you about a whole circuit. They are called Kirchhoff's voltage law and current law. Put them together and you get the most useful little circuit in electronics: the voltage divider. It is how almost every analog sensor talks to an Arduino.

← Back to Engineering
  • KVLEvery loop adds up to zero. The rises equal the drops.
  • KCLWhat flows in flows out. Current is never lost at a junction.
  • VoutA divider shares the voltage in proportion to resistance.

The big idea

Voltage is height. Current is traffic.

Think of voltage as height on a hiking trail. The battery is a ski lift: it carries charge up the hill. Every resistor is a slope going back down. However you walk the trail, you end where you started, so every climb must be balanced by the same total of descents. That is Kirchhoff's voltage law.

Think of current as cars on roads. At an intersection, the number of cars arriving each second equals the number leaving. Cars don't vanish, and they don't pile up inside the intersection. That is Kirchhoff's current law.

Kirchhoff's voltage law (KVL)

Around any closed loop, the voltage rises equal the voltage drops.

Vbattery = V1 + V2 + V3

Kirchhoff's current law (KCL)

At any junction (a node), the currents in equal the currents out.

Iin = Ia + Ib + Ic

Why it matters

With these two rules and Ohm's Law you can work out the voltage and current anywhere in any circuit. Professional circuit simulators do exactly this, millions of times a second.

Sim 1 · Walk the loop

Kirchhoff's voltage law: the voltage hike

Three resistors in a series loop share one battery. The graph below the circuit is the trail: how high (how many volts) each point sits above the battery's minus terminal. Change the resistors and watch how the battery's climb gets shared out.

Current
V1
V2
V3

Notice: the biggest resistor always takes the biggest share of the voltage. The same current flows through all three, so by Ohm's Law (V = I × R), more R means more V. Double one resistor and you double its share. The total never changes: it is always the battery.

Sim 2 · Balance the junction

Kirchhoff's current law: the junction count

Now three LEDs-with-resistors hang in parallel from one 5 V supply. Each branch gets the full 5 V, so each one draws its own current. Switch branches on and off and watch the main wire's current change. The thickness of each wire shows how much current it carries.

Why your Arduino resets: every LED, motor, and sensor you add in parallel adds its current to the main supply wire. A USB port can supply about 500 mA. Ask for more and the voltage sags, and the board restarts. In the capstone you'll add up a power budget before you build, using exactly this rule.

Put them together

The voltage divider, in three lines

Two resistors in series across a supply, with a wire tapped off the middle. The middle point sits somewhere between the supply voltage and 0 V. Where exactly? Kirchhoff and Ohm tell you.

Vin R1 (top) R2 (bottom) Vout ground (0 V)
Vout is measured from the middle tap to ground.
  1. KCL: one current.

    With nothing connected to Vout, the same current flows through R1 and R2: I = Vin ÷ (R1 + R2).

  2. Ohm: the bottom drop.

    The voltage across R2 is Vout = I × R2.

  3. Substitute.

    Vout = Vin × R2 ÷ (R1 + R2)

Only the ratio matters. 1 kΩ + 1 kΩ and 100 kΩ + 100 kΩ both give exactly half the supply. What changes is how much current the divider wastes, and how easily a load can drag the output down.

Sim 3 · Divider bench

Build a divider, feed an Arduino

Pick what goes in the bottom spot: a fixed resistor, a photoresistor (light sensor), or a potentiometer. The Arduino's analog-to-digital converter turns 0–5 V into a number from 0 to 1023, which is what analogRead() returns. Then try connecting a load and see what happens.

Vout
analogRead()
Divider current
Power wasted

Missions 0 of 5

  1. Fixed resistors, 5 V supply: make Vout read between 2.45 and 2.55 V. Hint: equal resistors split the supply in half.
  2. Make a 3.3 V signal from a 5 V supply (3.2 to 3.4 V). This is how you safely send a 5 V Arduino signal into a 3.3 V sensor. Hint: you need R2 about twice R1.
  3. Light sensor: as wired, Vout rises in the dark, because the sensor's resistance climbs. Rewire it so Vout rises with light instead, then make it read above 3.5 V at 90% light or more. Hint: swap the sensor to the top.
  4. Connect a load of 1 kΩ to a divider built from two 100 kΩ resistors. Watch Vout collapse. This is called the loading effect.
  5. With the 1 kΩ load still connected, get Vout back within 10% of the unloaded value. Hint: make R1 and R2 much smaller than the load.

Spot them in the wild

Where dividers hide

Every analog sensor

Photoresistors, thermistors, flex sensors, and force pads all change resistance. A fixed resistor turns that change into a voltage change the Arduino can measure.

Potentiometers

A potentiometer is a divider. The wiper slides along one resistor, splitting it into an R1 and an R2 that always add up to the same total.

Level shifting

Many modern sensors and boards (ESP32, UNO Q, Raspberry Pi) run at 3.3 V. A 1 kΩ / 2 kΩ divider brings a 5 V signal down to a safe 3.3 V.

Battery monitors

A 9 V battery is too high for the Arduino's 5 V input. A divider scales it down so the board can warn you when the battery is low.

Many buttons, one pin

A chain of resistors with a button at each tap gives each button its own voltage. Some LCD keypad shields read five buttons on a single analog pin this way.

Inside the meter

Your multimeter's voltage ranges use a precision divider to scale big voltages down to what its chip can measure.

On the Arduino

Read the divider, then convert back to volts

Wire your divider's middle tap to pin A0. The board reports a number; one line of math turns it back into volts.

const int SENSOR_PIN = A0;

void setup() {
  Serial.begin(9600);
}

void loop() {
  int raw = analogRead(SENSOR_PIN);       // 0 to 1023
  float volts = raw * (5.0 / 1023.0);     // back to 0 to 5 V
  Serial.print(raw);
  Serial.print("  ");
  Serial.println(volts);
  delay(200);
}

Choosing the fixed resistor: for the best range, pick a fixed resistor close to the sensor's resistance in the middle of the conditions you care about. A photoresistor that reads about 10 kΩ in normal room light pairs well with a 10 kΩ fixed resistor.

Avoid these

Four divider mistakes

Using a divider as a power supply

A divider can make a signal, not a supply. The moment a motor or LED draws current from the tap, the voltage sags. To power something at a lower voltage, use a voltage regulator.

Forgetting the load

The divider formula assumes nothing draws current from Vout. Keep the load at least 10 times bigger than R2. The Arduino's analog input is about 100 MΩ, so it barely loads anything.

Wasting current

Two 100 Ω resistors on 5 V waste 25 mA all the time. On a battery project that's a dead battery by morning. Use kilohms for sensor dividers.

Upside down

Sensor on the bottom: Vout rises when its resistance rises. Sensor on the top: Vout falls. If your night-light turns on in daylight, swap the two parts (or flip the comparison in your code).

Quick check

Can you analyze a circuit?

1. A 9 V battery drives three resistors in series. The first drops 2 V and the second drops 4 V. What does the third drop?

2. 120 mA flows into a junction that splits three ways. Two branches carry 40 mA and 50 mA. What is the third branch's current?

3. A divider has R1 = 10 kΩ on top and R2 = 30 kΩ on the bottom, across 5 V. What is Vout?

4. A divider made from two 100 kΩ resistors reads 2.5 V. You connect a 1 kΩ load to the output and it drops to about 0.05 V. Why?

5. A photoresistor is the bottom part of a divider. Its resistance goes up in the dark. What happens to analogRead() when you cover it?