Ohm’s Law & DC Circuits
Drag & Drop • Any Topology • Click-to-Edit Popover • Tap-Anywhere Wires • Animated Current • Fault Detection • MNA Solver
1 Overview
The Ohm’s Law & DC Circuits Simulator is a free, browser-based interactive tool for building and analysing direct-current circuits. Drag components from the palette — batteries, resistors, lamps, LEDs, fans, switches, ammeters, voltmeters — onto the canvas, wire them up by clicking ports or tapping anywhere along an existing wire, click a component to open a floating edit popover, and watch animated current flow in real time. It covers V = IR, Kirchhoff’s Laws (KCL and KVL), series and parallel resistance, voltage dividers, and power dissipation.
The simulator uses a full circuit solver (Modified Nodal Analysis — the same algorithm behind professional SPICE tools) so any topology you can draw will be solved, not just presets. Each node’s voltage is computed, each branch’s current is computed, and the results drive animated current dots and live voltage/current readouts on every component. Before energising, a fault-detection pass catches common wiring mistakes — shorts, conflicting batteries, ammeters across loads, duplicate wires, open loops — and flashes the offending parts red with an explanatory banner. Designed for electrical engineering students, physics learners, vocational trainees, and instructors.
2 Getting Started
Drag a component from the palette on the left onto the canvas. Start with a Battery, add one or more Resistors (or real-life loads like lamps and fans), and then click the round ports on each component to create wires between them. Click Run Circuit to energise — current dots flow along the wires, live readouts appear, and any wiring fault is highlighted in flashing red.
- Click a blank canvas point while wiring to drop a waypoint for cleaner routing.
- Tap anywhere along an existing wire to attach a new wire — a junction node is created automatically at the tap point.
- Use an explicit Junction (3-way or 4-way) component when you want a visible node.
- Load a Pre-Built Circuit pill to start from a ready example (single resistor, series, parallel, mixed, LED, Wheatstone bridge, two-loop KCL, etc.).
- Click any component to open a floating popover with a value input, unit selector, slider, and rotate / delete buttons — no side panel needed.
3 Simulate Mode & Components
Simulate mode is the free-form workspace where you build any DC circuit. Available components:
- Battery: Adjustable 1–48 V DC source with clear + and – terminals. Multiple batteries supported — the solver handles series-aiding, series-opposing, and identical-parallel configurations.
- Resistor / Rheostat: Adjustable resistance with Ω / kΩ / MΩ unit selector.
- Lamp / Bulb: Incandescent load; brightness scales with P = V×I.
- LED: Diode with ~2 V forward drop; glows when forward-biased.
- Fan / Motor: Animated rotation proportional to current.
- Buzzer / Heater: Visual indication of power dissipation.
- Switch / Push Button: Click during simulation to toggle (open / closed).
- Ammeter: Reads branch current in series — wiring it in parallel is now caught as a fault before Run.
- Voltmeter: Reads node-to-node voltage in parallel — wiring it as the only return path is caught as an open-loop fault.
- Junction: 3- or 4-way wire splitter/combiner.
- Ground: Reference node (0 V).
The readouts show supply voltage, total current, equivalent resistance, total power, component count, and status. Verify KVL (voltage drops around a loop sum to 0) and KCL (currents at a junction sum to 0) by reading the on-canvas labels.
4 Click-to-Edit Component Popover
Click any component on the canvas to open a floating edit popover anchored right next to it. It lets you change the component without ever leaving the canvas:
- Value field — type an exact value (e.g.
470,9,2.2). - Unit selector — pick Ω / kΩ / MΩ for resistors, V / kV / MV for batteries. The stored SI value updates automatically.
- Slider — drag for fast adjustment while watching readings update live.
- Rotate — cycle 0° → 90° → 180° → 270°.
- Delete — remove the component and all its wires.
The popover hides while you drag the component and re-appears at the new position on drop. Click elsewhere or press Esc to dismiss.
5 Fault Detection & Diagnostics
Hit Run Circuit on a broken wiring and the faulty components plus their wires flash red, and a red warning banner explains the issue in plain language. The engine runs two passes:
Pre-flight topology check — catches problems before the solver even runs:
- No battery — nothing to energise.
- Hard short across a battery — – terminal wired directly to + without any load.
- Disconnected battery terminal — an unwired + or – pole.
- Conflicting parallel batteries (KVL violation) — two batteries of different voltage wired directly in parallel.
- Ammeter in parallel with a load — a near-zero-Ω ammeter across a resistor shorts it out and in real life would blow the meter fuse.
- Duplicate wires between the same two ports — distorts readings.
Post-solve numerical check — catches problems only visible after solving:
- Open loop / no current — battery is live but no complete conductive path back (e.g. an open switch in the only loop).
- Voltmeter as the only return path — a voltmeter’s near-infinite resistance cannot carry load current; the hint tells you exactly this.
- Singular / ill-conditioned configurations — the solver aborts cleanly instead of returning nonsense.
The identical-parallel-batteries case is handled silently by the solver (treated as one source), not flagged as an error.
6 Canvas Tools & Annotations
Annotation Toolbar: Move (select, drag, resize), Sketch (freehand with 6 colours & 3 widths; the pencil cursor stays active for continuous drawing), and Shapes (rectangle, circle, ellipse, line, arrow, double arrow, text label). Picking a shape from the dropdown activates it for a single placement. Click any annotation to select it — a dashed box with corner handles appears; drag inside to move, corners to resize (including text labels), use the action icons above to rotate / duplicate / delete. Double-click text to edit.
Zoom & Pan: Toolbar buttons or Ctrl = / Ctrl - / Ctrl 0 / Ctrl 1. Hold H or toggle the ✋ pan button for pan mode. Ctrl+Scroll zooms; pinch-to-zoom on touch.
Export & Toggle: The 📷 button exports the canvas as a PNG with watermark. The 👁 eye toggles annotation visibility. The 🧹 button clears annotations with a category chooser (all, sketches only, shapes & text only).
Fullscreen: Click the yellow fullscreen button (top-right) to expand the simulator to the full viewport — it changes to a red × while active so you can close it at a glance, or press Esc.
7 Explore, Practice & Quiz
Explore provides structured content across Fundamentals (Ohm’s Law, current, voltage, resistance), Laws (KCL, KVL, power, series), and Components (parallel, voltage divider, current divider, conductance) — each with formula, description, and worked example.
Practice offers 12 randomised problem types on V=IR, series/parallel totals, dividers, and power, with step-by-step solutions.
Quiz gives 5 randomly selected questions from a pool of 15 MCQ + numeric questions with instant grading.
8 Keyboard Shortcuts & Tips
Circuit: Space = Run/Stop, Ctrl+Z = Undo, Ctrl+Shift+Z = Redo, R = Rotate, D = Duplicate, Delete/Backspace = Delete, Esc = Cancel / dismiss popover / exit fullscreen.
Zoom/Pan: Ctrl+= In, Ctrl+- Out, Ctrl+0 Reset, Ctrl+1 Fit, H Pan toggle, Esc Exit pan.
- Every circuit needs a closed loop from + to – of the battery — an open loop triggers the post-solve fault banner.
- Always put a series resistor with an LED to limit current (typical 150–470 Ω).
- Wire an Ammeter in series, a Voltmeter in parallel. The wrong orientation is now flagged before Run.
- Use the Rheostat or the popover slider to sweep resistance live while the simulation runs and watch the V / I response.
- Verify KVL: voltage drops across series resistors should sum to the supply voltage.
- Verify KCL: at any junction, incoming currents = outgoing currents.
- Match battery voltages exactly if you want to parallel them — conflicting voltages are caught as a KVL violation.
Understanding Ohm’s Law — Free Interactive DC Circuit Simulator
Ohm’s Law states that voltage equals current times resistance: V = I × R. To find current, use I = V/R. To find resistance, use R = V/I. Power is calculated as P = V × I. These four equations form the basis of all DC circuit analysis in electrical engineering.
Ohm’s Law is the foundational equation of electrical engineering: V = IR, where V is voltage in volts, I is current in amperes, and R is resistance in ohms. It tells us that the current flowing through a conductor is directly proportional to the voltage across it and inversely proportional to its resistance. This simple relationship governs everything from LED circuits to industrial power distribution. Our interactive simulator lets you build arbitrary DC circuits from batteries, resistors, lamps, LEDs, fans, switches, ammeters and voltmeters, and observe how voltage, current, and resistance interact in real time with animated current dots flowing through the wires.
Kirchhoff’s Laws — KCL and KVL
Kirchhoff’s Current Law (KCL) states that the total current entering a junction equals the total current leaving it — charge is conserved. Kirchhoff’s Voltage Law (KVL) states that the sum of all voltage drops around any closed loop equals the supply voltage — energy is conserved. In our simulator, you can verify both laws by building series and parallel circuit configurations. In a series circuit, the same current flows through every resistor and voltages add up to the supply. In a parallel circuit, the same voltage appears across every branch and currents add up to the total.
Series, Parallel & Mixed Circuits
A series circuit has all components connected end-to-end, so Rₙₒₙ = R1 + R2 + ... and the current is the same everywhere. A parallel circuit has components connected across the same two nodes, so 1/Rₙₒₙ = 1/R1 + 1/R2 + ... and the voltage is the same across every branch. A mixed circuit combines both topologies — for example, R1 in series with a parallel combination of R2 and R3. The simulator calculates total resistance, individual voltage drops, branch currents, and power dissipation for each component automatically using Modified Nodal Analysis.
Power Dissipation in DC Circuits
Electrical power is calculated using P = VI = I²R = V²/R. Every resistor converts electrical energy into heat. The simulator displays total circuit power and individual component power so you can see which resistor dissipates the most energy. Total power is computed from energy conservation (net delivered = net dissipated), so results stay correct even in multi-battery circuits where some sources supply and others absorb — critical for selecting appropriate resistor wattage ratings in real-world designs.
Accurate Simulation with Automatic Fault Detection
Under the hood, the simulator implements Modified Nodal Analysis (MNA) with full Gaussian elimination, partial pivoting, and numerical safeguards — the same mathematics used by professional SPICE simulators. Before every Run, a topology check scans for common wiring mistakes, and a post-solve numerical check verifies that at least one real load is doing useful work. When a fault is detected, the offending components and wires flash red and a warning banner explains the issue in plain English.
Faults caught automatically include: hard shorts across a battery, disconnected battery terminals, conflicting batteries wired in parallel (a Kirchhoff’s Voltage Law violation), ammeters wired across a resistor (which in a real bench would blow the meter fuse), duplicate wires between the same two ports that distort readings, open loops with no current path, and voltmeters accidentally placed as the only return path (a near-infinite resistance that collapses the loop current to nanoamps). Identical parallel batteries are handled silently — the solver treats them as a single source rather than flagging a non-issue.
The engine handles any DC topology you can draw: single-loop, multi-loop, series-aiding or series-opposing batteries, voltage dividers, Wheatstone bridges, current dividers, and mixed networks. Every result satisfies Kirchhoff’s Current Law and Voltage Law exactly, and the per-component currents and voltages are computed to floating-point precision. An eleven-case automated test suite covers energy conservation, KVL enforcement across multi-battery configurations, ill-conditioned matrices, and legitimate high-impedance circuits (e.g. 1 V across 100 MΩ = 10 nA) to prevent both false positives and false negatives in the fault detector.
Fast Component Editing & Flexible Wiring
Editing component values is designed for speed. Click any component and a floating edit popover appears right next to it with a numeric input, a unit selector (Ω / kΩ / MΩ for resistors, V / kV / MV for batteries), a slider, and inline rotate and delete buttons — you never have to scroll to a side panel. Unit conversion happens automatically so you can type 4.7 kΩ and the solver uses 4700 Ω. The slider updates readings live, which makes sweep studies and rheostat-style experiments effortless.
Wiring is equally flexible: in addition to clicking component ports, you can tap anywhere along an existing wire to branch off a new connection — the simulator automatically inserts a 4-way junction node at the tap point and re-routes the original wire. This means you can build complex parallel and bridge networks without having to plan every junction in advance, just like sketching on a whiteboard.
Who Uses This Simulator?
This simulator is designed for electrical and electronics engineering students, physics students studying DC circuits, technical trainees learning about circuit analysis, and instructors teaching Ohm’s Law, Kirchhoff’s Laws, or basic circuit theory. It provides visual, hands-on understanding of current flow and voltage distribution without requiring laboratory equipment or simulation software.
Ohm's Law Formula Table
| Find | Formula | Units |
|---|---|---|
| Voltage (V) | V = I × R | Volts (V) |
| Current (I) | I = V ÷ R | Amperes (A) |
| Resistance (R) | R = V ÷ I | Ohms (Ω) |
| Power (P) | P = V × I = I²R = V²/R | Watts (W) |
Where V is voltage in volts, I is current in amperes, R is resistance in ohms, and P is power in watts. These four equations are the foundation of all DC circuit analysis.
Series vs Parallel Resistance
| Configuration | Total Resistance | Current | Voltage |
|---|---|---|---|
| Series | RT = R1 + R2 + R3 | Same through all | Divides across each |
| Parallel | 1/RT = 1/R1 + 1/R2 + 1/R3 | Divides across branches | Same across all |
Explore Related Simulators
If you found this Ohm’s Law simulator helpful, explore our RC Circuit simulator, RLC Circuit simulator, Transformer simulator, Wheatstone Bridge simulator, and Star-Delta Conversion simulator, and Electro-Pneumatic Circuit Simulator for more hands-on electrical engineering practice.