i don't know how to wire my multi-directional switch to a DUE. i have a few questions:
Do i have to connect pin 1 and 2 to ground? to which pins can i connect the rest?
And if i want to use external pull-up resistors instead of the internal, do i need a pull-up resistor for each input or can i connect only one resistor between VCC and the switches?
Yes they are right. Why do you want to test both options? They will both work and you don't have the equipment to do any deep investigation into the noise margin which will be the only difference between the two.
Grumpy_Mike:
Why do you want to test both options?
Because i want to build a shield and i am not sure if it works with the internal pull-ups because they are 50kOhm and the minimum current of the switch is 1mA. I am not sur if ther will be any problems...
If you're using the internal pullup then the minimum current of the switch needs to be greater than the 5V / 50K = .0001A. And it is. But I won't discourage you from trying both options -- good experience.
Be sure to take a few moments to search for menu libraries for the Arduino. There are a few nice ones out there.
Chagrin:
If you're using the internal pullup then the minimum current of the switch needs to be greater than the 5V / 50K = .0001A. And it is. But I won't discourage you from trying both options -- good experience.
The DUE has 3.3V. So i get 0.066mA and that is less than the minimum current of the switch so it wont work, or am i wrong???
Chagrin:
Be sure to take a few moments to search for menu libraries for the Arduino. There are a few nice ones out there.
So i get 0.066mA and that is less than the minimum current of the switch so it wont work, or am i wrong???
You are not wrong if and it is a big if, the switch will not work with currents less than 1mA. As I said I am not at all sure about the varsity of this. The standards of data sheets is not what it used to be.
Normally minimum currents are only required when operating at high humidity with none noble metal contacts.
Grumpy_Mike:
Not too sure that a minimum current for a switch makes a lot of sense.
However if you want to ensure 1mA then hose external pull-ups need to be 3K3.
Any pin will do they are all the same when they are an input.
Perhaps the minimum current ensures a long lifetime by self-cleaning action of the contacts
(breaking down oxide film)? Perhaps its nonsense, I've certainly not seen such a spec before
to the best of recollection.
I came across the issue some years back where I was using an industrial type switch in a test machine that switched low energy. Needed to source another switch that still had an industrial look and could handle the low level current and voltage. It had snap-action and gold contacts.