I think I may have cracked this! At least, I have something that seems to be working.
I have 2 shift registers, neither of them are used to read input from the sensors. I have grounded all of the sensing LED's to each other, and run them all down a single Analog input on the Arduino.
The IR LED's are just always on.
One shift register just always has one bit flipped to 1, but is set in the code to cycle through all of them, always only having one on, with a 1ms delay between each change. After each bit gets flipped, I do an analogRead(0) on the one analog input coming from the sensor rail. Since the shift register will only have one sensor on at a time, doing the analogRead will only get info from the sensor that had power running through it. It's a bit brute force, but so far it can get readings from each of 3 sensors i have hooked up thus far, very fast.
The other shift register simply manages the LEDs in a more straightforward way. just writing to the register which LEDs need to be on. Later I will change this to PWM so the sensor distance can dictate the brightness.
Anyone see a problem with this setup? It really fits the "cheapest" part of my question since i already have some of these components to prototype with. Obviously, I am planning to scale this out to upwards of 400 sensors, anything that would make the same setup at that scale not possible?
I have 2 shift registers, neither of them are used to read input from the sensors. I have grounded all of the sensing LED's to each other, and run them all down a single Analog input on the Arduino.
The IR LED's are just always on.
One shift register just always has one bit flipped to 1, but is set in the code to cycle through all of them, always only having one on, with a 1ms delay between each change. After each bit gets flipped, I do an analogRead(0) on the one analog input coming from the sensor rail. Since the shift register will only have one sensor on at a time, doing the analogRead will only get info from the sensor that had power running through it. It's a bit brute force, but so far it can get readings from each of 3 sensors i have hooked up thus far, very fast.
The other shift register simply manages the LEDs in a more straightforward way. just writing to the register which LEDs need to be on. Later I will change this to PWM so the sensor distance can dictate the brightness.
Anyone see a problem with this setup? It really fits the "cheapest" part of my question since i already have some of these components to prototype with. Obviously, I am planning to scale this out to upwards of 400 sensors, anything that would make the same setup at that scale not possible?