For a school project i have interface 100 photocell (photoresistor) I have a bunch of cd4051s lying around but since its only 8 channel and the arduino has only 6 analog pins do i have to use another arduino as well or is there another option.
And comes the problem if there is a way by multiplexing the multiplexers (which seems possible but i figured out i dont have enough digital pins to do it).
Each first level MUX selects 1 of 8 second level MUXes. That's 64 analog inputs on one Arduino pin. Doubling gives 128 analog inputs. You just have to keep track in software which channel you're looking at.
Use an additional 4051 to distribute a 0 to the INH signal (otherwise pulled up, to turn the muxes off) of (up to) 8 additional 4051s based on three digital outputs of the AVR, and then feed their tied-together outputs into an analog input. That gives you up to 64 sensors per analog input...
(You could use a logic decoder like the 74HC138 instead of a 4051 for the INH signals, and you wouldn't need the pullups. My suggestion assumed that you ONLY had 4051s...)
Seems a poor solution for old CD4051 chips. Specs (speed, 'on' resistance) are worse than the more commonly used 74HC4067. Several banks (as many analogue pins as you have spare), and using the INH pin seems a lot better.
Why 106.
96 (4 * 3) or 120 (5 * 3) seems easier and more logical to code.
5 analogue inputs, with 3 chips per input. Or 3 analogue inputs with 5 chips each.
Unless you have access to a Mega. then you can put one chip on each analogue input.
In that case it won't matter if you have 13 chips (104 inputs).
Leo..