Sign up ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I have come across many simple circuits that show how to switch on an LED or something else. Pull up resistors are often mentioned. What do they do? Some GPIO pins require pull up resistors and others do not, what is the difference?

share|improve this question
I looked at the Wikipedia explanation and it made no sense whatsoever. I was going to edit the question to reflect this but you answered first. – Menuta Jan 19 '13 at 10:30
very well explained in this site – user19442 Aug 2 '14 at 13:17

5 Answers 5

up vote 5 down vote accepted

From the Arduino website:

Often it is useful to steer an input pin to a known state if no input is present. This can be done by adding a pullup resistor (to +5 V), or a pull-down resistor (resistor to ground) on the input, with 10 kΩ being a common value.

BUT: That is from the Arduino website. Remember that Raspberry GPIO pins are only 3.3 V tolerant (so, do the pullup to 3.3 V, not 5 V on the Raspberry Pi)!!!

Here's an example of a pull-up resistor schematics.

A pull-up will make sure the pin is up without taking in too much current. A gate has three possible states: ON, OFF and FLOATING.

The FLOATING state is not very useful since it can't be converted to a boolean value. Hence pull-up and pull-down resistors: they are there to eliminate the FLOATING state.

share|improve this answer
Technically FLOATING is not a logical state but a loose technical term used to describe that it is unconnected and may receive random combinations of HIGH/LOW caused by static discharge noise generated by nearby objects. There is no logical variable for floating, except the mathematical number. Digital is either 1 or 0. – ppumkin Aug 2 '14 at 14:52

A pull-up or pull-down resistor are used on input pins to define a state in the case an input does not have anything connected or the connected part is in the high impedance (Z) state. Inputs without a defined state have the problem that the input value can be anything (0 or 1), called floating.

This is explained in more depth in the article on Wikipedia (that Jivings added to the comments of your question), and a little more visually in this article on SparkFun.

share|improve this answer
The sparkfun description is brilliant compared to Wikipedia a makes far fewer assumptions about a readers knowledge – Menuta Jan 19 '13 at 10:36

Something to keep in mind (confused me a bit at first) is that a pull-up or pull-down resistor is just a standard resistor in a specific role. More than one person has tried to buy pull-up resistors only to find they don't exist. Otherwise it is just as it sounds, a standard resistor pulling the voltage up to 5V/3.3V or down to 0V as the normal state.

share|improve this answer
Part of what's confusing here is it isn't really the resistor doing the "pull-up" -- the pull up is what on the other side of the resistor. The resistor is just control the current flow through through the pull-up.… – goldilocks Apr 22 at 17:56

The electronics dictionary defines pull-up as follows:

pull-up: Descriptive of a circuit or component used to raise the value (e.g., impedance) of a circuit to which it is connected.

If an LED is connected to a +5 V power supply and is controlled (LED ON & OFF) by a microcontrollers/microprocessor or by some other means, during ON state the power-supply may supply high current, in turn high current may damage the LED.

To limit the high current from the supply, a pull-up resistor, pulls up the impedance and limits the current supplying the LED from the power supply (+5 V). Hence the LED is protected form high currents. Based on the circuit, a pull-up function varies and form protection to wired AND logic to an I²C bus.

share|improve this answer

The term pull-up or pull-down is a term used to describe the role a resistor is performing. It pulls the signal line that it is connected to on one terminal towards the Supply/Ground/Reference Voltage that is present on the other terminal. The previous answer is incorrect in saying ¨it pulls up the impedance¨ rather it is to reduce the resistance/impedance in the circuit so that the line assumes a known state when it will not otherwise e.g. an input pin on a integrated circuit that is otherwise not connected. As this will counter the effects when something external is connected the amount of the resistance is required to be low enough to be effective to do the pulling if the pin is accidentally or deliberately left open circuit but high enough that any external circuit is not unduly burdened to overcome the effect when it wants to drive the line in the other direction.

The GPIO Pins on the Pi have controllable internal ones which I understand can mostly be made to make the lines assume a logical low or high or left open circuit - the latter of which is fine if there is a user provided pull up/down resistor to do the job (possibly as part of the external circuity anyway). The design of latter is particularly significant if the external circuit is running from supply rails in excess of 3.3 Volts because in that case the pull-up must not try to raise the voltage on the line to above 3.3V - a series resistor (say 4K7) and a Schottky diode (e.g. a BAT85) with its anode to the side of the series resistor connected to the GPIO pin and its cathode to the 3.3V supply rail is one way to prevent this - the low ( < 0.2V ) forward voltage drop of that type of diode prevents the signal line being taken high enough to damage the Pi, at the expense of a slightly increased time for signals to propagate into the Pi.

I´m just starting out with Pi's as I bought two second-hand yesterday {though I've been into electronics for over 35 years} and I'm looking around for information about the Pi's Pinout for exactly this reason - and for the best place to get two PSUs as they didn´t come with 'em. 8-P

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.