I'm trying to design a device that produces visible light with a somewhat controllable spectrum. My goal is to measure the human eye cone cell responses by switching between two different spectra and finding spectra that are hard to distinguish by eye, so an RGB led won't be sufficient for this purpose.

My first draft PCB has 13 LEDs in different wavelengths set in a circle with a diameter of 20 mm, but I can change this arrangement in whatever way is desirable. The LEDs I plan to use come in 2 mm x 2 mm packages, so they could also be fit more tightly if that's useful for the mixing (see image below). Their "typical viewing angle" is between 145° and 170°. (LED datasheet)

What kind of optics could I use to produce a well mixed light out of these? I would not need more than a (say) 2 cm x 2 cm diffuse surface with well mixed light. The output power need not be large—ideally it would be comfortable to look at from a distance of tens of centimeters—and it is not a huge problem if a fair amount of the light is absorbed.

I have looked into light pipes in the Digikey catalog, and while I have a feeling they might be part of the solution, they generally seem to be designed for leading the light from a single led to a panel. I think a light pipe should mix light shot into it from a sufficient angle. I also have explored all kinds of weird ideas like installing LED reflectors upside down and having diffuse lenses in the other end. Another idea is to put the LEDs in a separate, smaller board that fits inside a reflector. In the end, it's clear to me that I don't know enough about optics to understand how to best approach this problem.

Here's a very early draft design of a Raspberry Pi hat (65 mm x 56 mm) with the 13 LEDs in a d=20 mm circle.

draft PCB design

  • \$\begingroup\$ It'd probably be much better to use more than one LED of each color. \$\endgroup\$
    – Hearth
    Commented May 28, 2022 at 20:11
  • 2
    \$\begingroup\$ Put the LEDs as close as possible and then put a diffuser sheet a few centimeters in front. Unless you need a lot of power I would be tempted to avoid using lenses if at all possible. Probably cheaper to throw more diodes at the problem anyway. \$\endgroup\$ Commented May 28, 2022 at 20:19

2 Answers 2


In photometry, the standard instrument for doing this is the Integrating Sphere.

The concept is to bounce light around inside a matt white enclosure before allowing it to escape, and arranging the light sources and exit hole so that you can't see any light source directly from the output.

How good or big does your enclosure need to be? Probably not as good as you would need in a photometer, just something better than you are getting by just putting the LEDs close together.

As a first attempt, try a thin translucent sheet of white paper, or a thick sheet of tracing paper, spaced off from the LEDs, to diffuse the light, it may be sufficient.

If you are fabricating the board the LEDs are on, then use white silk screen around the LEDs so that the board surface is white rather than dark green. Light scattered back from the paper will illuminate the white areas, which mixed light will then bounce forward again. Maybe make matt white walls around the LEDs to complete the enclosure. If you want to try with existing boards, use Tippex or white paint to paint the board around the LEDs.

A better approximation to the integrating sphere will be to have the LEDs facing away from the viewer, and bouncing off the back wall of the box.

  • \$\begingroup\$ Thanks, this is pretty much what I ended up going with, though I haven't seen the results yet; I found a DIY light box video on Youtube and got a lot of inspiration from it. I did inspect the led backlighting thing suggested by the other answer, and while promising—it felt like an interesting possibility to even combine this with the UI by using a transparent display—I just couldn't figure out without having the hardware in hand how to make that work, especially with SMT LEDs on a PCB. I did also add holes for three different ~5 USD diffusing lenses available from Digikey. We'll see! \$\endgroup\$ Commented Jun 4, 2022 at 12:19

Consider a construction like it's used in small TFT backlights. The LEDs inject the light in the side(s) of a transparent plastic panel. The back side of the panel has a white reflector and the light goes across the panel under different angles. Most of the light gets deflected several times by total reflection at the surface until finally it leaves the panel. Light distribution is equalized very good.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.