Choosing gpio multiplexer

i need 16 inputs and i want to use a multiplexer or something similar. i currently use the pcf8574 to handle my outputs and i think i can use it for input. the pcf8574 would work i think for buttons or other low speed applications, however i also need a couple analog inputs and would prefer if i could wire some dht22s or other temp sensors.

What are my options besides pcf8574 im not very familiar with these types of components? I would be willing to use multiple multiplexers if they are only available with 8 inputs. i would also prefer it to be I2C

A 4051 or 4067 will do for analog inputs and can be used for polling digital inputs as well. For digital inputs, you can look at a 74HC165 shift register or the MCP23017 (I2C) or MCP23S17 (SPI) port expanders. Or your PCF8574.

1 Like

How come i cant find any i2c 8/16ch analog to digital multiplexer?.

If i wanted to keep all i2c the only thing i could find for analog input is this, PCF8591 . with 4067 or 4051 i would need to use 4 pins on the mcu.

are any of those modules capable of using OneWire to talk to dsb temp sensor? maybe dht22?

You can use ADCs with integrated multiplexer; not sure of the type.

You can always use a (digital) port expander and use 3 or 4 of its pins to control the selection of the input of the 4051/4067.

I don't know.

I've use DHT11 in the past but never looked into the details.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.