Rain sensor automatic calibration control method and computer readable storage medium
By using an automatic calibration control method for rain sensors to adjust drive parameters in real time, the adaptability and power consumption issues of existing rain sensors are solved, improving detection accuracy and versatility, ensuring driving safety and comfort, and reducing power consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU RIYING ELECTRONICS
- Filing Date
- 2026-03-30
- Publication Date
- 2026-07-24
AI Technical Summary
The existing rain sensor's LED driving parameters are manually fixed and calibrated, which cannot adapt to the complex and variable vehicle environment. It is easily affected by human operation errors and lacks a calibration anomaly detection and correction mechanism, resulting in low rain detection accuracy, poor versatility, and increased power consumption due to frequent manual calibration, which does not meet the requirements of low power consumption design for vehicles.
An automatic calibration control method for rain gauge sensors is adopted, including an LED emission module, an ADC sampling module, a storage module, and a main control unit. The calibration process is automatically started by power-on or detection of dynamic update conditions, driving parameters are adjusted in real time, anomaly detection and correction are realized, and data is stored and historical calibration parameters are quickly reused after sleep and wake-up.
It enables real-time adaptation of rain sensors in complex environments, reduces detection deviation, improves driving safety and comfort, reduces human operation errors, expands the scope of application, reduces power consumption, and meets the requirements of low-power vehicle design.
Smart Images

Figure CN122443367A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle-mounted rain gauge technology, and in particular to an automatic calibration control method for rain gauges and a computer-readable storage medium. Background Technology
[0002] The vehicle-mounted rain sensor is one of the core components of the intelligent driving assistance system of automobiles. The rain sensor emits light through LEDs and receives light reflected / refracted by the windshield. It uses changes in the ADC sampling value to determine the amount of rain, and then controls the start and stop of the car's windshield wipers and the wiping frequency. Its detection accuracy directly affects driving safety and comfort.
[0003] The LED driving parameters (driving current, gain) of existing rain sensors are mostly manually fixed and calibrated. The optimal parameters for the current working conditions are found based on experience and calibration data and then fixed for continued use. However, the manual fixed calibration mode has the following shortcomings: (1) The vehicle environment is complex and changeable. Factors such as windshield wear, stains, temperature changes, power supply voltage fluctuations, and different windshield thicknesses of different models will cause changes in LED luminous intensity and light propagation path, resulting in the fixed parameters being unable to adapt to dynamic scenarios and easily causing rain detection deviations (such as accidental wiping, missed wiping, no wiping, etc.). (2) It is easily affected by human operation errors and lacks a calibration anomaly detection and correction mechanism. When calibration anomalies occur during the calibration process, they cannot be identified and dealt with in time, resulting in the failure of calibration results and further affecting the accuracy of rain detection. (3) It is usually set for specific vehicle models and specific environments, and its versatility is poor. When the sensor is installed on a different vehicle model or the windshield condition changes after long-term use, it needs to be manually recalibrated, which is cumbersome and cannot achieve dynamic automatic adaptation, thus limiting the applicability of the rain sensor. At the same time, frequent recalibration will increase the power consumption of the vehicle equipment, which does not meet the low power consumption design requirements of the vehicle equipment, and is especially unsuitable for vehicle scenarios that require frequent sleep and wake-up. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide an automatic calibration control method for rain gauge sensors that can adapt to complex vehicle environments, achieve automatic calibration upon power-on, avoid calibration anomalies, and support rapid reuse of historical calibration parameters after sleep and wake-up, as well as a computer-readable storage medium.
[0005] The technical solution adopted by this invention to solve its technical problem is: an automatic calibration control method for a rain gauge sensor, wherein the rain gauge sensor includes an LED emitting module, an ADC sampling module, a storage module, and a main control unit, wherein the LED emitting module, the ADC sampling module, and the main control unit are connected in sequence, and the storage module is connected to the main control unit; the method includes the following steps:
[0006] S1. Calibration Trigger: When the vehicle is powered on or a dynamic update condition is detected, the main control unit automatically starts the calibration process; among which, dynamic update conditions include changes in hardware status and rainfall detection deviation exceeding a threshold.
[0007] S2. Calibration Implementation: First, eliminate the sampling saturation of the ADC sampling module, then stabilize the ADC sampling value of the ADC sampling module within the preset range, and finally, the main control unit calculates and fixes the final drive parameters, including drive current and gain parameters.
[0008] S3. Data storage: After calibration is completed, the storage module saves the calibration data in real time. The calibration data includes the final driving parameters and validity identifier.
[0009] Furthermore, the specific steps of step S2 are as follows:
[0010] S21. Read the storage module status and read the initial ADC sampling value of the LED emission module;
[0011] S22. Gradually reduce the drive current of the LED emitting module, and the ADC sampling module performs ADC sampling simultaneously. The main control unit counts the number of times the drive current is reduced. If the sampling saturation of the ADC sampling module is eliminated within the specified number of reductions, then step S23 is executed; otherwise, the final drive parameters calibrated last time are directly used.
[0012] S23. Keep the drive current obtained in step S22 unchanged, and gradually fine-tune the gain parameter of the ADC sampling module. The ADC sampling module performs ADC sampling synchronously. The main control unit counts the number of times the gain parameter is adjusted. If the ADC sampling value is stabilized within the preset range within the specified number of adjustments, then step S24 is executed; otherwise, the final drive parameter calibrated last time is directly used.
[0013] S24. Based on the preset ADC sampling value, and the driving current obtained in step S22, the final driving current for this calibration is calculated using a linear correlation model.
[0014] Furthermore, the calculation formula for the linear correlation model in step S24 is as follows:
[0015] cal_result=L adc / (L) t / I t )
[0016] In the formula, cal_result represents the final drive current, L adc L represents the preset ADC sampling value. t I represents the ADC sample value in this operation. tThis represents the driving current obtained in step S22.
[0017] Furthermore, step S1 also includes: when the rain sensor wakes up from sleep mode, the final driving parameters from the last calibration are directly used.
[0018] Furthermore, the validity identifier in step S3 includes the generation time or validity period of the final driving parameters for this calibration.
[0019] Furthermore, the LED emitting module includes a first LED emitting submodule and a second LED emitting submodule, both of which are connected to the ADC sampling module.
[0020] Furthermore, the rain sensor also includes a communication module, and the main control unit is connected to the ADC sampling module through the communication module.
[0021] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described automatic calibration control method for a rain gauge sensor.
[0022] The beneficial effects of this invention are:
[0023] (1) The present invention automatically starts the calibration process when the vehicle is powered on or when dynamic update conditions are detected, without the need for manual calibration, and realizes real-time dynamic adjustment of calibration parameters. It adapts to the complex changes in the vehicle environment in real time, avoids the detection deviation caused by fixed calibration parameters, effectively solves the problems of wiper miswiping, missing wiping, and not wiping, and ensures that the wiper can accurately perform wiping action according to the actual rainfall, thereby improving driving safety and ride comfort.
[0024] (2) In the automatic calibration process, the present invention can identify calibration abnormalities and other problems in real time. When the number of times the driving current is reduced or the number of times the gain parameter is adjusted exceeds the specified number, the previous calibration data is automatically adopted, forming an abnormality detection and correction mechanism, which improves the reliability and stability of the calibration parameters, thereby reducing the probability of rainfall detection failure caused by calibration abnormalities and other problems.
[0025] (3) The present invention adopts an automatic start calibration process, which does not require manual intervention, reduces the error of manual operation, and significantly shortens the start response time of the rain sensor after power-on. It ensures that the rain sensor quickly enters the working state after the vehicle is started, and can automatically adapt to different vehicle models, different windshield specifications and different environmental changes under different operating conditions. It does not require separate debugging for specific vehicle models or scenarios, expands the applicable range of the rain sensor, reduces the installation, debugging and maintenance costs, improves versatility and practicality, and improves the intelligence level of the vehicle system, which is more in line with the development trend of intelligent driving assistance system of automobiles.
[0026] (4) After the rain sensor wakes up from sleep, the present invention automatically adopts the final driving parameters of the last calibration, avoiding repeated calibration, effectively reducing the power consumption of the vehicle equipment, better adapting to the low power consumption design requirements of the vehicle, and extending the vehicle's power supply range. Attached Figure Description
[0027] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0028] Figure 1 This is a flowchart of the present invention.
[0029] Figure 2 This is a structural framework diagram of the rain sensor in this invention.
[0030] In the diagram: 100, LED transmitting module; 110, first LED transmitting sub-module; 120, second LED transmitting sub-module; 200, ADC sampling module; 300, storage module; 400, main control unit; 500, communication module. Detailed Implementation
[0031] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0032] Example 1
[0033] like Figure 1 and Figure 2 As shown, an automatic calibration control method for a rain gauge sensor is disclosed. The rain gauge sensor includes an LED emitting module 100, an ADC sampling module 200, a storage module 300, and a main control unit 400. The LED emitting module 100, the ADC sampling module 200, and the main control unit 400 are connected sequentially, and the storage module 300 is connected to the main control unit 400. The method includes the following steps:
[0034] S1. Calibration Trigger: When the vehicle is powered on or a dynamic update condition is detected, the main control unit 400 automatically starts the calibration process; among which, dynamic update conditions include changes in hardware status and rainfall detection deviations exceeding thresholds.
[0035] Specifically, changes in hardware conditions include windshield wear, stain adhesion, temperature changes, and variations in thickness and dimensions. For example, when there is rain on the windshield, the calibration is performed using this as a reference environment. Subsequently, after the windshield dries during driving, the ADC sampling value may overflow, resulting in a sampling anomaly. In this case, the main control unit 400 automatically initiates the calibration process for recalibration. Additionally, if the difference between the operating conditions and the initial calibration conditions during driving causes a sudden and excessive deviation in rainfall detection, even exceeding the threshold, the main control unit 400 automatically initiates the calibration process for recalibration.
[0036] S2. Calibration Implementation: First, eliminate sampling saturation in the ADC sampling module 200. Then, stabilize the ADC sampling values of the ADC sampling module 200 within a preset range. Finally, the main control unit 400 calculates and fixes the final drive parameters, including drive current and gain parameters. The specific steps are as follows:
[0037] S21. Read the status of storage module 300 and read the initial ADC sampling value of LED emission module 100;
[0038] S22. Gradually reduce the driving current of the LED emitting module 100, and the ADC sampling module 200 performs ADC sampling simultaneously. The main control unit 400 counts the number of times the driving current is reduced. If the sampling saturation of the ADC sampling module 200 is eliminated within the specified number of reductions, then step S23 is executed; otherwise, the final driving parameters calibrated last time are directly used.
[0039] In an automotive environment, excessive drive current can cause light to exceed the ADC's range after being reflected by the windshield, resulting in sampling saturation. In this case, the sampled data is invalid and cannot be used for calibration. This step eliminates ADC sampling saturation, ensuring the validity of the sampled values and fundamentally preventing invalid sampling from interfering with subsequent calibration.
[0040] S23. After keeping the driving current obtained in step S22 unchanged, the gain parameter of the ADC sampling module 200 is gradually fine-tuned, and the main control unit 400 counts the number of times the gain parameter is adjusted. If the ADC sampling value is stabilized within the preset range within the specified number of adjustments, then step S24 is executed; otherwise, the final driving parameter calibrated last time is directly used.
[0041] This step mainly stabilizes the ADC sampling value within a preset range (such as [12000, 18000]), suppresses noise, eliminates signal interference, and thus ensures that the ADC sampling module 200 can accurately perform ADC sampling.
[0042] S24. Based on the preset ADC sampling value, and the driving current obtained in step S22, the final driving current for this calibration is calculated using a linear correlation model.
[0043] The formula for calculating the linear correlation model is as follows:
[0044] cal_result=L adc / (L) t / I t )
[0045] In the formula, cal_result represents the final drive current, L adc L represents the preset ADC sampling value. tI represents the ADC sample value in this operation. t This represents the driving current obtained in step S22.
[0046] It should be noted that the gain parameter obtained in step S23 is the final gain parameter calibrated in this step.
[0047] During the automatic calibration process, calibration anomalies and other problems can be identified in real time. When the number of times the drive current is reduced or the number of times the gain parameter is adjusted exceeds the specified number, the previous calibration data is automatically adopted, forming an anomaly detection and correction mechanism. This improves the reliability and stability of the calibration parameters, thereby reducing the probability of rainfall detection failures caused by calibration anomalies and other problems.
[0048] S3. Data storage: After calibration, the storage module 300 saves the calibration data in real time. The calibration data includes the final driving parameters and validity identifier.
[0049] The validity indicator includes the generation time or validity period of the final driving parameters in this calibration. The generation time or validity period of the final driving parameters in this calibration is used to determine whether the parameters have become invalid due to aging caused by long-term use.
[0050] In some embodiments, the validity flag also includes a flag indicating whether the previous calibration was successful, which is used to avoid reading invalid parameters upon wakeup.
[0051] The calibration process is automatically initiated when the vehicle is powered on or when dynamic update conditions are detected, eliminating the need for manual calibration. This enables real-time dynamic adjustment of calibration parameters, adapting to changes in the complex in-vehicle environment and avoiding detection deviations caused by fixed calibration parameters. It effectively solves problems such as wiper wiping errors, missed wipes, and failure to wipe, ensuring that the wipers can accurately perform wiping actions according to the actual rainfall, thereby improving driving safety and passenger comfort.
[0052] In some embodiments, step S1 further includes: when the rain sensor wakes up from sleep mode, directly using the last calibrated final driving parameters.
[0053] After the rain sensor wakes up from sleep mode, it automatically adopts the final drive parameters from the last calibration, avoiding repeated calibration, effectively reducing the power consumption of the vehicle equipment, better meeting the design requirements of low power consumption in vehicles, and extending the vehicle's power supply range.
[0054] Before the vehicle enters sleep mode, the main control unit 400 will automatically trigger the calibration data saving process, the specific steps of which are as follows:
[0055] The final drive parameters calibrated before hibernation are read and written to the storage module 300 to complete persistent storage. After the storage module 300 returns a write success signal, the main control unit 400 confirms that the calibration data has been safely saved and then enters low-power hibernation mode.
[0056] Since the storage module 300 saves the calibration data in real time after each calibration, if the main control unit 400 recognizes that the calibration data before the sleep state has been successfully saved, the main control unit 400 will not trigger the calibration data saving process before the vehicle enters the sleep state, thus avoiding duplicate data saving.
[0057] The LED emitting module 100 includes a first LED emitting submodule 110 and a second LED emitting submodule 120, both of which are connected to the ADC sampling module 200.
[0058] The rain sensor also includes a communication module 500, and the main control unit 400 is connected to the ADC sampling module 200 through the communication module 500.
[0059] Example 2
[0060] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the automatic calibration control method for a rain sensor in Embodiment 1.
[0061] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. An automatic calibration control method for a rain gauge sensor, characterized in that, The rain sensor includes an LED emitting module (100), an ADC sampling module (200), a storage module (300), and a main control unit (400). The LED emitting module (100), the ADC sampling module (200), and the main control unit (400) are connected in sequence, and the storage module (300) is connected to the main control unit (400). The process includes the following steps: S1. Calibration trigger: When the vehicle is powered on or a dynamic update condition is detected, the main control unit (400) automatically starts the calibration process; among which, the dynamic update conditions include changes in hardware status and rainfall detection deviation exceeding the threshold. S2. Calibration implementation: First, eliminate the sampling saturation of the ADC sampling module (200), then stabilize the ADC sampling value of the ADC sampling module (200) within the preset range, and finally the main control unit (400) calculates and solidifies the final driving parameters, including driving current and gain parameters. S3. Data storage: After calibration is completed, the storage module (300) saves the calibration data in real time. The calibration data includes the final driving parameters and validity identifier.
2. The automatic calibration control method for a rain gauge sensor according to claim 1, characterized in that, The specific steps of step S2 are as follows: S21. Read the status of the storage module (300) and read the initial ADC sample value of the LED emission module (100); S22. Gradually reduce the driving current of the LED emitting module (100), and the ADC sampling module (200) performs ADC sampling simultaneously. The main control unit (400) counts the number of times the driving current is reduced. If the sampling saturation of the ADC sampling module (200) is eliminated within the specified number of reductions, then step S23 is executed; otherwise, the final driving parameters calibrated last time are directly used. S23. Keep the driving current obtained in step S22 unchanged, and gradually fine-tune the gain parameter of the ADC sampling module (200). The ADC sampling module (200) performs ADC sampling synchronously. The main control unit (400) counts the number of times the gain parameter is adjusted. If the ADC sampling value is stabilized within the preset range within the specified number of adjustments, then step S24 is executed; otherwise, the final driving parameter calibrated last time is directly used. S24. Based on the preset ADC sampling value, and the driving current obtained in step S22, the final driving current for this calibration is calculated using a linear correlation model.
3. The automatic calibration control method for a rain gauge sensor according to claim 2, characterized in that, The calculation formula for the linear correlation model in step S24 is as follows: cal_result=L adc / (L t / I t ) In the formula, cal_result represents the final drive current, L adc L represents the preset ADC sampling value. t I represents the ADC sample value in this operation. t This represents the driving current obtained in step S22.
4. The automatic calibration control method for a rain gauge sensor according to claim 1, characterized in that, Step S1 further includes: when the rain sensor wakes up from sleep, the final driving parameters of the last calibration are directly used.
5. The automatic calibration control method for a rain gauge sensor according to claim 1, characterized in that, The validity identifier in step S3 includes the generation time or validity period of the final driving parameters for this calibration.
6. The automatic calibration control method for a rain gauge sensor according to claim 1, characterized in that, The LED emitting module (100) includes a first LED emitting submodule (110) and a second LED emitting submodule (120), both of which are connected to the ADC sampling module (200).
7. The automatic calibration control method for a rain gauge sensor according to claim 1, characterized in that, The rain sensor also includes a communication module (500), and the main control unit (400) is connected to the ADC sampling module (200) through the communication module (500).
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the automatic calibration control method for rain gauges as described in any one of claims 1-7.