Hi all,
Anyone knows if there's a 32 channel multiplexer? I've seen the CD74HC4067 (http://bildr.org/2011/02/cd74hc4067-arduino/), but I believe there must be a 32 channel one, so you use 5 digital pins instead of 8 (if you want to use to 16 channel ones)..right?
I am presuming you mean analog multiplexers? Farnell turns up two Analog Devices chips: ADG732BSUZ and ADG731BSUZ, both TQFP48 surface mount packages. Good to 5.5V though.
Use 2 x 74HC4067 with the ABCD inputs driven from the same 4 Arduino pins, and a separate Arduino pin driving the INHIBIT input of each 74HC4067 (6 Arduino pins in total). Drive the INHIBIT pin of the CD4067 that you want to select LOW and the other one HIGH.
If you really want to use only 5 pins rather than 6, connect the ABCD pins as above but connect one INHIBIT input direct to the 5th Arduino pin and the other one to the same pin through an inverter (e.g. 1/6 74HC04).
and the inverter can be as simple as an NPN transistor and 2 resistors.
Arduino output to one74HC4067 INHIBIT, and to 180 ohm resistor, other side to transistor base
transistor emitter to ground
+5 to 5K resistor, other side to transistor collector, same junction goes INHIBIT on the second part.
so you use 5 digital pins instead of 8 (if you want to use to 16 channel ones)..right?
As others have said, you should look at sending the same control signals in parallel to two 4067 chips and use the fifth pin in a chip enable setup. Using other types of chips, I've used a multiplex chip to multiplex power to other multiplex chips. Using 8 pins, one might use one 4067 to control power to 16 other 4067 chips.