Voltage calibration method, device, equipment, storage medium and program product

By calculating the voltage compensation value and updating the power supply voltage, the problem of voltage accuracy deviation of the communication module ADC interface is solved, voltage gradient calibration is realized, detection accuracy and accuracy are improved, and it is suitable for a variety of scenarios.

CN119010904AActive Publication Date: 2024-11-22LINKZHILIAN (CHONGQING) TECH CO LTD +2
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411021824.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-11-22
Estimated Expiration
2044-07-29

AI Technical Summary

Technical Problem

The prior art is difficult to realize high-precision voltage detection in the ADC interface of the communication module, and the resistance accuracy deviation of the peripheral voltage-dividing resistor circuit leads to a decrease in detection accuracy, making it impossible to adaptively calibrate the detection voltage.

Method used

By calculating the voltage compensation value, updating the power supply voltage until the voltage compensation value meets the compensation requirements, dividing the voltage compensation interval, realizing voltage gradient calibration, and improving detection accuracy.

Benefits of technology

It improves the accuracy and accuracy of the voltage detection of the ADC interface of the communication module, and is suitable for a variety of scenarios, which is universal and meets user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119010904A_ABST
    Figure CN119010904A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet of Things, in particular to a voltage calibration method and device, equipment, a storage medium and a program product, and the method comprises the steps: obtaining a detection voltage of an analog-to-digital converter interface of a communication module under the condition that the power voltage of a divider resistance circuit is a first voltage; calculating a voltage compensation value based on the detection voltage and the first voltage; and under the condition that the voltage compensation value meets the compensation requirement, updating the first voltage into the second voltage according to the first voltage difference, and returning to execute the steps until the voltage compensation value under the second voltage does not meet the compensation requirement, and determining a voltage compensation interval of the voltage compensation value based on the second voltage. By calculating the voltage compensation value under the first voltage and the corresponding voltage compensation interval, the input voltage range of the power supply voltage is divided into a plurality of voltage compensation intervals, so that the voltage gradient calibration of the analog-to-digital converter interface is realized, the accuracy and precision of the calibration result can be improved, and the user requirements are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet of Things, and in particular to a voltage calibration method, device, equipment, storage medium and program product. Background Art

[0002] The analog-to-digital converter (ADC) interface is one of the necessary peripheral interfaces of the communication module, which can be used to detect the voltage of the terminal device to which the communication module belongs. The input voltage range of the ADC interface of the communication module is small. When the power supply voltage is greater than the input voltage of the ADC interface, in order to ensure the normal voltage detection, a voltage divider resistor circuit needs to be designed on the periphery of the communication module. However, due to the internal resistance of the ADC interface on the chip side of the communication module, the different resistances of the peripheral voltage divider resistor circuit, the different charging and discharging curves, the resistance accuracy deviation and other reasons, the voltage detection accuracy is easily reduced by designing a voltage divider resistor circuit on the periphery of the communication module. Therefore, in order to improve the accuracy, the detection voltage of the ADC interface of the communication module needs to be adaptively calibrated. Summary of the invention

[0003] In view of the above problems, the present application is proposed, and the present application provides a voltage calibration method, device, equipment, storage medium and program product.

[0004] According to one aspect of the present application, a voltage calibration method is provided, comprising:

[0005] When the power supply voltage of the voltage-dividing resistor circuit is a first voltage, obtaining a detection voltage of an analog-to-digital converter interface of the communication module, the analog-to-digital converter interface being connected to the voltage-dividing resistor circuit, and the voltage-dividing resistor circuit being used to perform voltage detection on a terminal device to which the communication module belongs;

[0006] Calculating a voltage compensation value based on the detection voltage and the first voltage;

[0007] When it is determined that the voltage compensation value meets the compensation requirements, the first voltage is updated to the second voltage according to the first voltage difference, and the step of obtaining the detection voltage of the analog-to-digital converter interface of the communication module is returned when the power supply voltage of the voltage divider resistor circuit is the first voltage, until it is determined that the voltage compensation value under the second voltage does not meet the compensation requirements, and the voltage compensation interval of the voltage compensation value is determined based on the second voltage.

[0008] In addition, the voltage calibration method according to one aspect of the present application further includes:

[0009] The voltage-dividing resistor circuit includes a first resistor and a second resistor; the first resistor is configured with a first resistance value accuracy, and the second resistor is configured with a second resistance value accuracy;

[0010] Get the detection voltage of the analog-to-digital converter interface of the communication module, including:

[0011] Based on the first resistance value accuracy and the second resistance value accuracy, determining all resistance combinations of the first resistor and the second resistor, wherein the resistance values ​​of the first resistor and / or the second resistor in any two groups of the resistance combinations are different;

[0012] Respectively obtaining the detection voltage of the analog-to-digital converter interface at each of the resistor combinations;

[0013] Calculating a voltage compensation value based on the detection voltage and the first voltage includes:

[0014] Calculating a difference between the detection voltage of each of the resistor combinations and the first voltage;

[0015] The average of the differences corresponding to each of the resistance combinations is calculated to obtain the voltage compensation value.

[0016] In addition, the voltage calibration method according to one aspect of the present application further includes:

[0017] Determining that the voltage compensation value meets the compensation requirement includes:

[0018] When it is determined that the voltage compensation value is greater than a preset compensation threshold, a target resistance accuracy is selected from the first resistance accuracy and the second resistance accuracy, and the resistance accuracy of the resistor corresponding to the target resistance accuracy is greater than the standard accuracy of the resistor;

[0019] According to the preset accuracy difference, the target resistance accuracy is reduced to a third resistance accuracy, and the step of determining all resistance combinations of the first resistor and the second resistor based on the first resistance accuracy and the second resistance accuracy is returned to execute until the voltage compensation value is less than or equal to the compensation threshold, and it is determined that the voltage compensation value meets the compensation requirement.

[0020] In addition, the voltage calibration method according to one aspect of the present application further includes:

[0021] Determining a voltage compensation interval of the voltage compensation value based on the second voltage includes:

[0022] According to the second voltage difference, the second voltage is updated to a third voltage, and the step of obtaining the detection voltage of the analog-to-digital converter interface of the communication module is returned to be executed when the power supply voltage of the voltage-dividing resistor circuit is the first voltage, until the voltage compensation value meets the compensation requirement; the second voltage difference is less than the first voltage difference, and the change direction corresponding to the second voltage difference is opposite to the change direction corresponding to the first voltage difference;

[0023] In the case where there is a divided target voltage compensation interval, determining the voltage compensation interval based on a boundary voltage of the voltage compensation interval obtained by the last division of the target voltage compensation interval and the third voltage;

[0024] In the case where the target voltage compensation interval does not exist, the voltage compensation interval is determined based on the boundary voltage of the power supply voltage and the third voltage.

[0025] In addition, the voltage calibration method according to one aspect of the present application further includes:

[0026] Before determining that the voltage compensation value is greater than a preset compensation threshold, the method further includes:

[0027] In a case where it is determined that the voltage compensation interval is the first voltage compensation interval of the power supply voltage of the voltage-dividing resistor circuit, determining the compensation threshold to be an error value configured by a user;

[0028] When the voltage compensation interval is not the first voltage compensation interval, the compensation threshold is determined as the sum of the earliest determined voltage compensation value in the process of determining the voltage compensation interval and the compensation difference value configured by the user.

[0029] In addition, the voltage calibration method according to one aspect of the present application further includes:

[0030] After determining the voltage compensation interval of the voltage compensation value based on the first voltage and the second voltage, the method further includes:

[0031] When voltage detection is performed on a terminal device to which the communication module belongs based on the voltage-dividing resistor circuit, a target voltage compensation interval to which a current power supply voltage of the voltage-dividing resistor circuit belongs and a target voltage compensation value of the target voltage compensation interval are obtained; and a current detection voltage of an analog-to-digital converter interface of the terminal device is obtained;

[0032] Calculating the current detection voltage and the target voltage compensation value to obtain an actual detection voltage of an analog-to-digital converter interface of the terminal device;

[0033] Based on a comparison result of the actual detection voltage and the voltage range of the current power supply voltage, a voltage detection result of the terminal device under the power supply voltage is obtained.

[0034] According to another aspect of the present application, a voltage calibration device is provided, comprising:

[0035] an acquisition module, configured to acquire a detection voltage of an analog-to-digital converter interface of a communication module when a power supply voltage of a voltage-dividing resistor circuit is a first voltage, the analog-to-digital converter interface being connected to the voltage-dividing resistor circuit, and the voltage-dividing resistor circuit being configured to perform voltage detection on a terminal device to which the communication module belongs;

[0036] A calculation module, used for calculating a voltage compensation value based on the detection voltage and the first voltage;

[0037] an updating module, configured to update the first voltage to a second voltage according to the first voltage difference when it is determined that the voltage compensation value meets the compensation requirement, and return to execute the step of acquiring the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage-dividing resistor circuit is the first voltage, until it is determined that the voltage compensation value under the second voltage does not meet the compensation requirement;

[0038] An interval division module is used to determine a voltage compensation interval of the voltage compensation value based on the second voltage.

[0039] According to another aspect of the present application, a computer device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method of the above aspect.

[0040] According to another aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method of the above aspect is implemented.

[0041] According to another aspect of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method of the above aspect is implemented.

[0042] As will be described in detail below, according to a voltage calibration method, device, equipment, storage medium and program product of an embodiment of the present application, by calculating the voltage compensation value at the first voltage, when the voltage compensation value meets the compensation requirements, the first voltage is updated to the second voltage, and the updating method can be increased or decreased according to the first voltage difference, and the voltage compensation value at the new voltage is calculated each time it is updated, until the voltage compensation value does not meet the compensation requirements, and the voltage compensation interval of the voltage compensation value is determined according to the second voltage at this time. According to the above method, the input voltage range of the power supply voltage can be divided into one or more voltage compensation intervals, and each voltage compensation interval has a corresponding voltage compensation value, which realizes the gradient calibration of the detection voltage of the analog-to-digital converter interface, can improve the accuracy and precision of the calibration result, and meet user needs.

[0043] It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the technology as claimed. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0045] Figure 1 is a flow chart illustrating application of a voltage calibration method according to an embodiment of the present application.

[0046] Figure 2 is a system configuration diagram illustrating application of a voltage calibration method according to an embodiment of the present application.

[0047] Figure 3 is a diagram illustrating a configuration of a calibration plate according to an embodiment of the present application.

[0048] Figure 4 is another flow chart illustrating the application of the voltage calibration method according to the embodiment of the present application.

[0049] Figure 5 is a schematic diagram illustrating the structure of a voltage calibration device according to an embodiment of the present application.

[0050] Figure 6 It is a schematic diagram illustrating the structure of a computer device according to an embodiment of the present application.

[0051] Figure 7 is a schematic diagram illustrating a computer program product according to an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the present application more obvious, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.

[0053] The analog-to-digital converter (ADC) interface is one of the necessary peripheral interfaces of the communication module, which can be used to detect the voltage of the terminal device to which the communication module belongs. The input voltage range of the ADC interface of the communication module is small. When the power supply voltage is greater than the input voltage of the ADC interface, in order to ensure the normal voltage detection, a voltage divider resistor circuit needs to be designed on the periphery of the communication module. However, due to the internal resistance of the ADC interface on the chip side of the communication module, the different resistances of the peripheral voltage divider resistor circuit, the different charging and discharging curves, the resistance accuracy deviation and other reasons, the voltage detection accuracy is easily reduced by designing a voltage divider resistor circuit on the periphery of the communication module. Therefore, in order to improve the accuracy, the detection voltage of the ADC interface of the communication module needs to be adaptively calibrated.

[0054] Most of the existing calibration methods can only perform targeted calibration on the communication module of the terminal device. This calibration method is not universal and cannot adaptively calibrate the detection voltage of the ADC interface of the communication module. If the voltage value of the communication module of the terminal device detected by the user or the resistance value of the voltage divider resistor circuit changes, it will seriously affect the precision and accuracy of the detection results and cannot meet user requirements.

[0055] Above, with reference to the accompanying drawings, a voltage calibration method, device, equipment, storage medium and program product according to an embodiment of the present application are described. By calculating the voltage compensation value at the first voltage, when the voltage compensation value meets the compensation requirements, the first voltage is updated to the second voltage. The updating method can be increased or decreased according to the first voltage difference. Each update calculates the voltage compensation value at the new voltage until the voltage compensation value does not meet the compensation requirements, and the voltage compensation interval of the voltage compensation value is determined according to the second voltage at this time. The above method does not limit the model of the communication module, can be used in a variety of usage scenarios, and has universal applicability. According to the above method, the input voltage range of the power supply voltage can be divided into one or more voltage compensation intervals, and each voltage compensation interval has a corresponding voltage compensation value, which realizes voltage gradient calibration, can improve the accuracy and precision of the calibration results, and meet user needs.

[0056] To facilitate understanding of this embodiment, a voltage calibration method disclosed in the embodiment of the present application is first introduced in detail. The execution subject of the voltage calibration method provided in the embodiment of the present application is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal DiTital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the voltage calibration method can be implemented by a processor calling a computer-readable instruction stored in a memory.

[0057] The system configuration of the voltage calibration method of this embodiment refers to Figure 2 , including a cloud platform, a voltage regulator, a console and a calibration board. The console is the execution body and is used to control the operation of the calibration system. The cloud platform is used to send and receive information between the user end and the calibration board. The voltage regulator is used to provide power supply voltage for the voltage divider resistor circuit. The calibration board is used to load the communication module, control the resistance value of the voltage divider resistor circuit and output the detection voltage of the ADC interface of the communication module. Among them, the configuration diagram of the calibration board is as follows Figure 3 As shown, it includes a communication module, a digital potentiometer chip 1, a digital potentiometer chip 2, and a UART to USB circuit. The digital potentiometer chip 1 is connected to the I2C1 interface of the communication module to adjust the resistance value of the first resistor of the voltage-dividing resistor circuit; the digital potentiometer chip 2 is connected to the I2C2 interface of the communication module to adjust the resistance value of the second resistor of the voltage-dividing resistor circuit; the UART to USB circuit is used for a communication module without a USB interface, connecting the calibration board and the console to realize communication with the console.

[0058] like Figure 1 As shown, it is a flow chart of the voltage calibration method provided in an embodiment of the present application, and the method comprises steps 1-3:

[0059] Step 1: When the power supply voltage of the voltage-dividing resistor circuit is a first voltage, a detection voltage of an analog-to-digital converter interface of the communication module is obtained.

[0060] The analog-to-digital converter interface is connected to a voltage-dividing resistor circuit, which is used to detect the voltage of the terminal device to which the communication module belongs. The voltage-dividing resistor circuit includes a first resistor and a second resistor; the first resistor is configured with a first resistance value accuracy, and the second resistor is configured with a second resistance value accuracy.

[0061] It should be noted that the first voltage can be set according to the voltage range configured by the user. For example, if the voltage range configured by the user is 3.2 to 4V, then the first voltage can be any voltage value between 3.2 and 4V (including 3.2V and 4V). The calculation formula of the detection voltage is: Vdet = V ADC / R2×(R1+R2), where Vdet is the detection voltage, V ADC is the detection value of the input voltage of the analog-to-digital converter interface, R1 is the resistance value of the first resistor, and R2 is the resistance value of the second resistor.

[0062] Step 1 specifically includes the following steps:

[0063] Step 1-1: Based on the first resistance value accuracy and the second resistance value accuracy, determine all resistance combinations of the first resistor and the second resistor, and the resistance values ​​of the first resistor and / or the second resistor in any two resistance combinations are different.

[0064] Assuming that the resistance value of the first resistor is R1, and the first resistance value accuracy is x%; the resistance value of the second resistor is R2, and the second resistance value accuracy is y%, then all resistance combinations of the first resistor and the second resistor include: (R1, R2), (R1, R2*(1-y%)), (R1, R2*(1+y%)), (R1*(1-x%), R2), (R1*(1-x%), R2*(1-y%)), (R1*(1-x%), R2*(1+y%)), (R1*(1+x%), R2), (R1*(1+x%), R2*(1-y%)), (R1*(1+x%), R2*(1+y%)). Specifically, for example, the resistance of the first resistor is 100K, and the first resistance accuracy is 5%; the resistance of the second resistor is 200K, and the second resistance accuracy is 5%, then all resistance combinations of the first resistor and the second resistor may include the following 9 types: (100K, 200K), (100K, 190K), (100K, 210K), (95K, 200K), (95K, 190K), (95K, 210K), (105K, 200K), (105K, 190K), (105K, 210K).

[0065] Step 1-2: Obtain the detection voltage of the analog-to-digital converter interface under each resistor combination respectively.

[0066] Specifically, the calculation formula for the detection voltage is: Vdet = V ADC / R2×(R1+R2), where Vdet is the detection voltage, V ADC is the detected value of the input voltage of the analog-to-digital converter interface, R1 is the resistance value of the first resistor, and R2 is the resistance value of the second resistor. It should be noted that V ADCThe specific value can be directly obtained from the analog-to-digital converter interface; taking the resistor combination (95K, 200K) as an example, at this time R1 = 95K, R2 = 200K.

[0067] Step 2: Calculate a voltage compensation value based on the detection voltage and the first voltage.

[0068] Specifically, in combination with step 1, the voltage compensation value can be calculated based on the detection voltage under one of the resistor combinations; the voltage compensation value can also be calculated based on the detection voltages under several of the resistor combinations, for example, the maximum and minimum values ​​are deleted from the 9 detection voltages, and the remaining detection voltages are averaged to obtain the voltage compensation value. This embodiment provides another preferred solution, which specifically includes the following steps:

[0069] Step 2-1: Calculate the difference between each detection voltage and the first voltage.

[0070] Combined with step 1, assuming that the first voltage is 3.2V, the 9 detection voltages are V1-V9, and the differences between V1-V9 and 3.2V are calculated in turn to obtain 9 differences.

[0071] Step 2-2: Calculate the mean of the difference to obtain the voltage compensation value.

[0072] The 9 differences are averaged and the average is used as the voltage compensation value.

[0073] Step 3: When it is determined that the voltage compensation value meets the compensation requirements, update the first voltage to the second voltage according to the first voltage difference, and return to execute steps 1-2 until it is determined that the voltage compensation value under the second voltage does not meet the compensation requirements, and determine the voltage compensation interval of the voltage compensation value based on the second voltage.

[0074] Assume that the voltage range of the power supply voltage is Vmin~Vmax, if the first voltage is Vmin, the first voltage difference is ΔV1, and the first voltage is updated to the second voltage, that is, the second voltage is (Vmin+ΔV1); if the first voltage is Vmax, the first voltage difference is ΔV1, and the first voltage is updated to the second voltage, that is, the second voltage is (Vmax-ΔV1). Specifically, for example, the voltage range of the power supply voltage is 3.2~4V, the first voltage is 3.2V, the first voltage difference is 0.1V, and the first voltage is updated to the second voltage, that is, the second voltage is 3.2V+0.1V=3.3V; or, the first voltage is 4V, the first voltage difference is 0.1V, and the first voltage is updated to the second voltage, that is, the second voltage is 4V-0.1V=3.9V. After updating the first voltage to the second voltage, return to step 1-2 and calculate the voltage compensation value again. Taking the second voltage as 3.3V as an example, if the voltage compensation value under the second voltage of 3.3V meets the compensation requirements, the second voltage can be updated to 3.3V+0.1V=3.4V, and return to execute step 1-2 to calculate the voltage compensation value again until it is determined that the voltage compensation value under the second voltage does not meet the compensation requirements.

[0075] When the voltage compensation value under the second voltage does not meet the compensation requirement, the second voltage is updated to the third voltage according to the second voltage difference ΔV2. For example, when the second voltage is (Vmin+ΔV1), the third voltage is (Vmin+ΔV1-ΔV2), and when the second voltage is (Vmax-ΔV1), the third voltage is (Vmax-ΔV1+ΔV2), and the process returns to step 1-2 until the voltage compensation value meets the compensation requirement. The second voltage difference ΔV2 is less than the first voltage difference ΔV1, and the change direction corresponding to the second voltage difference ΔV2 is opposite to the change direction corresponding to the first voltage difference ΔV1. Specifically, taking the second voltage as 3.3V as an example, assuming that the second voltage difference is 0.01V (0.01V<0.1V), if the first voltage is updated based on the first voltage difference by addition (such as the second voltage is 3.2V+0.1V=3.3V), then updating the second voltage based on the second voltage difference is subtraction (such as the third voltage is 3.3V-0.01V=3.29V). Taking the second voltage difference as an example of subtraction, the second voltage is updated to the third voltage, that is, the second voltage decreases by 0.01V each time, and each time it decreases, it returns to execute step 1-2 and calculates the voltage compensation value again until it is determined that the voltage compensation value under the third voltage meets the compensation requirements. Assuming that when the third voltage is reduced to 3.27V, the voltage compensation value meets the compensation requirements, then one of the boundary values ​​of the voltage compensation interval is 3.27V.

[0076] The voltage range is 3.2 to 4V. If the voltage compensation value calculated this time is used to divide the first voltage compensation interval, in the absence of a target voltage compensation interval (a voltage compensation interval that has been divided), the voltage compensation interval is determined based on the boundary voltage of the power supply voltage and the third voltage. In combination with this embodiment, the voltage compensation interval is 3.2V to 3.27V. If the voltage compensation value calculated this time is not used to divide the first voltage compensation interval, in the presence of a divided target voltage compensation interval, the voltage compensation interval is determined based on the boundary voltage of the voltage compensation interval obtained by the last division in the target voltage compensation interval and the third voltage. Assuming that the target voltage compensation interval is 3.2V to 3.27V, and the third voltage is finally determined to be 3.35V, then the voltage compensation interval is 3.28V to 3.35V, where 3.28V = 3.27V + 0.01V, 3.27V is the boundary voltage of the target voltage compensation interval, and 0.01V is the second voltage difference. This embodiment only provides a detailed process of dividing the voltage compensation interval from the left boundary (3.2V) when the voltage range is 3.2-4V. The process of dividing the voltage compensation interval from the right boundary (4V) is just different in addition and subtraction algorithms, which will not be repeated in this embodiment.

[0077] Specifically, in this embodiment, the voltage compensation value can be determined to meet the compensation requirement according to the following conditions:

[0078] Case 1: when it is determined that the voltage compensation value is less than or equal to the preset compensation threshold, it is determined that the voltage compensation value meets the compensation requirement.

[0079] Case 2: When it is determined that the voltage compensation value is greater than the preset compensation threshold, a target resistance accuracy is selected from the first resistance accuracy and the second resistance accuracy, and the resistance accuracy of the resistor corresponding to the target resistance accuracy is greater than the standard accuracy of the resistor; according to the preset accuracy difference, the target resistance accuracy is reduced to the third resistance accuracy, and the steps 1-2 are returned to be executed until the voltage compensation value is less than or equal to the compensation threshold, and it is determined that the voltage compensation value meets the compensation requirements. Among them, the "standard accuracy of the resistor" is the commonly used minimum accuracy of the resistor. Resistors on the market are generally equipped with commonly used minimum accuracy. For example, the common minimum accuracy is 1%, 3%, 5%, etc. This embodiment does not limit the "standard accuracy of the resistor" and can be selected according to actual needs.

[0080] Case 3: Cases 1 and 2 can be applied to the case where the voltage compensation interval is the first voltage compensation interval of the power supply voltage of the voltage divider resistor circuit. When it is determined that the voltage compensation interval is not the first voltage compensation interval of the power supply voltage of the voltage divider resistor circuit, that is, there is at least one voltage compensation interval that has been divided. Assuming that there is a first voltage compensation interval that has been divided, the second voltage compensation interval is being calculated at this time. When it is determined that the voltage compensation value at this time is not equal to the voltage compensation value of the first voltage compensation interval, it is determined that the voltage compensation value meets the compensation requirements.

[0081] It should be noted that before step 3, the following steps are also included:

[0082] Determine whether the voltage compensation interval of the voltage compensation value calculated this time is the first voltage compensation interval of the power supply voltage. If it is determined that the voltage compensation interval is the first voltage compensation interval of the power supply voltage of the voltage divider resistor circuit, determine the compensation threshold as the error value configured by the user.

[0083] When the voltage compensation interval is not the first voltage compensation interval, the compensation threshold is determined as the sum of the earliest determined voltage compensation value and the compensation difference configured by the user in the process of determining the voltage compensation interval. Combined with step 1, the voltage range of the power supply voltage is 3.2~4V. According to the voltage compensation value, 3.2~4V is divided into multiple voltage compensation intervals for gradient calibration. Assuming that 3.2~3.6V has been determined as the first voltage compensation interval, the boundary voltage of the second voltage compensation interval is 3.6V+ΔV2, ΔV2 is the second voltage difference, assuming ΔV2 is 0.01V, the boundary voltage of the second voltage compensation interval is 3.61V, and the voltage compensation value calculated at 3.61V is the earliest determined voltage compensation value. If the voltage compensation value is 23mV and the compensation difference configured by the user is 2mV, then the compensation threshold at this time is 25mV. Assuming that 3.8~4V has been determined as the first voltage compensation interval, the boundary voltage of the second voltage compensation interval is 3.8V-ΔV2=3.79V. The voltage compensation value calculated at 3.79V is the earliest determined voltage compensation value. If the voltage compensation value is 22mV and the user-configured compensation difference is 2mV, then the compensation threshold at this time is 24mV.

[0084] On this basis, we will explain situation 2 in detail.

[0085] (1) Assume that the first resistance accuracy is 1%, the second resistance accuracy is 5%, the standard accuracy of the first resistor is 1%, and the standard accuracy of the second resistor is 1%. The target resistance accuracy at this time is the second resistance accuracy. At this time, the accuracy difference is 4%. The target resistance accuracy is reduced to the third resistance accuracy. Specifically, the second resistance accuracy can be directly reduced from 5% to 1%, or the second resistance accuracy can be reduced from 5% to 4%, 3%...1% successively. Each time the second resistance accuracy is reduced, it is necessary to return to step 1-2 until the voltage compensation value is less than or equal to the compensation threshold, and it is determined that the voltage compensation value meets the compensation requirements. At this time, the first resistance accuracy and the second resistance accuracy are the final accuracy values; if the second resistance accuracy is reduced to 1% (at this time, the first resistance accuracy and the second resistance accuracy have reached the standard accuracy and cannot be reduced any further), and the voltage compensation value is still greater than the preset compensation threshold, it means that the current conditions cannot meet the calibration requirements, and it is recommended to change the resistance value or error value (i.e., the compensation threshold).

[0086] (2) Assuming that the first resistance accuracy is 3%, the second resistance accuracy is 5%, the standard accuracy of the first resistor is 1%, and the standard accuracy of the second resistor is 1%, at this time, the first resistance accuracy and the second resistance accuracy are both greater than the standard accuracy, and the target resistance accuracy can be the first resistance accuracy and / or the second resistance accuracy, that is, the first resistance accuracy and the second resistance accuracy can be reduced at the same time, or only one of them can be reduced (taking the first resistance accuracy as an example), the specific situation is as follows:

[0087] (2-1) The target resistance accuracy is the first resistance accuracy and the second resistance accuracy.

[0088] At the same time, the first resistance accuracy and the second resistance accuracy are reduced. At this time, the accuracy difference of the first resistance accuracy is 2%, and the accuracy difference of the second resistance accuracy is 4%. The specific rules for reducing the first resistance accuracy and the second resistance accuracy can be referred to (1). Each time the first resistance accuracy and the second resistance accuracy are reduced, the process returns to step 1-2 until the voltage compensation value is less than or equal to the compensation threshold value, and the voltage compensation value is determined to meet the compensation requirements. At this time, the first resistance accuracy and the second resistance accuracy are the final accuracy values. If the first resistance accuracy and the second resistance accuracy are both reduced to 1% (at this time, the first resistance accuracy and the second resistance accuracy have reached the standard accuracy and cannot be reduced any further), and the voltage compensation value is still greater than the preset compensation threshold value, it means that the current conditions cannot meet the calibration requirements, and it is recommended to replace the resistance value or the error value (i.e., the compensation threshold value).

[0089] (2-2) The target resistance accuracy is the first resistance accuracy or the second resistance accuracy.

[0090] At this time, the accuracy difference of the first resistance accuracy is 2%, and the accuracy difference of the second resistance accuracy is 4%. You can reduce one of them first (taking the target resistance accuracy as the first resistance accuracy as an example). If the voltage compensation value is still greater than the preset compensation threshold after the first resistance accuracy is reduced to 1%, then use the second resistance accuracy as the target resistance accuracy, reduce the second resistance accuracy, and return to execute steps 1-2 until the voltage compensation value is less than or equal to the compensation threshold, and determine that the voltage compensation value meets the compensation requirements. At this time, the first resistance accuracy (1%) and the second resistance accuracy are the final accuracy values; if the voltage compensation value is still greater than the preset compensation threshold after the second resistance accuracy is reduced to 1%, it means that the current conditions cannot meet the calibration requirements, and it is recommended to replace the resistance value or error value (i.e., the compensation threshold).

[0091] Preferably, in the embodiment of the present application, after step 3, the following is further included:

[0092] Step 4-1: When performing voltage detection on the terminal device to which the communication module belongs based on the voltage-dividing resistor circuit, obtain the target voltage compensation interval to which the current power supply voltage of the voltage-dividing resistor circuit belongs and the target voltage compensation value of the target voltage compensation interval; and obtain the current detection voltage of the analog-to-digital converter interface of the terminal device.

[0093] For example, the detection voltage (i.e., power supply voltage) range of the terminal device configured by the user is 3.2~4V, the error value is 30mV, the resistance value of the first resistor is 200K, the first resistance accuracy is 3%, the resistance value of the second resistor is 400K, and the second resistance accuracy is 3%. Assuming that the current power supply voltage is 3.2V, the target voltage compensation value of the target voltage compensation interval to which the current power supply voltage belongs is 20mV, and the current detection voltage is 3.17V.

[0094] Step 4-2: Calculate the current detection voltage and the target voltage compensation value to obtain the actual detection voltage of the analog-to-digital converter interface of the terminal device.

[0095] Combined with step 4-1, the current detection voltage is 3.17V, the target voltage compensation value is 20mV, and the actual detection voltage is 3.17V+20mV=3.19V.

[0096] Step 4-3: Based on the comparison result between the actual detection voltage and the voltage range of the current power supply voltage, the voltage detection result of the terminal device under the power supply voltage is obtained.

[0097] Specifically, the current power supply voltage is 3.2V, the error value is 30mV, the voltage range of the current power supply voltage is 3.17~3.23V, and the actual detection voltage 3.19V is compared with the voltage range 3.17~3.23V. The comparison result is that the actual detection voltage 3.19V is within the voltage range of the current power supply voltage. The voltage detection result of the terminal device under the 3.2V power supply voltage is in good operating condition.

[0098] It should be noted that if the actual detection voltage calculated in step 4-2 is not within the voltage range of 3.17 to 3.23V, assuming it is 3.16V, then the voltage detection result of the terminal device under the 3.2V power supply voltage is that it cannot operate or the operation effect is poor.

[0099] like Figure 4 As shown, it is a flow chart of the voltage calibration method provided in an embodiment of the present application, and the method includes S1-11:

[0100] S1: Obtain the model information and circuit information of the communication module configured by the user.

[0101] The circuit information includes: the detection voltage range Vmin~Vmax, the resistance value R1 of the first resistor and the first resistor accuracy x%, the resistance value R2 of the second resistor and the second resistor accuracy y%, the voltage detection error value Va, load the corresponding model of the communication module on the calibration board, and start calibration.

[0102] For example, the input voltage V ADC The range of the detection voltage is 0~1.2V, the range of the detection voltage (power supply voltage) is 3.4V~4.2V, R1 is 620K, the accuracy of the first resistor is 5%, R2 is 220K, the accuracy of the second resistor is 5%, and the voltage detection error value Va is 20mV.

[0103] S2: Configure the power supply voltage to be a first voltage.

[0104] The control console controls the voltage regulator to output the power supply voltage. Specifically, the first voltage may be any voltage value between 3.4V and 4.2V. In this embodiment, the first voltage is preferably 3.4V.

[0105] S3: Obtain the detection voltage of the ADC interface under each resistance combination.

[0106] The calculation formula of the detection voltage is: Vdet = V ADC / R2*(R1+R2), where Vdet is the detection voltage, V ADC is the detected value of the input voltage of the analog-to-digital converter interface, R1 is the resistance value of the first resistor, and R2 is the resistance value of the second resistor. For example, when the resistor combination is (620K, 220K), Vdet=3.415V is calculated.

[0107] The resistor combination in this embodiment (i.e., the combination of R1 and R2) includes: (620K, 220K), (620K, 231K), (620K, 209K), (651K, 220K), (651K, 231K), (651K, 209K), (589K, 220K), (589K, 231K), (589K, 209K). The detection voltages of the ADC interface under each resistor combination are calculated sequentially according to the above calculation formula.

[0108] S4: Calculate the voltage compensation value based on the detection voltage and the first voltage.

[0109] Specifically, it includes the following step process:

[0110] S4.1 Calculate the difference Verror between each detection voltage and the first voltage.

[0111] For example, the first voltage is 3.4V, and the detection voltage calculated under the resistor combination (620K, 220K) is 3.415V. Verror1 = |Vdet - Vout| = |3.415 - 3.4| = 15mV, where Vdet represents the detection voltage and Vout represents the first voltage.

[0112] Referring to the above calculation process, the remaining 8 differences Verror are calculated sequentially: Verror2 = 10mV, Verror3 = 18mV, Verror4 = 12mV, Verror5 = 13mV, Verror6 = 22mV, Verror7 = 25mV, Verror8 = 28mV, Verror9 = 21mV.

[0113] S4.2 Calculate the mean value of the differences to obtain the voltage compensation value.

[0114] Specifically, the voltage compensation value Vcal = ∑|Verror| / 9 = 18mV.

[0115] S5: Determine that the voltage compensation value meets the compensation requirements.

[0116] Specifically, compare the voltage compensation value Vcal with the error value Va configured by the user. The voltage compensation value Vcal = 18mV, Va = 20mV, Vcal < Va. Determine that the voltage compensation value meets the compensation requirements, and there is no need to reduce the accuracy of the first resistance value and the second resistance value. Continue to execute the following steps.

[0117] S6: Update the first voltage to the second voltage according to the first voltage difference.

[0118] Specifically, this embodiment assumes that the first voltage difference ΔV1=0.1V, and the initial second voltage is 3.5V. Under the power supply voltage of 3.5V, the above 9 resistance combinations are traversed, and the difference Verror under each resistance combination is calculated. If all the difference Verrors are less than or equal to the error value Va, the second voltage can be updated to 3.6V, and the steps of traversing the above 9 resistance combinations and calculating the difference Verror under each resistance combination are repeated until at least one of the difference Verrors is greater than the error value Va. It should be noted that the calculation formula of the difference Verror in this step is: Verror=|Vd-Vout|, where Vd is the sum of the detection voltage Vdet and the voltage compensation value Vcal. Specifically in this embodiment, under the voltage of 3.5V, when traversing to (589K, 231K), Verror=25mV>Va=20mV, so the second voltage is determined to be 3.5V.

[0119] S7: updating the second voltage to a third voltage according to the second voltage difference.

[0120] Specifically, this embodiment assumes that the second voltage difference ΔV2=0.01V, and the initial third voltage is 3.5V-0.01V=3.49V. Under the power supply voltage of 3.49V, the above 9 resistance combinations are traversed, and the difference Verror under each resistance combination is calculated. If at least one of the difference Verror is greater than the error value Va, the third voltage is reduced by 0.01V one by one, and the above 9 resistance combinations are repeated to calculate the difference Verror under each resistance combination until all the difference Verrors are less than or equal to the error value Va. Specifically in this embodiment, until the third voltage is updated to 3.45V, all the difference Verrors are less than or equal to the error value Va, so the third voltage is determined to be 3.45V.

[0121] S8: Determine a voltage compensation interval of the voltage compensation value.

[0122] Specifically, the voltage compensation value Vcal calculated this time is 18 mV, and the corresponding voltage compensation range is 3.4 V to 3.45 V.

[0123] It should be noted that the first voltage compensation interval is calculated in this embodiment, so one of the boundary voltages of the voltage compensation interval can be obtained according to the detection voltage range configured by the user. Taking this embodiment as an example, the calibration starts from 3.4V, then the voltage compensation interval is 3.4V to 3.45V. If the calibration starts from 4.2V, the third voltage calculated at last is assumed to be 4.13V, then the voltage compensation interval is 4.13V to 4.2V.

[0124] S9: Determine the power supply voltage for the next calibration round based on the boundary voltage of the voltage compensation interval.

[0125] Taking this embodiment as an example, the voltage compensation interval is 3.4V to 3.45V, then the power supply voltage (first voltage) of the next calibration round can be 3.45V + ΔV2 = 3.46V, and S2-S8 are repeated until the maximum voltage Vmax is calibrated to 4.2V. It should be noted that when repeating S5, determining whether the voltage compensation value meets the compensation requirement is no longer to compare the voltage compensation value with the error value Va, but to compare the voltage compensation value with the voltage compensation value of the previous calibration round (such as 18mV). If the two voltage compensation values ​​are different, it can be determined that the voltage compensation value meets the compensation requirement.

[0126] It should also be noted that in S6 and S7, the second voltage and the third voltage need to be determined by comparing the difference Verror with the error value Va. When S6 and S7 are repeated, the compensation threshold can be determined according to the voltage compensation value and the preset compensation difference, and the second voltage and the third voltage are determined by comparing the difference Verror with the compensation threshold. For example, the voltage compensation value is 25mV, the compensation difference is 2mV, and the compensation threshold is 27mV. When S6 and S7 are repeated, the difference Verror is compared to see if it is greater than 27mV, and the second voltage and the third voltage of this calibration round are determined. Among them, the compensation difference can also be 0, and the compensation difference of each calibration round can be the same or different, which is not limited in this embodiment.

[0127] S10: Obtain a tuning parameter script.

[0128] The calibration parameter script includes the divided voltage compensation intervals and the voltage compensation values ​​corresponding to the voltage compensation intervals. Taking this embodiment as an example, the calibration parameter script is: the voltage compensation value Vcal of the voltage compensation interval (3.4V~3.45V) is 18mV; the voltage compensation value Vcal of the voltage compensation interval (3.46V~3.55V) is 25mV; the voltage compensation value Vcal of the voltage compensation interval (3.56V~3.6V) is 30mV...the voltage compensation value Vcal of the voltage compensation interval (4.1V~4.2V) is 100mV.

[0129] S11: Perform voltage detection on the terminal device to which the communication module belongs.

[0130] When the voltage of the terminal device is detected, the resistance value and resistance accuracy of the voltage divider resistor circuit are the resistance value and resistance accuracy finally determined during the calibration process. Assuming that the current power supply voltage is 3.5V, the specific steps include:

[0131] S11.1 obtains a target voltage compensation interval to which the current power supply voltage of the voltage-dividing resistor circuit belongs and a target voltage compensation value of the target voltage compensation interval.

[0132] According to the power supply voltage and the calibration parameter script, the target voltage compensation range of 3.5V is (3.46V~3.55V), and the target voltage compensation value Vcal is 25mV.

[0133] S11.2 calculates the current detection voltage and the target voltage compensation value to obtain the actual detection voltage of the analog-to-digital converter interface of the terminal device.

[0134] Specifically, the current power supply voltage is 3.5V, the error value Va is 20mV, then the voltage range of the current power supply voltage is 3.48V~3.52V, if the current detection voltage Vdet is 3.46V, the actual detection voltage is 3.46V+25mV=3.485V; if the current detection voltage Vdet is 3.53V, the actual detection voltage is 3.53V-25mV=3.505V.

[0135] S11.3 obtains a voltage detection result of the terminal device under the current power supply voltage based on a comparison result between the actual detection voltage and the voltage range of the current power supply voltage.

[0136] According to whether the actual detection voltage falls within the voltage range of the current power supply voltage, the voltage detection result of the terminal device under the current power supply voltage is obtained. For example, if the actual detection voltage falls within the voltage range of the power supply voltage, it can be indicated that the terminal device is in good operating condition under the current power supply voltage. It should be noted that if the current detection voltage Vdet is 3.51V (falling within 3.48V~3.52V), the current detection voltage Vdet can be directly used as the actual detection voltage at this time, or the current detection voltage Vdet and the voltage compensation value Vcal can be added and subtracted in sequence. If one of the operation results is within the voltage range of 3.48V~3.52V, it can be considered that the terminal device is in good operating condition under the current power supply voltage of 3.5V.

[0137] According to another aspect of the embodiments of the present application, a voltage calibration device is provided. Figure 5 As shown, the device comprises:

[0138] The acquisition module 101 is used to obtain the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage-dividing resistor circuit is a first voltage. The analog-to-digital converter interface is connected to the voltage-dividing resistor circuit, and the voltage-dividing resistor circuit is used to perform voltage detection on the terminal device to which the communication module belongs.

[0139] The calculation module 102 is used to calculate a voltage compensation value based on the detection voltage and the first voltage.

[0140] The update module 103 is used to update the first voltage to a second voltage according to the first voltage difference when it is determined that the voltage compensation value meets the compensation requirement, and return to execute the step of obtaining the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage divider resistor circuit is the first voltage, until it is determined that the voltage compensation value at the second voltage does not meet the compensation requirement.

[0141] The interval division module 104 is configured to determine a voltage compensation interval of the voltage compensation value based on the second voltage.

[0142] In one or more embodiments, the acquisition module 101 is used to:

[0143] Based on the first resistance value accuracy and the second resistance value accuracy, determining all resistance combinations of the first resistor and the second resistor, wherein the resistance values ​​of the first resistor and / or the second resistor in any two groups of the resistance combinations are different;

[0144] The detection voltage of the analog-to-digital converter interface at each of the resistor combinations is obtained respectively.

[0145] In one or more embodiments, the computing module 102 is configured to:

[0146] Calculating the difference between each of the detection voltages and the first voltage;

[0147] The mean of the difference is calculated to obtain the voltage compensation value.

[0148] The voltage calibration device is further used for: when it is determined that the voltage compensation value is greater than a preset compensation threshold, selecting a target resistance accuracy from the first resistance accuracy and the second resistance accuracy, wherein the resistance accuracy of the resistor corresponding to the target resistance accuracy is greater than the standard accuracy of the resistor;

[0149] According to the preset accuracy difference, the target resistance accuracy is reduced to a third resistance accuracy, and the step of determining all resistance combinations of the first resistor and the second resistor based on the first resistance accuracy and the second resistance accuracy is returned to execute until the voltage compensation value is less than or equal to the compensation threshold, and it is determined that the voltage compensation value meets the compensation requirement.

[0150] In one or more embodiments, the interval partitioning module 104 is used to:

[0151] According to the second voltage difference, the second voltage is updated to a third voltage, and the step of obtaining the detection voltage of the analog-to-digital converter interface of the communication module is returned to be executed when the power supply voltage of the voltage-dividing resistor circuit is the first voltage, until the voltage compensation value meets the compensation requirement; the second voltage difference is less than the first voltage difference, and the change direction corresponding to the second voltage difference is opposite to the change direction corresponding to the first voltage difference;

[0152] In the case where there is a divided target voltage compensation interval, determining the voltage compensation interval based on a boundary voltage of the voltage compensation interval obtained by the last division of the target voltage compensation interval and the third voltage;

[0153] In the case where the target voltage compensation interval does not exist, the voltage compensation interval is determined based on the boundary voltage of the power supply voltage and the third voltage.

[0154] The voltage calibration device is further configured to: before determining that the voltage compensation value is greater than a preset compensation threshold, further include:

[0155] In the case where it is determined that the voltage compensation interval is the first voltage compensation interval of the power supply voltage of the voltage-dividing resistor circuit, determining the compensation threshold to be an error value configured by a user;

[0156] When the voltage compensation interval is not the first voltage compensation interval, the compensation threshold is determined as the sum of the earliest determined voltage compensation value in the process of determining the voltage compensation interval and the compensation difference value configured by the user.

[0157] The voltage calibration device is further configured to: after determining the voltage compensation interval of the voltage compensation value based on the first voltage and the second voltage, further include:

[0158] When voltage detection is performed on a terminal device to which the communication module belongs based on the voltage-dividing resistor circuit, a target voltage compensation interval to which a current power supply voltage of the voltage-dividing resistor circuit belongs and a target voltage compensation value of the target voltage compensation interval are obtained; and a current detection voltage of an analog-to-digital converter interface of the terminal device is obtained;

[0159] Calculating the current detection voltage and the target voltage compensation value to obtain an actual detection voltage of an analog-to-digital converter interface of the terminal device;

[0160] Based on a comparison result of the actual detection voltage and the voltage range of the current power supply voltage, a voltage detection result of the terminal device under the current power supply voltage is obtained.

[0161] The voltage calibration device for a heterogeneous network provided in the embodiment of the present application and the voltage calibration method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.

[0162] The present application also provides a computer device to perform the voltage calibration method. Figure 6 It shows a schematic diagram of a computer device provided by some embodiments of the present application. Figure 6 As shown, the computer device 8 includes: a processor 800, a memory 801, a bus 802 and a communication interface 803, wherein the processor 800, the communication interface 803 and the memory 801 are connected via the bus 802; the memory 801 stores a computer program that can be run on the processor 800, and when the processor 800 runs the computer program, the voltage calibration method provided in any of the aforementioned embodiments of the present application is executed.

[0163] The memory 801 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the device network element and at least one other network element is realized through at least one communication interface 803 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0164] The bus 802 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 801 is used to store programs, and the processor 800 executes the program after receiving an execution instruction. The voltage calibration method disclosed in any implementation of the above-mentioned embodiment of the present application may be applied to the processor 800, or implemented by the processor 800.

[0165] The processor 800 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 800. The above processor 800 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a ready-made programmable gate array (FPTA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 801, and the processor 800 reads the information in the memory 801 and completes the steps of the above method in combination with its hardware.

[0166] The computer device provided in the embodiment of the present application and the voltage calibration method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.

[0167] An embodiment of the present application also provides a computer-readable storage medium corresponding to the voltage calibration method provided in the aforementioned embodiment. The computer-readable storage medium is a CD on which a computer program (i.e., a computer program product) is stored. When the computer program is executed by a processor, the voltage calibration method provided in any of the aforementioned embodiments is executed.

[0168] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.

[0169] The computer-readable storage medium provided in the above-mentioned embodiment of the present application and the voltage calibration method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.

[0170] The present application also provides a computer program product. Figure 7 The computer program product 600 carries a program code, namely a computer program 601. The instructions included in the computer program 601 can be used to execute the steps of the voltage calibration method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.

[0171] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0172] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0173] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0174] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.

[0175] It should also be noted that in the system and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0176] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the techniques of the teachings defined by the appended claims. Furthermore, the scope of the claims of this application is not limited to the specific aspects of the processes, machines, manufactures, compositions, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions, means, methods, or actions within their scope.

[0177] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0178] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A voltage calibration method, It is characterized in that include: When the power supply voltage of the voltage-dividing resistor circuit is a first voltage, obtaining a detection voltage of an analog-to-digital converter interface of the communication module, the analog-to-digital converter interface being connected to the voltage-dividing resistor circuit, and the voltage-dividing resistor circuit being used to perform voltage detection on a terminal device to which the communication module belongs; Calculating a voltage compensation value based on the detection voltage and the first voltage; When it is determined that the voltage compensation value meets the compensation requirements, the first voltage is updated to the second voltage according to the first voltage difference, and the step of obtaining the detection voltage of the analog-to-digital converter interface of the communication module is returned when the power supply voltage of the voltage divider resistor circuit is the first voltage, until it is determined that the voltage compensation value under the second voltage does not meet the compensation requirements, and the voltage compensation interval of the voltage compensation value is determined based on the second voltage.

2. The voltage calibration method according to claim 1, It is characterized in that The voltage-dividing resistor circuit includes a first resistor and a second resistor; the first resistor is configured with a first resistance value accuracy, and the second resistor is configured with a second resistance value accuracy; Get the detection voltage of the analog-to-digital converter interface of the communication module, including: Based on the first resistance value accuracy and the second resistance value accuracy, determining all resistance combinations of the first resistor and the second resistor, wherein the resistance values ​​of the first resistor and / or the second resistor in any two groups of the resistance combinations are different; Respectively obtaining the detection voltage of the analog-to-digital converter interface at each of the resistor combinations; Calculating a voltage compensation value based on the detection voltage and the first voltage includes: Calculating a difference between the detection voltage of each of the resistor combinations and the first voltage; The average of the differences corresponding to each of the resistance combinations is calculated to obtain the voltage compensation value.

3. The voltage calibration method according to claim 2, It is characterized in that Determining that the voltage compensation value meets the compensation requirement includes: When it is determined that the voltage compensation value is greater than a preset compensation threshold, a target resistance accuracy is selected from the first resistance accuracy and the second resistance accuracy, and the resistance accuracy of the resistor corresponding to the target resistance accuracy is greater than the standard accuracy of the resistor; According to the preset accuracy difference, the target resistance accuracy is reduced to a third resistance accuracy, and the step of determining all resistance combinations of the first resistor and the second resistor based on the first resistance accuracy and the second resistance accuracy is returned to execute until the voltage compensation value is less than or equal to the compensation threshold, and it is determined that the voltage compensation value meets the compensation requirement.

4. The voltage calibration method according to claim 1, It is characterized in that Determining a voltage compensation interval of the voltage compensation value based on the second voltage includes: According to the second voltage difference, the second voltage is updated to a third voltage, and the step of obtaining the detection voltage of the analog-to-digital converter interface of the communication module is returned to be executed when the power supply voltage of the voltage-dividing resistor circuit is the first voltage, until the voltage compensation value meets the compensation requirement; the second voltage difference is less than the first voltage difference, and the change direction corresponding to the second voltage difference is opposite to the change direction corresponding to the first voltage difference; In the case where there is a divided target voltage compensation interval, determining the voltage compensation interval based on a boundary voltage of the voltage compensation interval obtained by the last division of the target voltage compensation interval and the third voltage; In the case where the target voltage compensation interval does not exist, the voltage compensation interval is determined based on the boundary voltage of the power supply voltage and the third voltage.

5. The voltage calibration method according to claim 3, It is characterized in that Before determining that the voltage compensation value is greater than a preset compensation threshold, the method further includes: In the case where it is determined that the voltage compensation interval is the first voltage compensation interval of the power supply voltage of the voltage-dividing resistor circuit, determining the compensation threshold to be an error value configured by a user; When the voltage compensation interval is not the first voltage compensation interval, the compensation threshold is determined as the sum of the earliest determined voltage compensation value in the process of determining the voltage compensation interval and the compensation difference value configured by the user.

6. The voltage calibration method according to claim 1, It is characterized in that After determining the voltage compensation interval of the voltage compensation value based on the first voltage and the second voltage, the method further includes: When voltage detection is performed on a terminal device to which the communication module belongs based on the voltage-dividing resistor circuit, a target voltage compensation interval to which a current power supply voltage of the voltage-dividing resistor circuit belongs and a target voltage compensation value of the target voltage compensation interval are obtained; and a current detection voltage of an analog-to-digital converter interface of the terminal device is obtained; Calculating the current detection voltage and the target voltage compensation value to obtain an actual detection voltage of an analog-to-digital converter interface of the terminal device; Based on a comparison result of the actual detection voltage and the voltage range of the current power supply voltage, a voltage detection result of the terminal device under the current power supply voltage is obtained.

7. A voltage calibration device, It is characterized in that include: an acquisition module, configured to acquire a detection voltage of an analog-to-digital converter interface of a communication module when a power supply voltage of a voltage-dividing resistor circuit is a first voltage, the analog-to-digital converter interface being connected to the voltage-dividing resistor circuit, and the voltage-dividing resistor circuit being configured to perform voltage detection on a terminal device to which the communication module belongs; A calculation module, used for calculating a voltage compensation value based on the detection voltage and the first voltage; an updating module, configured to update the first voltage to a second voltage according to the first voltage difference when it is determined that the voltage compensation value meets the compensation requirement, and return to execute the step of acquiring the detection voltage of the analog-to-digital converter interface of the communication module when the power supply voltage of the voltage-dividing resistor circuit is the first voltage, until it is determined that the voltage compensation value under the second voltage does not meet the compensation requirement; An interval division module is used to determine a voltage compensation interval of the voltage compensation value based on the second voltage.

8. A computer device comprising a memory, a processor and a computer program stored in the memory, It is characterized in that The processor executes the computer program to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Compensation circuit, method and device of audio DAC, and storage medium

    CN114696823A

  • Power supply adjusting method and device, storage medium and image signal generator

    CN115993865A

  • Bus voltage compensation method and device of motor and terminal equipment

    CN117458939A

  • Analog / digital converter

    JP1991201826A

  • Apparatus and method for detecting voltage of an A / D converter

    US20060109157A1