</>EmbeddedInterview

What are Ohm's law and the power formula, and how do you use them on a board?

EasyElectronics & Hardware Basics

Short answer: Ohm's law says V = I × R (voltage across a resistor equals current times resistance). Power dissipated is P = V × I = I² × R = V² / R. Firmware engineers use them to size pull-ups and LED resistors, estimate current draw and battery life, check that a GPIO can drive a load, and choose resistor power ratings.

Worked examples

  • A 10 kΩ pull-up to 3.3 V with the line held low draws I = 3.3 / 10,000 = 0.33 mA, power 1.1 mW. A 1 kΩ pull-up would draw 3.3 mA — significant for a battery device that holds the line low.
  • A 0.1 Ω current-sense resistor carrying 2 A drops 0.2 V and dissipates 0.4 W: needs at least a 1/2 W part (use a 2× margin).
  • Voltage divider: Vout = Vin × R2 / (R1 + R2). Measuring a 12 V battery with a 3.3 V ADC: R1 = 100 kΩ, R2 = 27 kΩ gives 12 × 27/127 = 2.55 V full scale, drawing only ~94 µA. Higher resistances save current but the ADC's sampling capacitor needs a low source impedance (add a capacitor at the ADC pin or a slower sampling time).

Battery life estimate: average current = Σ(current × time fraction). A sensor drawing 5 mA for 10 ms every second and 5 µA otherwise averages 5 × 0.01 + 0.005 × 0.99 ≈ 55 µA; a 220 mAh coin cell lasts about 220 / 0.055 ≈ 4000 h ≈ 5.5 months (before derating for temperature, self-discharge and peak current limits).

Kirchhoff's laws: currents into a node sum to zero (KCL); voltages around a loop sum to zero (KVL). They explain dividers, ground offsets and why a shared ground return matters.