Ambient light detection sensor calibration method and system
By obtaining the sensor's background noise and transmittance compensation baseline values, and correcting the sensor's photosensor offset and housing transmittance differences, the problem of low sensor detection accuracy in low-transmittance housings is solved, thereby improving detection accuracy and user experience.
Patent Information
- Application Number
- CN202511206932.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-10-17
Smart Images

Figure CN120800558A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of optical sensor, and particularly relates to an ambient light detection sensor calibration method and system. BACKGROUND
[0002] As a key component of modern consumer electronics (such as smart phones, smart watches, tablet computers), the ambient light sensor (ALS) is responsible for dynamically adjusting the screen brightness according to the ambient light, optimizing the camera exposure, controlling the backlight power consumption and other core functions. Especially in low-power devices, the accuracy of ALS directly determines the user experience and the endurance ability - for example, the LCD backlight power consumption accounts for 40% of the total power consumption of the phone, and accurate light intensity detection can save 20%-30% of energy consumption. With the development of industrial design towards non-porous and high-transmittance materials (such as ceramic, frosted glass), the installation position of ALS is often covered by a dark shell, and the transmittance may be as low as 5%-10%, which puts higher requirements on the sensitivity and calibration method of the sensor.
[0003] The way the ambient light sensor calculates the ambient brightness according to its reading is usually a proportional relationship: ambient brightness = reading x gain coefficient x shell transmittance coefficient; from the above formula, it can be seen that the error of brightness detection mainly comes from two parts, reading error, gain coefficient and shell transmittance coefficient error.
[0004] The current sensor reading calibration method mainly uses multi-segment linear fitting or a global transmittance amplification coefficient K, which mainly calibrates the error of the amplification coefficient after the combination of the gain coefficient and the transmittance coefficient, and does not calibrate the noise floor of the light sensor (such as zero drift, dark current), resulting in the fixed error of the sensor in a completely dark environment being amplified, for example, when the transmittance is only 10%, the fixed error of the sensor in a completely dark environment will be amplified by 10 times, and the detected brightness of the sensor will be distorted. SUMMARY
[0005] The technical problem to be solved by the present application is to provide an ambient light detection sensor calibration method and system, which aims to correct the noise floor of the ambient light sensor and the transmittance difference caused by the shell at the same time, and improve the accuracy of the ambient light detection of the sensor.
[0006] The technical scheme adopted by the present application to solve the above technical problem is:
[0007] On the one hand, the present application provides an ambient light detection light sensor calibration method, characterized in that the method comprises:
[0008] Step S1: obtaining the fixed offset value of the photosensitive element of the sensor in a completely dark environment as the noise floor of the sensor ;
[0009] Step S2: Obtain the reading of the assembled sensor under standard light intensity as the light transmittance compensation reference value of the sensor shell ;
[0010] Step S3: Correct the ambient light reading of the sensor based on the background noise of the sensor and the light transmittance compensation reference value , as the calibrated ambient light.
[0011] Further, step S1 includes:
[0012] Step S11: Place the photosensitive element of the sensor in a completely dark environment and obtain the reading of the photosensitive element. If the reading of the photosensitive element is greater than 0, take the reading of the photosensitive element as the background noise of the sensor . If the reading of the photosensitive element is equal to 0, go to step S12;
[0013] Step S12: Set a variable light source and a standard photosensitive element of a sensor with normal reading in a completely dark environment. Set the positions of the photosensitive element to be tested and the standard photosensitive element to be symmetrical relative to the variable light source. Increase the light intensity of the variable light source by gradient from 0, record the first non-zero reading of the photosensitive element to be tested, denoted as , and obtain the reading of the standard photosensitive element at the same time , the background noise of the sensor .
[0014] Further, set a light intensity threshold for the variable light source in step S12. If the photosensitive element to be tested is still 0 after exceeding the set light intensity threshold, determine the photosensitive element to be tested as an abnormal piece.
[0015] Further, the variable light source is an LED light source with adjustable duty cycle.
[0016] Further, the light intensity threshold is less than 1 lx.
[0017] Further, step S2 includes:
[0018] Step S21: Set a standard light intensity in the laboratory, select a sensor that is assembled and has a standard reading as a golden machine, and record the reading of the golden machine under the standard light;
[0019] Step S22: Adjust the light intensity to the standard light intensity in the test environment through the reading of the golden machine;
[0020] Step S23: Obtain the reading of the assembled sensor to be tested under the standard light intensity in the test environment as the light transmittance compensation reference value .
[0021] Further, the average of the readings of the to-be-tested sensor under the standard light intensity in step S23 is taken as the transmittance compensation reference value .
[0022] Further, the standard light intensity is greater than 1000lx.
[0023] Further, the sensor background noise and the transmittance compensation reference value are stored in a non-volatile memory for correcting sensors of the same series.
[0024] In another aspect, the present application also provides an ambient light detection sensor calibration system, which comprises a background noise acquisition module, a transmittance compensation reference value acquisition module, and an ambient light correction module.
[0025] The background noise acquisition module comprises a dark box and a first variable light source, and a standard photosensitive element, the dark box and the first variable light source are used to change the readings of the to-be-tested photosensitive element and the standard photosensitive element, and the background noise of the sensor is acquired according to the readings of the to-be-tested photosensitive element and the standard photosensitive element .
[0026] The transmittance compensation reference value acquisition module comprises a second variable light source and a machine, the machine is used to correct the light intensity of the second variable light source to a set standard light intensity, and the transmittance compensation reference value of the to-be-tested sensor under the standard light intensity after assembly is acquired .
[0027] The ambient light correction module is used to correct the ambient light readings of the sensor according to the background noise and the transmittance compensation reference value of the sensor.
[0028] The present application has the following advantages: the ambient light detection sensor calibration method and system of the present application acquire the fixed offset value of the photosensitive element due to zero drift or dark current as the background noise of the sensor before the sensor is assembled into a shell, acquire the transmittance compensation reference value caused by the transmittance of the sensor shell after the sensor is assembled, and correct the brightness detection readings of the sensor based on the background noise of the sensor and the transmittance compensation reference value related to the sensor shell, thereby improving the accuracy and precision of the ambient brightness detection results of the sensor. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 It is a background noise correction flowchart;
[0030] Figure 2 A schematic diagram of a light transmittance compensation reference value correction process is shown in Figure 1.
[0031] Figure 3 A schematic diagram of a background noise correction module is shown in Figure 2.
[0032] Figure 4 A schematic diagram of a light transmittance compensation reference value correction module is shown in Figure 3. DETAILED DESCRIPTION
[0033] The core of the environmental light detection sensor calibration method and system of the present application to solve the above technical problems is: obtaining the fixed offset value of the photosensitive element of the sensor in a full black environment as the background noise of the sensor , determining the fixed error of the sensor reading caused by the sensor zero drift or dark current; obtaining the reading of the assembled sensor under a standard light intensity , excluding the light transmittance difference caused by the sensor shell as the light transmittance compensation reference value of the sensor ; based on the background noise and the light transmittance compensation reference value of the sensor, correcting the environmental light value read by the sensor, and improving the detection accuracy of the sensor to the environmental light.
[0034] The environmental light detection sensor calibration method of the present application mainly includes the following processes.
[0035] Step S1: background noise acquisition, as shown in Figure 4, the determination of the background noise includes: Figure 1
[0036] Step S11: place the photosensitive element of the sensor in a full black environment, obtain the reading of the photosensitive element, if the reading of the photosensitive element is greater than 0, take the reading of the photosensitive element as the background noise of the sensor , if the reading of the photosensitive element is equal to 0, go to step S2;
[0037] Step S12: in a full black environment, set a variable light source and a standard photosensitive element of a sensor with normal reading. The reading of the standard photosensitive element in a full black environment is 0, the light intensity of the variable light source is 0 to 1 lx, specifically it can be an adjustable duty cycle LED light source controlled by an LED driving chip, wherein the LED driving chip can set a brightness value of 0-225, and the brightness of the LED light source is adjusted from 0 to the brightest. Set the to-be-measured photosensitive element and the standard photosensitive element symmetrically relative to the variable light source, increase the light intensity of the variable light source from 0 according to the gradient, record the first reading of the to-be-measured photosensitive element which is not 0, mark as a, and obtain the reading m of the standard photosensitive element at the same time, the background noise of the sensor .
[0038] In this embodiment, if the reading of the photosensitive element to be tested is still 0 or no reading after exceeding the set light threshold, the photosensitive element to be tested is determined to be an abnormal and unusable component.
[0039] Step S2: Obtaining the transmittance compensation reference value, such as Figure 2 As shown, obtaining the transmittance compensation reference value of the sensor housing includes:
[0040] Step S21: Set a standard light intensity (e.g., 1000 lx) in the laboratory, select a sensor that has been assembled and has a standard reading as a gold sensor, and record the reading V1000 of the gold sensor under the standard light;
[0041] Step S22: in the test environment, adjust the light intensity to the standard light intensity by adjusting the reading of the gold machine to V1000 inversely;
[0042] Step S23: Obtain the average value of the readings of the assembled sensor under the standard light intensity S as the transmittance compensation reference value (The sensor to be tested after assembly may also adopt a semi-enclosed structure in which the photosensitive element is surrounded by the sensor housing material, ensuring that the light received by the photosensitive element is the light transmitted through the sensor housing).
[0043] Step S3: Based on the sensor's background noise And the transmittance compensation reference value of the shell The ambient light value read by the sensor To make a correction: , is the ambient light after calibration.
[0044] As a preference, the sensor noise floor and transmittance compensation reference value Stored in non-volatile memory for calibration of sensors in the same series.
[0045] The ambient light detection sensor calibration system of the present invention comprises: a background noise acquisition module, a transmittance compensation reference value acquisition module, and an ambient light correction module;
[0046] like Figure 3 The background noise acquisition module includes a dark box, a first variable light source and a standard photosensitive element. The dark box and the first variable light source are used to change the readings of the photosensitive element to be measured and the standard part, and the background noise of the sensor is obtained according to the readings of the photosensitive element to be measured and the standard photosensitive element. The variable light source, standard photosensor and photosensor to be tested are all connected to the test computer via a USB hub, and the test logic is executed by the control program on the test computer.
[0047] As Figure 4 shown, the light transmittance compensation reference value obtaining module comprises a second variable light source and a machine, the machine is used for correcting the light intensity of the second variable light source to a standard light intensity, and obtaining the light transmittance compensation reference value of the assembled sensor under the standard light intensity .
[0048] The ambient light correction module is used for correcting the ambient light value read by the sensor according to the background noise and the light transmittance compensation reference value of the sensor.
Claims
1. A method for calibrating an ambient light detection sensor, characterized in that: The method comprises: Step S1: Obtain the fixed offset value of the sensor's photosensor in a completely dark environment as the sensor's background noise ; Step S2: Obtain the assembled sensor under standard light intensity The reading below is used as the transmittance compensation reference value of the sensor housing ; Step S3: Based on the sensor's background noise and transmittance compensation reference value Ambient light readings for the sensor To make a correction: , is the ambient light after calibration.
2. The ambient light detection sensor calibration method according to claim 1, characterized in that: Step S1 includes: Step S11: Place the sensor's photosensor in a completely dark environment and obtain the photosensor reading. If the photosensor reading is greater than 0, the photosensor reading is used as the sensor background noise. If the reading of the photosensor is equal to 0, go to step S12; Step S12: Set a variable light source and a standard photosensitive element of the sensor with normal readings in a completely dark environment. Set the photosensitive element to be tested and the standard photosensitive element to be symmetrical relative to the variable light source. Increase the light intensity of the variable light source from 0 in a gradient. Record the first non-zero reading of the photosensitive element to be tested, which is recorded as , and obtain the reading of the standard photosensor at the same time , sensor noise floor .
3. The ambient light detection sensor calibration method according to claim 2, characterized in that: In step S12, a variable light source illumination threshold is set. If the value of the photosensitive element to be tested is still 0 after exceeding the set illumination threshold, the photosensitive element to be tested is determined to be an abnormal element.
4. The ambient light detection sensor calibration method according to claim 3, characterized in that: The variable light source is an LED light source with an adjustable duty cycle.
5. The ambient light detection sensor calibration method according to claim 4, characterized in that: The illumination threshold is less than 1 lx.
6. The ambient light detection sensor calibration method according to claim 1, characterized in that: Step S2 includes: Step S21: Set a standard light intensity in the laboratory, select a sensor that has been assembled and has a standard reading as a gold sensor, and record the reading of the gold sensor under the standard light; Step S22: adjusting the light intensity to the standard light intensity in the test environment according to the reading of the gold machine; Step S23: Obtain the reading of the assembled sensor under standard light intensity in the test environment as the transmittance compensation reference value. .
7. The ambient light detection sensor calibration method according to claim 6, characterized in that: In step S23, the average value of the readings of the sensor to be tested under the standard light intensity during multiple tests is used as the transmittance compensation reference value. .
8. The method for calibrating an ambient light detection sensor according to claim 7, wherein: The standard light intensity is greater than 1000 lx.
9. The ambient light detection sensor calibration method according to claim 1, characterized in that: The sensor noise floor and transmittance compensation reference value Stored in non-volatile memory for calibration of sensors in the same series.
10. An ambient light detection sensor calibration system, used to implement the ambient light detection sensor calibration method according to any one of claims 1 to 9, characterized in that: The system includes: a background noise acquisition module, a transmittance compensation reference value acquisition module, and an ambient light correction module; The background noise acquisition module includes a dark box, a first variable light source and a standard photosensitive element. The dark box and the first variable light source are used to change the readings of the photosensitive element to be measured and the standard photosensitive element, and the background noise of the sensor is obtained according to the readings of the photosensitive element to be measured and the standard photosensitive element. ; The transmittance compensation reference value acquisition module includes a second variable light source and a gold machine, wherein the gold machine is used to correct the illumination intensity of the second variable light source to the set standard illumination intensity and obtain the transmittance compensation reference value of the sensor to be tested under the standard illumination intensity after assembly. ; The ambient light correction module is used to adjust the ambient light according to the background noise of the sensor. and transmittance compensation reference value Corrects the ambient light readings taken by the sensor.