Help with 16 pots, 8 encoders, 10 switches, 8 LCD

Hello, I am new to the arduino community, so thanks for your guidance!

I am looking to interface a lot of components to a Duemilanove. My question is what the best approach might be. I've considered i2c and multiplexing - and some combination thereof.

I've looked through the Multiplexing, ADC, I2C, Input Devices, and LCD sections of the Playground, so I have an idea of how each one could be implemented singularly. But I thought it wise to consult you all who've worked on the Arduino before combining them.

Here is the list exactly: 16 analog potentiometers 8 rotary encoders (24 step encoders) 10 switches (8 push buttons on the encoders plus 2 additional) 8 LCD displays (8x2 Character, HD44780-compatible)

The pots are the most important as far as speed and performance. All the inputs will be piped over USB to Max/MSP, which will also determine output to the LCDs.

Can the i2c bus handle several port expanders and LCDs, or would I better splitting up analog input, digital input, and the LCDs? Or is there a more efficient approach still?

Any recommendations or tips are much appreciated!

This is going to be difficult.

The pots and switches are no problem you can use two 4051 muktiplexers to implement 16 pots using 3 digital pins and 2 analog on Arduino. But 8 encoders and 8 LCD’s requires a lot of processing and I/O pinns.

You would need to find some LCDs that could be interfaced over I2C or sometinig similar. And for the 8 decoders i’m blank. Try to search the foreum for decoder info. I know it has been done.

For a project like this i think that a very modular design aproach is needed.

So many rotary encoders might be tricky. One way would be to get a count from them by hardware and then read that count into the Arduino, in that way you are less likely to miss pulses. I have just written something to show you how to do this:- http://www.thebox.myzen.co.uk/Workshop/Rotary_Max.html

Then for more I/O I would defiantly use the MCP23016, this is an I2C expander that gives 16 I/O lines. The advantage is that it has a line that goes high if any of the inputs change. Therefore you can rapidly see if a read of all 16 inputs is needed by just monitoring one input.

For a project like this i think that a very modular design aproach is needed

The device itself is modular, so good thought. It is essentially a joystick, rotary encoder, and LCD module … times 8; with two additional switches.

The end result will be a control surface for creative input (Max/msp)

Thanks.

Would a cascaded approach work where you have say, 4 Arduinos - each running two sets of joysticks, encoders, switches and LCDs, aggregating the IO data and communicating with a 5th central Arduino for processing?

Would a cascaded approach work where you have say, 4 Arduinos - each running two sets of joysticks, encoders, switches and LCDs, aggregating the IO data and communicating with a 5th central Arduino for processing?

That would simplify the component processing, but could the 5th Arduino's tx and rx busses be able to handle this much information?

wouldnt you run into the same serial rate constraints working with one duino?

Mike -

Nice idea on the hardware encoder read. However, after reading your article I am unclear how the system might connect to an Arduino.

Can you clarify what the software would need to do with the incoming 'Axis output count'?

Thanks

The axis out count should be fed into the Arduino, either through separate input ping, or through things like an I2C expander, or an input shift register.

The Axis 1 count output can be used to indicate that the count has changed, then you could read the counter outputs to see by how many it had changed or you could just read the counter and see if it is the same as last time.