Do microcontrollers have a big resistance?

That is correct, in the sense that it can be thought like that for the sake of simplicity, but in reality there is no resistance at all, as it's a CMOS input which has an extremely high input impedance. It can be thought as resistor so large in value that it's not even there, and theory no current flows in or out that pin.

However, nothing is perfect, and there can be leakage current flowing in or out of that pin, but in worst case it is in the order of 1 microampere at 5V voltage, so it can be thought of as resistance larger than 5 Megaohms.

Typical values for pull-ups is a more broad question, as there is no single answer. Depends on supply voltage, switch current rating, level of coupled noise etc. So from 1k to 100k maybe.


Can you give also typical values of pull-ups resistors and values of MCU resistance?

'Typical' MCU input resistance is >100MΩ, except for those that have built in pull ups or pull downs. But you shouldn't rely on a 'typical' value - read the datasheet to find the specs for your MCU (and remember that temperature can have a large effect).

For external pullup resistors the 'typical' values I have seen are around 1-50kΩ, but it depends on the circuit requirements. A higher value draws less current when the input is low, but has lower EMI immunity. Some switches may require a lower value just to get enough wetting current to keep the contacts clean.


A microcontroller input does not have a weak pull down as you have drawn it (R2). It has a high impedance in the form of a MOSFET gate which should be many megaOhms. There are other parasitic paths to the power and ground rails which would reduce that impedance but I don't know typical values, or even if there are typical values. Seems doubtful.

So there is an "R2" so to speak but it's not necessarily tied to GND. It could be tied to +V. You don't know. In reality there's probably one to both and what voltage it sits at when disconnected at is indeterminant. The way you have drawn it implies that with nothing connected to the input, the input pin will read zero which is not true.

But if you are talking about inputs where an internal pull-down (or pull-up) is enabled your diagram is correct (for a pull-down). I would expect the internal resistance to be no less than 20K typically.

In either case, you can say that all the current flows through the pushbutton but it is because the pushbutton resistance is very low (basically just copper). So "all" the current would flow through the pushbutton if the input resistance was many megaOhms, 20K, or even 100 Ohms. The pushbutton switch resistance is so low it almost doesn't matter what the input's pull resistance is.

schematic

simulate this circuit – Schematic created using CircuitLab