I've started recently a project with arduino : to build a USB controller for Ableton Live.
I've already made some tests with a UNO and 3 buttons and made a working structure from Arduino to Max4Live (and then Finally in Ableton) and it works perfectly, I can control and trigger clips and effects (with my 3 buttons).
Now start the part where I'm really newbie (i'm ok with programming, but electronics and wiring is new to me), and my Arduino Starter Kit Manual doesn't cover it :
I want to add around 60 Digital buttons (so to speak 60 Digitals inputs) and around 20/25 Analog Inputs to my project,
So my question is, which way would be the best/more reliable/ or simpler to do that ?
Should I add another (or even several others) arduino Boards and put them in series as slaves of the main one ?
My goal is to have to deal with only one USB at the end and only one Arduino sketch that would control the whole object.
I like to learn by experimenting by myself, but I would like to be sure, before buying any new device, that this a good idea in this case,
Another, rather crazy :-), idea to having many digital inputs is to use an old ps2 keyboard controller, with just a couple of digital pin (1 have to be an external interrupt) you can read almost 100 inputs!
Well it is I2C which means it is a bit slow for scanning all the analogue channels you want. I would still use the 4051, you can put one on each analogue input to give you 48 analogue input channels. If you are worried about the three digital pins to drive the addresses then you can take them from one of the digital port expanders.
I'm living close to Paris (France), and usually the chip/electronic online shop I check is the french site conrad.fr but it doesn't seem to sell anything referenced as 4051.
maybe in fact the first shop, Reichelt.de, is the solution here, i didn't searched enough yesterday and they seem to have others models of 4051 chips, with "long legs" this time :
Grumpy_Mike:
We are not. We are hanging an 8 input to 1 output selector on each ( well sufficient so that's three ) analogue input.
The Arduino chip is the .328, that has one ADC with a multiplexer to get the 6 ADC pin when using the DIP version or 8 ADC when using the surface mount version.
it appears to me that you have to read once, discard the noise, read again after it settles, then move to the next channel.
also, if you set 4051 chip 1 to the analog pins, you would want to toggle the 4051, go off and read the digital pins to allow the analog circuit to settle. then read once, discard, read a second time and use the data.
then toggle for the second 4051, go off and read the digital pins.....
most ADC chips have only one ADC and an onboard MUX
even an LTC2497 with 16 channel, single ended, it is one core ADC and on-board MUX.
I think the proposed 4051 is fine and am not offering that there is a better way. I am asking because I have 32 temperature sensors, that I will be hanging off some chip to read.... trying to get an idea why the pros chose one way over another.
f you set 4051 chip 1 to the analog pins, you would want to toggle the 4051, go off and read the digital pins to allow the analog circuit to settle. then read once, discard, read a second time and use the data.
Absolutely no need for double reading if the input impedance is 10K or lower. Also a double read is not the only way, you can switch the analogue multiplexer separately ahead of the read function to allow voltages to settle if the input impedance is too high.
Not sure what you are getting at but just feeding one 4051 into one analogue input minimizes the number of multiplexers the signal has to go through. Just using one analogue input and cascading 4051's into that results in one more multiplexer in the signal path.
trying to get an idea why the pros chose one way over another.