Project involving lots of i/o ports and central computer

Thread Starter

awwwt

Joined Aug 24, 2015
60
Hi everyone,

I am beginning an art project that needs to involve 150 buttons switching 150 LEDs on and off (that means 300 ports in total!). They also all need to be connected to a central or master computer somehow that can know the state of each button or LED (on or off) and also send a signal to switch the LEDs on (overriding the physical button). The central computer is needed because I'd like to create some level of gamification or interactivity with the set of LEDs.

I have done a number of Arduino / Raspberry Pi projects before but not of this scale - I know it is ambitious but would be great to get any suggestions on where to begin. The main challenges I have firstly are the number of LEDs and sensors, but perhaps more so the need for a central computer of sorts.

I have thought of the following options as potential starting points, but haven't looked deep into any of them yet so I don't know if any of them are feasible...

- Using multiple Arduinos controlling a number of LEDs / buttons that are plugged into a web server via ethernet cable, and doing the processing through a web app of sorts.
- Chaining a bunch of Arduinos together with i2c or the RS485 (similar to the option above, but without the server)
- Using lots of shift registers for both the LEDs and the inputs, and doing the processing inside a single Arduino.
- Something else that doesn't use Arduino at all, that has at least 300 i/o ports?

I know this is a quite specific post, but any suggestions or comments on my proposed method would be super helpful!
 

MaxHeadRoom

Joined Jul 18, 2013
30,890
A 1 of 16 data distributor (74154 etc) would increase your outputs by x4, but still need a few.
For a industrial solution, check out Opto22, they have PLC simulated controllers.
Max.
 

Thread Starter

awwwt

Joined Aug 24, 2015
60
A 1 of 16 data distributor (74154 etc) would increase your outputs by x4, but still need a few.
For a industrial solution, check out Opto22, they have PLC simulated controllers.
Max.
Thanks so much for the suggestion, I am looking into Opto22 and it seems they can be used with a Raspberry Pi, so this could be a good solution that bridges my knowledge with more industrial methods. Thank you!
 

geekoftheweek

Joined Oct 6, 2013
1,429
How about something along the lines of the led cube for your leds? More or less connecting things in a grid and using only a layer at a time. You could turn some things around and do the same for the buttons. You will end up with some leftover pins in the end, but it could be done with four 16 bit shift registers if I'm thinking right.
 

dendad

Joined Feb 20, 2016
4,642
Look at the MCP23017 I2C 16 I/o chips.
there are lots on info sites available. Adafruit has a good intro.
https://learn.adafruit.com/mcp230xx-gpio-expander-on-the-raspberry-pi/overview?view=all
You can run 8 of these per I2C channel so it could be a good start. Each pin can be an input or an output. You may have a RasPi talking to slave Arduinos with the I2C port expanders on them.
That may be a way to go. Please let us know how it works out, whatever you decide to use.
 

dendad

Joined Feb 20, 2016
4,642
There is also the MAX7300 with 28 ports.
Max.
A very handy chip!
How about using both? As long as the address spaces are not the same, 4 x MAX7300 = 112 ports, and 8 x MCP23017 = 128 ports.
Or just one type and add some extra gating to select banks of the I2C expanders could also be used to add more to the single I2C channel.
An interesting exercise to get that many I/Os going.
 
Top