Why every button needs this resistor
Why a button input needs a pull-up: a 10k resistor holds the input high until you press, and an LED shows the state.

Free build sheet
The parts, every wire with its length and bend points, a bend guide, both sides of the board and checkboxes to track your progress. Print it or keep it open at the bench.
Open the build sheetWhat you need
9 parts on a perfboard 16 × 28 holes, plus hookup wire.
| Qty | Part | Where to buy |
|---|---|---|
| 1 | Ceramic Cap100nF C1 | Buy Ceramic Cap on Amazon |
| 1 | Power Input (2-pin) J1 | |
| 1 | Signal+Power Header (3-pin) J2 | |
| 1 | Screw Terminal 2P (5.08mm) J3 | |
| 1 | LED LED1 | Buy LED on Amazon |
| 1 | NPN Transistor (TO-92) Q1 | Buy NPN Transistor (TO-92) on Amazon |
| 2 | Resistor (axial)10k R1, R2 | Buy Resistor (axial) on Amazon |
| 1 | Resistor (axial)330 R3 | Buy Resistor (axial) on Amazon |
Check every pin against the datasheet of the exact part in your hands before wiring.
As an Amazon Associate I earn from qualifying purchases.
Cut list
12 wires, 312 mm (12.3 in) in total, in the order the build sheet cuts them. Wire numbers match the build sheet. Each length includes 5 mm per end to go through the hole.
| Wire | Colour and net | Length | ||
|---|---|---|---|---|
| 6 | BlackIN E12 → G9 | E12 → G9 | 23mm | 13mm (90°) |
| 12 | BlackGND M11 → G21 | M11 → G21 | 51mm | 30mm (90°) |
| 11 | BlueGND K9 → L10 | K9 → L10 | 14mm | Straight |
| 5 | Blue5V J5 → K14 | J5 → K14 | 35mm | 8mm (90°) |
| 4 | Green5V C3 → J3 | C3 → J3 | 28mm | Straight |
| 10 | GreenGND K2 → J8 | K2 → J8 | 33mm | 10mm (90°), 25mm (90°) |
| 1 | RedCOL K24 → H24 | K24 → H24 | 18mm | Straight |
| 7 | RedIN H8 → M8 | H8 → M8 | 23mm | Straight |
| 3 | White5V C8 → C5 | C8 → C5 | 18mm | Straight |
| 9 | WhiteGND D3 → K3 | D3 → K3 | 28mm | Straight |
| 8 | YellowIN L9 → L5 | L9 → L5 | 20mm | Straight |
| 2 | YellowBASE E19 → F23 | E19 → F23 | 23mm | 15mm (90°) |
About this build
A pushbutton input done right. With the button open and no resistor, an input isn't high or low. It floats and picks up noise. A 10k pull-up holds the input at a solid high, and pressing the button ties it to ground through that same resistor, at 0.5 mA.
A 100nF ceramic on the input smooths out contact bounce. A PN2222A NPN transistor and an LED with a 330 ohm resistor show the state right on the board, and the input also leaves on a 3 pin header so a microcontroller can read it.
The button itself is off the board, on a 2 pin screw terminal. The transistor is a TO-92 part and lead orders vary, so wire it from the build sheet and the PN2222A datasheet.
More builds
See all builds
VideoOne resistor and one capacitor set every timer in electronics
Press a button and an LED stays lit for about 1.1 seconds, set by one resistor and one capacitor. Swap the resistor to change it.
9 parts · 15 wires
Timers and logic
VideoDice that roll themselves, from two chips
Hold the button and a seven LED die face flickers through faces. Let go and it stops on one. A 555, a counter and six diodes.
25 parts · 36 wires
Games and toysTimers and logic
VideoA metronome you can see, and hear, from one 555
A metronome from one 555 timer: an LED flashes and a buzzer clicks on every beat, from about 36 to 206 beats a minute.
11 parts · 18 wires
Guitar and audioTimers and logic