Table of Contents

Pull-Up Resistor: Value Selection for GPIO and I2C

Conceptual pull-up resistor, microcontroller and signal paths for GPIO and I2C value selection

Technical guide · Updated October 8, 2026 · Worked examples are calculations, not bench measurements.

A pull-up resistor connects a digital signal to a positive supply so the signal defaults to HIGH when no device drives it LOW. Its resistance must be low enough to meet logic and timing limits, yet high enough to keep current within the driver’s capability. A pull-down resistor provides the opposite default: LOW.

A microcontroller button input and an I²C bus can both need pull-ups, but they have different selection limits. This guide explains the wiring, compares internal and external bias, and works through resistor-value calculations before you put the part on a production BOM.

What does a pull-up resistor actually do?

A pull-up establishes a default voltage on a node that would otherwise be undriven. The input reads that voltage; the resistor does not command the firmware to return a particular value. Check the pin’s electrical mode and logic thresholds as well as the resistor connection.

With a switch open, the node sits close to the pull-up supply, subject to leakage. Closing a switch to ground creates a current path through the resistor and moves the node toward LOW. The resistor limits current in that path. Wiring the same switch directly between the supply and ground would bypass that protection.

A pull-up is a circuit role, not a special resistor technology. An ordinary fixed resistor can serve as a pull-up or pull-down depending on its connection. Package, tolerance, working voltage, and power rating still belong in the part specification.

Floating CMOS inputs and slow transitions can increase supply current or cause unstable behavior. The practical check is to keep an input inside valid voltage and transition limits, as discussed in TI’s guidance on slow or floating CMOS inputs. A larger resistor saves current when the node is held LOW, but also gives leakage and coupled interference more influence over its voltage.

Pull-up vs pull-down resistor: which wiring should you use?

Choose the direction from the required idle state. Use a pull-up for an idle HIGH input with a switch to ground. Use a pull-down for an idle LOW input with a switch to the valid input supply. The active state then reverses, so firmware must use the matching polarity.

Button-input wiring with a compatible logic supply
CheckPull-up resistorPull-down resistor
Resistor connectionSignal node to positive logic supplySignal node to ground
Switch connectionSignal node to groundSignal node to positive logic supply
Switch openHIGHLOW
Switch closedLOW; active-low inputHIGH; active-high input
Main verificationHIGH threshold and LOW-state currentLOW threshold and HIGH-state current

These states agree with Arduino’s digital pin mode documentation. They assume a functioning switch, common ground, and a supply permitted by the input datasheet.

Pull-up and pull-down resistor wiring with opposite default input states
Pull-up wiring defaults HIGH; pull-down wiring defaults LOW. Both diagrams show the switch open.
Different task: I²C. Conventional open-drain SDA and SCL signals need to return HIGH after a device releases them. Replacing their pull-ups with pull-downs does not perform that function.

How do you choose a pull-up resistor value for a GPIO input?

Check both ends of the allowable resistance range. A resistor that is too small increases current while the node is LOW. A resistor that is too large can leave too little HIGH-state margin once input leakage, other connected components, and required response time are included.

  1. Collect the actual limits. Record the supply range, guaranteed HIGH and LOW thresholds, worst-case leakage, pin mode, temperature range, and the current permitted in the LOW state.
  2. Check the idle voltage. For a simplified pull-up with leakage toward ground, require Vnode = VPU − Ileak,totalR to stay above VIH,min. Include all leakage paths, not only the MCU pin.
  3. Check the active-state current. With an ideal closed switch to ground, I = VPU/R and resistor dissipation P = VPU2/R. With a semiconductor driver, use its specified LOW voltage and sink capability.
  4. Check tolerance and timing. Use the smallest possible resistance for the current check and the largest for leakage and RC checks. Validate noise margin and input transition requirements on the assembled circuit.
Simplified pull-up leakage bound: R ≤ (VPU,min − VIH,min) / Ileak,total,max
Simplified pull-down leakage bound: R ≤ VIL,max / Ileak,total,max

For the first bound, VIH,min means the guaranteed HIGH threshold required at the supply and temperature corner being checked. For the second, use leakage that sources current into the node and the corresponding guaranteed LOW threshold. These equations describe static leakage only; they do not establish acceptable noise immunity or switching speed.

Illustrative GPIO calculation: assume a fixed 3.3 V supply, a required HIGH threshold of 2.31 V, and total leakage of 1 µA toward ground. A 10 kΩ pull-up loses 0.010 V to leakage, so its predicted idle voltage is 3.29 V. When an ideal switch closes, current is 0.33 mA and dissipation is 1.089 mW. These are assumed design inputs, not specifications for a named microcontroller.

Calculated at 3.3 V with an ideal closed switch to ground
ResistanceLOW-state currentResistor dissipationWhat to review
4.7 kΩ0.702 mA2.32 mWHigher current; smaller voltage shift for a given leakage current
10 kΩ0.330 mA1.089 mWCheck the actual thresholds, response time, and noise environment
47 kΩ0.0702 mA0.232 mWGreater sensitivity to leakage and node capacitance
100 kΩ0.0330 mA0.109 mWLower active-state current; verify idle-state margin carefully
Pull-up resistor current comparison at 3.3 volts for 4.7, 10, 47 and 100 kilohms
Current and power are calculated for the stated switch circuit. The table is not an I²C resistor recommendation.

A held button can keep drawing bias current throughout its active time. For a battery-powered design, multiply that current by the expected active duty cycle rather than assuming the resistor consumes the same power in both switch states.

Can you use the microcontroller’s internal pull-up?

Use an internal pull-up when its guaranteed strength and enabled states satisfy the input requirement. An external resistor is useful when you need a controlled value, a bias during a state where the internal pull is unavailable, or a resistance chosen for a specific interface load.

Arduino’s UNO Rev3 documentation lists 20–50 kΩ internal pull-ups on its ATmega328-based digital pins. That range belongs to that documented board family; it is not a universal specification for every Arduino or MCU. Do not model a wide internal range as an exact 10 kΩ component.

Configuration also matters. Microchip’s GPIO overview describes input and output modes and the role of pull-up and pull-down bias. Confirm that your selected pin is configured as a digital input, then check the corresponding registers in your own device documentation.

Questions to resolve before removing an external resistor from the BOM
RequirementInternal pull-up reviewExternal resistor review
Simple local buttonConfirm input mode, pull enable, and valid logic marginsSpecify a value if the internal limits do not meet the requirement
Defined state during reset or sleepRead the pin’s documented reset and low-power behaviorCheck whether the bias supply remains present in those states
Open-drain busProve that the full pull-strength range meets current and rise-time limitsChoose the resistance from the interface’s electrical limits
Cable or exposed connectorEvaluate leakage, capacitance, and interference at the inputEvaluate the complete input network, including protection or filtering
Internal versus external pull-up decision guide for buttons, reset states and open-drain buses
Selection depends on the pin’s documented behavior and the circuit requirement, including power-up and low-power states.

An external resistor connected to an unpowered rail is not automatically a valid bias source. Review power sequencing and permitted pin voltages. For broader device requirements, see our microcontroller selection guide.

How do you calculate an I²C pull-up resistor?

For a passive I²C pull-up, the driver’s sink capability sets a minimum resistance and the bus rise-time limit sets a maximum. Calculate the range for each line, include every installed pull-up, and choose a value that stays within it at the relevant component and supply corners.

TI application report SLVA689 gives the following bounds for the passive RC model. The rise-time factor 0.8473 describes the 30%–70% transition of an exponential RC edge.

Rmin = (VPU,max − VOL,max) / IOL
Rmax = tr,max / (0.8473 × Cbus,max)
Predicted 30%–70% rise time: tr = 0.8473 × Reffective × Cbus

Use a guaranteed sink current IOL at the allowed LOW voltage VOL,max for the weakest connected driver. Cbus includes the connected devices, wiring, and measurement loading. The model needs review if buffers, active rise-time accelerators, or other non-passive circuitry are present.

NXP’s UM10204 specification, Rev. 7.0, Table 11 gives a maximum rise time of 300 ns for Fast-mode I²C, which supports clock frequencies up to 400 kHz. Clock rate alone does not tell you the required resistance: capacitance changes the upper bound.

This calculated Fast-mode I²C example assumes a fixed 3.3 V pull-up supply, 100 pF capacitance per line, a 300 ns maximum rise time, and a driver guaranteed to sink 3 mA at 0.4 V. The passive model gives a minimum resistance of 967 Ω and a maximum of 3.54 kΩ. A 2.2 kΩ resistor predicts a 186 ns rise time, while 4.7 kΩ predicts 398 ns and exceeds the stated timing limit. At ±5% tolerance, the 2.2 kΩ component ranges from 2.09 to 2.31 kΩ, still inside those fixed bounds. These results make 2.2 kΩ a candidate for verification, not a universal I²C value. Replace the assumptions with your actual supply limits, weakest driver capability, installed capacitance, and temperature conditions. Count parallel pull-ups on every module and verify both SDA and SCL on the assembled bus. This is not a measured board.

Passive RC calculation using the example assumptions above
ResistancePredicted rise timeResult for the stated bounds
2.2 kΩ186 nsWithin both nominal bounds; a candidate for verification
4.7 kΩ398 nsExceeds the 300 ns limit in this example
10 kΩ847 nsExceeds the 300 ns limit in this example
I2C pull-up example with a 967 ohm to 3.54 kilohm range and rise times at 100 picofarads
The acceptable window is calculated for one stated example. A different supply, driver, capacitance, or bus mode changes it.

Multiple pull-ups combine in parallel. Two 4.7 kΩ resistors on the same line and supply produce 2.35 kΩ effective resistance; four produce 1.175 kΩ. Count pull-ups on modules and daughterboards before adding another one. Check both SDA and SCL, then verify their LOW levels and rising edges on the completed system. See also I²C vs SPI EEPROM selection.

Why does an input still fail after adding a pull-up?

Measure the failing state before changing the resistor. An unexpected reading can come from incorrect pin configuration, a wrong supply, slow edges, switch bounce, or an extra load. A single DC measurement cannot show all of those faults.

Checks to make while the fault is present
SymptomFirst checkNext action
Released button reads randomlyVoltage at the pin; resistor connection; input and pull-enable registersVerify the default voltage against the input thresholds
One press creates several eventsWaveform during the press and releaseIf contacts bounce, add an appropriate debounce method
I²C fails after another module is addedEffective resistance, total load, LOW voltage, and rise timeRecalculate the bounds for the assembled bus
Input is correct only after startupPin voltage and configuration throughout resetProvide the documented startup bias requirement
Battery drain rises while a switch is heldCurrent through the active pull-up pathInclude active duration and leakage in the power budget

Two frequent mistakes deserve a separate check. A pull-up does not debounce a mechanical switch. It also does not make a 3.3 V input automatically tolerant of a 5 V pull-up supply. Check the input’s permitted operating voltage and powered-off conditions before choosing that rail.

Pull-up resistor review sequence from pin mode and logic voltage to current, timing and BOM specifications
Review the electrical requirement before changing a resistor value or approving a replacement part.

What should a pull-up resistor BOM entry include?

Specify the physical component and its permitted substitution limits. “10 kΩ pull-up” describes a function and a nominal value, but it does not identify an orderable part or prove that another package or tolerance is acceptable.

  • Resistance and tolerance: approved nominal value and permitted minimum/maximum, including any temperature drift relevant to the calculated margin.
  • Package: footprint and mounting type; identify the size convention explicitly, such as 0603 imperial / 1608 metric.
  • Electrical ratings: rated power, working voltage, and any manufacturer derating needed for the operating temperature.
  • Part identity: manufacturer part number, reference designator, quantity, and approved alternatives.
  • Circuit conditions: bias supply and startup behavior; for I²C, mode, estimated capacitance, and effective installed pull-up resistance.

If a replacement changes tolerance or package, rerun the relevant bounds and footprint checks. A part with the same nominal resistance can still fall outside the approved electrical or assembly requirement. This is where a resistor selection note helps purchasing preserve the design intent.

Prepare the resistance, tolerance, package, and approved part numbers before requesting sourcing help. Include the MCU or interface IC in a multi-part inquiry so the electrical assumptions are clear.

Browse ResistorsUpload BOM / Request Quote

Use the inquiry to confirm the requested parts, available options, price, and lead time for your project.

Pull-up resistor FAQ

Is 10 kΩ always the right pull-up resistor value?

No. Check the input thresholds, leakage, current budget, and timing. A 10 kΩ resistor produces a calculated 847 ns rise time at 100 pF in the passive RC example above, exceeding its 300 ns limit.

Can the same resistor be a pull-up or a pull-down?

Yes. The connection determines the role: signal to a positive logic supply for a pull-up, or signal to ground for a pull-down. Its value and physical ratings must suit the resulting circuit.

Does a smaller pull-up resistor mean a stronger pull-up?

Yes, for the same supply: a smaller resistance can deliver more current. It reduces the voltage shift caused by a given leakage current, while increasing LOW-state current. Check that the driver can still achieve a valid LOW.

Do all microcontrollers have internal pull-down resistors?

No universal pin feature should be assumed. Read the exact device’s pin configuration and electrical tables for pull-up and pull-down availability, strength, reset state, and low-power behavior.

Can I replace I²C pull-ups with the MCU’s internal pull-ups?

Only if their full guaranteed range meets the bus’s electrical and timing limits in every required state. Calculate effective resistance and rise time, including connected modules, then verify the assembled interface.

Technical sources and calculation method

This guide uses manufacturer and platform documentation for electrical principles. Numerical tables are original calculations using the stated assumptions and rounded results. They are not laboratory measurements or a qualification of a specific board.