Pull-up and pull-down resistors, simply explained!

A pull-up resistance pulls something up and a pull-down resistance pulls something down. It's super simple, isn't it? One pulls the electrical voltage up and the other pulls it down. The pull-up usually goes up to the operating voltage and the pull-down to GND. 

But why do we need these pull-up / pull-down resistors?

With our Raspberry Pi and Arduinos, we have inputs and outputs, the so-called pins. These must be in a defined state in order to function correctly, e.g. HIGH or LOW. However, voltage fluctuations or high-frequency interference from surrounding components can mean that the input does not have a clear HIGH or LOW signal and switches even though it should not.

To counteract this, we use pull-down and pull-up resistors, but let's take a closer look at the various options.

Without resistance

Pullup ohne Widerstand
+5V direct

In this example, we are not using a resistor and this now harbors the risk that a voltage could be present at the input due to external influences, which would switch the Arduino. The contact hangs in the air, so to speak. When the button is pressed, the +5V is applied and the Arduino switches perfectly.

Pullup GND direkt
GND direct

Here is the same example but this time we switch to GND. Here, too, the contact hangs in the air. When the button is pressed, GND is present and the Arduino switches correctly.

Pull-up resistance

Pullup resistor
Pull-up

When the button is open, the resistor pulls the input towards +5V. This is definitely "HIGH" and that is why this resistor is called a pull-up resistor, because the resistor pulls the input up to the operating voltage.

When the push-button is closed, the GND is connected to the input. The voltage drops completely at the pull-up resistor and GND is therefore present at the input, resulting in a clear "LOW".

Pull-down resistor

Pulldown resistor
Pull-down

When the button is open, the resistor pulls the input to GND. There is definitely 0V here, i.e. "LOW", and this resistor is therefore referred to as a pull-down resistor because the resistor pulls the input down to GND.

When the push-button is closed, +5V is connected to the input. The voltage drops completely at the pull-down resistor and thus +5V is present at the input and therefore a clear "HIGH".

Pull-up or pull-down resistance, which do I use now?


It doesn't really matter whether we use a pull-up or pull-down resistor. 
If you have the choice of switching to GND or VCC, then it is a question of interference immunity. The better choice here is the pull-up resistor, as it is also more battery-friendly than a pull-down resistor.

Watch the video

★☆★★ If you would like to support the channel via ★☆★★

or via

Twint Spenden Code