The short answer

Put the switch and current-limiting resistor in the same path as the LED. Closing the switch completes the loop; opening it stops the ideal DC branch current without making every point zero volts.

On this page
Five-volt LED and closed series switchA closed switch and 330-ohm resistor are in series with a forward-oriented LED. Assuming a two-volt LED drop and an ideal five-volt source, conventional current flows from positive to negative at approximately 9.09 milliamps when closed; opening the switch stops it.+−330 ΩClosedLED(5 V − 2 V) / 330 Ω ≈ 9.09 mA
Five-volt LED and closed series switch

Choose parts and isolate the supply

Use an isolated regulated 5 V DC source, normally open switch, 330 Ω resistor and LED. Check LED polarity and its data-sheet current limit; the assumed 2 V drop is not universal. Never use mains or omit the resistor. Keep all three parts in series; plan for hidden breadboard strips.

Map the connections before inserting a wire

Use separate verified breadboard strips for A–D. Source negative must connect to the LED cathode. Closing the switch joins A–B; opening it separates them. Neither resistor nor LED should share a strip across its terminals.

NodeTerminals joined by wire or a verified stripPurpose
A (+5 V)Source +; switch inputSupply to switch
BSwitch output; 330 Ω resistor first endSwitched feed
C330 Ω resistor second end; LED anodeCurrent-limited LED feed
D (0 V)LED cathode; source −Complete return

Predict both states before applying power

With the switch closed, assume 5 V from the source, 2 V across the LED and negligible switch/wire drops. The resistor sees 3 V: current ≈ 9.09 mA, dissipation ≈ 27.27 mW. Check actual part ratings and tolerances.

With the switch open, the ideal steady-state branch current is zero and the LED is off. That does not mean every voltage is zero: the source still has 5 V between A and D, and the open switch can have voltage across its contacts.

Closed: I ≈ (5 V − 2 V) / 330 Ω = 9.09 mA; PR ≈ (3 V)² / 330 Ω = 27.27 mW

Connect the loop with power off

Follow A → switch → B → resistor → C → LED anode → cathode → D. Identify switch contacts by marking or power-off continuity test.

Before powering on, inspect for bare leads touching across the supply or across the resistor. Check split rails with power off; the diagram is not a hole-by-hole layout.

  1. With power off, verify switch contacts, LED polarity and resistor value.
  2. Join only the terminal pairs in A, B, C and D; keep those four nodes separate while the switch is open.
  3. Trace the complete return and check for a resistor bypass or source short before energizing.

Measure the resistor, not the supply current by shorting it

Energize the isolated low-voltage circuit, close the switch and observe the LED. Set a suitably rated meter to DC voltage, with leads in COM and the voltage jack. Measure between B and C, in parallel with the resistor; a result near 3 V implies approximately 3 V / 330 Ω ≈ 9.1 mA through that branch. Check A–D, then open the switch and compare.

If a direct current reading is necessary, turn power off, move the lead to the correctly fused current jack and insert the meter in series by opening one branch. Never put an ammeter across the supply. Power off to reconnect, then restore the voltage jack.

Diagnose a dark or always-on LED

If the LED never lights, power off and trace A through D. Check the switch's actual contacts, LED direction, split rails and whether the return reaches source negative. Near-zero resistor voltage may indicate an open branch or bypass; one reading cannot distinguish them. If the LED stays on with the switch open, look for an unintended parallel route around the switch.

If it is unusually bright, switch off immediately and check for a resistor short, wrong resistor value or incorrect source setting. Never fix a dark LED by removing its current limiter.

Repeat the prediction in a browser Lab

Predict, connect, measure and diagnose; change only the resistor and repeat. NPNLab's educational browser Lab can help practice supported low-voltage component connections and idealized measurements. It does not automatically import this article as a circuit, certify a physical build, or model every contact fault or LED data-sheet limit. Check real parts and wiring independently.

Build a switched LED loop

Keep this recipe open while building in the Lab. The link opens the workspace; it does not import a prebuilt circuit.

Ideal predictions, not measurements: compare these assumptions with the supported model, then verify any real hardware independently.

  • Selected-throw LED current: about 9.09 mA. Ideal estimate: (5 V − assumed LED 2 V) / 330 Ω; neglect contact and LED dynamic resistance.
  • Selected-throw R1 power: about 27.27 mW. Ideal estimate: (3 V)² / 330 Ω.
  • Other-throw LED current: 0 mA. Open series path in the ideal steady-state model; unused pin 3 remains unconnected.
Parts and connections
PartSetting or value
DC supply (DC1)5 V; set a suitable current limit above 10 mA
Slide switch (SLIDE1)3 pins: middle 2 is common; outer 1 is the selected throw; leave outer 3 unconnected
Resistor (R1, pins 1 and 2)330 Ω, rated at least 0.25 W
Red LED (LED1)Anode (+, A pin) and cathode (−, C pin); set 2 V forward drop for this estimate
NodeTerminals joined
A (+5 V)DC1 + (5V pin); SLIDE1 middle common (pin 2)
B (switched)SLIDE1 selected outer throw (pin 1); R1 lead 1
C (LED feed)R1 lead 2; LED1 anode (+, A pin)
D (return, 0 V)LED1 cathode (−, C pin); DC1 − (GND pin)
  1. Set the supply to 5 V and R1 to 330 Ω. With the source off, identify slide-switch pin 2 (common) and pin 1 (one outer throw).
  2. Join A, B, C and D as listed; leave pin 3 unused. Never bridge the supply or bypass R1.
  3. Select the position that joins pins 2 and 1, run the model, then select the other position to open this path.

Check your build

  • Keep the resistor in series with the LED; LED anode faces the positive feed.
  • Only pin 1 and common pin 2 are wired; selecting unused pin 3 opens the LED path.
  • Measure voltage in parallel, not current across the supply. The Lab's LED and switch have finite modeled resistances, so observed current can differ from 9.09 mA.

Try one change: Swap the switch position without rewiring. Predict whether LED current becomes zero, then compare the supported model observation.

Sources and further reading

Diagrams are simplified teaching illustrations, not measured results or construction plans. See how these guides are prepared.