The Role of the LED Photodetector in Closed-Loop Lighting

An LED photodetector—such as an integrated ambient light sensor like the ROHM BH1750FVI or a fast-response photodiode—acts as the feedback eye in a daylight-harvesting circuit. Unlike legacy cadmium sulfide (CdS) photoresistors, which suffer from memory effects and slow response times, modern silicon photodetectors provide linear lux measurements via I2C or analog voltage. When you wire a photodetector into a microcontroller (like an ESP32) that drives a dimmable LED power supply, you create a closed-loop system: the sensor reads the ambient daylight, and the controller adjusts the LED driver's PWM or 0-10V signal to maintain a target lux level on the workplane.

However, bolting a sensor to a microcontroller is only 10% of the job. The remaining 90% is managing the AC mains side of the circuit: sizing the LED driver, surviving inrush currents, matching dimmer minimum loads, and managing thermal constraints inside the enclosure. Here is the exact engineering framework for building a reliable, sensor-driven lighting circuit.

Lumens, Watts, and Efficacy in Sensor-Driven Fixtures

When designing a circuit where an LED photodetector will throttle the output, you must know your baseline efficacy (lumens per watt). A sensor-driven system assumes a linear relationship between the driver's output percentage and the resulting lux, but LED efficacy actually shifts at lower drive currents (often peaking around 30-50% load before dropping off due to driver overhead). According to the U.S. Department of Energy's Solid-State Lighting guidelines, modern commercial LEDs routinely exceed 130 lm/W, but thermal throttling inside a sealed enclosure can degrade this by 15% or more.

Table 1: Fixture Equivalence and Efficacy Context
Fixture Type Nominal Watts Output (Lumens) Efficacy (lm/W) Photodetector Target Lux
Standard A19 LED (Residential) 9W 800 lm 88 lm/W 300 lux (desk/reading)
2x4 Troffer Panel (Office) 30W 4,000 lm 133 lm/W 400 lux (workspace)
High-Bay UFO (Warehouse) 150W 21,000 lm 140 lm/W 500 lux (floor level)

Efficacy Context: Never size your driver based solely on lumen output. If your 2x4 troffer requires 4,000 lumens, you need a 30W LED load. However, to maintain high efficacy and prevent the photodetector from chasing a dimming curve distorted by heat, select a driver rated 20% higher than the nominal load (e.g., a 36W or 40W driver running at 75% capacity).

Driver Sizing, Inrush Math, and Power Factor

LED drivers are constant-current switching power supplies. When AC mains voltage is applied, the driver's internal bulk capacitors charge almost instantaneously, creating a massive inrush current. If you are wiring multiple fixtures controlled by a single photodetector circuit, this inrush can trip branch breakers or weld relay contacts.

Circuit Impact Math: Inrush and Power Factor

Let’s look at a real-world scenario using a Mean Well HLG-120H-24B 120W driver. The datasheet specifies a maximum inrush current of 100A (at 230VAC) for a duration of 150µs. If you wire four of these drivers to a single 20A branch circuit, the combined inrush can exceed 300A for a fraction of a millisecond. While a standard thermal-magnetic breaker might not trip on the thermal curve, the magnetic trip threshold (usually 5x to 10x rated current, or 100A-200A for a 20A breaker) can easily be breached. The fix: Stagger the turn-on times via your microcontroller's relays by 200ms each, or install an NTC inrush current limiter (like the Ametherm SL12 20005) on the branch feeder.

Next, consider Power Factor (PF). A cheap, non-corrected LED driver might have a PF of 0.5. A 120W load at 120VAC and 0.5 PF draws an apparent current of 2.0A ($I = \frac{120W}{120V \times 0.5}$). A high-quality driver with active PFC (Power Factor Correction) at 0.9 PF draws only 1.11A. Always specify drivers with PF > 0.9 for circuits exceeding 50W; otherwise, your wire sizing and breaker calculations must be based on apparent power (VA), not real power (W).

Dimmer Compatibility and the Flicker Fix

If your photodetector circuit interfaces with a wall-mounted phase-cut dimmer rather than a direct 0-10V/PWM microcontroller output, you must respect minimum load requirements. Trailing-edge (ELV) dimmers use MOSFETs to chop the AC waveform, while leading-edge (incandescent) dimmers use TRIACs. Both require a minimum holding current to keep the semiconductor latched on for the remainder of the AC half-cycle.

Why Flicker Happens (and the Exact Fix)

Flicker in sensor-driven LED circuits usually happens at low dimming levels (e.g., when the photodetector reads high ambient daylight and commands the LEDs to drop to 10% output). At 10% output, a 15W LED fixture draws very little current. If this current falls below the dimmer's minimum load requirement (often 10W to 15W for legacy phase-cut dimmers), the dimmer's internal circuitry misfires, dropping voltage mid-cycle. This results in a visible 120Hz strobe effect.

The Fix: You have two options. First, you can install a 10kΩ, 5W wirewound bleeder resistor in parallel across the line and load at the fixture to provide the missing holding current. Second, and much better for modern designs, abandon phase-cut dimming entirely. Use a constant-voltage PWM driver or a 0-10V analog driver controlled directly by the ESP32 reading the photodetector. According to Lutron's LED compatibility documentation, bypassing phase-cut for low-voltage DC dimming eliminates the minimum-load problem entirely and provides a flicker-free dimming range down to 1%.

Heat, Enclosures, and Sensor Placement Constraints

An LED photodetector must measure ambient room light, not the heat or direct glare of the LED fixture it is controlling. Two major physical constraints dictate your enclosure design:

  • Thermal Derating: LED drivers lose output capacity as ambient temperature rises. A 120W driver rated for 50°C ambient may derate to 90W at 60°C. If you seal the driver and the microcontroller inside an IP65 junction box above a suspended ceiling, the trapped heat will trigger the driver's internal thermal foldback, causing the lights to dim unexpectedly regardless of the photodetector's lux reading.
  • Sensor Cross-Contamination: Never mount the BH1750 or TEMT6000 sensor inside the same optical cavity as the LEDs. The photodetector will read the fixture's own output, creating a positive feedback loop where the system constantly fights itself. Mount the photodetector in a separate, diffused housing pointing toward the workplane or window, wired back to the controller via low-voltage I2C or shielded analog cable.

Decision Tree: Selecting Your Driver, Dimmer, and Sensor

Use this decision path to finalize your bill of materials. Do not mix phase-cut dimming with high-fixture-count microcontroller setups; the math and minimum loads will cause endless debugging headaches.

Table 2: Component Selection Decision Tree
Scenario Fixture Count / Total Load Dimming Architecture Concrete Component Picks
Small Room Retrofit (Phase-Cut) 1-3 fixtures (< 45W total) Trailing-Edge Phase Cut Dimmer: Lutron DVELV-300P (Min load 0W, but 15W recommended)
Driver: Philips Xitanium 15W LED Driver
Sensor: TEMT6000 (Analog)
Large Space / New Build (Analog/PWM) 4+ fixtures (> 100W total) 0-10V / PWM Analog Driver: Mean Well HLG-150H-24B (0-10V/PWM dimming, PF > 0.95)
Controller: ESP32 DevKit v1
Sensor: ROHM BH1750FVI (I2C)
The Default Recommendation: If you are designing a new circuit from scratch, default to the 0-10V/PWM analog route using the Mean Well HLG-series driver and the ROHM BH1750FVI sensor. It bypasses AC minimum-load constraints, eliminates 120Hz flicker, and allows your microcontroller to execute smooth PID control loops based on exact lux readings rather than chopped AC waveforms.