0
\$\begingroup\$

I probably have a basic question but i'd like a confirmation on my solution.

I have finished my arduino breadboard prototype which is using some basic momentary push buttons along with pull down resistors. See diag, left side.

Now it's time to build that into some real box with arcade push buttons. They have a COMMON, NC and NO pins. I have to place a dozen of them in a row and was wondering if i could simplify the design to avoid the resistors and the wiring effort.

I came with the solution on the right of the diagram. Arduino input signal pin is on the button's COMMON pin ; then 5V on NO and GND on NC.

enter image description here

With this solution i can simply connect all the NO together, all the NC together and just have dedicated wires between COMMONs and Arduino input pins.

But i'm wondering whether removing the pulldown resistor might generate some real problems. I can't see them since :

  • NO and NC can't be connected together so no risk of short circuit

  • in a stable situation, a signal pin will never be floating. If, when switching from NO to NC, there is a very small lapse of time where COMMON is not connected to either 5V or GND : whether the read signal will be the previous one or the next one makes no difference (previous = as if there was no floating, next = what will be in the next millisec)

  • in case of rebounds, well, that's the same pb with pulldown resistor.

What do you think ?

| improve this question | | | | |
\$\endgroup\$
  • \$\begingroup\$ As long as you do not configure your input as an output and attempt to drive it high (or low), you should be fine. \$\endgroup\$ – StainlessSteelRat May 25 '15 at 16:42
0
\$\begingroup\$

Your solution is a good one, provided that all inputs will always be inputs.

The advantage of the push button is that when it's not pushed, the pin is only weakly pulled to ground and the pin can then be used for other tasks, such as programming.

The bounce effect you describe is quite accurate, I do not know of any switches so badly built that they bounce between pins, so the bouncing can be very easily "helped" by adding a capacitor, if and when you find you still notice it. If the input circuitry isn't also performing weak pull-up it's quite possible the capacitance of the wires already takes care of a part of the bouncing. (Because the inputs of the Atmels used in Arduinos, when they are only input consume very little current)

| improve this answer | | | | |
\$\endgroup\$

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.