Professional Documents
Culture Documents
Generally pull-up and pull-down resistors are used for OFFSET NULL. (i.e) unwanted triggering by circumferences. Positive triggering means we use PULL-DOWN resistors. And if we want negative triggering means use PULL-DOWN resistor. The value of pull-up and pull-down resistors range are (min 4.7k to max 47k) should be use.
Pull-up or Pull-down
The figure above illustrates a typical pull-up resistor application. The resistor is connected between the power supply and a GPIO pin. A switch is then connected between the GPIO pin and ground. When the switch is open, there is (practically) zero current that flows from VCC through the resistor and into the GPIO pin. The voltage at the GPIO pin is given by the following equation derived from Ohm's law: V GPIO = V CC - I R1 *R1
Since there is no current through the resistor (I R1 =0), there is no voltage drop across R1 making the voltage at the GPIO input equal to VCC which causes the input to read "high". When the switch is closed, the GPIO pin is connected directly to ground driving it "low". As a side effect of closing the switch, current flows through the resistor according to the following equation (also from Ohm's law): I PULLUP = V CC/R PULLUP In some systems, I PULLUP is a significant amount of current through the pull-up (or pulldown) resistor. Increasing the value of the resistor can reduce this current while simultaneously causing the pull-up or pull-down to be "weaker".
In order for the strong pull-down resistor to work properly, it must be correctly sized. During normal operation, the voltage at the GPIO pin must be below the input low voltage V IL as specified in the electrical characteristics section of the device's datasheet. The voltage at the GPIO pin is calculated using a voltage divider: V GPIO =V CC * R 1 /(R 2 +R 1) The value of the strong pull-down must be low enough to make V GPIO < V IL. This ensures the voltage at the microcontroller GPIO pin is low (logic zero) when the switch is open. When the switch is closed, the signal is driven high--not because of the internal pull-up resistor but because it is directly connect to VCC.
Conclusion
Pull-up/pull-down resistors are a great way to prevent microcontroller GPIO inputs from assuming undefined values in embedded designs; however, they must be correctly sized (either weak or strong) based on power consumption requirements as well as existing circuitry (such as internal pull-up/pull-down resistors) to ensure proper circuit operation. -SHANTILAAL S s.shantilaal@gmail.com