Difference between pull-up and pull-down resistors is pull up resistors pull up a pin to a HIGH stat and pull down resistors pull down a pin to a LOW state.
When the switch is open the voltage of the gate input is pulled up to the level of Vin. When the switch is closed, the input voltage at the gate goes to ground.
In electronic logic circuits, a pull-up resistor or pull-down resistor is a resistor used to ensure a known state for a signal. It is typically used in combination with components such as switches and transistors, which physically interrupt the connection of subsequent components to ground or to VCC. When the switch is closed, it creates a direct connection to ground or VCC, but when the switch is open, the rest of the circuit would be left floating (i.e., it would have an indeterminate voltage). For a switch that connects to ground, a pull-up resistor ensures a well-defined voltage (i.e. VCC, or logical high) across the remainder of the circuit when the switch is open. Conversely, for a switch that connects to VCC, a pull-down resistor ensures a well-defined ground voltage (i.e. logical low) when the switch is open.
An open switch is not equivalent to a component with infinite impedance, since in the former case, the stationary voltage in any loop in which it is involved can no longer be determined by Kirchhoff's laws. Consequently, the voltages across those critical components (such as the logic gate in the example on the right) which are only in loops involving the open switch are undefined, too.
A pull-up resistor effectively establishes an additional loop over the critical components, ensuring that the voltage is well-defined even when the switch is open.
For a pull-up resistor to only serve this one purpose and not interfere with the circuit otherwise, a resistor with an appropriate amount of resistance must be used. For this, it is assumed that the critical components have infinite or sufficiently high impedance, which is guaranteed for example for logic gates made from FETs. In this case, when the switch is open, the voltage across a pull-up resistor with sufficiently low impedance vanishes to the effect that it looks like a wire to VCC. On the other hand, when the switch is closed, the pull-up resistor must have sufficiently high impedance in comparison to the closed switch to not affect the connection to ground. Together, these two conditions can be used to derive an appropriate value for the impedance of the pull-up resistor but usually, only a lower bound is derived assuming that the critical components do indeed have infinite impedance. A resistor with low resistance (relative to the circuit it's in) is often called a 'strong' pull-up or pull-down; when the circuit is open, it will pull the output high or low very quickly (just as the voltage changes in an RC circuit), but will draw more current. A resistor with relatively high resistance is called a 'weak' pull-up or pull-down; when the circuit is open, it will pull the output high or low more slowly, but will draw less current.
Applications[edit]
A circuit showing a pull-up resistor (R2) and a pull-down resistor (R1), as well as an open collector (7407) to drive the line to the FET only when given a low 0 V input
A pull-up resistor may be used when interfacing logic gates to inputs. For example, an input signal may be pulled by a resistor, then a switch or jumper strap can be used to connect that input to ground. This can be used for configuration information, to select options or for troubleshooting of a device.
Pull-up resistors may be used at logic outputs where the logic device cannot source current such as open-collectorTTL logic devices. Such outputs are used for driving external devices, for a wired-OR function in combinational logic, or for a simple way of driving a logic bus with multiple devices connected to it. For example, the circuit shown on the right uses 0 V logic level inputs to actuate a relay. If the input is left unconnected, pull-down resistor R1 ensures that the input is pulled down to a logic low. The 7407 TTL device, an open collector buffer, simply outputs whatever it receives as input, but as an open collector device, the output is left effectively unconnected when outputting a '1'. Pull-up resistor R2 thus pulls the output all the way up to 12 V when the buffer outputs a '1', providing enough voltage to turn the power MOSFET all the way on and actuate the relay.
Pull-up resistors may be discrete devices mounted on the same circuit board as the logic devices. Many microcontrollers intended for embedded control applications have internal, programmable pull-up resistors for logic inputs so that minimal external components are needed.
Some disadvantages of pull-up resistors are the extra power consumed when current is drawn through the resistor and the reduced speed of a pull-up compared to an active current source. Certain logic families are susceptible to power supply transients introduced into logic inputs through pull-up resistors, which may force the use of a separate filtered power source for the pull-ups.
Pull-down resistors can be safely used with CMOS logic gates because the inputs are voltage-controlled. TTL logic inputs that are left un-connected inherently float high, and require a much lower valued pull-down resistor to force the input low. A standard TTL input at logic '1' is normally operated assuming a source current of 40 μA, and a voltage level above 2.4 V, allowing a pull-up resistor of no more than 50 kohms; whereas the TTL input at logic '0' will be expected to sink 1.6 mA at a voltage below 0.8 V, requiring a pull-down resistor less than 500 ohms.[1] Holding unused TTL inputs low consumes more current. For that reason, pull-up resistors are preferred in TTL circuits.
In bipolar logic families operating at 5 VDC, a typical pull-up resistor value will be 1000–5000 Ω, based on the requirement to provide the required logic level current over the full operating range of temperature and supply voltage. For CMOS and MOS logic, much higher values of resistor can be used, several thousand to a million ohms, since the required leakage current at a logic input is small.
See also[edit]
References[edit]
- Paul Horowitz and Winfield Hill, The Art of Electronics, 2nd edition, Cambridge University Press, Cambridge, England, 1989, ISBN0-521-37095-7
- ^'Quadruple 2-input positive-NAND gates'(PDF). Texas Instruments. October 2003. Retrieved 11 August 2015.
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Pull-up_resistor&oldid=915954080'
A microcontroller in any embedded system utilizes I/O signals to communicate with the external devices. The simplest form of I/O is usually stated to as GPIO(General Purpose Input/Output). When the GPIO voltage level is low, then it is in high or high impedance state, then the pull up and pull-down resistors are used to ensure GPIO which is always in a valid state.Usually, the GPIO is arranged on a microcontroller as I/O. As an input, the microcontroller pin can take one of these states: high, low and floating or high impedance. When an i/p is driven above the i/p is high threshold, it is a logic one.When the I/P is driven below the I/P, which is low threshold, the input is logic 0. When in a floating or high impedance state, the I/P level is not constantly high nor low. To ensure the values of an I/P is always in a known state, pull up and pull-down resistors are used.The main function of pull-up and pull-down resistors is that the pull up resistor pulls the signal to high state unless it is driven low; and, a pull-down resistor pulls the signal to low state unless it is driven high.
What is a Resistor?
![Pull up and pull down resistor in msp430 Pull up and pull down resistor in msp430](/uploads/1/2/6/2/126269144/618899294.png)
The Resistor is a most commonly used component in many electronic circuits and electronic devices. The main function of the resistor is, it restricts the flow of current to other components. The resistor works on the principle of ohms law which states that dissipation due to the resistance. The unit of resistance is ohm and the symbol of ohm shows resistance in a circuit. There are numerous resistor types are available in the market with different sizes and rating. They are Metal film resistors, thin film resistors and thick film resistors, wire wound resistors, network resistors, surface resistors, mount resistors, variable resistors and special resistors.
Consider a two resistors in series connection, then the same current I flows through the two resistors and the direction of the current is indicated by an arrow.When the two resistors are in parallel connection, then the potential drop V across the two resistors is the same.
Pull-up Resistors
![Pull Up And Pull Down Resistors Pdf Pull Up And Pull Down Resistors Pdf](/uploads/1/2/6/2/126269144/876227390.jpg)
Pull-up resistors are simple fixed value resistors, that are connected between the voltage supply and the particular pin. These resistors are used in digital logic circuits to ensure a logic level at a pin, which results in state wherein the input/output voltage is nonexistence driving signal. Digital logic circuits consist of three states like high, low and floating or high impedance. When the pin is not pulled to a lower or a high logic level, then the high impedance state occurs. These resistors are used to solve the problem for the microcontroller by pulling the value to a high state, as seen in the figure. When the switch is open, the microcontrollers input would be floating and brought down only when the switch is closed. A typical pull-up resistor value is 4.7kilo Ohms, but can change depending on the application.
NAND Gate Circuit using Pull Up Resistor
In this project, the pull-up resistor is wired up to a logic chip circuit. These circuits are the best circuits to test pull up resistors. Logic chip circuits work based on low or high signals. In this project, the NAND gate is taken as an example of logic chip. The main function of the NAND gate is, when any one of the NAND gate input is low, then the output signal is high. In the same way, when the inputs of the NAND gate are high, then the output signal is low.
The required components for AND gate circuit using pull-down resistors are NAND gate chip (4011), 10Kilo Ohm resistors-2, Pushbuttons-2, 330ohm resistor and LED.
- Each NAND gate consists of two I/P and one O/P pin.
- Two push buttons are used as an inputs to the AND gate.
- The pull-up resistor value is 10 kilo Ohm and the remaining components are 330 Ohm resistor and LED. The 330 Ohm resistor is connected in series to limit the current to the LED
The circuit diagram of the NAND gate using 2-pull-down resistors at the i/ps to the NAND gate is shown below.
In this circuit, to give power to the chip it is fed with 5V. So, +5V is given to the pin 14 and the pin7 is connected to the ground. Pull-up resistors are connected to the NAND gate inputs. A pull up resistor is connected to the first input of the NAND gate and positive voltage. A push button is connected to GND. When the push button is not pressed, the NAND gate input is high. When a push button is pressed, the NAND gate input is low. For the NAND gate, both I/Ps must be low to get an output high. In order to work the owl circuit, you must press down on both buttons. This shows the great usefulness of pull-up resistors.
Pull-Down Resistors
As pull up resistors, Pull-down resistors also works in the same way. But, they pull the pin to a low value. Pull-down resistors are connected between a particular pin on a microcontroller and the ground terminal. An example of a pull down resistor is a digital circuit shown in the figure below. A switch is connected between the VCC and the microcontroller pin. When the switch is closed in the circuit, the input of the microcontroller is logic 1,but when the switch is open in a circuit, the pull down resistor pulls down the input voltage to the ground (logic 0 or logic low value). The pull down resistor should have a higher resistance than the impedance of the logic circuit.
And Gate Circuit using Pull Down Resistor
In this project, the pull-down resistor is wired up to a logic chip circuit. These circuits are the best circuits to test pull-down resistors. The Logic chip circuits work based on the low or high signals. In this project, AND gate is taken as an example of the logic chip.The main function of the AND gate is, when both inputs of the AND gate are high, then the output signal is high. In the same way when the inputs of the AND gate are low, then the output signal is low.
The required components for AND gate circuit using a pull-down resistors are AND gate chip(SN7408), 10Kilo Ohm resistors-2, Push buttons-2, 330 Ohm resistor and LED.
- Each AND gate consists of two I/P and one O/P
- Two push buttons are used as an inputs to the AND gate.
- The pull-down resistor value is 10 kilo Ohm and the remaining components are 330 Ohm resistor and LED. The 330 Ohm resistor is connected in series to limit the current to the LED.
The circuit diagram of the AND gate using 2-pull down resistors at the i/ps to the AND gate is shown below.
In this circuit, to give power to the chip, it is fed with 5V. So, +5V is given to pin 14 and pin7 is connected to the ground. The Pull-down resistors are connected to the AND gate inputs. One pull down resistor is connected to the first input of the AND gate.The pushbutton is connected to the positive voltage, and then, a pull-down resistor is connected to GND. If the push button is not pressed, AND gate input will be low. If the push button is pressed, AND gate input will be high.For AND gate, both I/Ps must be high to get an output high. In order to work the owl circuit, you must press down both the buttons.This shows the great usefulness of pull-down resistors.
Applications of Pull-Up and Pull-Down Resistors
- Pull-up and pull-down resistors are frequently used in interfacing devices like interfacing a switch to microcontroller.
- Most of the microcontrollers have inbuilt programmable pull up/pull down resistors.So Interfacing a switch with a microcontroller directly is possible.
- In general, pull up resistors are often used than pull down resistors, although some microcontroller families have both pull-up and pull-down resistors.
- These resistors are often used in A/D converters to provide a controlled flow of current into a resistive sensor
- Pull-up and pull-down resistors are used in I2C protocol bus, wherein the pull-up resistors are used to allow a single pin to act as an I/P or O/P.
- When it is not connected to a I2C protocol bus, the pin floats in a high impedance state. Pull down resistors are also used for outputs to afford a known O/P
Therefore, this is all about the working and the difference between pull-up and pull-down resistors with practical example.We believe that you have got a better idea about this concept.Furthermore,for any queries regarding this article or Electronics projects, you can contact us by commenting in the comment section below.