What are pull-up and pull down resistors? 

 January 11, 2018

By  Peter

Join Our Mailing List

We publish fresh content each week. Read how-to's on Arduino, ESP32, KiCad, Node-RED, drones and more. Listen to interviews. Learn about new tech with our comprehensive reviews. Get discount offers for our courses and books. Interact with our community.

One email per week, no spam, unsubscribe at any time.

A question I get asked frequently by people new to circuit design is about pull-up and pull down resistors.

What is the purpose of a pull-up or pull down resistor, and how does it work?

I’ll try to answer this question here as simply as I can. When I think about this, it really is simple.

Here it goes:

Imagine that you have a switch. One pin is connected to a 5V source, and the other to a logic circuit. A logic circuit is a component that expects certain values only at its pins, usually HIGH or LOW, and it doesn’t really work well with anything else. An example could be an ATMega micro-controller, like the one you find in an Arduino board.

Schematically, you would have something like this:

This looks fine, the switch is closed and the input of the logic circuit is directly connected to Vin, so it is HIGH. No problem! What if we open the switch?

Well, now there is a problem. The input of the logic circuit is not connected to anything with a specific value, it’s just hanging there. Another term people often use for this kind of situation is “floating”.

Let’s repeat: the problem here is that the input of the logic circuit is not connected to a source of defined value, and logic circuits really don’t like this!

So how do we fix it? Have a look at the next schematic:

We fix this by using a large resistor (say, 10kΩ or larger) to connect the input of the logic circuit to ground. When the switch is open, instead of the input to be floating to an uncertain value, it becomes grounded, therefore LOW, through the resistor.

What if the switch closes again? Then, we’ll have this:

Because the resistor is large, current from Vin will find it much easier to flow through the logic circuit rather then to ground via the resistor. Because the connection between Vin and the logic circuit input has negligible resistance, the Vin’s HIGH value will be transferred to the input of the logic circuit.

To recap, by attaching a pull-down resistor to our circuit, we ensure that the logic circuit’s input will always have a defined value, and will be happy.

You could inverse the circuit and connect the resistor to Vin instead of ground. Now, this resistor would be called “pull-up”, because it would be pulling the input of the logic circuit to Vin (HIGH) when the switch was open.

A pull-up resistor schematic would look like this:

I have just swapped the positive voltage (differential) to the top of the diagram and the ground to the bottom. When the switch is open, the input of the logic circuit is connected to Vin via the large resistance, so the voltage there is almost Vin. There will be a very small current flowing so there will also be a very small drop in voltage from Vin to the input of the logic circuit, but this is small enough to be able to accept an approximate value at the logic circuit as Vin, which is HIGH.


Pull-down, Pull-up, Resistors

You may also like

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

I’m excited to introduce you to the latest and greatest version of KiCad – version 8 (stable release). This article will overview the new features and capabilities added to this popular open-source electronic design automation

Read More
KiCad 8: The new and updated features, a full review

Learning anything worth learning from the ground up is hard. The road to proficiency is filled with roadblocks, distractions, and dead-ends. Everyone learns differently and for different reasons. Some of us learn to advance our

Read More
From struggling to thriving: Understanding the journey from Beginner to Proficient (in programming or anything else)