PerfBoardSign in

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.

Component side layout of Why every button needs this resistor on a perfboard 16 by 28 holes
16 × 28 holes · 9 parts · 12 wires

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 sheet

What you need

9 parts on a perfboard 16 × 28 holes, plus hookup wire.

QtyPartWhere 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.

WireColour and netLength
6
BlackIN
E12 → G9
23mm
12
BlackGND
M11 → G21
51mm
11
BlueGND
K9 → L10
14mm
5
Blue5V
J5 → K14
35mm
4
Green5V
C3 → J3
28mm
10
GreenGND
K2 → J8
33mm
1
RedCOL
K24 → H24
18mm
7
RedIN
H8 → M8
23mm
3
White5V
C8 → C5
18mm
9
WhiteGND
D3 → K3
28mm
8
YellowIN
L9 → L5
20mm
2
YellowBASE
E19 → F23
23mm

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