Every circuit you will ever build, debug, or fix comes down to one relationship: voltage, current, and resistance. That relationship is Ohm's Law. It is the single most useful formula in electronics, and once you truly understand it, circuits stop being mysterious black boxes and start being systems you can reason about, predict, and control.
This guide is not theory for the sake of theory. We are going to work through 10 real-world calculations — the exact problems you hit when wiring up an LED to an Arduino, monitoring a battery with an ESP32, or figuring out why your linear regulator is burning hot. Grab a pen, a multimeter, and follow along.
The Formula
Ohm's Law states that the voltage across a conductor is directly proportional to the current flowing through it:
V = I x R
Where:
| Symbol | Quantity | Unit | Abbreviation |
|---|---|---|---|
| V | Voltage | Volts | V |
| I | Current | Amperes (Amps) | A |
| R | Resistance | Ohms | Ohm |
Rearranged, this gives you three formulas from one:
- V = I x R — Find voltage when you know current and resistance.
- I = V / R — Find current when you know voltage and resistance.
- R = V / I — Find resistance when you know voltage and current.
That is it. Three letters, one relationship. Everything else builds on top.
The Ohm's Law Triangle
A classic visual aid: draw a triangle with V on top and I and R on the bottom. Cover the quantity you want to find:
-------
| V |
-------
| I x R |
-------
- Cover V and you see I x R.
- Cover I and you see V / R.
- Cover R and you see V / I.
Tape this to your workbench until it becomes second nature.
The Water Pipe Analogy
If electrons and volts feel abstract, think of water flowing through pipes:
| Electrical | Water Analogy | Intuition |
|---|---|---|
| Voltage (V) | Water pressure | How hard the water is being pushed |
| Current (I) | Flow rate (litres/second) | How much water actually flows |
| Resistance (R) | Pipe narrowness | How much the pipe restricts flow |
Turn up the pressure (voltage) with the same pipe (resistance), and more water flows (current). Narrow the pipe (increase resistance) with the same pressure, and less water flows. Ohm's Law captures this relationship exactly.
The Power Formula
Ohm's Law tells you about voltage, current, and resistance. But you also need to know power — how much energy a component consumes (or dissipates as heat) per second.
P = V x I
Combine this with Ohm's Law and you get three equivalent forms:
| Formula | Use when you know... |
|---|---|
| P = V x I | Voltage and current |
| P = I^2 x R | Current and resistance |
| P = V^2 / R | Voltage and resistance |
Power is measured in Watts (W). A quarter-watt resistor can handle 0.25 W before it overheats. A 7805 regulator in a TO-220 package can dissipate about 1-2 W without a heatsink. These numbers matter — we will calculate them below.
10 Real-World Calculations
Example 1: LED Current Limiting Resistor (ESP32 + Red LED)
Problem: You want to drive a red LED from an ESP32 GPIO pin (3.3 V logic). The red LED has a forward voltage of 1.8 V and you want 10 mA of current. What resistor do you need?
Solution:
The resistor must drop the difference between the supply voltage and the LED forward voltage:
V_resistor = V_supply - V_LED = 3.3 V - 1.8 V = 1.5 V
Now apply Ohm's Law:
R = V / I = 1.5 V / 0.010 A = 150 Ohm
Answer: Use a 150 Ohm resistor. The nearest standard value is exactly 150 Ohm.
Power check:
P = I^2 x R = (0.010)^2 x 150 = 0.015 W = 15 mW
A standard 1/4 W (250 mW) resistor handles this easily.
Example 2: LED Current Limiting Resistor (Arduino + Blue LED)
Problem: A blue LED (forward voltage 3.0 V) connected to a 5 V Arduino Uno pin. Target current: 15 mA.
Solution:
V_resistor = 5.0 V - 3.0 V = 2.0 V
R = 2.0 V / 0.015 A = 133.3 Ohm
The nearest standard resistor value is 130 Ohm (E24 series). With 130 Ohm:
I = 2.0 V / 130 Ohm = 15.4 mA
Close enough. Answer: Use a 130 Ohm or 150 Ohm resistor. Either is fine — 150 Ohm gives a slightly dimmer but safer 13.3 mA.
Example 3: ESP32 Current Draw from a 3.3 V Regulator
Problem: Your ESP32 module draws 240 mA peak during Wi-Fi transmission. The 3.3 V regulator has a maximum output of 500 mA. Is this safe? How much power does the ESP32 consume?
Solution:
Current headroom check: 240 mA is well under 500 mA. Safe.
Power consumption:
P = V x I = 3.3 V x 0.240 A = 0.792 W
Answer: The ESP32 consumes about 0.8 W peak. When idle (roughly 20 mA), it drops to just 66 mW.
Example 4: Voltage Divider for 12 V Battery Monitoring
Problem: You want to read a 12 V battery voltage using an ESP32 ADC (maximum 3.3 V input). Design a voltage divider using two resistors.
Solution:
The voltage divider formula:
V_out = V_in x R2 / (R1 + R2)
We need V_out at most 3.3 V when V_in is the maximum battery voltage. A fully charged 3S LiPo reaches about 12.6 V. Let us target V_out = 3.15 V at 12.6 V input to leave margin.
Choose a ratio:
V_out / V_in = R2 / (R1 + R2)
3.15 / 12.6 = 0.25 = 1/4
So R2 / (R1 + R2) = 1/4, which means R1 = 3 x R2.
Pick R2 = 10 kOhm, then R1 = 30 kOhm (use 33 kOhm, the nearest standard value).
With 33 kOhm and 10 kOhm:
V_out = 12.6 x 10000 / (33000 + 10000) = 12.6 x 0.2326 = 2.93 V
That is within ADC range with comfortable headroom.
Current draw from the battery:
I = V_in / (R1 + R2) = 12.6 / 43000 = 0.000293 A = 293 uA
Answer: Use 33 kOhm (R1) and 10 kOhm (R2). The divider draws under 300 uA — negligible.
Example 5: Pull-Up Resistor for a Button
Problem: You are connecting a push button to an ESP32 GPIO. When the button is not pressed, the pull-up resistor holds the pin HIGH (3.3 V). When pressed, the button connects the pin to GND. What value pull-up should you use?
Solution:
The pull-up resistor must balance two things:
- Low enough that noise does not cause false readings. The ESP32 input leakage current is negligible, so this is rarely an issue.
- High enough that it does not waste current when the button is pressed (shorting through R to GND).
When the button is pressed:
I = V / R = 3.3 V / R
| Resistance | Current (button pressed) | Power |
|---|---|---|
| 1 kOhm | 3.3 mA | 10.9 mW |
| 4.7 kOhm | 0.70 mA | 2.3 mW |
| 10 kOhm | 0.33 mA | 1.1 mW |
| 100 kOhm | 0.033 mA | 0.1 mW |
Answer: 10 kOhm is the standard choice — low enough for reliable readings, high enough that 0.33 mA is trivial. For battery-powered projects where the button is pressed often, 47 kOhm or 100 kOhm can save power.
Example 6: Power Dissipation — Will This 1/4 W Resistor Survive?
Problem: A 47 Ohm resistor is used to limit current in a 12 V LED strip driver circuit. The current through it is 100 mA. Will a 1/4 W (0.25 W) resistor handle this?
Solution:
P = I^2 x R = (0.100)^2 x 47 = 0.01 x 47 = 0.47 W
A 1/4 W resistor is rated for 0.25 W. We need 0.47 W. That is nearly double the rating.
Answer: No, the 1/4 W resistor will overheat and possibly burn. Use a 1 W resistor instead. As a rule of thumb, derate by 50 percent: for 0.47 W dissipation, use at least a 1 W rated resistor.
Example 7: Battery Life Estimation
Problem: You have a 3000 mAh 18650 lithium cell powering a sensor node that draws 50 mA on average (including periodic Wi-Fi transmissions). How long will it last?
Solution:
Battery life in hours:
Time = Capacity / Current = 3000 mAh / 50 mA = 60 hours
That is 2.5 days. In practice, you cannot use 100 percent of the capacity (the voltage drops below the minimum before the cell is fully drained). With a realistic 85 percent usable capacity:
Time = (3000 x 0.85) / 50 = 2550 / 50 = 51 hours
Answer: About 51 hours, or roughly 2 days. To extend this, reduce average current with deep sleep modes. An ESP32 in deep sleep draws about 10 uA, which can stretch a single 18650 to months.
Example 8: Wire Resistance and USB Cable Voltage Drop
Problem: You are powering an Arduino and a few servos through a 2-metre USB cable. Total current draw is 800 mA. The cable uses 28 AWG wire (resistance approximately 213 mOhm per metre). USB supplies 5 V. What voltage actually reaches the Arduino?
Solution:
The cable has two conductors (power and ground), so total wire length is 2 x 2 m = 4 m.
R_wire = 0.213 Ohm/m x 4 m = 0.852 Ohm
Voltage drop across the wire:
V_drop = I x R = 0.800 A x 0.852 Ohm = 0.682 V
Voltage at the Arduino:
V_arduino = 5.0 V - 0.682 V = 4.318 V
Answer: Only 4.32 V reaches the Arduino instead of 5 V. This can cause brownouts and erratic servo behaviour. Use a shorter cable, thicker wire (24 AWG or lower), or power the servos separately.
Multimeter verification: Measure voltage at the USB plug (should read close to 5 V) and at the Arduino's 5 V pin under load. The difference is your cable voltage drop.
Example 9: Sizing a Fuse
Problem: Your circuit has the following loads on a 5 V rail: ESP32 module (250 mA), OLED display (30 mA), three LEDs (20 mA each), and a buzzer (80 mA). What fuse should you use?
Solution:
Total current:
I_total = 250 + 30 + (3 x 20) + 80 = 250 + 30 + 60 + 80 = 420 mA
The fuse should be rated above normal operating current but below the maximum safe current for your wiring and components. A common rule: 125 to 150 percent of normal operating current.
Fuse rating = 420 mA x 1.5 = 630 mA
Answer: Use a 750 mA or 1 A fuse. Standard fuse values jump from 500 mA to 750 mA to 1 A. A 500 mA fuse is too close to operating current and may blow from transient spikes (especially ESP32 Wi-Fi bursts). A 750 mA fuse gives adequate headroom.
Example 10: Heat Dissipation in a Linear Regulator (7805)
Problem: A 7805 linear voltage regulator takes a 12 V input and outputs 5 V at 500 mA. How much power does it waste as heat? Does it need a heatsink?
Solution:
The 7805 drops the excess voltage and converts it entirely to heat:
V_drop = V_in - V_out = 12 V - 5 V = 7 V
P_dissipated = V_drop x I = 7 V x 0.500 A = 3.5 W
A TO-220 package without a heatsink can dissipate roughly 1-2 W before reaching dangerous temperatures (junction thermal resistance is about 65 degrees C per watt to ambient).
Temperature rise = 3.5 W x 65 C/W = 227.5 C above ambient
At a 25 degree C room, the junction would theoretically reach 252.5 degrees C. The absolute maximum junction temperature is 150 degrees C. It will hit thermal shutdown or be destroyed.
Answer: 3.5 W is far too much without a heatsink. Solutions:
- Add a heatsink that brings the total thermal resistance below 36 degrees C per watt.
- Lower the input voltage — using a 9 V supply reduces dissipation to 2 W.
- Use a switching regulator instead (like an LM2596), which wastes very little energy as heat.
Verifying with a Multimeter
Calculations are only half the job. Every time you build a circuit, verify with a multimeter. Here is what to measure and how:
Measuring Voltage (Parallel)
Set your multimeter to DC Volts (V). Place the probes across (in parallel with) the component you want to measure.
- Verify supply voltage at the power rails.
- Measure voltage drop across a resistor to confirm your R = V/I calculation.
- Check that your voltage divider output matches the calculated value.
Measuring Current (Series)
Set your multimeter to DC Amps (A or mA). You must break the circuit and insert the multimeter in series so all current flows through it.
- Measure LED current to confirm your resistor value is correct.
- Measure total circuit current to size your fuse.
- Measure sleep current to estimate battery life accurately.
Warning: Never connect the multimeter in current mode across a voltage source. This creates a near-short-circuit and can blow the multimeter fuse (or worse).
Measuring Resistance (Power Off)
Set your multimeter to Ohms. Disconnect the component from the circuit first (or at least power it off). Place probes across the component.
- Verify resistor values (especially if colour bands are hard to read).
- Check for short circuits (near-zero resistance where there should be high resistance).
- Measure wire resistance on long cable runs.
The Verification Loop
For every calculation in this guide, follow this cycle:
- Calculate the expected value.
- Build the circuit.
- Measure with the multimeter.
- Compare — if measured and calculated values disagree by more than 10 percent, investigate.
A Brief Look at Kirchhoff's Laws
Once you move beyond single-resistor circuits, you need two more rules. These are not replacements for Ohm's Law — they work alongside it.
Kirchhoff's Voltage Law (KVL)
The sum of all voltages around any closed loop in a circuit equals zero.
In our LED circuit from Example 1:
V_supply - V_resistor - V_LED = 0
3.3 V - 1.5 V - 1.8 V = 0
This is exactly how we calculated the resistor voltage drop. KVL simply formalises it.
Kirchhoff's Current Law (KCL)
The sum of all currents entering a node equals the sum of all currents leaving it.
In the fuse example (Example 9), the 5 V rail is a node. The total current entering from the power supply (420 mA) equals the sum of currents flowing into each component. KCL is why we added them up.
When Ohm's Law Does Not Apply
Ohm's Law applies to linear, resistive components. Several common components are non-linear:
LEDs have a forward voltage that stays roughly constant regardless of current. You cannot say "LED resistance = V_LED / I" and use that to predict behaviour at a different current. That is why we calculate the resistor separately and treat the LED voltage as a fixed drop.
Capacitors block DC and pass AC. Their "resistance" (impedance) changes with frequency: Z = 1 / (2 x pi x f x C). Ohm's Law still applies if you use impedance instead of resistance, but that is AC circuit analysis — a topic for another day.
Transistors and MOSFETs are active devices. A small signal at the gate or base controls a much larger current. The relationship between voltage and current is non-linear and depends on the operating region (cutoff, active, saturation).
Diodes are similar to LEDs — they have a fixed forward voltage drop (about 0.7 V for silicon diodes) and do not obey V = IR in a simple way.
The takeaway: use Ohm's Law for resistors, wires, and other passive linear elements. For non-linear components, use their specific models (forward voltage, datasheet curves, etc.) and apply Ohm's Law to the rest of the circuit around them.
Common Calculation Mistakes
Mixing Units
This is the number one source of errors. Ohm's Law requires consistent units:
| If current is in... | And resistance is in... | Then voltage is in... |
|---|---|---|
| Amps (A) | Ohms | Volts (V) |
| mA | Ohms | mV |
| mA | kOhm | V |
Safe approach: Always convert to base units (V, A, Ohm) before calculating.
10 mA = 0.010 A
4.7 kOhm = 4700 Ohm
Forgetting Voltage Drops
A 5 V Arduino pin does not deliver 5 V across your load if there is an LED, diode, or regulator in the path. Always subtract forward voltage drops before applying Ohm's Law to the resistor.
Confusing Series and Parallel
- Series resistors: R_total = R1 + R2 + R3 (current is the same through each)
- Parallel resistors: 1/R_total = 1/R1 + 1/R2 + 1/R3 (voltage is the same across each)
Using the wrong formula gives wildly incorrect results.
Ignoring Power Ratings
Getting the resistance right is only half the job. Every resistor has a power rating (typically 1/8 W, 1/4 W, or 1/2 W for through-hole). Always check P = I^2 x R and make sure it is well below the rating.
Practice Problems
Test yourself. Answers are below — try to solve each one before looking.
Problem A: A green LED (forward voltage 2.1 V) is connected to a 5 V supply through a resistor. You want 20 mA. What resistance?
Problem B: Two 1 kOhm resistors in parallel. What is the total resistance?
Problem C: A 220 Ohm resistor carries 30 mA. What is the power dissipation? Will a 1/4 W resistor handle it?
Problem D: A 9 V battery powers a circuit drawing 120 mA. How long will a 550 mAh 9 V battery last?
Problem E: You measure 4.7 V across a 470 Ohm resistor. What current is flowing?
Answers
A:
R = (5.0 - 2.1) / 0.020 = 2.9 / 0.020 = 145 Ohm -> use 150 Ohm (standard value)
B:
1/R_total = 1/1000 + 1/1000 = 2/1000
R_total = 500 Ohm
(Shortcut: two identical resistors in parallel = half the value of one.)
C:
P = I^2 x R = (0.030)^2 x 220 = 0.0009 x 220 = 0.198 W
0.198 W is very close to the 0.25 W rating. It will work but run warm. A 1/2 W resistor would be a better choice for reliability.
D:
Time = 550 mAh / 120 mA = 4.58 hours
With 85 percent usable capacity: about 3.9 hours.
E:
I = V / R = 4.7 / 470 = 0.01 A = 10 mA
Wrapping Up
Ohm's Law is not just a formula you memorise for an exam. It is the tool you reach for every single time you design a circuit, pick a component, debug a problem, or estimate battery life.
The pattern is always the same:
- Identify what you know (two of V, I, R).
- Calculate the third.
- Check power dissipation.
- Verify with a multimeter.
Start with the 10 examples above. Rework them with different values. Change the LED colour, the supply voltage, the battery capacity. The more you practice, the faster these calculations become intuition rather than arithmetic.
Every resistor you stock, every multimeter you own, every circuit you build connects back to these three letters: V, I, R. Master them and everything else in electronics becomes a variation on a theme you already understand.



