Multiple Resistor Ladders with one arduino?

Is it possible to have multiple resistor ladders with one arduino UNO to control ~25 buttons that may have to be pressed simultaneously? I would like a resistor ladder to be in parallel with different resistors for each button, but to provide each set of ladders its' own 5v source. Would they all have to connect to the same ground if it is possible? Thank you for your time.

What are the switches connect to?

If you just want data entry, use an IR remote.

Is it possible to have multiple resistor ladders with one arduino UNO to control ~25 buttons that may have to be pressed simultaneously?

6 analog pins each with a 4 or 5 way ladder would work. Its much easier if only one button at a time
is pressed, as such ladders of push buttons are non-linear so button combinations are complex to
figure out.

There are ways to make a linear ladder with power-of-two scaling, using a constant-current source and
each button shorting across one resistor in the 1:2:4:16 ladder - then the voltage is a scaled binary code
for the set of buttons pushed.

MarkT:
6 analog pins each with a 4 or 5 way ladder would work. Its much easier if only one button at a time
is pressed, as such ladders of push buttons are non-linear so button combinations are complex to
figure out.

Thats the thing, it has to be pressed simultaneously. So how would I power the 4 buttons a row, for 6 rows (Or 5 buttons for 5 rows). I'm picturing the 5v to power 6 ladders in parallel then it all goes to the same ground, if that makes sense. But I am wondering if I should be worried about damaging the arduino by doing that? And I think I'd rather do the ladder in parallel just so the resistor math is easier. And I don't the IR remote is the direction I want to go with this

I took far too long to wire up an R2R resistor ladder on a DIP header for 6 buttons.

I also ordered some SIP 8 button R2R resistor ladders from Digikey for $20 for 25 of them. Much simpler. And you can have multiple button presses.

https://www.digikey.com/product-detail/en/bourns-inc/4610X-R2R-103LF/4610X-R2R-103LF-ND/3787967

polymorph:
I took far too long to wire up an R2R resistor ladder on a DIP header for 6 buttons.

I also ordered some SIP 8 button R2R resistor ladders from Digikey for $20 for 25 of them. Much simpler. And you can have multiple button presses.

Thank you for the help. I'm looking at the data sheet for these and it is going over my head. I understand where to put the buttons and all, but where do I input power to them? These look helpful, I just don't quite understand them. Also how accurate can these be since you can have 10-16 buttons on one pin?

A complication is that an R2R ladder cannot just use pullups, it must be driven with symmetrical sink/source. So either use SPDT buttons/switches, or use a 4049 or 4050 CMOS inverter or buffer. Then you can put a pullup on a SPST button/switch.

In the datasheet for that SIP, look at the "10 Pin 8 Bit SIP".

Pin 1 is the output that goes to the Arduino analog input. Pin 10 is grounded. All of the other pins are either connected to ground or 5V (or 3.3V if your Arduino is running on 3.3V) by the switches or a buffer driven by the switch.

That all got super complicated super fast. I honestly at this point would rather build my own resistor ladder just because I don't have control over what type of buttons I use. I would just like to know, if I build my own resistor ladder. I can power it from the same 5v source as 4 other resistor ladders without frying my arduino. If i have my resistors relatively high the current should not exceed what the arduino ground can handle?

"That all got super complicated super fast. I honestly at this point would rather build my own resistor ladder just because I don't have control over what type of buttons I use. I would just like to know, if I build my own resistor ladder. I can power it from the same 5v source as 4 other resistor ladders without frying my arduino. If i have my resistors relatively high the current should not exceed what the arduino ground can handle?"

A DIY ladder network is not the way to go as manually selecting resistors is arduous.
The resistors are one problem the required amplifiers is a whole other story.

Suggest you use a switch matrix as it would be reliable.

Read this complete discussion:
https://www.gammon.com.au/forum/?id=14175

polymorph:
A complication is that an R2R ladder cannot just use pullups, it must be driven with symmetrical sink/source. So either use SPDT buttons/switches, or use a 4049 or 4050 CMOS inverter or buffer. Then you can put a pullup on a SPST button/switch.

Pin 1 is the output that goes to the Arduino analog input. Pin 10 is grounded. All of the other pins are either connected to ground or 5V (or 3.3V if your Arduino is running on 3.3V) by the switches or a buffer driven by the switch.

Ok i understand why you were pointing me towards R/2R networks. I need it if I'm doing multiple buttons at a time. And I am starting to slowly understand it all. That does seem like a good solution, but I can have multiple wired up right? I still dont quite understand spdt buttons but thats ok.

larryd:
A DIY ladder network is not the way to go as manually selecting resistors is arduous.
The resistors are one problem the required amplifiers is a whole other story.

Suggest you use a switch matrix as it would be reliable.

And i appreciate this input Larry. That whole page you linked was super helpful, I'm going to study it a bit more, but it looks like a great solution.

For multiple switch press to be detected, you will need the anti ghosting diodes that the discussion mentions.

cct. with ghosting diodes

Here is a one switch at a time cct. I worked on.
It contains no ghosting diodes so you would have to add them.

SPDT is Single Pole Double Throw. So the center contact is always in contact with one of two other contacts.

SPST is Single Pole Single Throw. So there are only two contacts. A switch labeled NO is Normally Open, closed only when pressed, this is the most common type of pushbutton. Labeled NC means Normally Closed, pushing it opens. Interlock switches that remove power when a cabinet or door is opened are made this way.

DPDT is Double Pole Double Throw, the Double Pole just means it has two SPDT switches in it. Similarly, 4PDT means four SPDT.

It is quite simple once you understand the acronyms.

A SP6T switch would have one main contact that switches between 6 other contacts, for instance a 6 position rotary switch.

Here is a page on Sparkfun about it:
https://learn.sparkfun.com/tutorials/switch-basics/poles-and-throws-open-and-closed

I have a Teslapunk prop I'm building that has several toggle and pushbutton switches. I don't want to use up all of my inputs on the buttons and switches, and they may be left in many combinations. So I'm using an R2R network, the SIP that I linked to. I could use a buffer IC on the pushbuttons so I can use momentary SPST, but instead I'll just choose SPDT pushbuttons. The toggles are all at least SPDT anyway.

You do have to take the normal precautions against noise when using analogRead(). If using Vcc as the reference voltage, make sure it is well bypassed, avoid ground loops, that sort of thing. You should be learning those skills if you don't have them already.