Capacitive proximity sensor and method for compensating temperature drift of capacitive proximity sensor
By integrating the temperature detection module and digital potentiometer in the capacitive proximity sensor, the mapping relationship between the preset temperature interval and the adjustment parameters is established, and the potentiometer tap is adjusted in real time, the problem of poor detection consistency of the capacitive proximity sensor in a wide temperature environment is solved, and efficient temperature drift compensation and detection consistency improvement is achieved.
Patent Information
- Application Number
- CN202510330064.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-03-20
AI Technical Summary
Capacitive proximity sensors have poor detection consistency in wide temperature environments, traditional material optimization and software compensation methods have limited effects, and require a large number of individual calibrations.
A capacitive proximity sensor is designed, integrating an oscillation detection module, a temperature detection module, a digital potentiometer and a main control module. Through the precalibration stage, a mapping relationship between the preset temperature interval and the digital potentiometer adjustment parameters is established. In the real-time compensation stage, the analog-to-digital conversion value of the sensor is dynamically calibrated according to the ambient temperature.
It effectively improves the detection consistency of capacitive proximity sensors in wide temperature environments, reduces the workload and cost of individual calibration, and solves the problems of limited material optimization effects and software compensation requiring a large number of individual calibrations.
Smart Images

Figure CN119860798B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of sensors, and particularly to a capacitive proximity sensor and a method for compensating temperature drift of the capacitive proximity sensor. Background Art
[0002] Capacitive proximity sensors are widely used in fields such as industrial control and consumer electronics, but their detection distance is susceptible to changes in ambient temperature. To solve the problem of temperature drift, traditional capacitive proximity sensors mainly adopt two methods. One is to select materials with a low temperature coefficient to manufacture the sensor to reduce the direct influence of temperature on the capacitance value. The other is to collect a large amount of data and calculate a compensation parameter to perform software compensation.
[0003] However, the above solutions have significant defects. The material optimization method is limited by physical properties, the compensation effect is limited, and there are still performance differences among sensors of different batches; the software compensation method requires parameter calibration for individual sensors, and the compensation effect depends on the parameters of individual sensors, and it is difficult to ensure consistency. Summary of the Invention
[0004] In view of the above problems, this application provides a capacitive proximity sensor and a method for compensating temperature drift of the capacitive proximity sensor to solve the above technical problems.
[0005] In a first aspect, this application provides a capacitive proximity sensor, including:
[0006] An oscillation detection module, which includes a sensor electrode, is used to output an oscillation signal according to the capacitance change of the sensor electrode and convert the oscillation signal into a first electrical signal;
[0007] A temperature detection module, which is used to detect the ambient temperature at the current moment and output a second electrical signal;
[0008] A digital potentiometer, connected to the oscillation detection module, is used to adjust the first electrical signal output by the oscillation detection module by adjusting the tap position;
[0009] A main control module, which is used to control the digital potentiometer to adjust the tap according to the second electrical signal and output a detection result according to the first electrical signal.
[0010] In a second aspect, this application provides a method for compensating temperature drift of a capacitive proximity sensor, which is applied to the capacitive proximity sensor as described in the first aspect. The method includes a pre-calibration stage and a real-time compensation stage;
[0011] The pre-calibration stage includes:
[0012] Obtaining the analog-to-digital conversion values sampled based on the same preset detection distance by at least one capacitive proximity sensor in multiple preset temperature ranges;
[0013] Adjust the tap position of the digital potentiometer of the capacitive proximity sensor, and calibrate the analog-to-digital conversion value of the capacitive proximity sensor under each of the preset temperature ranges to a preset target analog-to-digital conversion value;
[0014] Obtain the adjustment parameters of the digital potentiometer, and generate a mapping relationship between the preset temperature range and the adjustment parameters of the digital potentiometer;
[0015] The real-time compensation stage includes:
[0016] Obtain the ambient temperature at the current moment, and determine the preset temperature range to which the ambient temperature belongs;
[0017] Adjust the tap of the digital potentiometer according to the mapping relationship between the preset temperature range to which the ambient temperature belongs and the adjustment parameters of the digital potentiometer, so as to calibrate the analog-to-digital conversion value sampled by the capacitive proximity sensor based on the preset detection distance to the target analog-to-digital conversion value.
[0018] This application provides a capacitive proximity sensor and a method for compensating the temperature drift of the capacitive proximity sensor. This method establishes a mapping relationship between a preset temperature range and digital potentiometer adjustment parameters through a pre-calibration stage, and adjusts the potentiometer tap according to the current ambient temperature in the real-time compensation stage to dynamically calibrate the analog-to-digital conversion value of the sensor. Specifically, in the pre-calibration stage, standardized compensation parameters are generated by calibrating the sensor output at different temperatures; in the real-time compensation stage, the corresponding parameters are quickly matched based on the temperature range, without relying on complex algorithms or individual sensor data acquisition. This application effectively improves the detection consistency of the capacitive proximity sensor in a wide temperature environment through a standardized calibration process and dynamic parameter matching, reduces the individual calibration workload and cost, and solves the problems of limited material optimization effect and the need for a large amount of individual calibration in software compensation in traditional solutions.
[0019] These aspects or other aspects of this application will be more clearly understood in the following description of the embodiments. Brief Description of the Drawings
[0020] In order to more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0021] Figure 1 Shows a module schematic diagram of the capacitive proximity sensor provided by an embodiment of this application.
[0022] Figure 2Shows another schematic diagram of the capacitive proximity sensor provided by the embodiments of the present application.
[0023] Figure 3 Shows the flowchart of the pre-calibration stage of the temperature drift compensation method for the capacitive proximity sensor provided by the embodiments of the present application.
[0024] Figure 4 Shows the flowchart of the real-time compensation stage of the temperature drift compensation method for the capacitive proximity sensor provided by the embodiments of the present application.
[0025] Figure 5 Shows another flowchart of the pre-calibration stage of the temperature drift compensation method for the capacitive proximity sensor provided by the embodiments of the present application.
[0026] Figure 6 Shows another flowchart of the pre-calibration stage of the temperature drift compensation method for the capacitive proximity sensor provided by the embodiments of the present application.
[0027] Figure 7 Shows another flowchart of the pre-calibration stage of the temperature drift compensation method for the capacitive proximity sensor provided by the embodiments of the present application.
[0028] Figure 8 Shows another flowchart of the real-time compensation stage of the temperature drift compensation method for the capacitive proximity sensor provided by the embodiments of the present application. Detailed implementation manners
[0029] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present application.
[0030] In the embodiments of the present application, it should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0031] Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or apparatus comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or apparatus. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
[0032] In addition, "a plurality of" in the embodiments of the present application means two or more. In view of this, "a plurality of" in the embodiments of the present application can also be understood as "at least two". "At least one" can be understood as one or more, for example, understood as one, two or more. For example, including at least one means including one, two or more, and does not limit which ones are included. For example, including at least one of A, B and C, then what is included can be A, B, C, A and B, A and C, B and C, or A and B and C.
[0033] It should be noted that "connection" in the embodiments of the present application can be understood as electrical connection, and the connection of two electrical components can be a direct or indirect connection between the two electrical components. For example, when A is connected to B, it can be either a direct connection between A and B or an indirect connection between A and B through one or more other electrical components.
[0034] The embodiments of the present application provide a capacitive proximity sensor. Figure 1 The module schematic diagram of the capacitive proximity sensor provided by the embodiments of the present application is shown, as Figure 1 shown, the capacitive proximity sensor includes:
[0035] An oscillation detection module, which includes a sensor electrode, is used to output an oscillation signal according to the capacitance change of the sensor electrode, and convert the oscillation signal into a first electrical signal representing the sensor detection result.
[0036] A temperature detection module, which is used to detect the ambient temperature at the current moment, convert the temperature information into an electrical signal, and thus output a second electrical signal representing the ambient temperature.
[0037] A digital potentiometer, connected to the oscillation detection module, is used to adjust the first electrical signal output by the oscillation detection module by adjusting the tap position (i.e., the resistance value). Optionally, the tap of the digital potentiometer refers to the position of one or more adjustable contact points in its internal programmable resistance network.
[0038] The main control module is used to control the digital potentiometer to adjust the tap according to the second electrical signal, so as to compensate for the influence of temperature on the sensor. The main control module also receives the first electrical signal output by the oscillation detection module, determines whether the target object is detected, and outputs the corresponding detection result. Optionally, the main control module receives the first electrical signal and the second electrical signal through two analog-to-digital conversion interfaces respectively, and is connected to the digital potentiometer through a serial communication interface.
[0039] In the capacitive proximity sensor provided by the embodiment of the present application, a temperature detection module is set to detect the ambient temperature. The main control module controls the digital potentiometer to adjust the tap position thereof through the ambient temperature. The digital potentiometer is connected to the oscillation detection module, so as to compensate the first electrical signal output by the oscillation detection module. By integrating the temperature detection module to detect the ambient temperature, and dynamically adjusting the first electrical signal by adjusting the tap position of the digital potentiometer, the embodiment of the present application realizes real-time compensation for the change of the ambient temperature, thereby significantly improving the detection accuracy and environmental adaptability of the sensor, and solving the problems of limited material optimization effect and the need for a large number of individual calibrations for software compensation in the traditional solution.
[0040] It should be clear that the purpose of the embodiment of the present application is to provide a solution for realizing real-time compensation for the influence of ambient temperature change on the detection accuracy of the capacitive proximity sensor through a digital potentiometer, so as to enhance the stability and reliability of the sensor under different environmental conditions. The specific implementation manners of the temperature detection module and the digital potentiometer can be realized by conventional technical means. By integrating these components into the capacitive proximity sensor system and using the main control module to coordinate the work of each component, the embodiment of the present application realizes dynamic compensation for the change of the ambient temperature.
[0041] Exemplarily, the embodiment of the present application can form a voltage division circuit through a thermistor and a resistor with a fixed resistance value, connect the output end of the voltage division circuit to the analog-to-digital conversion interface of the main control module, so as to convert the temperature signal into a second electrical signal, and then the main control module performs analog-to-digital conversion on the second electrical signal to obtain the analog-to-digital conversion value of the ambient temperature. It can be understood that only a basic temperature detection circuit is exemplified here, and it does not mean that the temperature detection module of the embodiment of the present application is limited to using this circuit. In fact, when the temperature detection module provided by the embodiment of the present application is applied, factors such as accuracy, power consumption, response speed, cost-effectiveness, compatibility, and integration difficulty should also be considered.
[0042] Exemplarily, the digital potentiometer of the embodiment of the present application can be set to indirectly adjust the first electrical signal by adjusting the amplitude of the oscillation signal through the change of the resistance value, so as to perform temperature compensation on the sensor, or can also be set to directly adjust the first electrical signal through the change of the resistance value, so as to perform temperature compensation on the sensor.
[0043] It can be understood that both the oscillation detection module and the main control module are essential technical features of the capacitive proximity sensor. The purpose of the embodiments of the present application is not to innovate these two modules, so the specific structures of the oscillation detection module and the main control module will not be described in detail.
[0044] Exemplarily, the oscillation detection module includes a sensor electrode, an oscillation circuit, and a filtering circuit. The oscillation circuit outputs an oscillation signal to the filtering circuit, and the amplitude of the oscillation signal changes based on the capacitance change of the sensor electrode. The filtering circuit filters the oscillation signal, thereby converting the oscillation frequency change caused by the capacitance change into a voltage change, which is finally received by the analog-to-digital conversion interface of the main control module. Among them, the digital potentiometer can indirectly adjust the first electrical signal by adjusting the amplitude of the oscillation signal through the resistance change, or directly adjust the first electrical signal through the resistance change. The embodiments of the present application do not limit this. Optionally, the oscillation detection module may further include a voltage amplification circuit for amplifying the first electrical signal output by the filtering circuit and then outputting it to the main control module. It can be understood that only a basic oscillation detection circuit is exemplified here, and it does not mean that the temperature detection module of the embodiments of the present application is limited to using this circuit. In fact, when the temperature detection module provided by the embodiments of the present application is applied, factors such as measurement accuracy, signal resolution, response time, environmental stability, linear adjustment and calibration, energy consumption control, economic cost, system compatibility, and integration complexity should also be considered.
[0045] In some embodiments, for the capacitive proximity sensor provided by the embodiments of the present application, the main control module is configured to:
[0046] Obtain the ambient temperature at the current moment and determine the preset temperature range to which the ambient temperature belongs.
[0047] Adjust the tap of the digital potentiometer according to the mapping relationship between the preset temperature range to which the ambient temperature belongs and the adjustment parameter of the digital potentiometer.
[0048] The embodiments of the present application achieve precise compensation for the sensor performance fluctuations caused by ambient temperature changes by presetting the optimal adjustment parameters of the digital potentiometer in different temperature ranges.
[0049] In some embodiments, Figure 2 shows another module schematic diagram of the capacitive proximity sensor provided by the embodiments of the present application. As Figure 2 shown, the capacitive proximity sensor provided by the embodiments of the present application further includes a storage unit for storing the mapping relationship between the preset temperature range and the adjustment parameter of the digital potentiometer, so that the main control module can adjust the tap of the digital potentiometer according to the mapping relationship between the preset temperature range to which the ambient temperature belongs and the adjustment parameter of the digital potentiometer.
[0050] In some embodiments, the storage unit is a non-volatile memory.
[0051] Based on the above capacitive proximity sensor, an embodiment of the present application further provides a temperature drift compensation method for a capacitive proximity sensor, which is applied to the above capacitive proximity sensor. The method includes a pre-calibration stage and a real-time compensation stage.
[0052] Figure 3 The flowchart of the pre-calibration stage of the temperature drift compensation method for the capacitive proximity sensor provided by the embodiment of the present application is shown. As Figure 3 shown, the pre-calibration stage includes:
[0053] Step S100: Obtain the analog-to-digital conversion values sampled based on the same preset detection distance by at least one capacitive proximity sensor in multiple preset temperature ranges. Optionally, multiple preset temperature ranges are set based on the application scenario of the capacitive proximity sensor. For example, the preset temperature ranges are set as: 15~25°C, 25~35°C, 35~45°C, 45~55°C. Then select a temperature in each of 15~25°C, 25~35°C, 35~45°C, 45~55°C, and test the analog-to-digital conversion values sampled by the capacitive proximity sensor when based on the preset detection distance in each temperature environment. This analog-to-digital conversion value is the result of the main control module performing analog-to-digital conversion on the second electrical signal. The preset detection distance can be set based on the application scenario of the capacitive proximity sensor. For example, if the capacitive proximity sensor is used to detect objects within 8 millimeters, the preset detection distance can be set to 8 millimeters. In view of the inconsistency of each capacitive proximity sensor, embodiments of the present application can select multiple capacitive sensors to execute this step.
[0054] It can be understood that the values of the preset temperature ranges are empirical values or obtained through experimental testing means, and the present application does not limit this. These preset temperature ranges can be adjusted according to specific application scenarios and requirements to ensure the performance and accuracy of the capacitive proximity sensor under different ambient temperatures. For example, in some application scenarios, finer-grained temperature ranges may be required to obtain higher compensation accuracy, while in other cases, wider temperature ranges may already be sufficient to meet the requirements. Therefore, the setting of the preset temperature ranges should comprehensively consider factors such as actual application conditions, required measurement accuracy, and system complexity and cost.
[0055] Step S200: Adjust the tap position of the digital potentiometer of the capacitive proximity sensor to calibrate the analog-to-digital conversion value of the capacitive proximity sensor in each preset temperature range to a preset target analog-to-digital conversion value. Optionally, in embodiments of the present application, the main control module dynamically adjusts the tap position of the digital potentiometer according to the preset target analog-to-digital conversion value, so as to ensure that the analog-to-digital conversion value output by the sensor remains consistent or within the desired range in each preset temperature range.
[0056] Step S300: Obtain the adjustment parameters of the digital potentiometer, and generate a mapping relationship between the preset temperature range and the adjustment parameters of the digital potentiometer. Optionally, this mapping relationship is stored in the storage unit of the capacitive proximity sensor for the main control module to call.
[0057] Figure 4 The flowchart of the real-time compensation stage of the temperature drift compensation method for the capacitive proximity sensor provided by the embodiment of the present application is shown, as Figure 4 shown, the real-time compensation stage includes:
[0058] Step S400: Obtain the ambient temperature at the current moment, and determine the preset temperature range to which the ambient temperature belongs. Optionally, in the embodiment of the present application, the ambient temperature is monitored in real time by the temperature detection module, and the temperature data is transmitted to the main control module in the form of an electrical signal. The main control module converts it into a digital signal and judges the preset temperature range to which it belongs.
[0059] Step S500: Adjust the tap of the digital potentiometer according to the mapping relationship between the preset temperature range to which the ambient temperature belongs and the adjustment parameters of the digital potentiometer, so as to calibrate the analog-to-digital conversion value sampled by the capacitive proximity sensor based on the preset detection distance to the target analog-to-digital conversion value. Optionally, the main control module automatically queries the corresponding digital potentiometer adjustment parameters according to the mapping relationship, and sends instructions to the digital potentiometer for adjustment through a serial communication interface such as I2C or SPI, thereby realizing temperature compensation for the capacitive proximity sensor. For example, the preset temperature ranges include: 15~25°C, 25~35°C, 35~45°C, 45~55°C, and the ambient temperature at the current moment is 24°C. Then the main control module adjusts the tap of the digital potentiometer according to the adjustment parameters of the digital potentiometer corresponding to the preset temperature range of 25~35°C, so that the analog-to-digital conversion value sampled by the capacitive proximity sensor based on the preset detection distance is the target analog-to-digital conversion value.
[0060] For the temperature drift compensation method of the capacitive proximity sensor provided by the embodiment of the present application, a mapping relationship between the preset temperature range and the digital potentiometer adjustment parameters is established through the pre-calibration stage, and the potentiometer tap is adjusted according to the current ambient temperature in the real-time compensation stage to dynamically calibrate the analog-to-digital conversion value of the sensor. Specifically, in the pre-calibration stage, the sensor output is calibrated at different temperatures to generate standardized compensation parameters; in the real-time compensation stage, the corresponding parameters are quickly matched based on the temperature range, without relying on complex algorithms or individual sensor data collection. Through the standardized calibration process and dynamic parameter matching, the present application effectively improves the detection consistency of the capacitive proximity sensor in a wide temperature environment, reduces the individual calibration workload and cost, and solves the problems of limited material optimization effect and large amount of individual calibration required for software compensation in the traditional solution.
[0061] It can be understood that in the embodiments of the present application, the purpose of the pre-calibration stage is to obtain the mapping relationship between each preset temperature range and the adjustment parameters of the digital potentiometer. Therefore, once this mapping relationship is determined, it will no longer be necessary to repeat the pre-calibration stage during subsequent actual applications, but only the real-time compensation stage needs to be executed.
[0062] It can be understood that in the embodiments of the present application, each step of the implementation compensation stage is executed by a software algorithm, and its implementation method can be flexibly selected and adjusted according to specific application requirements and hardware platforms. Therefore, the embodiments of the present application do not limit the algorithm content.
[0063] In some embodiments, Figure 5 shows another flowchart of the pre-calibration stage of the temperature drift compensation method for a capacitive proximity sensor provided by the embodiments of the present application, as Figure 5 shown, before step S100: obtaining the analog-to-digital conversion values sampled based on the same preset detection distance by at least one capacitive proximity sensor in multiple preset temperature ranges, the following steps are further included:
[0064] Step S10: Obtain the analog-to-digital conversion values sampled based on the preset detection distance by at least one capacitive proximity sensor in the reference temperature range, and the reference temperature range is one of the multiple preset temperature ranges. Optionally, the reference temperature range can be the temperature range under common standard test conditions, such as 25~35°C, or the most commonly used temperature range can be selected as the reference temperature range according to specific application scenarios. By performing preliminary tests within the reference temperature range in the embodiments of the present application, a reference benchmark can be provided for subsequent calibration processes.
[0065] Step S20: Adjust the tap positions of the digital potentiometers of each capacitive proximity sensor to calibrate the analog-to-digital conversion values of each capacitive proximity sensor to the target analog-to-digital conversion values. Optionally, the main control module can dynamically adjust the tap positions of the digital potentiometers according to the preset target analog-to-digital conversion values to ensure that the outputs of all sensors are consistent within the reference temperature range. Thereby reducing the individual differences between each sensor and providing a unified basis for subsequent compensation in different temperature ranges.
[0066] In some embodiments, Figure 6 shows yet another flowchart of the pre-calibration stage of the temperature drift compensation method for a capacitive proximity sensor provided by the embodiments of the present application, as Figure 6 shown, in the embodiments of the present application, step S300: obtaining the adjustment parameters of the digital potentiometer and generating the mapping relationship between the preset temperature range and the adjustment parameters of the digital potentiometer includes:
[0067] Step S310: Obtain the step difference between the digital potentiometer tap positions of the capacitive proximity sensor in each preset temperature range and the digital potentiometer tap position of the capacitive proximity sensor in the reference temperature range. For example, the preset temperature ranges include: 15 - 25°C, 25 - 35°C, 35 - 45°C, 45 - 55°C, the reference temperature range is 25 - 35°C, the digital potentiometer tap position corresponding to the reference temperature range is the initial position. When the preset temperature range changes from 25 - 35°C to 35 - 45°C, the digital potentiometer needs to decrease by 3 steps from the initial position, then the step difference at this time is -3; when the preset temperature range changes from 35 - 35°C to 45 - 55°C, the digital potentiometer needs to decrease by 5 steps from the initial position, then the step difference at this time is -5; when the preset temperature range changes from 25 - 35°C to 15 - 25°C, the digital potentiometer needs to increase by 1 step from the initial position, then the step difference at this time is +1.
[0068] Step S320: Generate the mapping relationship between the preset temperature range and the step difference. For example, the step differences mapped by multiple preset temperature ranges 15 - 25°C, 25 - 35°C, 35 - 45°C, 45 - 55°C are 1, 0, -3, -5 respectively.
[0069] In the temperature drift compensation method of the capacitive proximity sensor provided by the embodiment of the present application, the step difference between the digital potentiometer tap positions of the capacitive proximity sensor in each preset temperature range and the reference temperature range is used as the adjustment parameter of the digital potentiometer, thereby realizing the precise compensation for the performance fluctuation of the sensor caused by the environmental temperature change.
[0070] In some embodiments, Figure 7 shows another flowchart of the pre - calibration stage of the temperature drift compensation method of the capacitive proximity sensor provided by the embodiment of the present application. As Figure 7 shown, in the embodiment of the present application, step S300: The step of obtaining the adjustment parameter of the digital potentiometer and generating the mapping relationship between the preset temperature range and the adjustment parameter of the digital potentiometer includes:
[0071] Step S330: Obtain the adjustment parameters of the digital potentiometers of each capacitive proximity sensor in the preset temperature range.
[0072] Step S340: According to the preset screening strategy, select one adjustment parameter from the adjustment parameters of multiple digital potentiometers corresponding to the preset temperature range to form a mapping relationship with the preset temperature range.
[0073] Optionally, in the embodiments of the present application, due to the inconsistency of each capacitive proximity sensor, multiple capacitive sensors can be selected to perform the pre-calibration phase. In the same preset temperature range, the adjustment parameters of the digital potentiometers of different capacitive proximity sensors are not necessarily the same. In view of this, in the embodiments of the present application, through a preset screening strategy, for each preset temperature range, only one adjustment parameter is selected as the mapping result of the preset temperature range. This ensures that the system can use the optimal adjustment parameters for compensation, improving the overall consistency and reliability.
[0074] In some embodiments, in the temperature drift compensation method of the capacitive proximity sensor provided by the embodiments of the present application, the preset screening strategy includes one of the following: the first screening strategy, the second screening strategy, the third screening strategy, and the fourth screening strategy.
[0075] Among them, the first screening strategy is: based on the median of the adjustment parameters of the digital potentiometers of each capacitive proximity sensor, select one adjustment parameter to form a mapping relationship with the preset temperature range, that is, use the median of the adjustment parameters of each digital potentiometer as the mapping result of the preset temperature range. The second screening strategy is: based on the mode of the adjustment parameters of the digital potentiometers of each capacitive proximity sensor, select one adjustment parameter to form a mapping relationship with the preset temperature range, that is, use the mode of the adjustment parameters of each digital potentiometer as the mapping result of the preset temperature range. The third screening strategy is: based on the statistical distribution characteristics of the adjustment parameters of the digital potentiometers of each capacitive proximity sensor, such as normal distribution / skew distribution and other characteristics, select one adjustment parameter to form a mapping relationship with the preset temperature range. The fourth screening strategy is: based on a preset reference parameter, select one of the adjustment parameters of the digital potentiometers of each capacitive proximity sensor to form a mapping relationship with the preset temperature range. The preset reference parameter can be an empirical value, an experimental value, etc.
[0076] It should be clear that the embodiments of the present application do not impose any restrictions on the specific strategies of the preset screening strategy. In practical applications, the appropriate screening strategy should be flexibly selected according to specific application requirements and actual situations.
[0077] In some embodiments, Figure 8 shows another flowchart of the real-time compensation phase of the temperature drift compensation method of the capacitive proximity sensor provided by the embodiments of the present application. As Figure 8 shown, in the temperature drift compensation method of the capacitive proximity sensor provided by the embodiments of the present application, before step S400: adjusting the tap of the digital potentiometer according to the mapping relationship between the preset temperature range to which the ambient temperature belongs and the adjustment parameter of the digital potentiometer, it further includes:
[0078] Step S80: Determine whether the ambient temperature at the current moment satisfies the first execution condition or the second execution condition.
[0079] Step S90: If the ambient temperature meets the first execution condition or the second execution condition, then execute the following steps: Adjust the tap of the digital potentiometer according to the mapping relationship between the preset temperature range to which the ambient temperature belongs and the adjustment parameter of the digital potentiometer.
[0080] Otherwise, skip the steps: Adjust the tap of the digital potentiometer according to the mapping relationship between the preset temperature range to which the ambient temperature belongs and the adjustment parameter of the digital potentiometer.
[0081] Among them, the first execution condition is: The ambient temperature at the current moment and the ambient temperature at the previous moment do not belong to the same preset temperature range, and the ambient temperature at the current moment and the ambient temperature at the previous moment belong to the same transition range, and the ambient temperature at the current moment and the ambient temperature at the moment before the previous moment do not belong to the same preset temperature range. The second execution condition is: The ambient temperature at the current moment and the ambient temperature at the previous moment do not belong to the same preset temperature range, and the ambient temperature at the current moment and the ambient temperature at the previous moment do not belong to the same transition range. The transition range is an interval formed by expanding a predetermined temperature to both sides of the boundary between two adjacent preset temperature ranges. Optionally, if the ambient temperature at the current moment meets the first execution condition, it means that the ambient temperature does not undergo repeated jumps at the critical point between adjacent preset temperature ranges. Therefore, the tap of the digital potentiometer should be adjusted. For example, if the adjacent preset temperature ranges are 15 - 25°C and 25 - 35°C, and the transition range is 24 - 26°C, if the ambient temperature jumps from 24.5°C to the temperature range of 25.5°C and then jumps back to 24.5°C, that is, the ambient temperature undergoes repeated jumps in this transition range at this time. Therefore, there is no need to adjust the tap of the digital potentiometer. If the second execution condition is met, it means that the ambient temperature changes from one preset temperature range to a new preset temperature range. Therefore, the tap of the digital potentiometer should be adjusted.
[0082] The temperature drift compensation method for the capacitive proximity sensor provided by the embodiments of the present application solves the problem of frequent adjustment of the tap position of the digital potentiometer caused by repeated jumps of the ambient temperature at the critical point between adjacent preset temperature ranges by setting a transition range and execution conditions.
[0083] The above content is a further detailed description of the present application in combination with specific implementation manners, and it cannot be determined that the specific implementation of the present application is only limited to these descriptions. For those of ordinary skill in the technical field to which the present application belongs, without departing from the concept of the present application, several simple deductions or substitutions can still be made, which should all be regarded as the protection scope of the present application.
Claims
1. A method for compensating temperature drift of a capacitive proximity sensor, wherein: The capacitive proximity sensor comprises: an oscillation detection module, which comprises a sensor electrode, and is used to output an oscillation signal according to the capacitance change of the sensor electrode, and convert the oscillation signal into a first electrical signal; a temperature detection module, which is used to detect the ambient temperature at the current moment and output a second electrical signal; a digital potentiometer, which is connected to the oscillation detection module and is used to adjust the first electrical signal output by the oscillation detection module by adjusting the tap position; a main control module, which is used to control the digital potentiometer to adjust the tap according to the second electrical signal, and output the detection result according to the first electrical signal; characterized in that the method comprises a pre-calibration stage and a real-time compensation stage; The pre-calibration stage includes: Obtaining analog-to-digital conversion values of at least one capacitive proximity sensor sampled at a same preset detection distance in multiple preset temperature ranges; Adjusting the tap position of the digital potentiometer of the capacitive proximity sensor to calibrate the analog-to-digital conversion value of the capacitive proximity sensor to a preset target analog-to-digital conversion value in each of the preset temperature ranges; Acquiring an adjustment parameter of the digital potentiometer, and generating a mapping relationship between the preset temperature range and the adjustment parameter of the digital potentiometer; The real-time compensation stage includes: Obtain the current ambient temperature and determine the preset temperature range to which the ambient temperature belongs; Adjusting the tap of the digital potentiometer according to a mapping relationship between a preset temperature interval to which the ambient temperature belongs and an adjustment parameter of the digital potentiometer, so as to calibrate the analog-to-digital conversion value obtained by sampling the capacitive proximity sensor based on the preset detection distance to the target analog-to-digital conversion value; Wherein, before the step of obtaining the analog-to-digital conversion value of at least one capacitive proximity sensor sampled at the same preset detection distance in multiple preset temperature intervals, the method further includes: Acquire an analog-to-digital conversion value of at least one of the capacitive proximity sensors sampled based on the preset detection distance in a reference temperature interval, wherein the reference temperature interval is one of the plurality of preset temperature intervals; Adjusting the tap position of the digital potentiometer of each of the capacitive proximity sensors to calibrate the analog-to-digital conversion values of each of the capacitive proximity sensors to the target analog-to-digital conversion values; The step of obtaining the adjustment parameter of the digital potentiometer and generating a mapping relationship between the preset temperature range and the adjustment parameter of the digital potentiometer comprises: Acquire a step difference between a tap position of a digital potentiometer of the capacitive proximity sensor in each of the preset temperature intervals and a tap position of the digital potentiometer of the capacitive proximity sensor in the reference temperature interval; A mapping relationship between the preset temperature interval and the step difference is generated.
2. The temperature drift compensation method of a capacitive proximity sensor according to claim 1, characterized in that: Before the step of adjusting the tap of the digital potentiometer according to the mapping relationship between the preset temperature interval to which the ambient temperature belongs and the adjustment parameter of the digital potentiometer, the step further includes: Determine whether the current ambient temperature meets the first execution condition or the second execution condition, If the ambient temperature satisfies the first execution condition or the second execution condition, the steps of: adjusting the tap of the digital potentiometer according to a mapping relationship between a preset temperature interval to which the ambient temperature belongs and an adjustment parameter of the digital potentiometer; Otherwise, skip the step of: adjusting the tap of the digital potentiometer according to the mapping relationship between the preset temperature interval to which the ambient temperature belongs and the adjustment parameter of the digital potentiometer; The first execution condition is that the ambient temperature at the current moment and the ambient temperature at the previous moment do not belong to the same preset temperature interval, and the ambient temperature at the current moment and the ambient temperature at the previous moment belong to the same transition interval, and the ambient temperature at the current moment and the ambient temperatures at the previous two moments do not belong to the same preset temperature interval; The second execution condition is that the ambient temperature at the current moment and the ambient temperature at the previous moment do not belong to the same preset temperature range, and the ambient temperature at the current moment and the ambient temperature at the previous moment do not belong to the same transition range; The transition interval is an interval formed by extending the boundary of two adjacent preset temperature intervals to both sides with predetermined temperatures.
3. The temperature drift compensation method of a capacitive proximity sensor according to claim 1, characterized in that: The main control module is configured as follows: Obtain the current ambient temperature and determine the preset temperature range to which the ambient temperature belongs; The tap of the digital potentiometer is adjusted according to a mapping relationship between a preset temperature interval to which the ambient temperature belongs and an adjustment parameter of the digital potentiometer.
4. The temperature drift compensation method of a capacitive proximity sensor according to claim 3, characterized in that: The capacitive proximity sensor also includes: The storage unit is used to store the mapping relationship between the preset temperature range and the adjustment parameter of the digital potentiometer.
Citation Information
Patent Citations
Temperature compensation method and related product
CN112462005A
Temperature compensation method and device of capacitive sensing system and electronic equipment
CN118331346A