New Designs, Horticultural LEDs & DIY Tunable Spectrum Grow Lights


[Disclaimer: Don’t rely on what you read here without verifying it for yourself. The stuff below is based on OpenAg’s pre-release designs that may change, my math may be wrong, etc.]

After studying Jake & Dan’s preliminary designs on OpenAg’s github for the pfc-edu and light controller, I’ve been thinking about how to adapt some of the concepts they used for DIY prototyping. Jake & Dan’s designs use custom printed circuit boards and surface mount components that require reflow soldering. Manufactured PCBs should be great for reducing many of the problems people have had wiring up PFC v1 and PFC v2 kits. But, mass producing the PCBs will take time. I like the new designs a lot, but I don’t have one of their prototypes, and I don’t know if or when I might be able to get my hands on one. So, I’ve been thinking about how to adapt some of their ideas and components for DIY prototyping with hand-soldering.

Key Design Ideas

  1. Series-wired LED strings with constant current LED drivers and a 24V DC power supply. The new pfc-edu design uses 6 channels of 4 series-wired CREE XP-E series LEDs each, driven with 1 Recom Lighting RCD-24 dimmable LED driver per channel. The RCD-24 drivers can provide up to 700mA each. The important concept is that using current drivers with series-wired LEDs and a 24V supply is more efficient than running current limiting resistors with parallel wired LEDs and a 5V supply.

  2. Commit to using I2C for sensors & actuators and make it work well. The new designs use TCA9548A I2C expanders so that it will be possible to use multiple I2C devices with addresses that would conflict without the expander. For example, it will be possible to use two humidity sensors with fixed addresses of 0x40–one inside the growth chamber and one outside to monitor the ambient environment. The new designs also include PCA9615 differential I2C bus buffers and RJ style jacks to allow differential I2C cables of up to 3 meters with good noise immunity. This should work well for wiring up racks with lots of sensors and light panels.

  3. Multiple channels of I2C controlled LED dimming. As it stands–keep in mind it’s still an alpha design so far–the pfc-edu v1.0 includes a DAC5578 I2C 8-channel, 8-bit DAC and a PCA9685 16-channel, 12-bit PWM driver to control the Recom RCD-24 LED drivers. The RCD-24 drivers have both analog and PWM dimming inputs (analog for adjusting peak current & PWM for adjusting duty cycle).

Estimating the PFC-Edu’s Light Output

You get a lot of photons from running 24 CREE XP-E LEDs at 700mA each. I haven’t found an authoritative source that explains how to calculate from LED datasheet specs to PPFD (Photosynthetic Photon Flux Density, μmol/m⁻²s⁻¹). So, I’m just making this up. Additional disclaimer: my last undergrad physics course was a while ago, this math might be totally wrong, etc. That said, here’s my attempt at to quantify “a lot of photons” as an approximate PPFD.

According to page 10 of the XP-E2 datasheet, a group 38 XP-E2 Royal Blue (XPEBRY-L1-0000-00S01) puts out a minimum PPF (Photosynthetic Photon Flux) of 2.46 μmol/s at 350 mA. When you flip to page 17 for the Relative Radiant Flux vs. Forward Current charts, it says for Royal Blue, 700mA should give about 180% of the photon flux at 350mA. So, at 700mA, a group 38 XP-E2 Royal Blue should give a minimum PPF of approximately 2.46 μmol/s x 1.8 = 4.43 μmol/s.

Repeating the table and chart lookups for a group 28 XP-E High Efficiency Photo Red (XPEEPR-L1-0000-00B01 (the datasheet is here): On page 13 it, says the minimum PPF is 2.20 μmol/s at 350mA. Page 20 says the relative radiant flux at 700mA is about 200%. So, at 700mA, a group 28 XP-E HE Photo Red should give a minimum PPF of approximately 2.20 μmol/s x 2.0 = 4.40 μmol/s.

For simplicity’s sake, I’m not going to worry about far red or UV, but for plants like tomatoes those could be important. To get an approximate PPF number, I’ll just assume that the pfc-edu’s 24 XP-E pads are populated with 20 HE Photo Red (83% red) and 4 Royal Blue (17% blue). So, (20 x 4.40 μmol/s) + (4 x 4.43 μmol/s) = 106 μmol/s for red and blue combined.

But, that number is just photon flux coming out of the LEDs (PPF). To get PPFD at plant canopy height, I need an area for the canopy, and I need to know what fraction of the photons coming out of the LEDs make it to the canopy.

According to the datasheets, Royal Blue has a viewing angle of 135° and HE Photo Red has a viewing angle of 130°. But, since CREE says the XP-E series are meant to be used with lenses, I’m guessing the visible angle of the LED doesn’t matter as long as it’s matched to the lens. The important questions are, how efficient is the lens, and what pattern does it aim the photons in?

The CAD files on github for the pfc-edu v1.0 design mention a KNAC24xxB lens panel. Probably that means something from Khatod’s Nactus KNAC24 series. I had a hard time finding useful specifications on Khatod’s website. So, I’m going to assume that Khatod’s stuff is at least as good as LEDiL Lighting who have a better website with lots of detailed specs. For additional background on lenses for high efficiency LEDs, see DigiKey’s article, “Choosing Lenses to Make the Most of LED Lumens”. Based on what I see in LEDiL’s product lineup, it looks like a lens made from PMMA can give you up to 94% efficiency, with uniform intensity, in a wide variety of beam patterns.

By selecting a good lens made from PMMA, I’ll assume it will be possible to deliver 90% of 106 μmol/s to whatever surface area of plant canopy that I want. According to the pfc-edu CAD files on github, the PCB top assembly with the LEDs, sensors, BeagleBone, etc. measures 11.2 inches by 11.2 inches. I’m not sure how big they plan to make the enclosure, but I’ll arbitrarily guess the growing area footprint will be 18 inches by 18 inches, or about 0.21 m², and use that for the plant canopy size.

Given all that, the pfc-edu’s approximate PPFD would be 0.90 x (106 μmol/s) / (0.21 m²) = 454 μmol/m²/s. Running at that flux density for 13 hours a day would give a DLI of (454 μmol/m²/s) x (3600 s/hour) x (13 hours/day) / (10^6 μmol/mol) = 21.2 mol/m²/day.

According to one of the pdfs from Cornell’s Floriculture Extension, a DLI of 15-17 mol/m²/day is good for growing lettuce and a DLI of 20-30+ mol/m²/day is good for growing tomatoes. So, it looks like the pfc-edu’s light panel is on track to potentially grow tomatoes at full power, and lettuce would be no problem as long as you turned the brightness down. Keep in mind, this is an estimate that’s based on a lot of guessing about pre-release plans.

DIY Tunable Spectrum Grow Lights

For a while now, I’ve wanted to try writing software to experiment with tunable spectrum light recipes. The big obstacle stopping me from soldering my own lights was that I had only a vague idea about how to calculate PPF from LED datasheets. Until yesterday, all the LED datasheets I had seen gave intensity in units of luminosity. The problem is that candelas and lumens incorporate a spectral weighting function based on human eyesight which is significantly different than the spectrum for photosynthesis. I haven’t figured out how to do the math to reverse the weighting function yet.

From looking at Jake & Dan’s new designs, I found out about CREE’s XP-E horticultural LEDs that actually give PPF in the datasheets. Searching for similar products on Mouser, I found other horticultural LEDs like the Lumileds LUXEON SunPlus Series. Also, Opulent Americas makes “starboards” with SMT horticultural LEDs soldered onto a metal star shaped heat sink (see CREE Starboards and Horticulture Starboards). The starboards are interesting because they can be hand soldered for prototyping.

More generally, I’m curious about adapting the design concept of a 24V DC power supply + constant current regulators + strings of series wired LEDs. The RCD-24 LED drivers from the pfc-edu design cost about $17 each, and the XP-E & XP-E2 LEDs cost about $1.50 (red) or $2.30 (royal blue) each. For DIY experimenting, I don’t think I need that much light output, and I could probably get by with simpler, cheaper constant current regulators of the sort used in LED light bulbs. I’m also curious about using a prototyping perf-board style PCB with dozens of through hole LEDs that would be easy to hand solder. It might be impractical to get enough photons that way. But, if the goal were to grow lettuce or micro-greens, maybe it would work.

On the I2C control side, I’m interested in experimenting with prototype hardware that is logically similar to the pfc-edu v1.0 design. My thought is that I might be able to write code for my prototype now that could be simply adapted later to run on a pfc-edu.

Adafruit sells breakout boards for the TCA9548A I2C multiplexer along with a couple of options for the PCA9685–a 16-channel PWM/servo driver and an 8-channel PWM/Servo FeatherWing that’s a little cheaper.

I’ve started experimenting with my Raspberry Pi 3 B, an Adafruit PCF8523 RTC, a TCA9548A breakout board, a PCA9685 PWM/Servo FeatherWing with LEDs on the servo channels, and a couple Sparkfun Si7021 humidity sensors. It’s surprisingly easy to control I2C devices from the Raspberry Pi command line with i2cset and i2cget from the i2c-tools package. I tried doing stuff last year in python with smbus, but I had a hard time. I got the idea for using i2cset in i2c block mode from looking at Jake’s scripts in the openag_hw_scripts repo on github. The command line way works much better (thanks Jake!).

Here’s a photo of my prototype so far:

And here’s the bash script I’m using to control it:


function mux_select_pwm () { i2cset -y 1 0x70 0x01; }
# Init: mode = PWM Auto-inc register ON, low power mode, all-call OFF
function pwm_init () { i2cset -y 1 0x40 0x00 0x20; }
function pwm_led_on ()  { i2cset -y 1 0x40 $1 0x00 0x10 0x00 0x00 i; }
function pwm_led_off () { i2cset -y 1 0x40 $1 0x00 0x00 0x00 0x10 i; }
function pause1 () { sleep 1.3; }
function pause2 () { sleep 3; }

WHT1=0x06; WHT2=0x0a; WHT3=0x0e; RED=0x22; BLUE=0x1e; FAR_RED=0x1a

for i in `seq 1 5`; do
    pwm_led_on $RED
    for j in $WHT1 $WHT2 $WHT3 $FAR_RED; do pwm_led_on $j; done;
    for j in $RED $WHT1 $WHT2 $WHT3; do pwm_led_off $j; done
    pwm_led_off $FAR_RED; pause1
for addr in $WHT1 $WHT2 $WHT3 $RED $BLUE $FAR_RED; do
    pwm_led_off $addr

I’m thinking of trying to make a light panel with LEDs, constant current regulators, MOSFETs (wired to the servo PWM outputs), and a 12V or 24V DC power supply.

Ultimately I’d like to experiment with nice ways of specifying light recipes using a high level domain specific language (i.e. not a low-level schedule of events in json). I think it might be nice to be able to enter information about climate region, month to plant, days to germination, etc. from seed packets and have that programmatically translated into appropriate control signals for the lights.

My Questions

  1. Does this interest anyone? If so, which parts do you care most about, and why?

  2. If you consider yourself qualified to check my math for the pfc-edu PPFD and DLI, what do you think? Is my estimate plausible? Did I make some obvious mistake?

/cc @Webb.Peter

OpenAg for Outreachy and Google Summer of Code (GSoC) projects

Something to take into account is the reflectivity of walls. This lies slightly outside of the scope of just calculating a lights output, but when it comes to calculating what hits the canopy it’s critical.

For example: the MVP without mylar enclosure puts out about 110 μmol/s, once you add the mylar though, that number soars to 240 μmol/s. This might be exaggerated on our design because the lights are facing slightly outward towards the corners of the unit, but my point is that 98% of our light (or so I hear) is captured and reflected (despite angle/diffusing).

I have no clue what they plan to use for an interior, but I would assume based on other designs it will be something highly reflective. This has an impact at least on the distribution of the light over the canopy, if nothing else.


One of the beautiful things about the fancy highly efficient PMMA lenses like LEDiL makes is you can get very good control over where the photons go. Think about theatrical lighting–like going to see a play, not movies. If you have a light fixture that just blasts photons in all directions, lots will hit the walls. If the lens directs most of the photons downward, the walls will still come into play for secondary bounces off of the plants, but it might not be such a big issue as with lamps that are intended to uniformly light rooms.


Full disclosure I haven’t dug into these myself. I just read about these two software’s for modeling lights in a book:


@Webb.Peter I took a look. I doubt either of those will be helpful. The problem is that it’s all designed for architectural stuff which works in lumens, lux, etc. because it cares about human eyesight. We need photon flux at specific wavelengths. That kind of architectural software is designed around manipulating standard photometric data files provided by light fixture manufacturers. Some LED data sheets have vaguely comparable data, but not in that format. It doesn’t matter anyway, because the main problem is extracting photon flux per wavelength vs. viewing angle.

Here are things that would potentially be helpful for designing DIY horticultural lighting:

  1. Someone who understands basic physics and calculus going to the trouble of converting LED datasheet charts of spectrum, peak luminosity, and intensity vs. viewing angle into tables of photon flux vs. wavelength vs. viewing angle. I’ve got a fair idea of how to do this, but I haven’t done it yet. Basically, it should be the equivalent of a moderately involved undergrad physics homework problem. This will involve using the CIE photopic luminous efficiency function from

  2. Writing code to integrate the photon flux vs viewing angle from multiple LEDs onto a matrix representing the plant canopy. Again, I’ve got a general idea how to do this, but I haven’t tried it yet.

  3. Someone with a spectroradiometer (also see wikipedia) and a lot of patience, or else a goniospectroradiometer (see Gamma Scientific, NIST, and GL Optic) buying a pile of LEDs and making tables of their photon flux vs. wavelength vs. viewing angle. This would be a substitute for # 1 above.

If none of that makes any sense, I recommend that you don’t worry about it. Or, if you really care, find somebody with a stronger physics background than me to ask about it. I’m just in the process of learning about this stuff. I don’t understand it well enough yet to do a good job of explaining it. There’s a good chance I will continue looking into this. I may write about it more once I understand more. I may also write code to do some of this.

Also, as a word of caution, I’d strongly discourage people from trying to work on this unless they are willing to start by building a solid understanding of the underlying physics and math. In particular, understanding the difference between candela and photon flux is important. is a good place to start.


cool thread! I’ll have to make time to come back and re-read it, but i like your thinking with the I2C bus and the ability to be modular and able to connect with multiple lights and/or sensors. I think that is a good approach.


Glad you like it. This isn’t my idea. I’m drawing heavily on Jake & Dan’s designs for the upcoming pfc-edu, light controller, nervous system board, etc. Looking forward to hearing more from OpenAg about where things are headed with the new stuff.


Here’s an update on my search to understand how LED manufacturers measure the values in LED datasheets. Apparently there’s a standard called CIE 127:1997 that specifies how to measure radiant flux from LEDs, and it was refined by CIE 127:2007 to fix ambiguities in the earlier version.

  1. CIE’s web store offers CIE 127:2007 for the not-so-low price of €72.00. I’m not curious enough yet to pay for a copy. From other sources, I think it describes a method of using an instrument called an integrating sphere along with specific positioning for the LEDs relative to the sphere.

  2. The October 2008 issue of Optics & Photonics News had an article, “The New CIE 127 Standard for LED Measurement” that summarizes CIE 127:2007 and illustrates two methods of measuring radiant flux from LEDs using an integrating sphere.

  3. LumiLEDs have an article, “Optical Measurement Guidelines for high-power LEDs and solid state lighting products”, that discusses how to calibrate an integrating sphere according to CIE 127.

  4. LabSphere sells integrating spheres, and they have articles about how integrating spheres work, including “Integrating Sphere Uniform Light Source Applications”, “Integrating Sphere Radiometry and Photometry”, and “Integrating Sphere Theory and Applications”. They also have an article specifically about measuring LEDs: “The Radiometry of Light Emitting Diodes”.

  5. Kingbright is one of the LED manufacturers that provide moderately detailed photometric specs in their datasheets. Many Kingbright LED datasheets include the footnote, “Luminous intensity value is traceable to CIE127-2007 standards.” For example, see the datasheet for their WP7113QBC/G LED.

I care about all this because I want to understand exactly what the LED datasheet values about luminous intensity mean so that I can use them in calculations to determine photon flux.


@wsnook You are spot on with estimating the PPFD of the PFC. I have been researching led grow lighting since 2015 and would like to share some of the tricks I use to make these calculations easy. Main thing to do is stay in one unit of measurement, Watts. LEDs are solid state devices. Put (x) power in get (% of x) power out across its spectral distribution. The efficiency will, fluctuate slightly based on temperature, and suffer a percentage reduction from optics. From what I have seen, using no optics with leds spaced evenly and closer to the plants with a reflective tent always wins out over a smaller fixture using optics. There are many manufactures now making optic free led fixtures. Some are even switching from glass to a conformal coating. Here is my response on openagstl Slack when asked how I calculate PAR for a given fixture. “SPECTRAL RADIANCE is the only thing that matters. Plants are electromagnetic radiation antennas. Light or lumens is our perception of em radiation and nearly opposite to the spectral sensitivity of plants. I convert everything to radiant flux and look at the spectral distribution graph to know if a light is any good. PLANTS ABSORB RADIATION NOT LIGHT. Can’t wait for everyone else to figure that out and standardize the terminology. PAR is restricted to 400-700nm and plants use more than that. Some manufactures provide ppf which is the RADIANT FLUX or total output between 400 and 700nm. RADIANT FLUX, SPECTRAL DISTRIBUTION, everything else is marketing.”

If we need to grow lettuce in a 2’x2’. Lettuce needs ~5W/sq ft, 20W total radiant flux. We have leds that are 33% efficient. We need (20/.33) 60W worth of the leds we have spread evenly in a tent. EASY! For tomatoes use ~10-15W/sq ft.

Monochromatic leds with a narrow bandwidth have their place in led horticulture fixtures but the best results come from majority wide bandwidth (white or phosphor red). The trade off of efficiency loss when phosphor converting to wide bandwidth is always a win to all species of plant. The best leds for horticulture are phosphor converted have 630nm peak wavelength. Best led recipe is 1750-3500k 90cri with a 425nm violet peak monochromatic supplimentation @~10% to keep the total % of blue under 20 with green 35% and red 45%. Still only using 2 different leds but getting all the IR, UV and green any plant benefits from. In summary, using 24x 3500k >70cri white will give much better results over 20x 660nm red to 4x 450nm blue no whites even though efficiency is lowered 10-20%. Plants need green light to be healthy. If we want to try growing with red and blue at least use 425nm, 450nm, 630nm, and 660nm plus a little 730nm and hit ALL chlorophyll peaks. Thats 5 different leds and were still not full spectrum. Some manufactures now use >5000k white leds as their “blue channel.”