Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to connect 22 switches to an Arduino?

Status
Not open for further replies.

steven834

Newbie level 6
Joined
Dec 10, 2014
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
106
I have built in place 22 momentary SPST pushbutton switches with 23 wires (one common wire and 22 separate running to all the switches). Note there is electromagnetic interference noise in the area.
Option one .
Use Arduino Mega2560
Put my common wire to ground
Put a 100 ohm pullup resistor on each separate line and connect each line to a different io port.
Option two
Daisy-chain together three 74HC165N Shift Register and connect to arduino.
I don’t have a clear understanding of exactly how to do this and if I need any resistors or capacitors (I can’t find a wiring diagram).
I think when I use the shift registers I don’t have to program for debounce.

Is one solution better than the other or something else?
Thanks
Steven
 

In option 1 ise 10k pullups instead of 100E.
 

aren't the 100 ohm pull-ups better for my noisy environment? ( to increase the current and reduce effects of noise coupling)

Any comments on my bigger question?
 

Hello!

If you want 22 switches, you can use a 5 line x 5 columns grid. In this
case you can use up to 25 switches, and it will cost you only 10 signal
lines. As far as I remember, you may be able to do that with Arduino, even
the UNO type.

Beside this, 100 ohm sounds indeed very low, even in a noisy environment.
100 ohm will means 50 mA in 5V, which is more than 1A for your 22 switches.
In a noisy environment, even 50k would make it, except possibly in extreme
environments. What is the environment exactly?

Dora
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top