Is it possible to connect two CD4051b analog multiplexers together so that I can receive 14 analog inputs through them? Just by using one analog pin and three digital pins on the Arduino UNO.

  • 2
    CD4051b is an analogue multiplexer, not a shift register. Your question seems to suggest you want lots of analogue inputs, not a shift register. Have you read (or seen) the data sheet?
    – Mark Smith
    Commented Dec 16, 2017 at 8:41
  • Oh okay. Yes I need analog inputs. What is the best option I have.
    – 0x000005A
    Commented Dec 16, 2017 at 8:44
  • Thanks -- I've edited your question to reflect what you really want. Can you tell us more about what signal(s) you're trying to multiplex (switch) please?
    – Mark Smith
    Commented Dec 16, 2017 at 8:46
  • Okay the components I need to connect are - 5 LDR sensors. 5 PIR sensors and 3 ambient heat sensors.
    – 0x000005A
    Commented Dec 16, 2017 at 8:48
  • I have used all my digital input pins and only have the 6 analog in pins left.
    – 0x000005A
    Commented Dec 16, 2017 at 8:49

1 Answer 1


Each CD4052B multiplexes 8 input to one output, and you need three digial pins to control it. You have the six analogue input pins available and those pins can also serve as digital outputs, so you should be able to use them to do what you need.

I would do as follows:

Assign three of your spare pins to be digital outputs. Use these three to address both CD4052Bs together -- so both devices will receive the same addressing.

Connect the output of one CD4052B to the fourth analogue pin, and the output of the second CD4052B to the fifth analogue pin. These will be your inputs.

On both CD4052Bs, tie the INHIBIT pin low, so they are permanently on. (If you want to be able to switch them off, for some reason, you an use your sixth pin to control the INHIBIT line on both devices.)

Now when you want to read from sensor 1, you set 000 on the address lines (A, B and C) and read from the first input. At the same time you'll have sensor 9 on the second input.

It would be well worth reading the data sheet


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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