lux.jpeg Converting Shrooly Light Levels into Lux

If you’re using a Shrooly mushroom growing device and trying to follow growing guides from online mycology resources, you’ve probably noticed they specify light requirements in lux while Shrooly only gives you LED brightness percentages. This post explains how to convert between the two based on actual measurements.

The Problem

Many mushroom growing resources specify light requirements in lux, but Shrooly only lets you control “White LED brightness” as a percentage from 0-100%. Without knowing the relationship between these values, it’s difficult to follow external growing guides precisely.

Measuring the Relationship

I measured the exposure value (EV) inside a Shrooly cavity using a Sekonic L-758DR light meter at various LED brightness levels, then converted to lux using the standard formula:

$$\text{Lux} = 2.5 \times 2^{\text{EV}}$$

(The Cine versions of my meter can do Lux directly, but they cost more and i’m not buying another one for this project!)

Here’s what I found:

LED Brightness (%) EV Lux
100 11.7 8,317
90 11.2 5,881
80 10.7 4,159
70 10.2 2,941
60 9.6 1,940
50 8.8 1,114
40 7.9 597
30 6.9 299
25 6.1 171
20 5.2 92
18 4.2 46
15 2.1 11
12 0.09 2.7
10 0.0 2.5

White LED Brightness vs. Lux The relationship between Shrooly’s LED brightness percentage and lux follows a power law, with a sharp drop-off below 20% brightness

The Conversion Formulas

I used a mix of ChatGPT and check out the Python to figure out the relationship. At first I was hoping it’d be really simple but there’s a sharp dropoff as the brightness level drops below 20% so I ended up needing two different functions.

For Low Light (≤20% brightness):

$$\text{Lux} \approx 0.442 + 7.383 \times 10^{-8} \times \text{Brightness}^{6.991}$$

For Higher Light (>20% brightness):

$$\text{Lux} \approx 0.02307 \times \text{Brightness}^{2.768}$$

Piecewise Fit Model The piecewise fit model (red line) closely matches the measured data points (blue), with different formulas for low (≤20%) and high (>20%) brightness ranges

Adding to OpenShrooly

I’m in the process of adding this to an OpenShrooly release that will change the white light setting to be in LUX and not a set percentage, but this requires inverting the formulas to convert from desired lux to LED brightness percentage. This should show up in the 0.4.3 release.

Inverted Formulas (Lux → Brightness)

For the low light range (≤92 lux, which corresponds to ≤20% brightness):

  • Since the original formula has such a steep curve (power of ~7), a simplified linear approximation works well: $$\text{Brightness} \approx \frac{\text{Lux}}{92} \times 20$$

For the higher light range (>92 lux):

  • Inverting the formula $\text{Lux} = 0.02307 \times \text{Brightness}^{2.768}$ gives us: $$\text{Brightness} = \left(\frac{\text{Lux}}{0.02307}\right)^{\frac{1}{2.768}}$$

Implementation Example

Here’s how this looks in code (C++ for ESPHome):

float lux_to_brightness(float lux) {
    if (lux <= 0) {
        return 0.0f;
    }

    // Low light range: 0-92 lux maps to 0-20% brightness
    if (lux <= 92.0f) {
        return (lux / 92.0f) * 20.0f;
    }

    // Higher light range: use inverse power law
    float brightness = pow(lux / 0.02307f, 1.0f / 2.768f);

    // Clamp to 100%
    return min(brightness, 100.0f);
}

With this implementation, the OpenShrooly interface will show a slider from 0-4000 lux (capped at a reasonable maximum), making it much easier to follow mushroom growing guides that specify light requirements in lux rather than arbitrary percentages.

Distance Matters: Light Intensity at Different Heights

All measurements above were taken at 135mm below the LEDs, which is approximately where mushroom pins form. However, as mushroom caps develop and grow upward, they get closer to the LEDs and receive significantly more light due to the inverse square law.

Light Intensity vs Distance

Using the inverse square law:

$$L_{\text{height}} = L_{135\text{mm}} \times \left(\frac{135}{d}\right)^2$$

Here’s how the light intensity changes at different heights for some common settings:

Height from LEDs Distance Factor 30% Setting 40% Setting 50% Setting
135mm (pins) 1.0× 299 lux 597 lux 1,114 lux
100mm (young fruits) 1.8× 545 lux 1,089 lux 2,032 lux
75mm (mid growth) 3.2× 968 lux 1,935 lux 3,610 lux
50mm (mature caps) 7.3× 2,184 lux 4,367 lux 8,145 lux
35mm (tall caps) 14.9× 4,455 lux 8,909 lux 16,611 lux

Why Most Programs Use 10-20% Brightness

Now the typical 10-20% brightness range in Shrooly programs makes perfect sense:

Brightness Lux at Pins (135mm) Lux at Mature Caps (50mm) Lux at Tall Caps (35mm)
10% 2.5 lux 18 lux 37 lux
15% 11 lux 80 lux 164 lux
20% 92 lux 672 lux 1,371 lux

These lower settings work because:

  • They provide very gentle light during sensitive pinning stage
  • Natural distance effect creates appropriate light gradient as mushrooms grow
  • Avoid bleaching that would occur with higher initial settings
  • No adjustment needed during the early part of the cycle, as the mushrooms start to fruit they’ll receive more light
  • However, late in the fruiting cycle I think there’s a higher chance of bleaching the caps because they light level increases exponentially with height. In the real world, a 10cm tall mushroom doesn’t get 7x more sunlight than it does when it was pinning - but in a Shrooly it does!
  • Perhaps we should consider programs that vary during the fruiting cycle?

Practical Recommendations

  1. Default Settings: Start with 100-200 lux (roughly 15-20% brightness) for most species

  2. Species-Specific Ranges:

    • Low light species (Shiitake): 50-150 lux at pinning
    • Moderate light (Lion’s Mane): 100-250 lux at pinning
    • Higher light (Oyster): 200-400 lux at pinning
  3. Adjust for growth patterns:

    • Tall-growing varieties: Use lower initial settings
    • Compact varieties: Can handle slightly higher initial settings
  4. Watch for signs:

    • Too much light: Bleached caps, dried edges, stunted growth
    • Too little light: Long thin stems, caps growing toward light, poor cap development