Expansion ports and optical with Nano

I am very new to Arduino although not new to programming (20+ years). I'm trying to get a feel for what I'd need for a project.

I need to control an LCD and receive inputs from multiple components some of which will have up to 60 switches (simple 'on' and 'off'). That data needs to be sent via optical line to control components on that end.

I've read about the MCP23017 which offers 16 additional pins and can be daisy chained up to 8 additional boards. Is this the only pre-made solution for adding additional ports? And would I potentially run into any limitations using the Nano unit?

My current thinking is this:

  • One Nano to connect to each of the components which have between 20-60 switches and use MCP23017 boards to connect all of the switches.
  • One Nano which connects to those other Nanos and which drives a small LCD display (text monochrome) and which uses an optical cable (not sure yet of a board part number) to communicate with another Nano.
  • That other Nano receives the data via the optical cable and routes the data to other Nanos corresponding to the inputs again using MCP23017 boards.

My hesitation with this is that there will be a number of chained MCP23017 boards. What would be a lot better is a board with 60 (or more) inputs and 1 output which could connect to the Nano or other Arduino board so that I could use just two Nanos and have one of these expansion boards per component.

Any thoughts would be appreciated.

Off the top of my head:

  1. Same sort of thing, 16 I/Os, chainable to 8 units.
  1. Buy 4 MCP23017 in DIP, make up a schematic and PCB in KiCad for a 64 input board, send off the Gerbers to have your PCB made, solder on the MCP23017 -> 64 inputs on a single board.

The bigger context needs describing. Connections to switches - screw terminals, ribbon cables, other connectors?

Your task is easily do-able. But, you describe locations with a large variation in the number of inputs - would you make a 64 input board, and use 24 of them, or would it be better to have 16, or 32, input modules that stack?
If all your switches come in by 2-pin header, for example, you could easily make a stacking 16-input card which you could stack eight of, for up to 128 inputs in a very compact cube.

YOu could also look at closer-to-industrial solutions, such as modbus-addressable input boards. For example, check Amazon for:
Isolated-Rtu-Controller-Module-Acquisition

Thanks for the replies!

I've never made a schematic and had a board made, but that sounds like a potentially good option.

The application here is for a pipe organ (no MIDI). As a sort of test, I'm wanting to setup a digital controller for the console in order to enable more memory levels. I could potentially just rewire the console only and leave the communication to the pipe chamber as is, but I'm exploring options.

Writing the code for the console is easy for me, but putting together the boards is new. So I'm wanting to get key on/off and I'd probably need an already existing setup for that though I can process the data using a Nano. There are 60 keys. There are also various pistons and tabs that need to be monitored and that'll be less than 60. If I go this route, that data will need to be sent up to the pipe chamber via optical and then split out to the various terminals and chests. The organ runs on 12VDC or higher so I'd need to devise some way to step down the voltage for the Nanos.

Hint Be careful, those chips are designed for on board usage, not from board to board. The problem will be in the communication with the processor and the noise injected into those control lines. Wire over 10" may work but expect a lot of problems. Post #3 has the best start on the correct answer. Mechanical spacing etc must be known to give a valid answer.

I can put the Nano and expansion port boards very close. But wiring distance to the input sources (keyboards) is unknown. It could be between 1-3ft. The modules which would be reading keystrokes are unknown at this point.