When an LED Light Dims, Yesterday’s Threshold Misses Today’s Defect
LIGHTING
The threshold remembers the light of setup day while the LED warms up, ages and dims, so a white particle with a 14.3 % margin starts slipping through quietly on the day output falls 15 %.
For a 5 MP camera looking for white particles on a glossy black housing, I calculated the decision margin, warm-up drift, the precision of a reference patch and the recalibration interval.
About 13 min read
When a wall clock loses a few seconds a day, you hardly notice it day by day. Only when you compare it with the standard time on a phone do you see how many minutes it has drifted. Inspection lighting is the same. An inspection recipe fixes its threshold, exposure and golden-sample images to the brightness of setup day, yet an LED light slowly dims as its operating hours add up and even rises and falls with temperature within a single day.
In an inspection that looks for white particles on a glossy black molded housing, the background absorbs most of the light, and on the glossy surface only the spots where the light bounces toward the lens by specular reflection1 rise bright. A white particle scatters light back in every direction, so it shows up as a bright dot on a dark background, and the decision comes down to whether that brightness crosses a fixed threshold. When the light weakens, the brightness of the particle comes down with it and slips under the threshold, with no alarm and no rise in false rejects. The yield figure even looks better, and the problem comes back from the incoming inspection of the customer.
The question is why yesterday’s threshold misses today. I would treat the lighting as something measured in every frame, never as a constant. The calculations assume a 5 MP camera with 2,448 × 2,048 px and 3.45 μm pixels, fitted with a 25 mm lens viewing 80 mm across. One pixel covers 32.7 μm, and the WD2 from the lens principal plane to the housing is about 262 mm.
A white particle has only 14.3 % of margin
The gray level3 of an image is broadly proportional to the strength of the light. When the light becomes k times, the background and the particle both become k times, but a threshold fixed as a number does not move. For the calculation, set the background at 120 levels, the white particle at 210 and the threshold at 180.
The margin between the particle and the threshold is (210 − 180) ÷ 210 = 14.3 %. If the light output falls 10 %, the particle reads 189 levels and is still caught, but at a 15 % drop it reads 178.5 levels and slips under the threshold. It is a bright defect on a dark background, so the weaker the light, the further the defect moves from the decision line, and the decision tilts toward good parts without a sound.
Some inspections run the other way. Where dark defects are caught on a bright background, weaker light brings the background closer to the threshold, false rejects rise, and the operators notice first. The dangerous side is the missed defect. My standard is to place the stop limit of the light monitoring inside this margin, at −10 %. How the decision line of anomaly detection sways as the light weakens is calculated separately in what happens when the light dims by 5 %.
Warming up takes 7.5 % away
The swing within a day comes from temperature. The higher the junction temperature4 of the emitting part, the lower the light output of an LED at the same current. Assume the output falls 0.3 % per 1 °C and the heat sink warms by 25 °C after start-up, and 7.5 % is gone during warm-up alone. That is over half the margin. It uses three quarters of the −10 % stop limit just while warming up. The real temperature coefficient comes from the flux-versus-temperature curve in the datasheet.
The shape of this swing depends on how the LED is driven. The forward voltage5 of an LED drops as it warms, and under constant-voltage drive the current rises by as much as the voltage falls, and the extra current heats it further in a feedback loop. In a circuit with a small series resistance, this loop can grow into thermal runaway, the LED heating itself while its current keeps climbing, and its lifetime is the first thing to suffer. A cold LED then starts dim with less current and brightens as it warms, while under constant-current drive it starts bright and comes down as it warms. A constant-current driver6 breaks the feedback loop but cannot stop the output from changing with temperature, so a thermal design that keeps the heat sink within a set range has to come along with it.
So my standard is to start inspection after start-up only once the change rate of the reference patch7 settles below 0.5 % per 5 minutes. Strobing with an on-time share under 10 % also cuts the average heat a lot, which shrinks the warm-up swing itself. Logging how long it takes to reach this point also pays off, because a time that keeps growing is itself a sign that the heat path is getting blocked.
One gray patch in the corner becomes a light meter
One gray patch fixed in a corner of the field becomes the cheapest light meter, measuring the state of the lighting in every frame. The patch goes through the same light, lens and sensor as the product, so on top of the aging of the LED light output it shows contamination of the cover glass or a change in exposure settings as a single number. A diffuse gray with a reflectance near 50 % keeps specular effects small and keeps the gray level in the middle, away from saturation and from the floor.
In this setup a 5 mm square patch covers 153 × 153 pixels, more than 23,000 in all. Even if the noise of one pixel is 1 % of its brightness, averaging 23,000 of them shrinks the wobble of the patch mean to 0.0065 %, plenty to resolve changes in steps of 0.5 %. Precision is not the worry here. Log the patch mean as a ratio to its reference value, and the log itself becomes a control chart8. In practice the shape of the trend matters more than the value, and the figure below shows how those shapes separate in operation that starts up and shuts down once a day.

In the figure, a slope that falls steadily over several days is the shape of output aging, and a stretch that drops like a step one day and stays there is contamination of the lens cover or a shift in light position. The sawtooth that dips right after each daily start-up and recovers over tens of minutes is warm-up. The three shapes separate only with the heat sink temperature curve below on the same time axis, and once they separate, it becomes clear whether to replace the light, clean the cover or delay the start of inspection. The slope in the figure assumes a fast-aging light drawn on a scale of days, so the real slope has to be measured from operating records.
The first four weeks tell you how fast it ages
The time it takes for LED light output to fall to 70 % of its initial level is called L709. It is projected with the TM-21 method from records taken every 1,000 hours over at least 6,000 hours with a test method called LM-80. Assume an L70 of 50,000 hours in the datasheet and solve it as exponential decay: the output falls 0.71 % per 1,000 hours, and on a line running 16 hours a day, 6 days a week, it takes 75 weeks to reach the −5 % warning line.
Reading the datasheet
with an L70 of 50,000 hours, it seems a few years can pass without recalibration.
Adding the operating conditions
the same light ages faster when run hot and hard. The interval comes from the slope of the first four weeks.
Inspection lighting may run hotter than the datasheet test conditions, under overdrive or inside a cramped housing, so I do not take these 75 weeks at face value. My approach would be to measure the slope directly from the patch log of the first four weeks after start of operation, and multiply the time left to the warning line by a safety factor of 0.5 to get the recalibration interval. For a fast-aging light whose slope comes out at 1 % per week, that is 5 weeks to the warning line and recalibration every 2.5 weeks; for a light that ages as the datasheet says, it is about every 37 weeks. That is a fifteen-fold gap.
Recalibration restores the output by resetting the drive current first, and then retakes the patch reference value and the flat-field reference. Covering the light loss with software normalization over and over raises the noise by the normalization gain, so the output is restored in hardware and normalization is kept for the small residual between recalibrations. Cap the normalization gain at 1 ÷ 0.9 = 1.11, and it stops at the same point as the −10 % stop limit. The closer the gain gets to that cap, the higher the chance of noise crossing the same decision line, so it is better to move the recalibration date forward than to wait for the day the cap is reached. The procedure for retaking the flat-field reference is written up separately in the limits of flat-field correction.
Lighting management specs that protect a 100 μm particle
Put down as three numbers how much the decision margin, the temperature and the lifetime each take, and it looks like this. Warm-up alone uses more than half of the margin, while aging moves far more slowly. Even in one setup, the temperature within a day shakes the decision well ahead of aging that takes more than a year.
14.3%
the margin between the white particle and the threshold
7.5%
output lost during warm-up, 0.3 %/°C and a 25 °C rise assumed
75weeks
time for a light with an L70 of 50,000 hours to reach −5 %, 96 operating hours a week assumed
So the order of management is to fence in warm-up first, catch the steps of contamination next, and then calculate the lifetime. Contamination shows up at once in the patch log because it comes as a step, while aging is a gentle slope that takes four weeks of watching to see. Gather the three on one spec sheet and it comes out as below, with pixel counts based on one 32.7 μm pixel.
| Item | Value | Condition and basis | In plain words |
|---|---|---|---|
| ① Minimum defect size · white particle | 100 μm diameter = 3.06 px (32.7 μm/px) | 80 mm across ÷ 2,448 px; as light drops, the gray-level margin collapses before size matters | Just over three pixels, so brightness margin decides |
| ① Minimum defect size · bright linear scratch | 500 μm long = 15.3 px | line filter, weakens in the same ratio as the light | Long enough, but it dims along with the light |
| ① Minimum defect size · short shot | 1,000 μm = 30.6 px | judged by shape, relatively insensitive to light changes | Judged by shape, so it sways less |
| ② Optical setup · light and drive | low-angle white LED ring, constant-current strobe, on-time 10 % or less | no constant-voltage drive (breaks the thermal feedback) | Fix the current to break the heat feedback |
| ② Optical setup · heat sinking and temperature log | heat sink temperature logged on the same time axis as the patch | warm-up 7.5 % (0.3 %/°C, 25 °C rise assumed) | Draw temperature and brightness on one graph |
| ② Optical setup · camera, lens and WD | 5 MP (3.45 μm), 25 mm, WD about 262 mm (from principal plane) | room for the ring light housing and heat sink height inside the WD | Measure the height for the light and heat sink |
| ② Optical setup · reference patch | diffuse gray (reflectance about 50 %) 5 mm × 5 mm, fixed in a field corner | 153 × 153 px average, mean wobble 0.0065 % (1 % pixel noise assumed) | The gray square in the corner is the light meter |
| ③ Algorithm parameters · decision threshold | background 120, particle 210, threshold 180 levels | threshold margin 14.3 % | Misses once the light is 15 % dimmer |
| ③ Algorithm parameters · drift limits | −5 % warning, −10 % stop, inspection starts below 0.5 % change per 5 minutes | stop limit placed inside the threshold margin | Stop before anything slips through |
| ③ Algorithm parameters · normalization and recalibration | normalization gain cap 1.11, recalibration interval = time to warning line × 0.5 | 2.5 weeks at 1 % per week, about 37 weeks at an L70 of 50,000 hours | Measure the slope to set the interval |
Reading the first row beside the drift-limit row shows that what protects a 3.06-pixel white particle is a layout that keeps the stop limit inside the margin, more than any fine tuning of the threshold. The −10 % stop limit sits inside the 14.3 % margin, so the line stops before any silent miss can occur, and the normalization gain cap of 1.11 is tied to the same −10 %, keeping noise amplification under 11 %.
Inspections that can go without monitoring
On the other hand, some inspections can do without a reference patch. With high defect contrast and a relative threshold judged as a ratio to the background, a change in light hits background and defect together and cancels out, so periodic checks may be enough. An intermittent inspection that runs only tens of minutes a day ages slowly, so scheduled replacement may cost less than a monitoring system, and where there is no room for a patch in the field, a separate photodiode that measures the light output directly is the better choice. A photodiode cannot see contamination of the lens or the cover, though.
On surfaces that mix specular and diffuse reflection, such as glossy resin or machined metal, the gray level may not move in proportion when the light changes. Spots where specular reflection enters the lens saturate easily, staying put for a while as the light drops and then falling suddenly, so whether the 14.3 % margin holds on such surfaces cannot be guaranteed before a sample test. On such a surface, a reference coupon of the same material placed in the field, measured for both its glints and its background, comes closer to the real decision than a gray patch.
The person who manages these numbers together with the recipe is the machine vision engineer on site. For someone just learning, I recommend photographing the same white paper in the morning and in the afternoon at the same exposure and comparing the average gray levels. Seeing the percentage difference for yourself makes it clear why a threshold has to be managed together with the light. From the equipment budget side, a constant-current driver, a heat sink and a reference patch are small lines in the quote, but leave them out and, when a miss comes to light, everything produced in the meantime becomes subject to tracing. This article explains technology and is not investment advice. See our Disclaimer.
Field Note
On a line where the count of white particles found keeps falling for weeks, I would retake the golden sample before reading it as a better process, and look at how far the particle level sits from the threshold of 180. By the numbers of this setup, a particle reading below 189 levels means the light output has already fallen more than 10 %. In that case the constant-current driver and the heat path get checked, and the log of the gray patch in the field corner shows whether the drop is a step or a gentle slope.
Field Checkpoints
With the gray level of the golden sample and the patch log in hand, use the questions below to turn lighting management into spec-sheet sentences.
- Do the ring light housing and the heat sink height fit inside the WD of about 262 mm (25 mm lens, from the principal plane)? (distance from the lens front from the lens drawing)
- Have you first confirmed the material and reflectance of the surface? (on glossy resin, specular reflection can break the proportion between light and gray level)
- Is the light driven at constant current, with the heat sink temperature logged on the same time axis as the patch value?
- Is a diffuse gray patch fixed in a field corner, with its average logged every frame?
- Is the stop limit (−10 %) inside the decision margin (14.3 % in this setup)?
- Was the recalibration interval calculated from the slope of the first four weeks, and are the warm-up conditions after start-up written into the recipe?
Glossary
- [1] Specular reflection specular reflection
Reflection in which light bounces off a smooth surface in one direction only, at the same angle it came in. If the lens sits in that direction, only that spot turns white. ↩ - [2] WD working distance
The distance from the lens to the inspected surface. The values here are thin-lens numbers from the lens principal plane, and the clearance from the lens front is checked separately on the lens drawing. ↩ - [3] Gray level gray level
A step value that records the brightness of a pixel. An 8-bit image records 256 steps from 0 to 255. ↩ - [4] Junction temperature junction temperature
The temperature of the part of an LED chip that emits light. It runs hotter than the heat sink, and the higher it climbs, the less light comes out at the same current. ↩ - [5] Forward voltage forward voltage
The voltage across an LED while current flows through it. It drops slightly as the temperature rises. ↩ - [6] Constant-current driver constant-current driver
A power supply that holds the current through an LED steady. The current does not follow changes in voltage. ↩ - [7] Reference patch reference patch
A small target of known reflectance fixed at one side of the field, whose brightness is measured in every frame. It measures the light, lens and sensor all at once. ↩ - [8] Control chart control chart
A graph that plots measurements in time order with warning and limit lines, to pick out unusual trends. ↩ - [9] L70 L70 life
The operating time until LED output falls to 70 % of its initial level. It is projected from LM-80 test records with the TM-21 method. ↩
References
- Formulas: decision margin = (particle − threshold) ÷ particle, warm-up loss = temperature coefficient × temperature rise, output Φ(t) = exp(−αt), α = −ln(0.7) ÷ L70, time to the −5 % warning line = −ln(0.95) ÷ α, recalibration interval = time to warning line × 0.5, noise of the patch mean = pixel noise ÷ √pixel count, normalization gain cap = 1 ÷ 0.9
- Assumptions: 5 MP camera (2,448 × 2,048 px, 3.45 μm), 25 mm lens, 80 mm horizontal field, background 120, particle 210 and threshold 180 levels, temperature coefficient −0.3 %/°C, heat sink rise 25 °C during warm-up, L70 50,000 hours, 96 operating hours a week, fast-aging slope 1 % per week, pixel noise 1 %
- Lumen maintenance (LM-80 testing, TM-21 projection, L70), Wikipedia. en.wikipedia.org/wiki/Lumen_maintenance
Related reading — When the Light Dims by 5 %, How Many Good Pixels Turn Into Defects? · Flat-Field Correction Gain Amplifies Noise Along with Uneven Light · In Edge Inspection, Input Drift Shows Up Before Accuracy Drops

