Chain 16-channel analog multiplexer/demultiplexer

I'm trying to figure out how to chain six 74HC4067 or similar 16bit multiplexers.

I have only 1 analog pin input and 7 digital pin output, which is enough to address each input (2^7 = 128 > 6x16 = 96). So I need to figure out how to select each.

Simplest solution wins, please avoid using any shields or shift registers, keep it simple.

• What do you mean as in chaining these multiplexers because this is not going to be a simple solution, as ONLY one channel can be on per moment. May 7, 2016 at 14:54
• What's the actual problem that you are trying to solve (6x 4067 is not a problem, it's a proposed solution)? What have you figured out so far? Why do you think that you're stuck? (I don't see any difficulties here. You fan out the analog signals and create a kind of a "tree" out of 4067s. The tree would have the depth of 2, and you would need a total of 8x channel-select lines to access each channel individually.) May 7, 2016 at 15:09
• Well I have only limited number of pins, only 1 analog and 7 digital pins. Question updated. May 7, 2016 at 15:11
• @pravdomil this looks like a cleverly disguised homework question. I find it odd that someone knows about '4067 analog muxes but doesn't know how to use them. Did we on EE.SE just get pwned? May 7, 2016 at 21:42
• I'm just a SE building some circuits. I know that there must be some way how to chain these chips. But I cannot figure out the scheme. May 8, 2016 at 12:32

It sounds like you want to select one of 16*6=96 source signals. You will need to place the 6 mux/demux parts side by side to give you the total of 96 sources. The four selection pins on each of these six parts will be bussed in common to four GPIOs from your microcontroller.

Then you will need one more mux/demux part to select which one of the above six parts will be the single input to the microcontroller. Wire the output of each of the first six parts to the first six channels of the cascaded mux. The select pins of the cascaded mux go to more GPIO pins on your microcontroller. Only three of these mux select lines would be needed (with the fourth being grounded) because you are using less than half of the inputs of the cascaded mux.

• great, that means I will need 6x16bit and one 8bit mux/demux right? May 7, 2016 at 15:19
• Yes, but you could just use 7 of the 16 bit parts if you want to simplify your parts procurement activity. May 7, 2016 at 15:23

You will need five GPIOs to control you multiplexers. Four for channel selection: S0, S1, S2, S3 and one for the enable pin (/E). You can tie this pins together at every multiplexer, so you will only be able to read the same channel on all of the multiplexers.

Furthermore, you will need six ADC input (analog input) to connect to outputs (Z) of the muliplexers to the Arduino.

The operation is simple.

1. Select the first channel on the MUX16s with S0-S3.
• Scan your first MUX16's output.
• Set the S0-2 of the MUX8 to the next channel (next MUX16).
• Repeat until all MUX16s are read.
2. Select the next channel on the MUX16s with S0-S3
• Repeat sub-steps.
3. Repeat until all channels are read.

Here is the circuit for three multiplexers, you can easily add the remaining three. Note that, this way you can only select the same channels on the multiplexers. If it is not suitable for you, then you can use more GPIOs.

simulate this circuit – Schematic created using CircuitLab