Calculator
Quick presets:
V
Typical: 1–100 kΩ
PCB trace + pin: ~10–50 pF typical
Typical resistor values by application
| Application | Recommended R | Vcc | Reason |
|---|---|---|---|
| Push button (5V AVR) | 10 kΩ | 5 V | Low current draw, fast enough for buttons |
| Push button (3.3V MCU) | 10 kΩ | 3.3 V | Standard — works for ESP32, STM32, RPi |
| I²C SDA/SCL (100 kHz) | 4.7 kΩ | 3.3 / 5 V | Required pull-up for open-drain I²C bus |
| I²C SDA/SCL (400 kHz) | 2.2 kΩ | 3.3 V | Faster speed needs lower R for rise time |
| I²C SDA/SCL (1 MHz) | 1 kΩ | 3.3 V | Fast mode+ — low R needed |
| Open-drain output | 4.7–10 kΩ | any | Balance speed vs power consumption |
| Reset pin (MCU) | 10 kΩ | 5 / 3.3 V | Weak pull-up to keep MCU running |
| UART RX idle high | 10 kΩ | 3.3 / 5 V | Pull to idle state if line floats |
| Long cable / noisy env. | 1–4.7 kΩ | any | Lower R reduces noise sensitivity |
| Battery-powered device | 100–470 kΩ | 3.3 V | Minimise leakage current |
Pull-up vs Pull-down
Pull-up resistor
- Connects GPIO pin to Vcc through R
- Idle state: GPIO reads HIGH
- Button/switch connects pin to GND
- When pressed: GPIO reads LOW
- Required for open-drain/open-collector outputs (I²C, 1-Wire)
- Most common choice — less noise pickup
Pull-down resistor
- Connects GPIO pin to GND through R
- Idle state: GPIO reads LOW
- Button/switch connects pin to Vcc
- When pressed: GPIO reads HIGH
- Used when active-HIGH input logic is needed
- More susceptible to picking up 50/60 Hz hum
Choosing resistor value
- Too high (>100 kΩ) — slow edges, noise sensitive, may not drive input reliably
- Too low (<1 kΩ) — high current when button pressed, wasted power
- 10 kΩ — good default for buttons at 3.3V and 5V
- For I²C: R × C_bus must allow fast enough rise time
Internal pull-ups
- Arduino/ESP32/STM32 all have built-in pull-ups (~20–50 kΩ)
- Enable with:
pinMode(pin, INPUT_PULLUP) - Internal pull-ups are usually sufficient for buttons
- For I²C or long cables, use external pull-up resistors
- Internal values vary — check your MCU datasheet for exact value