Analog-to-digital conversion calibration system, method and equipment
By designing an analog-to-digital conversion calibration system, using the reference end and the connection module to determine the reference calibration coefficient, the accuracy deviation problem caused by ignoring the accuracy of peripheral circuits and sensors in the prior art is solved, and a higher analog-to-digital conversion accuracy is achieved.
Patent Information
- Application Number
- CN202311413443.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2025-04-29
AI Technical Summary
In practical applications, existing analog-to-digital converters ignore the accuracy of peripheral circuits and sensors, resulting in accuracy deviations.
An analog-to-digital conversion calibration system is designed to determine the reference calibration coefficient of the system through the reference end and the connection module, and to correct the actual value of the sensor based on this coefficient. The system includes reference end, sensor, connection module, selection switch, analog-to-digital converter and controller.
By taking into account the accuracy deviations of peripheral circuits and sensors, the system can effectively reduce errors and improve the accuracy of the analog-to-digital converter.
Smart Images

Figure CN119906423A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of model sensor technology, and in particular to an analog-to-digital conversion calibration system, method and device. Background Art
[0002] At present, the information table of analog-to-digital (A / D) converters generally provides relevant errors, such as offset error and gain error, and also pays attention to the impact of parameters such as temperature drift and voltage noise of the internal circuit on the error; but in actual applications, since the A / D converter, peripheral circuit, and sensor together constitute the entire system, the calculation process generally only considers the internal error provided by the data sheet, ignoring the accuracy of the peripheral circuit and sensor, thus causing accuracy deviation. Summary of the invention
[0003] In view of this, the embodiments of the present application provide an analog-to-digital conversion calibration system, method and device, which aim to take into account the accuracy deviation of peripheral circuits and sensors and reduce errors.
[0004] In a first aspect, an embodiment of the present application provides an analog-to-digital conversion calibration system, the system comprising: a reference terminal, a sensor, a first connection module, a second connection module, a selection switch, an analog-to-digital converter, and a controller;
[0005] The reference end is connected to the input end of the first connection module, and the output end of the first connection module is connected to the first selection end of the selection switch; the sensor is connected to the input end of the second connection module, and the output end of the second connection module is connected to the second selection end of the selection switch, and the circuits of the first connection module and the second connection module are the same;
[0006] The output end of the selection switch is connected to the analog-to-digital converter, and the control end of the selection switch is connected to the controller;
[0007] The reference terminal is used to generate a reference value of the same type as the real value of the sensor;
[0008] The controller is used to control the selection switch to switch to the first selection end, determine the system's reference calibration coefficient based on the reference value of the reference end, the reference conversion signal output by the analog-to-digital converter corresponding to the reference value, and the conversion resistor included in the first connection module; control the selection switch to switch to the second selection end, and determine, in combination with the reference calibration coefficient, that the actual value of the sensor corresponds to the actual conversion signal output by the analog-to-digital converter.
[0009] Optionally, the reference calibration coefficient includes a gain error and an offset error, and the sensor is a voltage type sensor or a current type sensor;
[0010] The controller is also used to obtain a first reference conversion signal corresponding to the first reference signal and a second reference conversion signal corresponding to the second reference signal; calculate the resistance coefficient of the first conversion module based on the connection relationship and resistance value of the resistors included in the first conversion module; calculate the ratio of the first ratio to the resistance coefficient to obtain the gain error; calculate the first reference conversion signal minus the product of the first ratio and the first reference signal to obtain the offset error; add the product of the actual value, the resistance coefficient and the gain error to the offset error to obtain the actual conversion signal; the first ratio is the ratio of the difference between the second reference conversion signal and the first reference conversion signal to the difference between the second reference signal and the first reference signal.
[0011] Optionally, the sensor is a voltage type sensor, and the reference end is a controllable voltage source;
[0012] The first connection module and the second connection module both include a resistor R1, a resistor R2 and a resistor R3, the second end of the resistor R1 is connected to the first end of the resistor R3, and the resistor R2 is a pull-down resistor connected to a node between the resistor R1 and the resistor R3;
[0013] The first end of the resistor R1 of the first connection module is the input end of the first connection module, the first end of the resistor R1 of the second connection module is the input end of the second connection module, the second end of the resistor R3 of the first connection module is the output end of the first connection module, and the second end of the resistor R3 of the second connection module is the output end of the second connection module;
[0014] The resistance coefficient is a ratio of the resistor R2 to the sum of the resistor R1 and the resistor R2.
[0015] Optionally, the sensor is a current type sensor, and the reference end is a controllable current source;
[0016] The first connection module and the second connection module both include a resistor R4 and a resistor R5, a first end of the resistor R4 is connected to a first end of the resistor R5, and the resistor R4 is a pull-down resistor;
[0017] The first end of the resistor R4 of the first connection module is also the input end of the first connection module, the first end of the resistor R4 of the second connection module is also the input end of the second connection module, the second end of the resistor R5 of the first connection module is the output end of the first connection module, and the second end of the resistor R5 of the second connection module is the output end of the second connection module;
[0018] The resistance coefficient is the resistor R4.
[0019] Optionally, the sensor is a resistance type sensor, and the reference end is an adjustable resistance module;
[0020] The first connection module and the second connection module both include a resistor R6 and a resistor R7, a first end of the resistor R6 is connected to the reference voltage end, and a second end of the resistor R6 is connected to a first end of the resistor R7;
[0021] The second end of the resistor R6 of the first connection module is connected to the first end of the adjustable resistance module, and the second end of the adjustable resistance module is grounded; the second end of the resistor R6 of the second connection module is connected to the first end of the sensor, and the second end of the sensor is grounded; the second end of the resistor R7 of the first connection module is the output end of the first connection module, and the second end of the resistor R7 of the second connection module is the output end of the second connection module;
[0022] The adjustable resistance module at least includes a resistor 1 R01 and a resistor 2 R02. The controller is used to obtain a first reference conversion signal Ya corresponding to the analog-to-digital conversion output when the adjustable resistance module is the resistor 1 R01, forming a formula 1 Ya=kV(R01 / (R01+R6))+b; obtain a second reference conversion signal Yb corresponding to the analog-to-digital conversion output when the adjustable resistance module is the resistor 2 R02, forming a formula 2 Yb=kV(R02 / (R02+R6))+b; combine the formula 1 and the formula 2 to obtain a gain coefficient k and an offset coefficient b, wherein V is the voltage value of the reference voltage terminal; substitute the gain coefficient k, the offset coefficient b and the actual value collected from the sensor into the formula 1 instead of R01 to obtain the actual conversion signal.
[0023] Optionally, the system further comprises a temperature sensor, wherein a signal output end of the temperature sensor is connected to the processor;
[0024] The processor is also used to record the reference calibration coefficients obtained at different temperatures and form a relationship table between temperature and reference calibration coefficients.
[0025] In a second aspect, the present application further provides an analog-to-digital conversion calibration method, which is applied to a processor in the above-mentioned analog-to-digital conversion calibration system, and the method includes:
[0026] When the sensor is in an idle period, the selection switch is controlled to switch to the first selection end.
[0027] Calculate and obtain a reference calibration coefficient multiple times, and calculate an average reference calibration coefficient of the reference calibration coefficients multiple times;
[0028] When the sensor re-enters the working time period, controlling the selection switch to switch to the second selection end;
[0029] Based on the average reference calibration coefficient, it is determined that the actual value of the sensor corresponds to the actual conversion signal output by the analog-to-digital converter.
[0030] Optionally, the idle time period and the working time period are switched at a preset frequency.
[0031] Optionally, the method further includes:
[0032] When the sensor is in the working time period, determining a first temperature of the system by the temperature sensor;
[0033] Look up a table of relationships between temperature and reference calibration coefficients to determine a reference calibration coefficient corresponding to the first temperature;
[0034] Based on the reference calibration coefficient, it is determined that the actual value of the sensor corresponds to the actual conversion signal output by the analog-to-digital converter.
[0035] In a third aspect, the present application also provides a processing device, including a memory and a processor, wherein the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device performs the above-mentioned analog-to-digital conversion calibration method.
[0036] The embodiment of the present application provides an analog-to-digital conversion calibration system, method and device. The reference end of the present application is connected to the input end of the first connection module, and the output end of the first connection module is connected to the first selection end of the selection switch; the sensor is connected to the input end of the second connection module, and the output end of the second connection module is connected to the second selection end of the selection switch, and the circuits of the first connection module and the second connection module are the same; the error accumulated in the circuit between the sensor and the analog-to-digital converter can be indirectly determined through the reference end and the first connection module, thereby forming a reference calibration coefficient. The controller controls the selection switch to switch the analog-to-digital converter to connect with the reference end to determine the reference calibration coefficient, and the selection switch can also be controlled to switch the analog-to-digital conversion module to connect with the sensor, and the actual value of the sensor is determined based on the reference calibration coefficient. The actual conversion signal output by the analog-to-digital converter corresponds to the actual value of the sensor. In this way, through the first connection module and the second connection module, the peripheral circuit and sensor accuracy deviation are integrated into the reference calibration coefficient, and the actual value of the sensor is corrected through the actual conversion signal output by the analog-to-digital converter. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 A schematic diagram of the structure of an analog-to-digital conversion calibration system provided in an embodiment of the present application;
[0039] Figure 2 A schematic diagram of the structure of an analog-to-digital conversion calibration system for a voltage sensor provided in an embodiment of the present application;
[0040] Figure 3 A schematic diagram of the structure of an analog-to-digital conversion calibration system for a current sensor provided in an embodiment of the present application;
[0041] Figure 4 A schematic diagram of the structure of an analog-to-digital conversion calibration system for a resistive sensor provided in an embodiment of the present application;
[0042] Figure 5 A flowchart of an analog-to-digital conversion calibration method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] A / D circuit refers to the circuit that converts analog signals into digital signals, and is widely used in the signal processing of various sensors such as temperature, pressure, humidity, displacement, sound, etc. However, due to the accuracy of components and sampling, there will be a certain error in the A / D acquisition accuracy.
[0044] At present, the information table of analog-to-digital (A / D) converters generally provides relevant errors, such as offset error and gain error, and also pays attention to the impact of parameters such as temperature drift and voltage noise of the internal circuit on the error; but in actual applications, since the A / D converter, peripheral circuit, and sensor together constitute the entire system, the calculation process generally only considers the internal error provided by the data sheet, ignoring the accuracy of the peripheral circuit and sensor, thus causing accuracy deviation.
[0045] Based on the above problems, the present application sets a reference end of the analog sensor signal, and the reference end is connected to the first selection end of the selection switch by a first connection module. At the same time, the sensor is connected to the second selection end of the selection switch through a second connection module, wherein the circuit structures of the first connection module and the second connection module are the same, and the output end of the selection switch is connected to the analog-to-digital converter. In this way, it is possible to control the selection switch to switch the analog-to-digital converter to connect to the reference end through the controller, determine the reference calibration coefficient, and then control the selection switch to switch the analog-to-digital conversion module to connect to the sensor, and determine the actual value of the sensor based on the reference calibration coefficient. The actual conversion signal output by the analog-to-digital converter is determined. Furthermore, through the first connection module and the second connection module with the same circuit structure, the peripheral circuit and sensor accuracy deviation are integrated into the reference calibration coefficient, and the actual value of the sensor is corrected through the actual conversion signal output by the analog-to-digital converter.
[0046] In addition, the present application also takes into account that temperature will bring different resistance values, thereby affecting the reference calibration coefficient. Therefore, a relationship table of reference calibration coefficients corresponding to different temperatures can be stored in the controller. Subsequently, when the sensor is always in working state, the temperature of the system can be determined by the temperature sensor, and the corresponding reference calibration coefficient is determined from the relationship table according to the temperature, and then the actual value of the sensor is corrected through the actual conversion signal output by the analog-to-digital converter.
[0047] 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 ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0048] Figure 1 A schematic diagram of the structure of an analog-to-digital conversion calibration system provided in an embodiment of the present application is shown in FIG. Figure 1 , an analog-to-digital conversion calibration system, comprising: a reference terminal, a sensor, a first connection module, a second connection module, a selection switch, an analog-to-digital converter and a controller;
[0049] The reference end is connected to the input end of the first connection module, and the output end of the first connection module is connected to the first selection end of the selection switch; the sensor is connected to the input end of the second connection module, and the output end of the second connection module is connected to the second selection end of the selection switch, and the circuits of the first connection module and the second connection module are the same; the output end of the selection switch is connected to the analog-to-digital converter, and the control end of the selection switch is connected to the controller.
[0050] Exemplarily, the sensor may be a voltage type sensor, a current type sensor or a resistance type sensor. In one implementation, when the sensor is a voltage type sensor, the reference end is a controllable voltage source, in another implementation, when the sensor is a current type sensor, the reference end is a controllable current source, and in one implementation, when the sensor is a resistance type sensor, the reference end is an adjustable resistance module.
[0051] Specifically, for the real value collected by the sensor or the real value of the reference end analog sensor generated by the same type of reference value, before performing analog-to-digital conversion, the above-mentioned non-electrical signal value needs to be converted into a voltage signal value. Therefore, for non-voltage input sources, it is generally converted into a corresponding voltage signal value through a pull-up / pull-down resistor; for voltage input sources, a resistor voltage division is generally used to meet the voltage input requirements of the A / D circuit and the recognition requirements of the system. Therefore, the present application is provided with a first conversion module and a second conversion module with the same circuit structure, which are used to convert the non-voltage input source into a voltage signal value, or to perform a resistor voltage division on the voltage input source to meet the voltage input requirements of the analog-to-digital converter. Therefore, the present application sets the reference end of the analog sensor, and also uses the same peripheral circuit (first conversion module) as the second conversion module of the sensor to comprehensively analyze and determine the reference calibration coefficient, which is then used to correct the real value obtained by sensor sensing.
[0052] The reference end is used to generate a reference value of the same type as the actual value of the sensor; the controller is used to control the selection switch to switch to the first selection end, and determine the reference calibration coefficient of the system based on the reference value of the reference end, the reference conversion signal output by the analog-to-digital converter corresponding to the reference value, and the conversion resistor included in the first connection module; control the selection switch to switch to the second selection end, and determine, in combination with the reference calibration coefficient, that the actual value of the sensor corresponds to the actual conversion signal output by the analog-to-digital converter.
[0053] According to the above-mentioned analog-to-digital conversion calibration system, a reference end of the analog sensor signal is set, and the reference end is connected to the first selection end of the selection switch by a first connection module, and at the same time, the sensor is connected to the second selection end of the selection switch through a second connection module, wherein the circuit structure of the first connection module and the second connection module is the same, and the output end of the selection switch is connected to the analog-to-digital converter. In this way, it is possible to control the selection switch to switch the analog-to-digital converter to connect with the reference end through the controller, determine the reference calibration coefficient, and then control the selection switch to switch the analog-to-digital conversion module to connect with the sensor, and determine the actual value of the sensor based on the reference calibration coefficient. The actual conversion signal output by the analog-to-digital converter is determined. Furthermore, through the first connection module and the second connection module with the same circuit structure, the peripheral circuit and sensor accuracy deviation are integrated into the reference calibration coefficient, and the actual value of the sensor is corrected through the actual conversion signal output by the analog-to-digital converter.
[0054] In the embodiment of the present application, the above Figure 1There are many types of sensors, and the corresponding circuit structures of the first conversion module and the second conversion module may have many implementation methods, which are introduced below. It should be noted that the implementation methods given in the following introduction are only for exemplary description and do not represent all implementation methods of the embodiments of the present application.
[0055] In one embodiment, the sensor is a voltage type sensor or a current type sensor.
[0056] The reference calibration coefficients include gain error and offset error.
[0057] The offset error and gain error can be expressed by the formula y=kx+b; where k is the gain error and b is the offset error; the offset error refers to the output result when the input is zero.
[0058] The controller is further used to obtain a first reference conversion signal Ya corresponding to the first reference signal Xa and a second reference conversion signal Yb corresponding to the second reference signal Xb; and calculate the resistance coefficient of the first conversion module based on the connection relationship and resistance values of the resistors included in the first conversion module.
[0059] Specifically,
[0060] Ya=k·N·Xa+b①
[0061] Yb=k·N·Xb+b②
[0062] Specifically, for the voltage type sensor and the current type sensor, the circuit structure of the first conversion module and the second conversion module is the same, and the resistance values of the resistors included in the first conversion module and the second conversion module are the same. For the voltage type sensor, the resistance coefficient is the resistance coefficient determined according to the resistance voltage divider in the first conversion module. For the current type sensor, the resistance coefficient is determined according to the pull-down resistor in the first conversion module that converts the current into a voltage signal value.
[0063] Calculate the ratio of the first ratio to the resistance coefficient to obtain a gain error k; calculate the first reference conversion signal minus the product of the first ratio and the first reference signal to obtain an offset error b; and convert the actual value X 实际 The product of the resistance coefficient N and the gain error k plus the offset error b is used to obtain the actual conversion signal Y 实际 ; The first ratio is the ratio of the difference between the second reference conversion signal and the first reference conversion signal to the difference between the second reference signal and the first reference signal.
[0064] Specifically, by combining the above formula ① and formula ②, we get:
[0065] First ratio = (Yb-Ya) / (Xb-Xa) ③;
[0066] k=(Yb-Ya) / (N·(Xb-Xa))④;
[0067] b=Ya-Xa·(Yb-Ya) / (Xb-Xa)⑤;
[0068] Y 实际 = k·N·X 实际 +b⑥.
[0069] In a possible implementation, when the sensor is a voltage type sensor, see Figure 2 The schematic diagram of the structure of the analog-to-digital conversion calibration system of the voltage type sensor shown in the figure is based on the above embodiment, another analog-to-digital conversion calibration system, the specific structure of which can be:
[0070] The first connection module and the second connection module both include a resistor R1, a resistor R2 and a resistor R3, the second end of the resistor R1 is connected to the first end of the resistor R3, and the resistor R2 is a pull-down resistor connected to the node between the resistor R1 and the resistor R3.
[0071] Specifically, the second end of resistor R1 in the first conversion module is connected to the first end of resistor R3, the first end of resistor R2 is connected to the second end of resistor R1, and the second end of resistor R2 is grounded; the circuit structure of the second conversion module is the same as that of the first conversion module, and corresponding resistors with the same resistance value are used.
[0072] The first end of the resistor R1 of the first connecting module is the input end of the first connecting module, the first end of the resistor R1 of the second connecting module is the input end of the second connecting module, the second end of the resistor R3 of the first connecting module is the output end of the first connecting module, and the second end of the resistor R3 of the second connecting module is the output end of the second connecting module.
[0073] The second ends of the resistors R3 of the first connection module and the second connection module are further connected to capacitors, and the other ends of the capacitors are grounded.
[0074] The resistance coefficient is a ratio of the resistor R2 to the sum of the resistor R1 and the resistor R2.
[0075] Therefore, N = R2 / (R1+R2). Combining the above formulas ④ and ⑤, the gain error and offset error included in the reference calibration coefficient can be determined. Then, the actual conversion signal corresponding to the actual value sensed by the sensor can be determined according to formula ⑥.
[0076] In another possible implementation, when the sensor is a current type sensor, the corresponding reference terminal is a controllable current source. Figure 3The schematic diagram of the structure of the analog-to-digital conversion calibration system of the current type sensor shown in the figure is based on the above embodiment, and another analog-to-digital conversion calibration system, the specific structure of which can be:
[0077] The first connection module and the second connection module both include a resistor R4 and a resistor R5. The first end of the resistor R4 is connected to the first end of the resistor R5. The resistor R4 is a pull-down resistor.
[0078] The first end of the resistor R4 of the first connecting module is also the input end of the first connecting module, the first end of the resistor R4 of the second connecting module is also the input end of the second connecting module, the second end of the resistor R5 of the first connecting module is the output end of the first connecting module, and the second end of the resistor R5 of the second connecting module is the output end of the second connecting module.
[0079] The second ends of the resistors R5 of the first connection module and the second connection module are further connected to capacitors, and the other ends of the capacitors are grounded.
[0080] Specifically, the reference end is connected to the first end of the resistor R4 of the first connection module, the second end of the resistor R4 of the first connection module is grounded, the first end of the resistor R4 of the first connection module is connected to the first end of the resistor R5 of the first connection module, and the second end of the resistor R5 of the first connection module is connected to the first selection end of the selection switch. At the same time, the sensor is connected to the first end of the resistor R4 of the second connection module, the second end of the resistor R4 of the second connection module is grounded, the first end of the resistor R4 of the second connection module is connected to the first end of the resistor R5 of the second connection module, and the second end of the resistor R5 of the second connection module is connected to the second selection end of the selection switch.
[0081] The resistance coefficient is the resistor R4.
[0082] Therefore, N = R4. Combining the above formula ④ and formula ⑤, we can determine Figure 3 The reference calibration coefficients in the system include gain error and offset error. Figure 3 The actual conversion signal corresponding to the actual value sensed by the sensor in the system.
[0083] In one embodiment, the sensor is a resistive sensor. Figure 4 The schematic diagram of the structure of the analog-to-digital conversion calibration system of the resistance type sensor is shown. Figure 1 In the system, when the sensor is a resistance type sensor, the reference end is an adjustable resistance module, specifically:
[0084] The first connection module and the second connection module both include a resistor R6 and a resistor R7, wherein the first end of the resistor R6 is connected to the reference voltage end, and the second end of the resistor R6 is connected to the first end of the resistor R7; the second end of the resistor R6 of the first connection module is connected to the first end of the adjustable resistance module, and the second end of the adjustable resistance module is grounded; the second end of the resistor R6 of the second connection module is connected to the first end of the sensor, and the second end of the sensor is grounded; the second end of the resistor R7 of the first connection module is the output end of the first connection module, and the second end of the resistor R7 of the second connection module is the output end of the second connection module.
[0085] Specifically, in the first connection module, after the reference voltage end is connected to the first end of the resistor R6, the second end of the resistor R6 is connected to the first end of the adjustable resistance module, the second end of the adjustable resistance module is grounded, the second end of the resistor R6 is also connected to the first end of the resistor R7, and the second end of the resistor R7 is connected to the first selection end of the selection switch. Different resistance values (reference values) are adjusted by the adjustable resistance module, and different reference conversion signals are output at the output end of the analog-to-digital converter.
[0086] In the second connection module, after the reference voltage end is connected to the first end of the resistor R6, the second end of the resistor R6 is connected to the first end of the sensor, the second end of the sensor is grounded, the second end of the resistor R6 is also connected to the first end of the resistor R7, and the second end of the resistor R7 is connected to the second selection end of the selection switch, and different resistance values (actual values) are formed by sensor sensing.
[0087] The adjustable resistance module at least includes a resistor 1 R01 and a resistor 2 R02.
[0088] Exemplarily, the first end of the adjustable resistance module is respectively connected to the first end of resistor 1 R01 and the first end of resistor 2 R02, the second end of resistor 1 R01 and the second end of resistor 2 R02 are respectively connected to the first input end and the second input end of another selection switch, the output end of the selection switch is grounded, and resistor 1 R01 or resistor 2 R02 can be turned on through the selection switch.
[0089] Resistor 1 R01 and resistor 2 R02 are high-precision resistors, for example, resistors with a precision of one thousandth are selected.
[0090] The controller is used to obtain the first reference conversion signal Ya corresponding to the analog-to-digital conversion output when the adjustable resistance module is the resistor R01, and form the formula Ya=kV(R01 / (R01+R6))+b; obtain the second reference conversion signal Yb corresponding to the analog-to-digital conversion output when the adjustable resistance module is the resistor R02, and form the formula Yb=kV(R02 / (R02+R6))+b; combine the formulas 1 and 2 to obtain the gain coefficient k and the offset coefficient b, wherein V is the voltage value of the reference voltage terminal; replace R01 with the gain coefficient k, the offset coefficient b and the actual value collected from the sensor and put them into the formula 1 to obtain the actual conversion signal.
[0091] Furthermore, the system of the above embodiment of the present application may further include a temperature sensor, wherein a signal output end of the temperature sensor is connected to the processor;
[0092] The processor is also used to record the reference calibration coefficients obtained at different temperatures and form a relationship table between temperature and reference calibration coefficients.
[0093] When the sensor is always in working state and the selection switch cannot be switched to connect to the reference end to obtain the latest reference calibration coefficient, the latest reference calibration coefficient can be determined by looking up the pre-recorded relationship table between temperature and reference calibration coefficient according to the current temperature.
[0094] The above are some specific implementations of an analog-to-digital conversion calibration system provided by the embodiment of the present application. Based on this, the present application also provides a corresponding method. The method provided by the embodiment of the present application is introduced below.
[0095] See also Figure 5 A flow chart of an analog-to-digital conversion calibration method is shown, and an analog-to-digital conversion calibration method is applied to a processor in the above-mentioned analog-to-digital conversion calibration system, and the method includes:
[0096] During an idle time period when the sensor is not working, the selection switch is controlled to switch to the first selection end.
[0097] For more information about free time periods at work, see Figure 5 In the idle stage of the dotted box in the working state, the corresponding selection switch (Switch selector) is in a low level state.
[0098] The reference calibration coefficient is obtained by multiple calculations, and an average reference calibration coefficient of the multiple reference calibration coefficients is calculated.
[0099] Specifically, the reference end obtains the reference calibration coefficient multiple times and calculates the average value according to switching different reference values.
[0100] When the sensor re-enters the working time period, the selection switch is controlled to switch to the second selection end.
[0101] For more details, please refer to Figure 5 In the working state, the normal stage of the frame is realized, and the corresponding selection switch (Switch selector) is in a high level state.
[0102] Based on the average reference calibration coefficient, it is determined that the actual value of the sensor corresponds to the actual conversion signal output by the analog-to-digital converter.
[0103] Specifically, the latest average reference calibration coefficient can be combined with the actual value of the sensor to calculate the actual conversion signal (see Figure 5 in the output).
[0104] Furthermore, the idle time period and the working time period are switched at a preset frequency.
[0105] Specifically, Figure 5 In the working state, the idle phase of the dotted box and the normal phase of the implementation box can be switched according to a preset frequency.
[0106] Furthermore, when the sensor is in a working period, the first temperature of the system is determined by a temperature sensor; a relationship table between temperature and reference calibration coefficient is checked to determine the reference calibration coefficient corresponding to the first temperature; based on the reference calibration coefficient, it is determined that the actual value of the sensor corresponds to the actual conversion signal output by the analog-to-digital converter.
[0107] For details, please refer to Figure 5 In the List, the relationship table between the temperature and the benchmark calibration coefficient can be the benchmark calibration coefficients stored corresponding to different temperatures in the idle time period before the working time period. In a longer working time period (normal), the corresponding benchmark calibration coefficient can be selected from the List table according to the current temperature.
[0108] The embodiments of the present application also provide corresponding processing devices and computer storage media for implementing the solutions provided by the embodiments of the present application.
[0109] The processing device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device performs an analog-to-digital conversion calibration method described in any embodiment of the present application.
[0110] The computer storage medium stores codes, and when the codes are executed, a device executing the codes implements an analog-to-digital conversion calibration method described in any embodiment of the present application.
[0111] The "first" and "second" in the names such as "first" and "second" (if any) mentioned in the embodiments of the present application are only used as name identifiers and do not represent the first or second in order.
[0112] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.
[0113] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0114] The above description is merely an exemplary embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. An analog-to-digital conversion calibration system, characterized in that: The system comprises: a reference end, a sensor, a first connection module, a second connection module, a selection switch, an analog-to-digital converter and a controller; The reference end is connected to the input end of the first connection module, and the output end of the first connection module is connected to the first selection end of the selection switch; the sensor is connected to the input end of the second connection module, and the output end of the second connection module is connected to the second selection end of the selection switch, and the circuits of the first connection module and the second connection module are the same; the output end of the selection switch is connected to the analog-to-digital converter, and the control end of the selection switch is connected to the controller; The reference terminal is used to generate a reference value of the same type as the real value of the sensor; The controller is used to control the selection switch to switch to the first selection end, determine the system's reference calibration coefficient based on the reference value of the reference end, the reference conversion signal output by the analog-to-digital converter corresponding to the reference value, and the conversion resistor included in the first connection module; control the selection switch to switch to the second selection end, and determine, in combination with the reference calibration coefficient, that the actual value of the sensor corresponds to the actual conversion signal output by the analog-to-digital converter.
2. The system according to claim 1, characterized in that The reference calibration coefficient includes a gain error and an offset error, and the sensor is a voltage type sensor or a current type sensor; The controller is also used to obtain a first reference conversion signal corresponding to the first reference signal and a second reference conversion signal corresponding to the second reference signal; calculate the resistance coefficient of the first conversion module based on the connection relationship and resistance value of the resistors included in the first conversion module; calculate the ratio of the first ratio to the resistance coefficient to obtain the gain error; calculate the first reference conversion signal minus the product of the first ratio and the first reference signal to obtain the offset error; add the product of the actual value, the resistance coefficient and the gain error to the offset error to obtain the actual conversion signal; the first ratio is the ratio of the difference between the second reference conversion signal and the first reference conversion signal to the difference between the second reference signal and the first reference signal.
3. The system according to claim 2, characterized in that The sensor is a voltage type sensor, and the reference end is a controllable voltage source; The first connection module and the second connection module both include a resistor R1, a resistor R2 and a resistor R3, the second end of the resistor R1 is connected to the first end of the resistor R3, and the resistor R2 is a pull-down resistor connected to a node between the resistor R1 and the resistor R3; The first end of the resistor R1 of the first connection module is the input end of the first connection module, the first end of the resistor R1 of the second connection module is the input end of the second connection module, the second end of the resistor R3 of the first connection module is the output end of the first connection module, and the second end of the resistor R3 of the second connection module is the output end of the second connection module; The resistance coefficient is a ratio of the resistor R2 to the sum of the resistor R1 and the resistor R2.
4. The system according to claim 2, characterized in that The sensor is a current type sensor, and the reference end is a controllable current source; The first connection module and the second connection module both include a resistor R4 and a resistor R5, a first end of the resistor R4 is connected to a first end of the resistor R5, and the resistor R4 is a pull-down resistor; The first end of the resistor R4 of the first connection module is also the input end of the first connection module, the first end of the resistor R4 of the second connection module is also the input end of the second connection module, the second end of the resistor R5 of the first connection module is the output end of the first connection module, and the second end of the resistor R5 of the second connection module is the output end of the second connection module; The resistance coefficient is the resistor R4.
5. The system according to claim 1, characterized in that The sensor is a resistance type sensor, and the reference end is an adjustable resistance module; The first connection module and the second connection module both include a resistor R6 and a resistor R7, a first end of the resistor R6 is connected to the reference voltage end, and a second end of the resistor R6 is connected to a first end of the resistor R7; The second end of the resistor R6 of the first connection module is connected to the first end of the adjustable resistance module, and the second end of the adjustable resistance module is grounded; the second end of the resistor R6 of the second connection module is connected to the first end of the sensor, and the second end of the sensor is grounded; the second end of the resistor R7 of the first connection module is the output end of the first connection module, and the second end of the resistor R7 of the second connection module is the output end of the second connection module; The adjustable resistance module at least includes a resistor 1 R01 and a resistor 2 R02. The controller is used to obtain a first reference conversion signal Ya corresponding to the analog-to-digital conversion output when the adjustable resistance module is the resistor 1 R01, forming a formula 1 Ya=kV(R01 / (R01+R6))+b; obtain a second reference conversion signal Yb corresponding to the analog-to-digital conversion output when the adjustable resistance module is the resistor 2 R02, forming a formula 2 Yb=kV(R02 / (R02+R6))+b; combine the formula 1 and the formula 2 to obtain a gain coefficient k and an offset coefficient b, wherein V is the voltage value of the reference voltage terminal; substitute the gain coefficient k, the offset coefficient b and the actual value collected from the sensor into the formula 1 instead of R01 to obtain the actual conversion signal.
6. The system according to claim 1, characterized in that and further comprising a temperature sensor, wherein a signal output terminal of the temperature sensor is connected to the processor; The processor is also used to record the reference calibration coefficients obtained at different temperatures and form a relationship table between temperature and reference calibration coefficients.
7. An analog-to-digital conversion calibration method, characterized in that: A processor in an analog-to-digital conversion calibration system according to any one of claims 1 to 6, the method comprising: When the sensor is in an idle period, the selection switch is controlled to switch to the first selection end. Calculate and obtain a reference calibration coefficient multiple times, and calculate an average reference calibration coefficient of the reference calibration coefficients multiple times; When the sensor re-enters the working time period, controlling the selection switch to switch to the second selection end; Based on the average reference calibration coefficient, it is determined that the actual value of the sensor corresponds to the actual conversion signal output by the analog-to-digital converter.
8. The method according to claim 6, characterized in that The idle time period and the working time period are switched according to a preset frequency.
9. The method according to claim 6, characterized in that Also includes: When the sensor is in the working time period, determining a first temperature of the system by the temperature sensor; Look up a table of relationships between temperature and reference calibration coefficients to determine a reference calibration coefficient corresponding to the first temperature; Based on the reference calibration coefficient, it is determined that the actual value of the sensor corresponds to the actual conversion signal output by the analog-to-digital converter.
10. A processing device, characterized in that: It comprises a memory and a processor, wherein the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes an analog-to-digital conversion calibration method as described in any one of claims 7-9.
Citation Information
Patent Citations
Analog signal acquisition circuit
CN105301995A
Power frequency AC voltage self-calibration unit and system
CN112034407A
Temperature calibration circuit, calibration method, sensor, electronic device and chip
CN112732002A
Temperature and humidity sensor and temperature and humidity measuring method
CN113465763A
Calibration method of production line detection equipment and analog-to-digital conversion calibration system
CN113541690A
Cited By
Channel coefficient independent calibration method and system used by sonde
CN120467538A