Pull Down Connection Clarification

Hello,

I have a little question about pull down connection.

Capture d’écran 2022-01-23 223328

I read lots of stuffs on internet, and I am not sure about what I've understood. Could you correct me please?

  1. if switch is closed, current goes from 5v to arduino input because resistance in arduino input is less important than 3K resistance so logic level is 1, am I right?
  2. if switch is open, ground is connected to arduino input, no current is coming into the input pin so logic level is 0. But I am wondering what would happen if interference signals are intercepted by the switch. There migh exist a current from switch to arduino input, so the input pin will be in floating state?

I am here to learn so sorry in advance if I am completely wrong.

The way I "casually" describe it, is that the pull-down (or pull-up) resistor is "overpowered". When the switch is closed the Arduino's input is directly connected to 5V so it's high. The resistor is also connected to 5V so current flows through the resistor.

[quote] if switch is open, ground is connected to arduino input, no current is coming into the input pin so logic level is 0. [/quote] (Or you might have a very-tiny current and a very-tiny voltage which still reads low.)

The Arduino's input has almost infinite impedance so no current flows in-or-out of the pin and no current flows through the pull-down resistor. With no current flowing there can be no voltage across the resistor (Ohm's Law).

Interference signals are "weak" (low power). Power is calculated as Voltage x Current. With a low resistance you don't get much voltage from the interference. With a 3M pull-down resistor you are more likely to have interference problems.

Well, the resistance of the Arduino input is ridiculously high in INPUT mode, so it basically looks like "not connected at all" so you can ignore it; you are only considering the voltage at the connection of switch and resistor. Switch closed, the voltage is whatever your "5V" supply is. Switch open - no current in resistor, so both ends of resistor at ground.

Not the switch, but the wiring to the switch, if there is any length to it, can pick up interference due to capacitive coupling to other electrical sources (even including your house wiring). However these are unlikely to affect a 3k resistor unless the wiring is ridiculously long and close to other sources.

Note that speaking of wiring, it is generally a bad idea to run your 5 V from your board to a switch at any distance as it might be shorted to ground or the 5 V line itself may even pick up interference, So you should connect the switch to ground and use a pull-up resistor to 5 V on or close to your board. :+1:

Here is another version of explanation of the use of pull-down resistor.
IOpin8

1. If the external pull-down resistor R1 is not connected, the input line (DPin-8) will reamin in the floating state (unknown logic).

2. If R1 is connected, DPin-8 (the input line) will be pulled down to LOW (~0V). Now, the input line is at the known logic (LOW).

3. If Button is closed, 5V is asserted at DPin-8. As a result, HIGH will appear at DPin-8. From the 5V supply, the input line will draw about 1uA (as per data sheet) current and R1 will draw about 0.5 mA (5V/10k) current. Note that a voltage as low as 3V will be seen as HIGH by the input line of ATmega328P MCU of the UNO Board.

4. If you place a jumper between DPin-8 and GND to keep LOW at DPin-8, then you cannot assert HIGH at DPin-8 by closing the Button; instead, the 5V will be directly shorted to GND causing a circuit destruction.

Thank you all for the clarifications. There is still something I don't understand about interference.

Let's consider the first diagram I posted with switch open and let's say the wiring of the switch picks up 5V interference . In that case, the interference will behave like a power supply and we obtain a similar configuration to "switch closed", don't we?

Even if it is low power interference, the voltage is still 5V, so it should be read as such by the Arduino input? In that case, the role of the 3K resistor will be to prevent shorts but I don't get what you mean by "interferences are unlikely to affect a 3k resistor"? 5V is still 5V, no matter the amount of current, isn't it?

Could you tell me where I am wrong please?

Interference is an external signal (eg mains or RF) that appears on the wiring, usually due to capacitive coupling. For most wiring (unless you are running long cables next to a radio mast!)
the capacitance will be small. You would need a VERY large capacitance to couple any realistic interference onto a 3k load and get a 5V signal Interference signals are usuallyonly a problem if you have an analog signal you are amplifying.

Disclaimer: having said that I once measured 70V of RF on a mains earth.