eli5: when a 5V signal is attached/applied directly to an input pin on an arduino, does that input pin act as ground?

284 views

For example, when a push button is pressed. The 5V supply connects to the signal cable, which is attached to Pin 2, for example.

But where does the current ‘sink’ into? Doesn’t it need an explicit ground pin? If it goes right into Pin 2, is that the ground pin in disguise?

Or is the signal pin (pin 2) the one applying the current through the push button..?

In: 0

6 Answers

Anonymous 0 Comments

The input pins are internally connected to ground pin through a capacitor. That means, that the current flows in/out of pin only then the input level changes, and only for a brief time. The logic level is detected by the charge on the capacitor (it’s not just a capacitor, but a gate of a MOSFET).

If internal pull-up is activated, the pin is also connected to Vcc through a resistor. Connecting such pin to ground will create constant current, but connecting it to 5V won’t.

[Here you can see the internal schematic of the pin connection](https://microchipdeveloper.com/8avr:ioports) (first picture on the page).

You are viewing 1 out of 6 answers, click here to view all answers.