-1
\$\begingroup\$

When calculating the value of a pull up resistor , i am dividing the Vcc voltage by the desired current value.

schematic

simulate this circuit – Schematic created using CircuitLab

But since impedance of the input pin and my pull up resistor are connected in series, shouldn't we take the 1 Mega Ohm input impedance into account when calculating the expected current value ?

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Try it out and you will see how big the difference is. \$\endgroup\$
    – PlasmaHH
    May 25, 2016 at 19:32
  • \$\begingroup\$ 5 mili A , dont you think it is sort of a big difference. \$\endgroup\$
    – Dogus Ural
    May 25, 2016 at 19:37
  • \$\begingroup\$ \$ I = \frac {V}{R} = \frac {5}{1M} = 5~\mu A\$ and not 5 mA. \$\endgroup\$
    – Transistor
    May 25, 2016 at 20:08
  • \$\begingroup\$ he asked the current difference between 1M ohm+ 1k ohm vs 1k ohm. \$\endgroup\$
    – Dogus Ural
    May 25, 2016 at 20:20

2 Answers 2

3
\$\begingroup\$

You can if you want.

Let's see what we get:

Vio = Vdd * Ri/ (Ri + R1)

Vio = 5 * 1e6 / 1.001e6

Vio = 4.995 which we engineers like to call 5, or since you are using this as a digital input, 1.

If you follow the manufacturer's recommendations in the datasheets and app notes, you really don't need to worry about the input leakage current.

You may care in high precision applications or extremely low power applications, but not as a button input.

\$\endgroup\$
2
  • \$\begingroup\$ So maximum amount of current a pin can handle is calculated without the input impedance . Is this corrent ? \$\endgroup\$
    – Dogus Ural
    May 25, 2016 at 19:40
  • 1
    \$\begingroup\$ Yes. Sinking and sourcing current limits are given for low impedance (output) mode (typically). \$\endgroup\$
    – Ryan B
    May 25, 2016 at 19:48
1
\$\begingroup\$

The current rating for an I/O pin is the maximum current that the pin can source or sink when it is used as an output. When the pin is used as an input, the current in or out of the pin will be near zero.

When selecting a pull-up resistor for an input pin, you should look at the current the device driving that input can handle, and, for faster signals, the effect of the resistor value on the signal risetime. For a switch input, 5K - 10K is a reasonable pull-up resistor value.

\$\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.