One of the AP Lab's current initiatives involves the study of subjects' response to light stimuli presented with precise timing in specific locations. To meet the requirements of precise (2-5ms) timing and near-zero decay time, I built a display panel based on LEDs and discrete logic.
To achieve the required timing performance for experiments of this type, the researchers have historically used a special CRT monitor with a true 120Hz refresh rate and rapid-decay phosphors. (Common LCD monitors only accept data at 60Hz despite higher internal refresh rates.) However, experiments performed by other researchers had suggested that even the reduced decay of a fast phosphor produces erroneous results in experiments of this type.
While the researchers' initial request was for a 1280x1024 display (1.3 million pixels) with a 200 Hz refresh rate, their actual need was to show lighted bars approximately 1mm wide and 20mm tall in one of about 200 different locations onscreen. Also, only one bar was shown at any one time, and the color of the bars was not important. However, the timing of the light stimuli was critical -- the light needed to turn on and off within a few milliseconds of when the researchers command it to. Further, in the off state the light output needed to be zero.
Based on this information, I decided to construct an LED matrix display based on "lines" of four standard 2mm x 5mm rectangular LEDs. The existing apparatus provided eight bits of digital output, which would allow 28 = 256 unique combinations. The experimenters also needed to control several separate LEDs for calibration, so we settled on a 224-position matrix, with 31 "slots" available for calibration and spares, and one designated as the "all LEDs off" position.
Despite some previous experience with micro-controllers, I decided to investigate discrete logic in the interest of simplicity, low cost, and minimal propagation delays. After some research I found that the 74-series CMOS devices (and their modern equivalents) could provide the functionality needed, specifically the 74HCT4514 4-line to 16-line decoders. Although I could have cascaded a large number of these to produce 256 outputs, I chose instead to wire the LEDs in an electrical matrix. This arrangement requires only 32 outputs, or two devices.
LEDs are current devices -- their light output is proportional to current, which can vary from device to device even with the same input voltage. Since the researchers need consistent brightness, I decided to use a constant-current power supply, which is easily implemented with an adjustable voltage regulator and an external resistor. With a constant-current supply, I can run the LEDs in series (simplifying the wiring), don't need any external resistors, and can feed the series groups of four rectangular LEDs, and the single calibration LEDs, from the same supply without modification.
The matrix arrangement requires that half of the switching devices operate at the voltage of the series string (2-10v) and half operate at/near ground potential. And of course, all need to pass the 20-30mA of current required by the LEDs. Because the logic operates at ~5 VDC, it must be isolated. I chose to use fast Darlington optoisolators to accomplish this. While these do add some delay (especially on turn-off), the specific devices chosen have a claimed switching delay of ~100uS, which is well within the researcher's requirements.
The board was laid out using software from ExpressPCB and sent off to be manufactured.
Meanwhile, I designed the panel and had it laser cut from black acrylic, then spray-painted it flat black to minimize reflections. (The nine small holes hold small LEDs used to calibrate the eyetracker.)
The ~900 LEDs were also painted on their sides and backs to reduce light leakage to adjacent LEDs.
For the panel to effectively test the effect the researchers were looking for, we needed to be sure that the LEDs would turn off immediately and then not emit any light thereafter. In my research, I found documentation that LEDs do emit some light after current through them ceases due to an effect known as "spontaneous recombination lifetime". However, as this time is on the order of nanoseconds, for our purposes we can assume that once current drops to zero, the LED is no longer emitting photons. Therefore, I decided to use LED forward current (If) as a safe indicator of light output. Thus I used a digital storage oscilloscope to measure current through the LEDs in response to the on and off commands.
Despite some noise due to the small voltage across the sense resistor, the data from the scope showed that current was effectively stopped in less than a millisecond -- less than 20% of the time required by the researchers. The panel is now being used with the lab's eyetracker in the current round of experiments.
Back to Projects