NewAI Part GeneratorFree to get started
CIRCUIT DIAGRAM EXAMPLE

LED Circuit Diagram with Resistor and Battery

The simplest useful circuit: one loop with a battery, a switch, a current-limiting resistor and an LED. It is the first circuit most people build, and it shows the rule every LED circuit follows: something has to limit the current.

Series LED circuitSeries LED circuit9 V battery, switch, 330 Ω resistor and a red LED+B19 VS1R1330 ΩD1RedLED currentI = (9 V − 2 V) / 330 Ω ≈ 21 mAResistor powerP = I² × R = (21 mA)² × 330 Ω ≈ 0.15 WMade with ProtoFlow · protoflow.ai
One loop, so the same current flows through every part. The resistor drops the battery voltage that the LED does not use and sets the current.

How this circuit works

There is only one path, so the same current flows through the battery, the switch, the resistor and the LED. Close S1 and the loop is complete; open it and the current stops everywhere at once. That single shared current is what makes it a series circuit.

An LED is a diode. Once the voltage across it reaches its forward voltage, about 1.8 to 2.2 V for a red LED, its current rises very steeply for any further increase in voltage. Connected straight across 9 V it would try to draw far more current than it can survive. R1 takes up the difference: the 9 V splits into roughly 2 V across the LED and 7 V across the resistor.

With 7 V across 330 Ω, Ohm's law gives about 21 mA, close to the continuous rating of a common 5 mm red LED. If you want the LED and the battery to last longer, 470 Ω gives about 15 mA and the LED looks only slightly dimmer.

The order of the parts in the loop does not matter: the resistor can sit before or after the LED and the current is the same. The LED's direction does matter. Current flows from anode to cathode, so the anode (the longer lead) must face the battery's positive terminal, or nothing lights.

Formulas

LED current
I = (Vbattery − VLED) / R = (9 V − 2 V) / 330 Ω ≈ 21 mA

Use the forward voltage from the LED's datasheet; blue and white LEDs need about 3 V.

Resistor for a target current
R = (Vbattery − VLED) / I = (9 V − 2 V) / 15 mA ≈ 470 Ω

Round up to the next standard value so the current lands at or below the target.

Resistor power
P = I² × R = (21 mA)² × 330 Ω ≈ 0.15 W

A 0.25 W resistor is enough. Keeping the power under about half the rating keeps it cool.

Working with your own values? The resistor color code calculator does the sums.

Resistor color code calculator

Parts list

RefPartValueWhat it does
B1Battery9 V9 V battery. Any supply works if you recalculate R1 for it.
D1LEDRedRed LED with a forward voltage of about 2 V. Anode toward the battery's + side.
R1Resistor330 ΩCurrent-limiting resistor. Sets the LED current to about 21 mA.
S1Switch—On/off switch. It can go anywhere in the loop.

Netlist

Recovered from the drawing itself: every pin on each net below is joined by a wire, a junction or a shared supply or ground symbol.

NetConnects
N1B1.-, D1.K
N2B1.+, S1.1
N3S1.2, R1.1
N4R1.2, D1.A

Common mistakes

  • Leaving the resistor out. The LED draws as much current as the battery can deliver and fails within seconds.
  • Putting the LED in backwards. A reversed LED blocks the current, so nothing lights, and 9 V in reverse is above the 5 V reverse rating of many LEDs.
  • Reusing the red LED's resistor for a blue or white LED. Those drop about 3 V, so the same 330 Ω gives (9 V − 3 V) / 330 Ω ≈ 18 mA.
  • Sharing one resistor between LEDs wired in parallel. Their forward voltages differ slightly, so one LED takes most of the current. Give each LED its own resistor.

Build notes

  • The LED only lights with its anode toward the battery's + side.

Frequently asked questions

What resistor do I need for an LED on 9 V?

For a red LED at about 20 mA, (9 V − 2 V) / 0.02 A = 350 Ω, so use 330 Ω or 390 Ω. For a blue or white LED, (9 V − 3 V) / 0.02 A = 300 Ω, so 330 Ω. For an indicator, 1 kΩ is usually bright enough and saves the battery.

Does the resistor go before or after the LED?

Either. In a series loop the current is the same everywhere, so the resistor limits it from either side of the LED.

Why is this called a series circuit?

Every part sits on the same single path, so the current through each one is identical and the voltages across them add up to the battery voltage.

How do I draw this circuit diagram with different values?

Open it in the circuit diagram maker and ask for the change, for example "use a 5 V supply and a blue LED". Restyling and exports (SVG, PNG, PDF, KiCad) are free.

Draw your own version

Open this circuit in the AI circuit diagram maker and ask for a change in plain English, edit a value, switch to IEC symbols, or export it as SVG, PNG, PDF, a KiCad project or a SPICE netlist. Opening the example and exporting it are free.

Related circuit examples

All circuit diagram examples

From circuit diagram to PCB

Open the diagram in ProtoFlow, the free AI PCB design app for Windows, macOS and Linux: pick real parts, lay out and route the board, simulate with SPICE and export Gerbers. Imports and exports KiCad, Altium and EAGLE.

Get for Mac

Free to start. No card required.