Multiplexers and Arduino
This taken from the arduino forums may be useful:
let's take the mc14067 (http://www.onsemi.com/pub/Collateral/MC14067B-D.PDF) as an example this is an 16 channel analogue multiplexer. i've use this a lot of times.
connect pin 24 to 5V and 12 to GND. then connect a 10K resistor from 5V to pin 15. this is powering the chip and enable the switch that lets you pick which input to read.
now connect pin 1 to analogue input 0.
now we need to tell the chip which channel we want to read. this is done by connecting 4 digital outputs to pins 10,11,14,13. By using a combination of digitalWrite commands you can set the input channel to read.
all the other 16 pins are inputs where you will connect up to 16 pots (or any analogue sensor)
the code will look like this:
for (i=0; i <16; i++) { # write i in binary on 4 output pins # this selectes the input val = analogRead(0) # store val somewhere or send it on the serial port }
now the cool part is that if you hook up one of these to each analogue input you can have 96!!!! analogue inputs