# Why does current flow along a wire instead of a resistor right next to it? [closed]

I am having trouble understanding exactly what is going on in a circuit where when a button is pressed an LED goes on. Also, I have the Arduino UNO.

The schematic can be seen at:

2:36 of this video: Arduino Tutorials: Control a LED with a Button.

So, the part that I don’t understand is, how come when the button is clicked and the current can pass through, the current doesn’t go through the pull down resistor and instead goes along the input wire?

I’m a beginner but do understand concepts like voltage, amps, resistors, Ohm’s law, etc. So answers don’t have to be super simple, but simple enough that I can understand them. Thanks!

• You may have the arduino, but the question is off topic. Please ask the question at Electrical Engineering SE. – MichaelT Apr 16 '19 at 12:19
• The input pin has a very high resistance, so that nearly no current is flowing into it. Effectively the microcontroller is doing a voltage measurement. It measures the voltage over the pulldown resistor. – chrisl Apr 16 '19 at 12:47
• Some current is flowing though the pull-down resistor, but the power supply has no problem producing this little bit of current, so the voltage before the pull-down resistor will remain a stable 5 Volt. So the voltage at the Arduino input will be 5Volt while the button is pressed. Once the button is released any "stray" voltage will flow though the resistor, so the voltage at the input pin will become 0 Volt – Gerben Apr 16 '19 at 13:06
• Please, can you forget everything that you "learned" from that video. The explanation in that video is wrong and confusing. The way the video explains how the current flows is utter nonsense. You can start with the arduino examples, they are in the menu of the arduino program and also online: arduino.cc/en/Tutorial/BuiltInExamples Start for example with "Button" in section "2. Digital". – Jot Apr 16 '19 at 13:08

So, the part that I don’t understand is, how come when the button is clicked and the current can pass through, the current doesn’t go through the pull down resistor and instead goes along the input wire?

Simple: It does go through the pull down resistor. But it also goes down the "input" wire.

For simplicity you can imagine that the input is simply a very large resistor. Say, 1MΩ.

The circuit can then be simplified as:

simulate this circuit – Schematic created using CircuitLab

Contrary to popular belief, current does not take the path of least resistance. It takes all possible paths. The quantity of current through each path is proportional to the resistance of the paths.

In this example we have two paths - one with 10kΩ and one with 1MΩ. That's a ratio of 1:100, and the current will be split accordingly.

You can calculate the current that flows through each resistor simple using Ohm's Law because the wires and switch are (in an ideal world) just not there. The 5V is directly connected across each of the resistors.

So for the 10kΩ resistor the current through is is:

``````     V      5
I = --- = ----- = 0.0005 = 500µA
R    10000
``````

And for the 1MΩ it is of course 100x smaller (I'll let you do the maths for that if you want to check), so 5µA.

The full current that the circuit takes is 505µA, with it split between the two resistors.

With the Arduino instead of the 1MΩ resistor it's exactly the same (though the current values may vary somewhat). 500µA flows through the 10kΩ resistor, and "some tiny current" flows through the Arduino.

However, with all that said, the Arduino really doesn't care about the current. All it cares about is the voltage. With the button pressed both the input and the 10kΩ resistor are connected directly to the 5V supply - so the Arduino reads that as "HIGH". When you release the button the input is now connected to ground through the 10kΩ resistor, but there's no current to flow, so there's no voltage across the resistor (the voltage across a resistor is proportional to the current flowing through the resistor - Ohm's Law), so it's as if the input is connected directly to ground - and the Arduino reads that as "LOW".

To be more technically accurate the input of the Arduino is actually more akin to a tiny capacitor. When you apply 5V to the input it charges that capacitor up. Once it reaches 60% of 5V the Arduino recognises it as a "HIGH" signal.

When you release the button that capacitor is then connected to ground through the resistor, and it discharges through that resistor. Once it drops to 30% of 5V the Arduino sees it as being "LOW".

If you don't have the pull-down resistor, when you remove the 5V from the input that capacitor is still charged. So the Arduino still sees it as a HIGH. The charge in the capacitor will slowly bleed away until it's low enough to be seen as low.

But, (and it's a big but), the capacitor is very sensitive and can be charged up again by ambient energy around the place (radio waves, static electricity, etc). It can harvest enough energy from the environment to get back up to the 60% of 5V and be seen as "HIGH" again. This is known as "Floating", and is something you do not want in your circuit. The input "flaps around" between HIGH and LOW with no control. Which is why the pull-down resistor is absolutely essential.