1

I have my Arduiono which has only a limited amount of Inputs/Outputs. But in my project I will have to attach a ton of potentiometers/buttons/LEDs, so I will have to use the IC4051-Multiplexer/Demultiplexer.

I have understood how to switch the Inputs/Outputs via the 3-Bits. But I don't get it, how to connect multiple ID4051s and process the signals(?)

Can someone explain that to me?

1

I have no experience of this chip but I would guess that you would need to connect the child level multiplexer to the output of the parent and use the outputs to drive the address lines.

You could look at an MCP23008 or MCP23016, these are 8 and 16 bit GPIO expanders that you control via I2C. You can have 8 of the MCP230008 (64 pins) before you need to look at I2C bus expanders (which you can get). I think its the same for the 16 bit version, but you would need to double check.

1

The 4051s are only useful, for your potentiometers. For leds, I'd use shift-registers. For buttons you could use input-shift-registers. Though there are better options. E.g. chips that can scan a matrix of buttons, or chips that send you an interrupt, if one of the buttons is pressed (so you don't have to constantly poll the button states.

As to the original question. You can connect the S1, S2, S3, and Z pins of multiple chips to the same pins on the Arduino. You need to use a different Arduino pin for each of the chips E pin.

You can then set the E pin of the chip you want to read to LOW. You then set the correct S1-3 pins to select which output/input of that chip you want to connect to. You then read the value from the Z pin.

I hope that makes sense. Otherwise, let me know.

  • Re “You need to use a different Arduino pin for each of the chips E pin”, one can instead use a 74LS138. This uses 3 address lines to select 1 of 8 outputs to pull low. – James Waldby - jwpat7 Nov 1 '16 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.