If you are wiring a button to a GPIO pin, use a 10kΩ metal film or thick film resistor. If you are building a standard-mode (100kHz) I2C bus, use 4.7kΩ. For fast-mode (400kHz) I2C, drop to 2.2kΩ. Never use wirewound resistors for high-speed digital pull-ups due to parasitic inductance, and never rely on a microcontroller's internal pull-ups for I2C communication—they are far too weak (typically 35kΩ to 45kΩ) to pull the bus high within the required rise-time specifications.
Choosing the correct pull up resistor in microcontroller designs is not just about picking a random value between 1kΩ and 100kΩ. The wrong value will cause I2C data corruption, excessive power draw, or sluggish button debouncing. Below is the definitive bench guide to selecting, reading, and substituting pull-up resistors for embedded systems.
The Direct Answer: Default Values and Part Selection
Before we get into the math, here are the default starting points that will solve 90% of your hobbyist and prototyping needs. For through-hole prototyping, grab a 1/4W metal film resistor. For custom PCBs, use an 0603 or 0805 thick film SMD resistor rated at 1/10W.
- GPIO Buttons/Switches: 10kΩ (Provides a solid logic HIGH while limiting short-circuit current to ~0.5mA at 5V when pressed).
- Standard I2C (100kHz): 4.7kΩ (Balances rise time against bus capacitance up to 200pF).
- Fast I2C (400kHz): 2.2kΩ (Required to overcome bus capacitance and meet the strict 300ns rise time limit).
- SPI Chip Select (CS) Lines: 10kΩ (Keeps the slave deselected during microcontroller boot-up before GPIOs initialize).
Resistor Construction Types: Which Belongs on Your PCB?
Not all resistors are created equal. The physical construction dictates parasitic capacitance, inductance, and thermal stability. Here is how the common types stack up for microcontroller pull-up duties.
| Construction Type | Tolerance | Tempco (ppm/°C) | Typical Pull-Up Use Case |
|---|---|---|---|
| Carbon Composition | ±5% to ±20% | -200 to +1000 | Avoid. High noise, massive drift. Only found in vintage audio or high-voltage pulse circuits. |
| Carbon Film (THT) | ±5% | -200 to -800 | Okay for basic buttons. Cheap, but generates more thermal noise than metal film. |
| Metal Film (THT) | ±1% | ±50 to ±100 | Excellent for breadboards. Low noise, highly stable. The default choice for through-hole GPIO and SPI pull-ups. |
| Thick Film (SMD) | ±1% to ±5% | ±100 to ±200 | The PCB standard. Used in 99% of commercial SMD boards. Perfectly adequate for I2C and GPIO pull-ups. |
| Thin Film (SMD) | ±0.1% | ±10 to ±25 | Overkill for pull-ups. Use these for ADC voltage dividers or precision op-amp feedback, not digital logic pull-ups. |
| Wirewound | ±1% | ±20 | Never use for digital pull-ups. The coiled wire acts as an inductor, destroying high-speed I2C/SPI signal edges. |
Decoding the Markings: SMD and THT Resistor Codes
When you are scavenging parts from a bin or verifying a BOM before reflow soldering, you need to read the physical markings. Here is how to decode them without guessing.
Through-Hole Color Bands
For a 10kΩ metal film resistor, you will see four bands: Brown, Black, Orange, Gold. Brown (1), Black (0), Orange (multiplier 10³), Gold (±5% tolerance). For a 4.7kΩ, it is Yellow, Violet, Red, Gold.
SMD 3-Digit Code (Standard E24)
Used on 5% and 1% SMD resistors. The first two digits are the significant figures, and the third is the multiplier (number of zeros).
- 103 = 10 × 10³ = 10,000Ω (10kΩ)
- 472 = 47 × 10² = 4,700Ω (4.7kΩ)
- 222 = 22 × 10² = 2,200Ω (2.2kΩ)
SMD 4-Digit Code (Precision E96)
Used on 1% or tighter tolerances. The first three digits are significant, the fourth is the multiplier.
- 1002 = 100 × 10² = 10,000Ω (10kΩ)
- 4701 = 470 × 10¹ = 4,700Ω (4.7kΩ)
EIA-96 Code (Tiny 0402 and 0603 Packages)
When the part is too small for 3 digits, manufacturers use the EIA-96 standard: two digits representing a lookup code, followed by a letter for the multiplier. According to the EIA-96 standard tables, '01' equals 100. 'C' is the multiplier for 10².
- 01C = 100 × 100 = 10,000Ω (10kΩ)
- 68X = 499 × 10⁻¹ = 49.9Ω (Not a pull-up, but good to know the 'X' means 0.1)
Failure Modes and Visual Symptoms on the Bench
Pull-up resistors rarely fail under normal digital logic conditions because the power dissipation is tiny (a 4.7kΩ resistor on a 3.3V I2C bus dissipates less than 2.5mW). However, they can fail due to mechanical or assembly defects. Here is what to look for when debugging a dead I2C sensor or a floating GPIO pin.
| Failure Mode | Visual Symptom | Electrical Result |
|---|---|---|
| Tombstoning (SMD) | One end of the SMD resistor is lifted off the pad, standing up like a gravestone. | Open circuit. The GPIO pin floats, causing erratic button reads or I2C bus lockups. |
| Solder Wicking | Solder has crept up the lead of a THT resistor or under the SMD component body. | Poor thermal/mechanical connection. Intermittent contact when the board flexes or heats up. |
| Thermal Overload | Discoloration of the PCB substrate (browning) or a burnt, cracked epoxy coating on a THT resistor. | Resistance drifts drastically high or fails open. Usually caused by a wiring fault pulling high current through the pull-up. |
| Flux Entrapment | No visible damage, but sticky, dark residue under the SMD part. | Leakage current across the pads. In high-impedance analog circuits this is fatal, but for digital pull-ups, it rarely causes logic errors unless the bus is extremely noisy. |
The Pull-Up Decision Tree: From I2C to GPIO Buttons
Stop guessing and follow this decision path to terminate on the exact part you need for your current project.
| Condition / Application | Constraint / Calculation | Concrete Pick (Value & Type) |
|---|---|---|
| Mechanical Switch to GPIO | Needs to overcome EMI, but minimize battery drain when pressed. | 10kΩ (0603 Thick Film SMD or 1/4W Metal Film THT) |
| I2C Bus (Standard 100kHz) | Bus capacitance < 200pF. Rise time limit = 1000ns. | 4.7kΩ (0603 Thick Film SMD, 1% tolerance) |
| I2C Bus (Fast 400kHz) | Bus capacitance < 400pF. Rise time limit = 300ns. (See TI App Note SLVA689 for exact RC math). | 2.2kΩ (0603 Thick Film SMD, 1% tolerance) |
| SPI Chip Select (CS) | Must hold line HIGH during MCU boot before GPIOs are configured as outputs. | 10kΩ to 47kΩ (0603 Thick Film SMD) |
| ESP32 / Arduino Internal | Silicon internal pull-ups are typically 35kΩ - 45kΩ. | Use ONLY for simple buttons. Never use for I2C or long wires. |
Safe Substitution: When You Don't Have the Exact Value
You are at the bench, the I2C sensor isn't ACKing, and your oscilloscope shows the SDA line rising too slowly. You need a 2.2kΩ pull-up, but your kit only has 4.7kΩ and 10kΩ. How do you substitute safely?
1. The Parallel Trick for I2C
Resistors in parallel decrease total resistance. If you place two 4.7kΩ resistors in parallel, the math is: (4700 × 4700) / (4700 + 4700) = 2350Ω. This is close enough to 2.2kΩ to successfully pull up a 400kHz I2C bus. You can solder a second SMD resistor directly on top of the first, or twist two THT leads together on the breadboard.
2. Wide Margins for GPIO Buttons
Digital logic inputs (CMOS) have incredibly high impedance (often >10MΩ). A pull-up resistor for a button doesn't need to be exactly 10kΩ. Anything from 4.7kΩ to 47kΩ will reliably pull the pin to VCC without causing logic errors. If you only have 47kΩ, use it. The only trade-off is slightly higher susceptibility to electromagnetic interference (EMI) on very long wires, and a marginally lower current draw (which is actually better for battery life).
3. When to Rely on Internal Pull-Ups
Modern microcontrollers like the ESP32 and ATmega328P (Arduino Uno) feature internal software-configurable pull-up resistors. According to the Espressif ESP32 Hardware Design Guidelines, the internal pull-up is roughly 45kΩ. This is perfectly fine for a tactile button on a short trace. However, you must never use internal pull-ups for I2C. The 45kΩ resistance combined with the parasitic capacitance of the wires and sensor modules will result in an RC time constant that completely destroys the I2C rise-time specification, leading to NACK errors and bus lockups. Always add external 4.7kΩ or 2.2kΩ physical resistors for I2C.
By treating the pull-up resistor as a critical timing and stability component rather than an afterthought, you eliminate an entire class of 'ghost in the machine' embedded debugging headaches. Stick to thick film SMDs for PCBs, metal film for breadboards, and always calculate your I2C rise times against your bus capacitance.






