So, I'd like to put a button between input and output pins to read when button is pressed. What minimal resistance should I add to the scheme not to burn Arduino when the button is pressed? Does this value depend on Arduino model?

  • Why between an input and output? Have you read the Button tutorial on the Arduino site? arduino.cc/en/Tutorial/Button – Majenko Apr 3 '16 at 16:32
  • @Majenko I see, it should probably be "what minimal resistance should be between ground and 5V", I guess.. – YakovL Apr 3 '16 at 16:49
  • @Majenko to make sure I understand you correctly, I've asked another question: arduino.stackexchange.com/questions/22672/… – YakovL Apr 3 '16 at 16:54
  • @YakovL - posting additional closely relations questions is frowned upon, it is better to edit the existing question. – Chris Stratton Apr 3 '16 at 20:46
  • @ChrisStratton I was going to edit this question after I get an answer to that other question, and "correct" question would be "What minimal resistance should be between 5V and GND pins not to burn Arduino?", but as you have answered this first formulation, I'm not sure what would be more appropriate now.. – YakovL Apr 3 '16 at 22:13

Looking towards the high end of recommended (vs absolute maximum) current and considering Ohm's law at a 5v difference if two outputs are trying to drive each other to opposite values, you would probably get away with as little as 250 ohms. But in most cases that would needlessly waste power, and in the case of multiple instance you could start totaling towards the limit of power supply current for the chip overall.

Typical values for external pull up resistors are more in the range of 1K-10K though higher is not uncommon - the internal pullup which you can optionally activate by setting the output state of an input pin high has a value of several tens of kilo ohms. Lower values will consume more power, higher values may be less reliable in a noisy situation.

| improve this answer | |

To read a button, normally you hook one end of the button to ground and one end to a pin in INPUT_PULLUP mode. Normally the pin reads 'high' because it is connected to +5v with a biggish resistor inside the arduino. When you press the button, it shorts out to ground and the input reads 'low'. The chip already has suitable resistors in it to handle this, and you don't need to worry about it. Just connect one end of your button the the pin, the other to the chassis, INPUT_PULLUP and away you go.

Output pins should have no less than 250Ω on them.

Beats me why you are thinking of connecting an output pin and an input pin together.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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