0
\$\begingroup\$

I'm new to electronics and I'm trying to understand pull-up resistors properly. I have a problem with the following schematic:

Schematic

I've redrawn the schematic into my following schematic for better understanding:

Redrawn schematic

In the redrawn schematic, R1 represents pull-up resistor.

If we connect the circuits using the button, according to explanations I've read, the current should flow not to the MCU, but to straightly to the ground, because on that branch there is lesser resistance. Based on conservation of charge, the current that goes in the branches, must come out of the branches, so I = I1 + I2. From that we can deduce I = U (1 / R2 + 1 / R3). However, branch leading straightly to the ground has (imo) approximately 0 ohms resistance, because there is no resistor, so I goes to infinity = short-circuit.

How is possible there is no short-circuit? Is my redrawn schematic identical to the original one? Also based on my knowledge of physics, even if we press the button and connect the circuit, there should be identical voltage on both branches in this parallel circuit. How is it possible that we can read 0 on the pin? Do we actually measure current instead of the voltage?

\$\endgroup\$
5
  • \$\begingroup\$ And that's why no one models MCU inputs as resistors. \$\endgroup\$ Jul 16, 2018 at 9:21
  • \$\begingroup\$ Still, R2 is just fine, what troubles me is the other branch, where the short-circuit should happen. R3 should be resistance on the other branch (not that with MCU), and that should (imo) go to zero. \$\endgroup\$ Jul 16, 2018 at 9:24
  • \$\begingroup\$ The circuit would make much more sense if the input was modeled properly, as a capacitor. \$\endgroup\$ Jul 16, 2018 at 9:25
  • \$\begingroup\$ "branch leading straightly to the ground has (imo) approximately 0 ohms resistance, because there is no resistor, so I goes to infinity = short-circuit" -- the alternative solution to that equation is that at the node in question, V=0. \$\endgroup\$
    – Jules
    Jul 16, 2018 at 10:13
  • \$\begingroup\$ Vcc and gnd is always seperated by alteast R1, meaning no short circuit will ever occour. Still you keep takling about short circuit. What exactly do you mean by short circuit? \$\endgroup\$
    – keffe
    Jul 16, 2018 at 11:55

3 Answers 3

0
\$\begingroup\$

The circuit modeled by you, shows R2 in series with R1. Closing the switch, will bypass R2, with a total current of \$ I = \frac{U}{R_1} \$. When the switch is open, current will flow equally on both resistors, which is \$ I = \frac{U}{R_1 + R_2} \$. So your formula is wrong.

But, also the schematic redraw is somehow wrong, since the input of the MCU has a resistance in the order of mega-ohms, and is better modeled as a capacitor or to simplify, as open-circuit. So the MCU can be excluded from the current loop and is only important to understand the voltage at its input.

  • When the switch is open: there is virtually no current, since the MCU input is just an open circuit, therefore the drop on R1 is null since there is no current, and on the MCU input you will see \$ V_{mcuin} = U - R_1 \cdot I = U\$. Because \$I = 0\$ since there is no current loop closed.

  • When the switch is open: the current is the one flowing in \$R_1\$ and is \$ I = \frac {U}{R_1} \$, while the MCU will see 0V since it is now attached to the same negative node of your voltage generator U.

\$\endgroup\$
4
  • \$\begingroup\$ I understand the case where the switch is open, its just two "resistors" in series. But if the switch is closed, then there are two branches, where one has infinite resistance and other has no resistance (no resistor there). So from resistors in parallel there is 1 / R = 1 / R2 + 1 / R3 (R3 is resistance on that empty branch), where R2 is infinity, but R3 is approximately 0. How is it possible that there is no short-circuit, if resistance on one branch is zero? \$\endgroup\$ Jul 16, 2018 at 10:54
  • \$\begingroup\$ Your branch is indeed around 0Ohm, but bare in mind that is in SERIES with R1. Indeed, with no R1, there would be "infinite" current. But again, you can consider R2 as infinite with no issues, and just consider the intertion of R3 of 0 OHm when closing the switch \$\endgroup\$
    – thexeno
    Jul 16, 2018 at 12:18
  • \$\begingroup\$ Thank you very much. Just last issue. How do I measure 0 voltage on MCU pin when switch is closed? Shouldn't there be same voltage as in the other branch since it is in parallel? \$\endgroup\$ Jul 16, 2018 at 12:53
  • \$\begingroup\$ To put simply, a short circuit here means that the negative voltage of U is brought at the input of the MCU, since it will be the same node of negative of U (no resistance in separating nodes), that's how you see 0V. So yes, there is the same voltage, which is 0 on both sides of R2, thus no current in -that- loop. The current is just across R1 to the 0V potential. \$\endgroup\$
    – thexeno
    Jul 16, 2018 at 13:02
0
\$\begingroup\$

VCC will never short-circuit because whatever path it uses to close the loop will pass through R1.

If the switch is closed, both pins of the MCU will be connected to ground. No current will flow into the MCU.

\$\endgroup\$
2
  • \$\begingroup\$ Why won't VCC short-circuit? It's still a parallel branch with approximately no resistance, thus short-circuit. Why should this statement be incorrect? If the switch is closed, approximately no flow will run into MCU, but based on what I was taught, we were measuring measuring voltage, not current and all branches have same voltage. \$\endgroup\$ Jul 16, 2018 at 11:33
  • \$\begingroup\$ Situation 1 (Switch open): Vcc is connected in series to R1 and to the MCU. Situation 2 (Switchclosed): Vcc is connected to R1 only. There is no situation in which the loop closes through VCC and plain wire. \$\endgroup\$ Jul 16, 2018 at 14:59
0
\$\begingroup\$

Redraw your circuit with R2 removed. When you close the switch, how much current flows through it? Vcc/R1, right? Now add R2 across the switch. With the switch closed there is no voltage across it, so there is no voltage across R2, so there is no added current flow.

\$\endgroup\$

Your Answer

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

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