Abstract:LED light source degradation detection and lifetime evaluation usually use the data of light flux change as a basis, but the process of light flux measurement is complicated and tedious, requiring the use of an integrating sphere, and cannot be performed online. This is unfriendly to the detection of machine vision light sources used in production lines. To address this problem, this paper proposes and designs a method for online detection and lifetime evaluation of light sources by using a mini spectrometer to detect the intensity of light sources online, and evaluates the light degradation and lifetime of light sources based on the changes in light intensity during use. This determines whether the light source needs to be adjusted or replaced, avoiding misjudgment or missed judgment in production detection due to light source degradation. The experiment was conducted on LED under high-temperature accelerated aging. The light intensity data after aging was fitted by an acceleration and life evaluation model, and the fitting result showed that the error of life evaluation by this method was 8.37%. As a comparison, this paper also detects the changes in light flux of light sources during the experiment, and the average error between the decay of light intensity and the decay of light flux was only 0.102%. It has been validated that the error in evaluating the lifetime of light sources using this method is 10.71%, and the accuracy of the evaluation is about 90%. The results show that the method is accurate, reliable, and can be used as a basis for online detection and evaluation of LED light source degradation.