Push Button and LED Circuit
Run the Push Button and LED Circuit MicroSim Fullscreen
You can include this MicroSim on your own website with this iframe:
1 | |
About this MicroSim
Three identical branches sit on one breadboard. Each has a push button, a 220 Ω current-limiting resistor, and an LED. Press a button and that branch's circuit closes: dots start moving along its wires and its LED lights up.
The three branches are identical except for the LED color, and that is the point. A red, a green, and a blue LED share the same supply and the same resistor but draw different currents, because each color has a different forward voltage.
The Circuit
Each branch traces the same path from the positive rail at the top of the board down to ground at the bottom:
T+1 (positive rail, top) → red wire → d1
→ SW1, straddling the center channel from e1 to f3 → j3
→ R1 220Ω → j6
→ D1, anode g6 to cathode g8 → j8
→ black wire → B-8 (ground rail, bottom)
The supply itself frames the board: its red lead goes to the + rail along the
top edge and its black lead to the − rail along the bottom edge. Nothing at all
is connected to the other two rails. That is deliberate — it means every branch
runs strictly downhill, and the dots you watch always enter at the top of the
board and leave at the bottom.
Each push button is a 6 mm tactile switch, and like the real part it covers
three columns: its legs sit in rows e and f of the outer two columns and
its body sits over the middle one. SW1 starts at the board's left edge, so it
owns columns 1–3 and nothing can ever go in column 2. The wires always attach to
a diagonal pair of legs — e1 to f3 here — because the two legs on the
same side of the center channel are joined inside the switch whether or not it is
pressed.
| Component | Value | Purpose |
|---|---|---|
| BAT | 3–9 V, slider | supply; fixes the rail voltages |
| SW1, SW2, SW3 | momentary | close each branch while held |
| R1, R2, R3 | 220 Ω | limit current to a safe level for the LED |
| D1, D2, D3 | red, green, blue | the output, brightness follows current |
Why 220 Ω?
At 5 V with a red LED, the resistor sees the supply minus the LED's forward voltage: (5 − 1.9) / 235 ≈ 13 mA. That is comfortably inside the 20 mA a standard 5 mm LED is rated for. Raise the supply to 9 V and the same resistor lets through about 30 mA — over the limit, which is exactly what the slider lets students discover.
How to Use It
- Press Start so the animation and the plot begin running.
- Click a button on the board, or press the 1, 2, or 3 key, and hold it. Watch the dots move and the LED light.
- Move the Supply voltage slider while holding a button and watch the current on the scope change with it.
What the Animation Shows
The moving dots are current. They travel from the positive rail toward ground (conventional current), and their speed is proportional to the actual current — a dimmer LED visibly moves fewer dots. The milliamp readout under the board and the traces on the scope come from the same circuit solution, so the picture and the arithmetic always agree.
Lesson Plan
Grade Level, Subject and Topic
Middle school and high school. Electronics. Complete circuits, Ohm's law, and LED forward voltage.
Learning Objective
Students will be able to explain why a series resistor sets the current in an LED circuit by changing the supply voltage and reading the resulting current.
Activities
Predict, then test
Before pressing anything, ask: with all three buttons up, how much current flows? (None — every branch is an open circuit.) Then press one button and ask what changes about the other two branches. (Nothing. They are independent parallel branches.)
Check the arithmetic
Have students compute the expected current with I = (V − Vf) / R for the red
LED at 5 V, then hold button 1 and compare with the readout. Then set the supply
to 7 V, predict the new current, and check.
Compare the colors
Hold all three buttons at once. Why does the blue LED draw the least current with the same resistor and the same supply? (Its forward voltage is 3.1 V, so less voltage is left across the resistor.) At what supply voltage does the blue LED stop lighting at all?
Assessment
- If you removed R1 entirely, what would happen to D1, and why?
- Two of the three LEDs are lit. How much current is the battery supplying?
- You want the red LED to run at 10 mA on a 5 V supply. What resistor do you need?
Model Limitations
This simulation solves the circuit in DC steady state. It does not model transient behavior, capacitance, inductance, AC, diode I-V curves, or transistor gain. Component values are ideal — no tolerance, no temperature effects, and no wire resistance.
References
- Solderless Breadboard Layout — how the rows, columns and rails are wired
- LED and Resistor Calculator — pick a resistor for a target current