Hi all,
Background: this is my first post on this forum and I've just started playing with Arduino and circuitry over the past two weeks after I saw a colleague give a small demo. So I bought a starter kit and started doing tutorials in my evenings. Bottom line: I'm a Dutch 39 yo complete and utter n00b on anything related to electricity, or physics in general I guess, go easy on me please
I've been hitting my head against the concept of Pullup and Pulldown resistors. So I know! Use the search function! Well, I did. I spent two evenings reading/watching dozens of pages/youtubes about them. But I'm still left with questions that I can't find good answers for. Not being a native English speaker (I'm Dutch) doesn't help in jargon searching either, although I'm not familiar with Dutch electrics jargon either so I'm going in blind one way or the other
So I think now that I get what they do after trying to see the actual trees in the forest of the interwebs Can anyone verify whether I'm getting this right with this summary?
-
PULLDOWN resistor is to connect pin with GND, so all fluctuations flow away to GND and it's always a 0. UNLESS there's current flowing "past" the resistor by connecting the pin to 5V as well, e.g. by pressing a connector switch, which makes the pin read 1.
-
PULLUP resistor is to connect pin with 5V, so there's always 5V on the pin, making it always a 1. UNLESS there's current flowing away "past" the pin towards GND, e.g. by pressing a connector switch, which makes the pin read 0.
(By "past" I mean that current "likes" to go through the path of least resistance and thus significantly less flows through the resistor (pulldown scenario) or through the pin (pullup scenario), making the alternative path created by the button press more attractive.)
I've attached a drawing of my understanding as a PNG picture. Hope I'm getting that right, more or less? Note: I'm also learning how to draw and read electric circuits from scratch, this is literally my first attempt. Constructive criticism is always welcome.
Now for my actual question! WHY in the first place is the Arduino pin randomly alternating between 1 or 0 when there's NO circuit? I keep finding pages that say that it's about something called high impedance circuitry fluctuations caused by things like EM interference, static electricity or even quantum fluctuations, but I can't find qualitative descriptions of what's ACTUALLY going on there. Not that I understand, anyway. Nor have I found a good noob-friendly explanation about what electrical impedance is or how it relates to digital 0/1 flappings on the Arduino. What is the apparent randomness that sometimes makes it 1, and how can there be a 1 without something connecting to the pin to flow current through?
Thanks for bearing with me and hopefully you can help me kickstart my second life as a microelectronics enthusiast \o/
Note: I know that the Arduino has a PULLUP resistor built-in for input pins. I'm just trying to know how it actually works.