3
\$\begingroup\$

Im trying to understand how pull up/down circuits works . Let's consider this schematic : enter image description here

I understand that there are two possible current flows :

  1. When the button is not pressed, the current flows from VCC through the input pin .
  2. When the button is pressed , the current flows from Vcc through the button , to the GND .

I cant understand the second flow . Why the the current goes directlly through the button ? After the R1 resistor there is a "crossroad" . So , why the current flow is not divided to both paths (left to the button , and right to the input) ? How it knows to flow only to the left path i.e. to the button, and not right to the input ?

Thanks

\$\endgroup\$

4 Answers 4

4
\$\begingroup\$

Because when the current gets to the "crossroad", it has two options to go to GND. One is through R2 and the other is direclty to GND. In other words this is like putting R2 in paralell with a resistor whose value is zero ohms. This lead us to a zero ohms equivalent, which is like a short circuit (left path).

In a intuitive way, it finds no resistance to go to the left while there is R2 if it goes to the right. The current division in a "crossroad" is a proportional division calculated by the resistance ratio of each path. Since one path is free, all current goes to there.

\$\endgroup\$
2
  • \$\begingroup\$ IMO Felipe gave a good answer, but if you question is more narrowly "how does an electron at the crossing know where to go": it does so because an electron just in front of him made room for him. \$\endgroup\$ Dec 21, 2013 at 17:56
  • \$\begingroup\$ Yes, this kind of question can be explained in many ways. We could also think that IF there was current through R2, it would then has a voltage difference (due to ohms law) through R2. So the crossroad point would have some voltage which would be different from GND (which is not true). \$\endgroup\$ Dec 21, 2013 at 18:14
1
\$\begingroup\$

Logic circuits are operated by voltage much more than by current - in fact, in CMOS logic, inputs are essentially open circuits, so no current flows in or out of a CMOS input pin, execept during signal transitions.

Therefore, in your example circuit, with the switch open, no current flows through the resistor, so there is no voltage drop across it, and the input pin is high (at or very near Vcc). With the switch closed, there will be currrent flowing from Vcc through the resistor and switch to ground, so the input pin will be held at ground.

\$\endgroup\$
1
\$\begingroup\$

If you visualize the button as being connected in the right side between the input pin and the ground pin of the mcu it will help you understand better why the current flows through the button that represents a 0 ohm resistance rather than the resistor that wants to resist the current flow.

enter image description here

\$\endgroup\$
1
\$\begingroup\$

Think of it like this: The current is divided.

Imagine the button as a small resistance when it's pressed, and a large resistance when it's not. If the button resistance is smaller than R2, more of the total current in the branch will flow through it. If the button resistance is much larger than R2, less of the total current in the branch will flow through it.

Now imagine the resistance of the button approaching zero. As it gets smaller and smaller, it takes more and more of the total branch current, until there's essentially none flowing through R2.

Now imagine the resistance of the button approaching infinity. As it gets larger and larger, it takes less and less of the total branch current, until there's none flowing through the switch.

When you understand that a closed switch is close to zero ohms (but never zero, unless we're talking about superconductors) and an open switch is essentially an infinite resistor, you'll understand why most of the branch current flows through the switch when it is closed, why no current flows through it when it's open, and why there's always a tiny trickle of current through R2.

An ideal switch can be approximated as a zero ohm resistor, but in practice there's always some small resistance with a closed switch. An open switch is easier to envision as a infinite resistor, so no current flows through it when open (air is a pretty efficient insulator, unless the voltage gets too high...)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.