The short answer
A pull-up connects a signal input weakly to its supply so an open switch reads high; a closed switch to ground pulls it low. It defines a logic level, not power for a load.
On this page
Why an open contact needs help
A digital input is usually high impedance: it draws little current and does not establish its own reliable voltage. With a switch between the input and ground, an open contact leaves the input floating unless something else sets its level. Noise, leakage, or touching the wire can then change a reading. Add a resistor from the input node to its permitted logic supply. With the switch open, the resistor pulls that node toward the supply; when the switch closes, the node connects toward ground. This is called an active-low input because pressed or closed corresponds to low.
Connect all three things to one signal node
Join one end of the pull-up, the input pin, and one switch terminal at the same node. Connect the other resistor end to the input's allowed supply, and the other switch terminal to the circuit's ground reference. An input connected to the wrong side of the resistor will not sense the switch as intended. On a breadboard, inspect which five-hole strip holds each lead and whether the power rail is split. A switch with four legs can have pairs already connected internally; check its contact layout before assuming adjacent pins change state.
- Identify the input's permitted supply and shared ground.
- Trace the resistor from supply to input node, and switch from input node to ground.
- With power removed, confirm switch continuity in both positions before powering the circuit.
Worked example: 3.3 V and 10 kΩ
Assume a regulated 3.3 V logic supply, a 10 kΩ pull-up, a nearly ideal switch and negligible wire resistance. When the switch closes, approximately 3.3 V falls across the resistor, so current is 3.3 V / 10,000 Ω = 0.00033 A = 0.33 mA. Approximate resistor dissipation is 3.3 V × 0.33 mA = 1.09 mW. With the switch open, the simple ideal model draws no current through the resistor; real input leakage and other connected devices can draw some. The switch should read near 0 V when closed only if the ground connection is sound.
Check leakage, thresholds, and speed
A weaker pull-up (larger resistance) wastes less closed-switch current but allows more voltage error from input leakage, board contamination, or a long noisy wire. For example, 1 µA of leakage through 10 kΩ can shift the open-node voltage by about 0.01 V in a simplified DC model. The receiving input's data sheet specifies guaranteed high and low threshold ranges and leakage; do not assume every 3.3 V input shares one threshold. Wire and pin capacitance also slow the rising edge with a large resistor. A stronger pull-up costs more current when the switch closes. Check all devices sharing the node rather than copying a value blindly.
If the input reads backwards or randomly
First check whether the logic is inverted in the code: high means open and low means closed in this wiring. If it stays low, inspect a short to ground or a switch leg that is permanently connected. If it stays high, check the switch ground and whether its contacts really close. If it flickers open, measure voltage from the input to its own ground reference and inspect the pull-up connection, supply, and physical layout. Mechanical bounce at transitions is a separate problem; a pull-up alone does not guarantee one clean edge per press.
A bias resistor is not a load supply
Do not use the pull-up node to power a lamp, motor, or other significant load. Such a load draws current through the resistor and can drag the input below its guaranteed high threshold. Some chips offer internal pull-ups, but their values and availability vary; check the specific device rather than assuming a 10 kΩ internal part. Never connect a 5 V pull-up to a 3.3 V-only input unless the device documentation explicitly permits it. These examples concern isolated low-voltage logic, not mains switching or safety-rated sensing.
Sources and further reading
- SparkFun: Pull-up Resistors
- SparkFun: Logic Levels
- OpenStax College Physics 2e: Ohm’s Law: Resistance and Simple Circuits
Diagrams are simplified teaching illustrations, not measured results or construction plans. See how these guides are prepared.