Using a 4067. Does every switch need its own pullup resistor? Can they all go through one resistor to vcc?

Novice here. I am using a 4067 to attach 16 switches to my teensy. As of now, they each have their own 10k pullup resistor to vcc. Is this necessary or can they all be routed to the same 10k pullup to vcc? Will this cause cross-talk?

1759946980295.png
 
If you connect them to a single pull-up resistor, connecting one input to ground will also connect all the others to ground...
 
If you connect 1 pullup resistor to the analog mux output rather than 16 resistors on each mux input, it can work but you will need to allow more time between switching the mux control pins and reading the signal.

Those mux chips have on resistance in the range of hundreds ohms. Teensy is very fast, so even with just the mux resistance and the capacitance of its pin and Teensy's pin and the ADC input, you will need a brief delay after changing the mux control signals to allow the voltage to settle before you read it.

The pullup resistor is 10,000 ohms, about 25X more. So if you had the mux selected to a pressed pushbutton and you chance it to one that's open, you must allow enough time for the 10K resistor to slowly bring the mux output voltage back up to logic high.
 
Oh right, it's an analog mux - you could just set pullup mode on the Teensy's input pin and not use any external resistors.
 
Have a look at the MCP23017. It has programmable internal pull-up of 100k, interrupt pin and more configurable.
 
Thank you all for your replies. I am actually needing to multiplex 32 knobs and 16 switches (so 3 x 4067s). Is there a better (hopefully cost-effective) way to do this?
 
Not sure how to interpret your answer. 🤔 Should I continue to try to help you ??????
Knob could be also encoders.
 
Analog switches like 4067 are usually the cheapest way.

But with so many analog signals along so many wires, it's easy to end up with a lot of analog noise. Best to use 5K or 10K pots. Also can help if you connect a ceramic capacitor between each pot and GND. Values between 10nF to 100nF (0.1uF) are fine.
 
Back
Top