A pull-up resistor connects a signal to its logic supply so an undriven input defaults to HIGH. A pull-down resistor connects it to ground so it defaults to LOW. Both prevent a microcontroller input from floating, while allowing a switch or another device to override that default state. Use a supply voltage compatible with the input, such as 3.3V or 5V depending on the device.
To more clearly highlight the distinctions between pull-up and pull-down resistors, I'll present a side-by-side comparison in the table below:
In Arduino, pinMode(pin, INPUT) configures a GPIO pin to read a digital signal. digitalRead(pin) returns HIGH or LOW according to the microcontroller’s input-voltage thresholds—not a universal 5V rule. An unconnected input can float, and a voltage between the specified LOW and HIGH thresholds is undefined. Check the board’s logic voltage before connecting external signals.
For a simple switch input, 4.7kΩ or 10kΩ is a common starting point, not a universal requirement. Choose the resistance by checking input leakage, logic thresholds, noise, and the current that flows when the switch overrides the resistor. Faster signals also require attention to capacitance and rise time.
When connected in a circuit, the resistor pulls the voltage across the pin to a known level. For example, with a pull-up resistor, a digitalRead on an Arduino GPIO pin will return HIGH unless actively driven low. This ensures a stable logic level, thus making the reading consistent and reliable.
In a typical pull-up schematic, the resistor is connected between the pin and VCC. For pull-downs, the resistor connects the pin to GND. These schematics often appear in circuits with switches, NAND gates, CMOS, and TTL logic devices.

I2C uses pull-up resistors on SDA and SCL because devices pull these lines LOW and release them to return HIGH; pull-down resistors are not interchangeable here. In transistor circuits, a resistor may provide a collector pull-up or keep a MOSFET gate in a defined state when its driver is inactive. Its role depends on the actual circuit, rather than every pull resistor acting as a voltage divider.
The ATmega328P used on the Arduino Uno R3 has internal pull-up resistors, but no internal pull-down resistors. Enable a pull-up with pinMode(pin, INPUT_PULLUP), then wire the switch between the input and GND: an open switch reads HIGH and a pressed switch reads LOW. Other Arduino-compatible MCUs may support INPUT_PULLDOWN, so check the specific board and core before using it.
To enable internal pull-ups on an Arduino, you can use the following line of code in your setup() function:
A pull-up must be strong enough to maintain a valid HIGH level despite input leakage and noise, yet large enough to limit current when the line is pulled LOW. For the button example below, Ohm’s law estimates the closed-switch current; it does not by itself establish the maximum resistance for every digital interface.

Let's say you want to limit the current to approximately 1mA when the button is pressed in the circuit above, where Vcc = 5V. What resistor value should you use?
To calculate the pull-up resistor, we'll be using Ohm's Law:
Where is the Vcc, is the current through the pull-up resistor, and is the resistance of the pull-up resistor.
Rearrange the above equation with little algebra to solve for the resistor:
To find the bands for the value you settle on, or to check the resistor already in your parts bin, use our resistor color code calculator.
Choose the default state your circuit needs. Use a pull-up when an open switch should read HIGH and a switch to ground should read LOW; use a pull-down for the opposite arrangement. Follow the interface specification for shared buses such as I2C, and do not assume all CMOS or TTL inputs behave identically.
Ohm's Law is the foundation when it comes to understanding resistors. The formula , where is the voltage, is the current, and is the resistance, governs how resistors work in circuits. The resistor limits the current that can flow between VCC and the input pin, balancing the impedance and providing a stable voltage level for digitalRead to interpret.
In real-world applications, pull-up and pull-down resistors are commonly used with switches and sensors. When a switch is open, a pull-up resistor will ensure that the voltage at the pin is pulled up to VCC (5V or 3V). When the switch is closed, it connects the pin directly to GND, overriding the pull-up and bringing the voltage to 0V.
For a sensor with an open-drain digital output, a pull-up can establish the released HIGH state; check whether the sensor module already includes one. Do not add pull resistors indiscriminately to analog sensor outputs, since they can load the signal and change the measured voltage.
In some cases, pull-up or pull-down resistors are part of a voltage divider circuit, especially when you're interfacing 5V and 3V components. A voltage divider consists of two resistors in series connected across a voltage supply. The output voltage can be tapped between the two resistors, providing a reduced voltage that is proportional to the ratio of the resistors. Our voltage divider calculator works that ratio out for you, and returns the nearest standard E-series resistor values.
Pull-up and pull-down resistors are more than just "additional components" in your electronic projects; they're fundamental to the reliable operation of microcontrollers, transistors, and logic gates. Understanding their function, role in circuits, and practical applications can make the difference between a project that functions inconsistently and one that operates reliably.
By now, you should have a solid understanding of pull-up and pull-down resistors, how to set the pinMode and use digitalRead in your Arduino projects, and the significance of resistance and impedance in these configurations. Whether you're a hobbyist or a professional, these resistors are tools you'll come back to time and time again.
With this, we've reached the end of our comprehensive guide. Happy building!

A complete 555 timer guide covering pinout, internal operation, monostable and astable modes, timing calculations, and practical circuit examples. It also explains component selection and PCB layout tips for reliable designs.

A visual guide to capacitor schematic symbols, polarity markings, and specialized capacitor types. It explains how to choose the correct symbol and footprint to prevent assembly and design errors.

A practical guide to potentiometer wiring, including pin identification, voltage-divider and rheostat configurations, Arduino examples, and PCB footprint considerations. It helps designers avoid common wiring and layout mistakes.

A troubleshooting guide for DXF and SVG board-outline import failures, including open paths, unit mismatches, unsupported curves, and layer mapping issues. It shows how to clean CAD-to-EDA handoffs before PCB fabrication.

A practical guide to inverting op-amp circuits, covering how negative feedback creates inversion, how to calculate gain with Rin and Rf, and how real-world limits affect design. It also explains component selection and PCB layout practices for reliable amplifier performance.

A troubleshooting guide for common JLCPCB Gerber upload errors, including unreadable files, missing board outlines, drill-file issues, and Gerber X2 compatibility problems. It explains how to export and verify clean Gerbers before ordering.

A practical guide to designing PCB enclosures around board geometry, clearances, mounting, assembly, and 3D-printed prototyping. It also explains how Flux can generate prototype enclosures directly from a PCB project.

Decide between PCB patents and trade secrets. Learn how AI reverse-engineering impacts hardware IP and get a practical decision framework for founders.