Straight off of Ardunio’s web page (see reference below)….
‘Just because you have nothing at all connected to an input pin doesn’t mean it is a logical zero.’
Pull-up resistors are installed in an electronic circuits to ensure that inputs to board settles at expected logic levels (one or zero) if external devices are disconnected aka high-impedance. It can be arrange such that it can perform function of a pull-down as well. This short article is written to show how it can be wired to perform these function.
A few things to remember before we proceed to the next paragraph.
- Electric signal travel in the path of least resistance… like water which flows on the path of least resistance
- Resistors can be thought of as water tap. As you open the water tap more and more, the water flowrate starts to increase. Similarly in the electronics world, as you start to decrease the resistance value of the resistor, more and more current will start to flow.
Consider the diagram below.
In these circuits shown above, the pull-down resistor “pulls” (or sets) the voltage down to zero on the output. But if the pull-up switch is pressed, it “pulls” (or sets) the voltage up to whatever the input supply is. Technically, the output would only be one if the pull-up switch is pressed and resets back to zero if it release.
Look at the same diagram again (above), the pull-up resistor “pulls” (or sets) the voltage to whatever the input supply is. But if the , it “pulls” (or sets) the voltage down to zero. That is to say, the output will only be zero if the pull-down switch is pressed. Which is working directly opposite to the previous logic.
This technically can be used to set and reset a n electronic logic.