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?
|
|
From the Arduino website:
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. |
|||
|
|
|
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 Z (high impedance) 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. |
|||
|
|
The electronics dictionary defines pull up as follow: 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 +5 V power supply and is controlled (LED ON & OFF) by Microcontrollers/Microprocessor or other menace , during ON state power-supply may supply high current, in turn high current may damage LED. To LIMIT the High current from supply, Pull Up Resistor, PULLS UP the IMPEDANCE and Limits the current supplying to LED from Power supply(+5v) hence LED is Protected form High currents. Based on the circuit pull up function varies form protection to Wired AND logic to I2C Bus. |
|||
|
|
