Toggle switches live and watch voltage change, current flow, and logic level update in real time. See exactly what a floating input looks like — and why it's dangerous.
Default = HIGH · Press = LOW
Default = LOW · Press = HIGH
No resistor → undefined logic level
Connects signal to VCC through a resistor. Default state = HIGH. When a switch or open-drain device pulls the line LOW, current flows through R and the voltage drops to 0V (I = VCC/R). Used with active-low signals, buttons that short to GND, and I2C buses.
Connects signal to GND through a resistor. Default state = LOW. When a switch pulls the line to VCC, current flows through R and the voltage rises. Used with active-high signals, buttons that connect to VCC, and boot configuration pins.
A CMOS input draws almost no current — it's high-impedance. With nothing connected, the input "floats" and picks up electromagnetic noise. The gate randomly toggles, causing unpredictable behavior, wasted power (both PMOS and NMOS conducting simultaneously = shoot-through current), and potential latch-up.
Too low (100Ω–1kΩ): Wastes current (milliamps), can overload weak open-drain drivers, generates heat.
Too high (>100kΩ): Slow rise time (RC delay), susceptible to noise, insufficient to overcome leakage.
Sweet spot: 4.7kΩ–47kΩ for GPIO. 1kΩ–10kΩ for I2C.
I2C uses open-drain outputs — devices can only pull SDA/SCL LOW by connecting them to GND through an internal NMOS transistor. They cannot drive the line HIGH. The pull-up resistors are the only mechanism to bring the bus back to HIGH when all devices release the line. This enables the Wired-AND property: if any device holds a line LOW, it stays LOW regardless of what others do. This is how I2C arbitration and clock stretching work.
| Use Case | Type | Typical Value | Reason |
|---|---|---|---|
| Push button → GND | Pull-Up | 10–47 kΩ | Default HIGH, button press → LOW (active-low) |
| I2C SDA / SCL | Pull-Up | 1–10 kΩ | Open-drain bus; must return to HIGH when released |
| UART RX idle | Pull-Up | 10 kΩ | UART idle state is HIGH (mark); prevent noise on undriven line |
| RESET / active-low enable | Pull-Up | 4.7–47 kΩ | Default = not reset (HIGH); pull LOW to assert |
| Push button → VCC | Pull-Down | 10–47 kΩ | Default LOW, button press → HIGH (active-high) |
| Boot config pins | Pull-Down | 10 kΩ | Default boot mode = LOW; strap HIGH to change mode |
| MOSFET gate | Pull-Down | 10 kΩ | Ensure gate = 0V when driver is off; prevent false turn-on |
| SPI CS# (chip select) | Pull-Up | 10 kΩ | CS# is active-low; default = deselected (HIGH) |