# 256 : 1 or 64 :1 or 32 :1, 5v multiplexer to handle 256 analog signals

I have an arduino mega and 256 analog sensors that I have to read. I already did it with a lot of 4067 16:1 multiplexers. At first it took all of my pins. Then I paralleled the multiexers to use only 4 digital pins to Control them and played with the E of them to turn them on or off.

Now my question is : is there a 256 : 1 multiplex that operates in the 5v range so my mega can handle it (or even smaller arduino) or if not a 128:1,64:1, 32:1. In order to make my board simpler.

Thank you very much for your time reading this. Have a nise day.

• other microcontrollers than the atmega have multiple ADC channels (8 is pretty common, typically realized through an integrated mux). So, by switching to a less expensive platform than Arduino, you could also reduce your hardware complexity by a factor of 8. Depending on the bandwidth of your 256 signals, an array of ADCs and a few shift registers or digital muxes might be way easier than external analog muxing. It all depends on your signal! May 1, 2021 at 11:28
• Do you actually need analog multiplexers, or are you looking for digital levels? The ATmega2560 has 16 ADC channels. What is the input range of your signal? May 1, 2021 at 17:18
• What if I used 2 16:1 multiplexers, 1 for 5v & 1 for gnd, for all of my sensor in a 16x16 matrix. Use 4 digital pins for each mux to control and 1 digital pin to set high for the 5v mux and low for the gnd mux. So every time I have only one sensor powered and provide to A0 data. This is 10 digital & 1 analog. Even an uno could do that. Should I use any diodes? Is my thinking correct? Am I missing something? May 4, 2021 at 8:14

As a rough comparison, USD Digikey price for Q100 each of the first solution is $8.28 vs.$89.40 for the second. Or if you prefer LCSC, $3.17 for the first one. • Makes sense. The series impedance might be an issue to the OP. But who knows given the lack of specs and the fact that a 74HC4067 is already stated as acceptable. So I'd guess that twice the impedance would also be fine. I'm not sure the OP has a lot of other reasonable options. +1 – jonk May 1, 2021 at 7:41 • @jonk OP didn't even say 74HC. The CD4067 is 5x worse than the 74HC4067 (1200 vs. 225 ohms max at 85°C). May 1, 2021 at 7:48 • Ah. I guess even that much is unsure from the OP's writing. – jonk May 1, 2021 at 7:56 • What if I used 2 16:1 multiplexers, 1 for 5v & 1 for gnd, for all of my sensor in a 16x16 matrix. Use 4 digital pins for each mux to control and 1 digital pin to set high for the 5v mux and low for the gnd mux. So every time I have only one sensor powered and provide to A0 data. This is 10 digital & 1 analog. Even an uno could do that. Should I use any diodes? Is my thinking correct? Am I missing something? May 4, 2021 at 8:14 With microcontrollers available for sub$1 these days, it is not unreasonable to use a number of them vs 1 microcontroller and a large mux. Benefits might be less pcb area, faster acquisition time (as a number of adcs are working in parallel) and redundancy. Downsides might be the need to program (ie load the code into) a number of microcontrollers along with a bootloader etc.