I have separated the relevant section in an image attached to this post.
To avoid the large current draw from all the LEDs in the QRD1113 sensors (~20mA * 8), the author is doing a clever trick. As I understand, he uses Arduino to turn on only a single LED at a time and then reads the corresponding phototransistor value (also dealing with the calibration for ambient light).
I would like to implement a similar project, but I'll need 16 optical sensors. So, for reading them, I could use a 74HC4067. Initially, I wanted to use another 74HC4067 to also turn off the LED of the same QRD1113 I'm about to read. This would be simple to implement as I could connect both 74HC4067 control pins in parallel.
However, I read in a few topics here that 74HC4067 is not supposed to be used for driving LEDs.
I'm wondering if that's the case even if I want to switch a single LED for a brief moment to read QRD1113 through the other 74HC4067? Would it be a bad idea? Should I use 74HC595 instead? It would make things more complex and require more pins from Arduino to control both the mux and the shift register.
I'm afraid that synchronization between turning the LED on, turning the needed QRD1113 transistor on through 74HC4067 and reading the value might get unstable if I mix 74HC4067 and 74HC595. I would want it to work in real-time, with less than a 1ms delay for reading all QRD1113 values, if possible. Essentially, reading all 16 QRD1113 values 1000 times a second.
Currently, it looks like I'll be using RF-Nano GitHub - emakefun/rf-nano: emakefun arduino nano V3.0 + nrf24L01+ (a clone of v1.0). I have tested a couple and their RF communication works pretty well. However, that means that SPI will not be usable for any other purpose because those pins are occupied by the RF chip. So, SPI-based muxes are not an option. I also want to keep some pins free for other sensors, so maybe Charlieplexing would make it too complex and occupy too many pins.
I guess, I'll have to try with two 74HC595 (for 16 LEDs) and a 74HC4067 (for reading analog data from phototransistors).
I watched a video where someone was using 74HC4067 also for LED output and noticed that during the boot, many LEDs flashed briefly.
Not sure what is the current draw for the LEDs in that video, but with 16 QRD1113 that would cause a spontaneous draw of 16 * 20 mA, which might be an overload for 74HC4067. So maybe two shift registers are my best option here, even if it complicates things.