Engineering
Lesson 06 · Beginner · 10 min read

Pull-up and pull-down resistors: why inputs need them

Pull-up and pull-down resistors explained: floating digital inputs, button circuits, internal pull-ups, open-drain and I2C buses, and how to choose resistor values.

The floating input problem

A digital input draws almost no current. If nothing drives it, for example a button that is not pressed, it picks up noise from the environment and reads random 0s and 1s. Touching the wire with a finger can change the reading. This is called a floating input.

The fix

A pull-up resistor connects the input to the supply, so it reads HIGH by default; the button connects it to ground to read LOW. A pull-down does the opposite. The resistor is large enough to limit current when the button is pressed, and small enough to beat the noise.

PULL-UPPULL-DOWN3.3 VR10 kΩGPIObuttonreleased = HIGH, pressed = LOW3.3 VbuttonGPIOR10 kΩreleased = LOW, pressed = HIGH
FIG. 1 — Without the resistor the input floats and reads random values. With it, the pin always has a defined level.

Choosing the value

SituationTypical valueWhy
Button on a GPIO10 kΩ0.33 mA when pressed at 3.3 V; robust against noise
Battery device, sleeping47 kΩ – 100 kΩLess current wasted while the button is held
I²C at 100 kHz / 400 kHz4.7 kΩ / 2.2 kΩFaster edges for faster buses and more devices
Reset or enable pin10 kΩCheck the datasheet: some chips already include one
MOSFET gate pull-down100 kΩKeeps the transistor off while the MCU boots

Internal pull-ups

Most microcontrollers have pull-ups (and often pull-downs) you enable in software, typically 20 to 50 kΩ. They are fine for a button close to the chip. For long cables, noisy environments, I²C buses or anything that must be defined before the software starts, use an external resistor.

Open-drain outputs

Some outputs can only pull a line LOW; they let go to go HIGH. I²C, many interrupt lines and alert pins work this way. Without a pull-up they never go HIGH at all, which is one of the most common reasons a first I²C circuit does not work.

Where it gets serious

Pull resistors become design decisions when several devices share a line, when a signal must hold a state during power-up and reset, or when a battery device must sleep at microamps. Those states are defined and checked in our schematic reviews.

Hand it to our lab →

Parts and tools to practise

Parts and tools to practise
ItemWhat to look forBuy
Resistor assortment, 1 % metal filmE24 or E12 values from 10 Ω to 1 MΩ, 1/4 W. Sorted in labelled bags or a box.View on Amazon ↗
Solderless breadboard kit with jumper wiresFull-size breadboard, pre-cut jumpers and flexible Dupont wires.View on Amazon ↗
ESP32 or similar development boardTo try pull-ups, ADC readings, buses and PWM for real.View on Amazon ↗
Digital multimeterAuto-range with continuity beeper, CAT III rated. You will use it every day.View on Amazon ↗
USB logic analyser, 8 channelsDecodes UART, I²C and SPI on your computer. Essential for bus problems.View on Amazon ↗

Links go to Amazon. As an Amazon Associate we earn from qualifying purchases, at no extra cost to you. We only list tools of the kind we use on our own bench.

Send us what you have. We tell you what it takes to finish it.

Answer five questions and see an indicative budget in two minutes. When you are ready, sign our NDA, upload your documentation and get a fixed quote. Everything by e-mail, with a call whenever you prefer.

Get an estimateContact an engineer
Get an estimate