What are pull-up resistors? And push-down resistors?
While trying to find answers to these questions on-line, I could only find sources too advanced for me to understand (I'm still a newbie after all).
But only after coming across some phenomena while playing with my RGB LEDs, did I understand what's the idea.
You see, one might think that if a circuit is open (like a switch) that the potential (voltage) is 0V, but actually because of the static electricity in the environment, that isn't entirely true.
There are components that need so little energy to work, that they might be influenced by that electricity.
What happened to me was that while having a LED connected only to GND, when I touched the other lead, it would light up a little.
When I tried to use a push button in a circuit connecting only one end to an output pin and the other end to an input pin of the Arduino, the Arduino would read strange values either I did or didn't press the push button.
So, these pull-up / push-down resistors are to compensate for this extra energy, forcing the circuit to a stable state.
In the push button case, I had to use a resistor in parallel with the input pin of the Arduino, so that when the button isn't pressed, it would always read 0V (LOW).
The difference between pull-up and push-down is where you use that resistor, either connecting the component to GND or to the source.
I hope to have simplified it enough. What do you think?
Here's a nice link about this: http://wiki.bildr.org/index.php/Pull_up_resistor
ReplyDelete