The Core Job: Why Microcontrollers Need Defined Logic States
A pullup and pulldown resistor forces a floating microcontroller GPIO pin into a known HIGH or LOW state when no active signal is driving it. Typical values range from 1kΩ to 100kΩ, with 10kΩ being the default for most 3.3V and 5V logic systems. Without these components, an unconnected pin acts as a high-impedance antenna, picking up electromagnetic interference (EMI) and causing erratic logic transitions, phantom interrupts, and increased power consumption as the input buffer rapidly toggles between states.
Modern microcontrollers like the ESP32-WROOM-32 include internal pullup and pulldown resistors (typically around 45kΩ). While internal resistors are convenient for simple button inputs, they are insufficient for noisy environments or high-speed buses. External resistors provide lower impedance paths to the supply rails, overpowering induced noise and ensuring fast edge transitions.
Sizing the Pullup and Pulldown Resistor: A Bench Scenario
Selecting the right resistance is a balancing act between power consumption, noise immunity, and signal rise time. Let us walk through a real-world I2C bus scenario where the math dictates the outcome.
The Setup
You are designing a custom PCB with an ESP32 master and three I2C sensors (BME280, MPU6050, ADS1115). The bus operates at 3.3V. You measure the total bus capacitance (Cb) at 180pF using an oscilloscope and a known test resistor. You want to run the bus in Fast Mode (400kHz).
The Numbers
The I2C specification mandates a maximum rise time (tr) of 300ns for 400kHz operation. The maximum pullup resistance is calculated using the RC charging formula:
Rp(max) = tr / (0.8473 × Cb)
Rp(max) = 300ns / (0.8473 × 180pF) = 1,967Ω
Next, we calculate the minimum resistance based on the maximum allowable voltage drop when the open-drain MOSFET pulls the line LOW. The I2C spec requires VOL(max) to be 0.4V at a sink current (IOL) of 3mA.
Rp(min) = (VCC - VOL) / IOL = (3.3V - 0.4V) / 3mA = 966Ω
The Outcome and What Went Wrong
Based on the math, we selected standard 1.5kΩ external pullup resistors. The prototype worked perfectly on the bench. However, during field testing in an unheated garage (10°C), the I2C bus started throwing NACK errors.
The Diagnosis: We forgot to account for the parallel resistance of the ESP32's internal pullups (enabled by default in the Arduino Wire library) and the sensors' internal protection networks. The parallel combination dropped the effective bus resistance to roughly 1.2kΩ. More critically, at low temperatures, the RDS(on) of the sensors' open-drain transistors increased. With a 1.2kΩ effective pullup, the voltage drop across the transistor exceeded the 0.4V logic LOW threshold, creeping up to 0.6V. The master read a LOW as a HIGH. The Fix: We explicitly disabled the internal pullups in firmware and dropped the external resistors to 1.0kΩ to guarantee a solid LOW state even with cold-soaked transistors.
Physical Resistor Types: Markings, Tolerances, and Substitution
Not all resistors are created equal. The physical construction dictates thermal stability, noise, and parasitic inductance. Here is how to choose the right physical type for your pullup and pulldown resistor needs.
| Type | Construction | Typical Tolerance | Tempco (ppm/°C) | Typical Use Case |
|---|---|---|---|---|
| Carbon Film | Carbon coating on ceramic rod | ±5% | -200 to -800 | General GPIO pullups, non-critical indicators |
| Metal Film (Axial) | Nickel-chromium on ceramic | ±1% to ±0.1% | ±50 to ±100 | Audio circuits, precision ADC pulldowns |
| Thick Film SMD | Ruthenium oxide paste fired on alumina | ±1% to ±5% | ±100 to ±200 | Standard digital logic, I2C/SPI pullups |
| Thin Film SMD | Sputtered nichrome or tantalum nitride | ±0.1% to ±0.01% | ±5 to ±25 | Precision voltage dividers, medical instrumentation |
Decoding the Markings
When scavenging parts or verifying a BOM, you must read the physical codes accurately:
- Axial 4-Band (Carbon): Brown-Black-Red-Gold = 1, 0, ×100, 5% = 1kΩ.
- Axial 5-Band (Metal): Brown-Black-Black-Brown-Brown = 1, 0, 0, ×10, 1% = 1kΩ.
- SMD 3-Digit: '102' = 10 × 10² = 1kΩ.
- SMD 4-Digit: '1001' = 100 × 10¹ = 1kΩ.
- EIA-96 SMD: Uses a 2-digit code + letter. '01C' = 100 (from lookup table) × 10² = 10kΩ.
How to Substitute Safely
When the exact BOM part is out of stock, follow these substitution rules for pullup and pulldown networks:
- Tolerance & Tempco: You can always substitute a tighter tolerance (e.g., using a 1% metal film instead of a 5% carbon film). Never substitute a looser tolerance for precision ADC pulldowns.
- Wattage: You can safely substitute a higher wattage rating (e.g., 1/2W instead of 1/4W), provided it physically fits the PCB footprint.
- Resistance Value: For simple GPIO button pullups, a ±50% deviation (e.g., using 4.7kΩ instead of 10kΩ) is perfectly safe. For I2C buses, you must recalculate the RC time constant; substituting a 10kΩ for a 2.2kΩ I2C pullup will cause the rise time to exceed the spec, corrupting data.
Failure Modes: Visual Symptoms and Bench Diagnostics
Resistors are generally reliable, but they do fail—especially when subjected to thermal cycling, moisture, or over-dissipation. Unlike capacitors which frequently fail short, resistors predominantly fail open or drift high in value.
Visual Symptoms of Failure
A visual inspection under a 10x loupe or microscope can reveal the root cause before you even touch the multimeter:
- Scorched or Bulging Axial Resistors: The epoxy coating cracks, discolors (turns dark brown or black), and the ends bulge. This indicates chronic over-dissipation. The carbon or metal film has literally burned away, usually resulting in an open circuit.
- SMD Micro-Cracks: Thick film SMD resistors subjected to board flexing (like a large PCB screwed into a chassis without adequate standoffs) develop micro-cracks in the ceramic alumina substrate. These cause intermittent opens that change resistance when you press on the board.
- Tombstoning: A surface-mount defect where one pad lifts off the board due to uneven solder paste heating. The resistor stands up on one end. This is an open circuit caused by manufacturing, not electrical stress.
- Silver Migration (Dendrites): In high-humidity environments with a DC bias, silver from the SMD terminations can migrate across the PCB substrate, forming microscopic dendrites. This is the rare case where a resistor network fails short or drifts significantly lower in value, causing phantom logic LOWs on pulldown networks.
Bench Diagnostics: In-Circuit vs. Out-of-Circuit
When troubleshooting a suspected pullup failure, measuring the resistor while it is still soldered to the board (in-circuit) will almost always yield a lower resistance than the marked value. This is because the multimeter's test current flows through parallel paths—like the microcontroller's internal protection diodes, ESD structures, and other ICs on the same net.
The Diagnostic Rule: If an in-circuit reading is higher than the marked value (e.g., reading 15kΩ on a 10kΩ pullup), the resistor has drifted or cracked and must be replaced. If the reading is lower (e.g., reading 6kΩ on a 10kΩ pullup), it might be normal parallel impedance. To confirm, desolder one leg of the resistor (lifting it off the pad) and measure it out-of-circuit. If it still reads 6kΩ out-of-circuit, the component is defective. If it reads 10kΩ out-of-circuit, the resistor is fine, and your low in-circuit reading was caused by a shorted semiconductor elsewhere on the bus.
For deeper reading on I2C bus capacitance and logic thresholds, refer to the SparkFun pull-up resistor tutorial and the official Espressif ESP32 GPIO API documentation for specific internal resistance values and pad drive capabilities.






