I was wondering if it would be possible to use charlieplexing as a way to select sensors. If so, what is the minimum number of pins required for charlieplexing to work?
End or means?
Are you asking about connecting more sensors than you have input pins available on the MCU? Perhaps “charlieplexing” is too specific a word to search for.
Sounds to me like you need to investigate IC that “multiplex” or “de-multplex”. Basically a dedicated chip to buffer the signals or digital values coming in from different sensors.
Also: make sure to tell the difference between different types of sensor signals: Some are binary (V high or low), some are analog (V in a range between high and low), some are digital (some sort of serial protocol sending bytes). Alle of these siganls can be whatever-plexed, I suppose. But mixing different types would be tricky. Might as well use a second MCU to do that trick. Many people do.
Some days I just don’t explain enough.
I was hoping to use charlieplexing to de multiplex sensor inputs. After reading one of the links posted in one of the forum posts here I did start to understand charlieplexing a bit better.
My thought was to get more sensors connected to a chip like a 08M. I would only plan on receiving digital signals. A yes/no from even 8 sensors is better than only 4. 16 sensors would be possible if one could mix charlieplexing and de multiplexing.
I hope I have given enough context to my thoughts.
There are a few ways
This doc from microchip has some neat ideas
http://ww1.microchip.com/downloads/en/devicedoc/40040b.pdf
The typical scheme is to use the ADC to distinguish between several binar inputs. What you do is to create a D to A converter with a resistor ladder.
I really think that tip #3 is very clever. You get three states from 1 pin — pulled up, pulled down, or not connected. The tip detects the not connected state by charging a capcitor and then reading the state of the capcitor to determine if anything is connected to it.
Shift registers
I’ve heard(read) of people using shift registers to hook up several sensors to one input, and then just shift the bits to get the right one. You’ll waste two or three pins to control the shift register but you’ll get eight more so that’s five more pins and if you daisy chain shift registers, you can get even more!
The only problem is that you have to select the right sensor by sending bytes to the shift register, and that might be a bit cumbersome if you haven’t worked with stuff like that before(it’s not hard though).