So I have a project which would require somewhere between 10 to 20 sensors. For the purpose of this use, the sensors are either open or closed.
So for now I am using simple push buttons on a breadboard.
One of the restriction I have is that I plan on using a regular Cat5 cable to connect all the sensors in series. So I have a limitation of 8 wires (7 really) to read 20 sensors. I was exploring the idea of putting a different resistance value on each sensor so I could put many of them on a single wire.
So far I realized the following:
- It is really hard to have reliable binary like resistance values ( ie.: to have the Analog pin return 8, 16, 32, 64, etc. as there is a lot of play room)
- It can take a few seconds for the actual proper readout to stabilize when a state change.
- Using a custom array and defining resistance values manually, I have been able to isolate 10 push buttons on a single wire. I can tell which one is pressed... so long as you don't press more than 1 button at once.
But I have real trouble finding a reliable way to know what button is pressed when multiple buttons are pressed. (Because it is almost impossible to be precise with a binary-type scale, I tried skipping 2 numbers (ie: 8, 32, 128, 256) but the analog output is limited to 1023 so that put me down at only 4 sensor per wire.
Have anyone experimented with a similar situation of trying to isolate multiple binary states on a single analog input ? Is there a better way when dealing with many sensor and being limited in term of wires ?
Thank you !