I am working on a project in which I need to accept 64 ON/OFF input signals into my Raspberry Pi. Is it possible by using four 16 channel multiplexers? How?

If not, then I have found out in other questions that "It is possible to expand up to 64 additional GPIO ports using some MCP23008 chips connected via I2C interface." But I quite did not understand how to do that (PS I am a newbie). Can anyone elaborate more about it?

What are other possible solutions to accept up to 64 digital input signals?


16 channel mulitplexers expose 4 digital pins

4 digital pins * 4 multiplexers = 16 pins on the Pi

So yea.. should be OK.

You could go for I2C Extenders though. That means you can add as many GPIO boards onto the I2C bus as you like. I2C is like a very simple network so you can controll any I2C device by working with the node names (yes you can mix and match various things on the same bus) It also works better than multiplexers as multiplexers have speed limits on PWN.

An interesting video with 128 GPIO's using two I2C channels

  • I have never done that. How do i achieve that? Could you please provide me more information on using I2C extenders with Pi? – Vijay Chavda Jan 5 '17 at 14:07
  • How will I be able to reference extended GPIO ports on the board? – Vijay Chavda Jan 5 '17 at 14:08
  • Yes please. Search google for using I2C with Raspberry Pi. There are a ton of articles, tutorials, videos, examples, source codes, LED lights and Temperature sensors available. Thanks you... – Piotr Kula Jan 5 '17 at 14:08
  • 1
    @VijayChavda if your going to need HI speed for your 64 GPIO pins, check out MCP23S17 chip. It uses a different protocol called SPI. The chip I stated can operate at 10 MHz (max.). – edesilets Jan 5 '17 at 21:22

You can use the MCP23017 I2C extenders which have 16 IO channels and you can use up to 8 of the chips on a single I2C bus giving you 128 IO channels. There are several companies making ready to use I2C expanders using the MCP23017 chips or you can make your own using a few external components.

This page http://www.raspberrypi-spy.co.uk/2013/07/how-to-use-a-mcp23017-i2c-port-expander-with-the-raspberry-pi-part-1/ has a demo using a MCP23017 chip on a breadboard and other ready to use boards are available such as https://www.abelectronics.co.uk/p/54/IO-Pi-Plus

  • Understood.. I think I will try to make my own.. Many thanks! – Vijay Chavda Jan 6 '17 at 5:16

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.