Let's say I have 32 simple temperature sensors or SD-card modules or I don't know... But only a very limited amount of pins available on my Arduino.
Is there an IC that can take 32 inputs and can connect one of them at a time to an output pin when an Arduino sends a signal to it?
I'd imagine it to look somewhat like this:
I'm also a bit worried about IC switching, as the voltage may not be as stable as it is with mechanic switching. But I really don't know if that is actually the case.
It all depends on what you want to do. An analog temperature sensor is not the same as the digital signals for a SD card.
For analog signals (sometimes also digital signals) a multiplexer can be used, or in short: a "mux". Gammon Forum : Electronics : Microprocessors : 74HC4051 multiplexer / demultiplexer.
It can be used for example for analog sensors.
With 2 analog inputs and two 16-to-1-mux, you get 32 analog inputs.
Or cascade them, with 1 analog input and nine 8-to-1-mux, you get 64 analog inputs.
For many SD card modules, a bunch of digital logic chips is probably better.
For 32 temperature sensors, one (or more) 1-Wire busses with the DS18B20 is probably better.
For many digital outputs (for example leds) there are shift registers with 8 outputs. There is also a output-shift-register that can drive leds.
For leds, also charlie-plexing is possible.
For many digital inputs, there are shift registers with 8 digital inputs.
Would that work for me?
Is there a loss in voltage when using such a multiplexer?
When I use it for digital purposes, would it immediately switch between 0V and 5V or would it potentially have values in between for a fraction of a second during the switching process? And if so, would that be a problem for something like an SD-card module in terms of data loss etc?
You may want read the post above yours agin.
The bored you posted is for stuff that gives 0 to 5 reading.
SpI is 0 or 1 low or high you don't read that with Adc. There chips to do anyting you'd want but you need to plan that out.
Post what your really wanting to do
felic:
What does Spirit, spi and Adc even stand for? Do you have any links?
When I google for Adc I only find weird stuff like "After-death communication".
SPI is a inter-chip comms bus, which is how you talk to SD cards.
ADC = analog to digitial converter
Google will find these things if you use the right keywords: "electronics SPI", "electronics ADC"
For multiple SD boards, you would connect SCK to all of them in parallel, MOSI in parallel, and MISO in parallel.
Then each board would need a unique chip select pin. You achieve that by using part like 74HC138
3 address lines would select the output that will go low when control signal G2 (G2A connected to G2B) goes low and G1 is high. Set up the address to select the board, then do standard board access commands.
Can put a lot info on a $5, 4GB SD card. Do you really need multiple?