Go Down

Topic: Mux shield + buttons + internal pull up? (Read 605 times) previous topic - next topic

Wuerfel_21

I still have the old Mux Shield (the really old one) here and i want to use it to interface to a few arcade buttons and joysticks i also have.

Now my question is, as it'd be super annoying to have a discrete resistor for each of them, i would just wire them to the pin on the mux shield one one side, and ground on the other side, and have the pullup do the job(to my understanding, the multiplexers used on the shield just connect the shields pins to the arduinos pins).
Would that work?

Also i think there should be something between the button and ground to protect it from short circuit, e.g. if i plug the wire into vcc by accident(its right next to the pins of the shield) or the arduino crashes and sets it to a high output?

Grumpy_Mike

Quote
Would that work?
Not very well. While the one input you are selecting would have a pull up resistor on it all the other un addressed inputs to the multiplexer would be floating and for a multiplexer that is a bad thing and causes cross talk on the channel you have selected.

Quote
Also i think there should be something between the button and ground to protect it from short circuit,
I don't.

Quote
if i plug the wire into vcc by accident(its right next to the pins of the shield)
What wire? A input pin can be connected directly to 5V.

Quote
the arduino crashes and sets it to a high output?
That is not going to happen unless you code it to happen. The architecture of the processor stops those sorts of run away crashes you get with PCs.

I detest this practice it is another example of safety gone mad.

Wuerfel_21

Well then, i gonna have to live with a dozen of resistors on breadboards...

About the wire to 5V, i meant accidentially plugging the wire from the button into 5v instead of the input, when the button is connected to ground on the other side...

Grumpy_Mike

Quote
i gonna have to live with a dozen of resistors on breadboards.
Please do not use solderless bread board, it is very unreliable. If you use strip board you can solder a surface mount resistor between the tracks.

Quote
About the wire to 5V, i meant accidentially plugging the wire from the button into 5v instead of the input, when the button is connected to ground on the other side...
It is only a problem when you press the button but then you check all the wiring before you apply any power don't you.  ;)

Paul__B

While the one input you are selecting would have a pull up resistor on it all the other un-addressed inputs to the multiplexer would be floating and for a multiplexer that is a bad thing and causes cross talk on the channel you have selected.
I doubt that.  It simply makes no sense.  The entire design intent of a multiplexer is to prevent exactly such cross-talk.  If it cannot do that, it is useless.

And I particularly doubt it for digital inputs which are not frequently switching.

Figure 4 of the datasheet indicates the presence of protection diodes so the unterminated inputs can not drift significantly beyond the supply rails.

This (analog switch terminal) is not an input buffer, so there is no concern about supply "bypass" current at intermediate voltage levels - it is intended to operate with analog values whether sourced at low or high impedance.

In short, using a common pull-up to the "Z" terminal is a perfectly sensible economy of components.

Grumpy_Mike

Have you tried using multiplexers with floating inputs? Make sense to you or not you need them. When you try it practally you get troubles. There has also been a few threads where this advice has made things behave.

Go Up