How can we logically allow raspberry pi to read sensor status from multiple devices?
The GPIO Pins can be set to OUTPUT or INPUT modes and this can be set programatically. There are 17 GPIO Pins available, and hence, you can have following combinations.
The math is:
Look into the first combination: Pin 1 is set to OUT mode, and we now have 16 pins remaining to read as sensor’s feedback. In this case, we can read 16 sensors. By multiplexing 2 GPIO pins as output and 15 input pins, we can read 30 digital sensors, and so on… In each settings, the role of a GPIO pin is consistent. A pin does not behave as both input and output for a reading.
An OUT pin activates all of the remaining INPUT pins through external opto-isolated interface.
Raspberry Pi 3 Model B seems to have 28 GPIO Pins.
- This is non-proven idea and under write-ups and further consideration. Do not trust this article right now.
- You may damage your device permanently if you source or sink more current than the specified limits.
- This is a software driven concept with opto-couplers in consideration (as an additional reader hardware).
- Software concept to be updated.