Though the initial results of the timer-based system weren't terrible, I felt that they could be improved significantly. There was a lot of variation in the system, and some of the data wasn't as clear as was expected. It was time to re-think the strategies for light sensing with LEDs. Further investigation of LED sensing technologies yielded some interesting leads. One site attempted to use Arduinos to sense light using LEDs, with a special emphasis on reducing interference on the board. On any given Arduino, there is only one A/D (analog-to-digital) converter, for all pins on the board. This can create problems with interference and noise when reading multiple LEDs in sequence, unless something is done to reduce cross-talk on the board. The code, found here, attempts to reduce electrical interference within the system.
Typical_Sensing_Setup.JPG
Here is a simplified version of the test setup described on this page, with only one LED. The red wire goes to an analog pin for voltage measurement, and the black wire goes to a digital pin, which must be switched from HIGH to LOW throughout the sensing routine. A 100-ohm resistor is used so the LED doesn't get toasted in the process.


Using this code as a starting point, I modified it to test my four 5mm LEDs in the lightbox, using the same testing procedures as before. Results can be seen below, either as a .grf or PDF file as before.
(PDF)

(.grf)


The data here is based on counts - a unitless dimension used by the Arduino. The software is written around using the board's analogRead function, which reads the voltage from a given analog pin. This reads in counts, ranging from 0 to 1023. One count is equal to 0.0049 volts. The greater the ambient light, the higher the voltage at each LED sensor will be - a higher count will be recorded.

These results look much more promising than the ones that I had gotten with the previous voltage-based setup, as well as that of the timer-based setup on the last page. Error is fairly low (no greater than +/- 25 counts, or .1225 V), and all LED responses seem to follow a distinct pattern of sorts. In fact, these data suggest that my four LEDs are not all the same - LEDs 1 and 2 show similar responses, and LEDs 3 and 4 show similar responses, but the two sets of responses are different from each other. LEDs 1 and 2 came from the same package, and LEDs 3 and 4 came from a different package.

With these more accurate responses, I feel that this code may be the way to continue forward with this work. It minimizes interference between sensing LEDs and allows for more accurate readings. This is critical for consistent, repeatable, and accurate BRDF measurement with LEDs.