Offset error calibration circuit and offset error calibration method
By designing a full hardware offset error calibration circuit, using a built-in temperature sensor and comparator to automatically identify the temperature and select appropriate adjustment data for calibration, the calibration process in the prior art is solved, and the calibration process is high in time, complexity and cost, and a fast and efficient calibration effect is achieved.
Patent Information
- Application Number
- CN202411586248.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-08
Smart Images

Figure CN119135169B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field related to offset error calibration, and in particular to an offset error calibration circuit and an offset error calibration method. Background Art
[0002] In the technical fields of analog-to-digital converters, amplifiers, and sensors, accurate measurement and calibration are crucial. The performance of these devices is often affected by factors such as temperature and environment, resulting in offset errors. In order to ensure the accuracy and stability of the equipment, these errors need to be calibrated. In addition, due to different application scenarios and requirements, it may be necessary to calibrate the equipment at different temperatures.
[0003] The existing solution is to provide the temperature signal to the analog-to-digital converter in the digital signal processor through the external temperature sensor of the development board for quantization, and then the software reads the quantization value corresponding to the temperature sensor and compares it with a certain value set by the program to determine which range the current temperature is in, and then call different adjustment values through the software to eliminate the offset error. The disadvantages of this method include:
[0004] (1) It takes up software resources and is time-consuming. The more modules that need to be calibrated, the longer the software takes.
[0005] (2) For the technology of eliminating offset errors through software programs, although the offset errors caused by ambient temperature, board-level environment, etc. can be eliminated through the software self-calibration process, in actual operation, this process may be more complicated and require special hardware and software support. In addition, due to different board-level environments, the value of the temperature sensor will be different at the same temperature. If the method of external temperature sensor can be calibrated for specific equipment, it may require redesign and adjustment for other types of equipment, which increases the complexity and cost of use. Summary of the invention
[0006] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention provides an offset error calibration circuit, which can improve the calibration efficiency and reduce the complexity and cost of use.
[0007] The present invention also provides an offset error calibration method, a control device for executing the offset error calibration method, and a computer-readable storage medium.
[0008] An offset error calibration circuit according to an embodiment of a first aspect of the present invention includes:
[0009] A processing module, for generating an analog signal, a temperature detection signal and a plurality of channel control signals in response to a trimming instruction, wherein the states of the channel control signals include a valid state and an invalid state, and one of the plurality of channel control signals is in a valid state, and the rest are in an invalid state;
[0010] an analog-to-digital conversion module connected to the processing module, wherein the analog-to-digital conversion module has a plurality of different conversion channels corresponding to the plurality of channel control signals one by one, wherein the conversion channels corresponding to the channel control signals in the effective state are used to access the analog signals, and convert the analog signals to obtain conversion results before adjustment;
[0011] a temperature control signal output module, connected to the processing module, and configured to detect a current temperature value in response to the temperature detection signal, and output a plurality of temperature control signals according to the current temperature value, wherein the state of the temperature control signal includes a valid state and an invalid state, and one of the plurality of temperature control signals is in a valid state, and the rest are in an invalid state;
[0012] A trimming register module, used for storing a plurality of groups of initial trimming data, the number of the initial trimming data being the product of the number of the channel control signals and the number of the temperature control signals, the plurality of groups of the initial trimming data representing the trimming data corresponding to different conversion channels at different temperatures;
[0013] A selection module, connected to the processing module, the temperature control signal output module and the trimming register module respectively, the selection module is used to select and output target trimming data from multiple groups of initial trimming data according to the channel control signal and the temperature control signal in a valid state;
[0014] A calibration module is connected to the selection module and the analog-to-digital conversion module respectively, and is used to perform calibration according to the conversion result and the target adjustment data to obtain calibration data.
[0015] The offset error calibration circuit according to the embodiment of the present invention has at least the following beneficial effects:
[0016] First, multiple temperature control signals are set corresponding to multiple different calibration temperatures, wherein the temperature control signal corresponding to the calibration temperature of the current temperature value is in a valid state, and the rest are in an invalid state; multiple channel control signals are set corresponding to multiple different conversion channels, wherein the channel control signal corresponding to the conversion channel that needs to convert the analog signal is in a valid state, and the rest are in an invalid state. Through the selection module, the output target adjustment data can be selected from multiple groups of initial adjustment data according to the channel control signal in the valid state and the temperature control signal. The target adjustment data is the adjustment data corresponding to the conversion result output by the conversion channel that converts the analog signal at the calibration temperature corresponding to the current temperature value, and then the calibration data is obtained by calibration according to the conversion result and the target adjustment data. The offset error calibration circuit of the embodiment of the present invention is calibrated by a full hardware method, which can improve the calibration efficiency and reduce the complexity and cost of use.
[0017] According to some embodiments of the present invention, the temperature control signal output module includes:
[0018] A built-in temperature sensor for detecting the current temperature value;
[0019] A first comparator having a first input terminal, a second input terminal and a first output terminal, wherein the first input terminal is connected to the temperature sensor, the second input terminal is used to input a preset first reference voltage, and the first output terminal is used to output a first comparison result;
[0020] a second comparator having a third input terminal, a fourth input terminal and a second output terminal, wherein the third input terminal is connected to the temperature sensor, the fourth input terminal is used to input a preset second reference voltage, the second reference voltage is higher than the first reference voltage, and the second output terminal is used to output a second comparison result;
[0021] A decoding module is connected to the first output end, the second output end and the selection module respectively, and the decoding module is used to output a plurality of the temperature control signals according to the first comparison result and the second comparison result.
[0022] According to some embodiments of the present invention, the analog-to-digital conversion module includes built-in:
[0023] an analog-to-digital converter, having a conversion result output terminal, a first analog-to-digital conversion input terminal, a second analog-to-digital conversion input terminal, a third analog-to-digital conversion input terminal and a fourth analog-to-digital conversion input terminal, wherein the conversion result output terminal is connected to the calibration module, the first analog-to-digital conversion input terminal is connected to the processing module, and the second analog-to-digital conversion input terminal is connected to the temperature sensor;
[0024] A programmable gain amplifier, whose input end is connected to the processing module and whose output end is connected to the third analog-to-digital conversion input end;
[0025] an operational amplifier, whose input terminal is connected to the processing module and whose output terminal is connected to the fourth analog-to-digital conversion input terminal;
[0026] The analog-to-digital converter itself, the analog-to-digital converter and the temperature sensor, the analog-to-digital converter and the programmable gain amplifier, and the analog-to-digital converter and the operational amplifier respectively form the four conversion channels.
[0027] According to some embodiments of the present invention, the selection module comprises:
[0028] A first selector having a plurality of first selection input terminals, a plurality of first selection control terminals and a plurality of first selection output terminals, wherein the plurality of first selection input terminals are used to input a plurality of sets of the initial trimming data in a one-to-one correspondence, the plurality of first selection control terminals are used to input a plurality of the temperature control signals in a one-to-one correspondence, and the plurality of first selection output terminals are used to output a plurality of sets of the initial trimming data at a temperature corresponding to the temperature control signals in a valid state in a one-to-one correspondence;
[0029] An intermediate register module, comprising a plurality of register input terminals and a plurality of register output terminals, wherein the plurality of register input terminals are connected to the plurality of first selection output terminals in a one-to-one correspondence;
[0030] The second selector has a second selection output terminal, multiple second selection input terminals and multiple second selection control terminals. The multiple second selection input terminals are connected to the multiple registered output terminals in a one-to-one correspondence. The multiple second selection control terminals are used to input multiple channel control signals in a one-to-one correspondence. The second selection output terminal is used to output the channel control signal in a valid state and the target adjustment data corresponding to the temperature control signal.
[0031] According to some embodiments of the present invention, the calibration module comprises:
[0032] An adding circuit, comprising a first adding input terminal, a second adding input terminal and an adding output terminal, wherein the first adding input terminal is connected to the analog-to-digital conversion module, the second adding input terminal is connected to the second selection output terminal, and the adding output terminal is used to output the calibration data obtained by adding the conversion result before trimming and the target trimming data;
[0033] The adjusted result register is connected to the addition output terminal, and the adjusted result register is used to store the calibration data.
[0034] The offset error calibration method according to the second aspect of the present invention is applied to the offset error calibration circuit as described in the first aspect of the present invention. The offset error calibration method includes:
[0035] In response to the adjustment instruction, an analog signal, a temperature detection signal and a plurality of channel control signals are generated, wherein the states of the channel control signals include a valid state and an invalid state, and one of the plurality of channel control signals is in a valid state, and the rest are in an invalid state;
[0036] According to the temperature detection signal, the temperature control signal output module is controlled to detect the current temperature value, so that the temperature control signal output module outputs a plurality of temperature control signals to the selection module according to the current temperature value, wherein the state of the temperature control signal includes a valid state and an invalid state, and one of the plurality of temperature control signals is in a valid state, and the rest are in an invalid state;
[0037] Input the analog signal to the conversion channel corresponding to the channel control signal in the valid state to obtain a conversion result before adjustment, and the conversion result is used to output to the calibration module;
[0038] The plurality of channel control signals are input into the selection module, so that the selection module selects and outputs target trimming data from a plurality of groups of initial trimming data stored in the trimming register module according to the channel control signals in the effective state and the temperature control signals, thereby enabling the calibration module to perform calibration according to the conversion results and the target trimming data to obtain calibration data.
[0039] The offset error calibration method according to the embodiment of the present invention has at least the following beneficial effects:
[0040] First, multiple temperature control signals are set corresponding to multiple different calibration temperatures, wherein the temperature control signal corresponding to the calibration temperature of the current temperature value is in a valid state, and the rest are in an invalid state; multiple channel control signals are set corresponding to multiple different conversion channels, wherein the channel control signal corresponding to the conversion channel that needs to convert the analog signal is in a valid state, and the rest are in an invalid state. Through the selection module, the target adjustment data can be selected from multiple groups of initial adjustment data according to the channel control signal in the valid state and the temperature control signal. The target adjustment data is the adjustment data corresponding to the conversion result output by the conversion channel that converts the analog signal at the calibration temperature corresponding to the current temperature value, and then the calibration data is obtained by calibration according to the conversion result and the target adjustment data. The offset error calibration method of the embodiment of the present invention is calibrated by a full hardware method, which can improve the calibration efficiency and reduce the complexity and cost of use.
[0041] According to some embodiments of the present invention, the temperature control signal output module includes: a temperature sensor for detecting the current temperature value; a first comparator having a first input terminal, a second input terminal and a first output terminal, the first input terminal is connected to the temperature sensor, the second input terminal is used to input a preset first reference voltage, and the first output terminal is used to output a first comparison result; a second comparator having a third input terminal, a fourth input terminal and a second output terminal, the third input terminal is connected to the temperature sensor, the fourth input terminal is used to input a preset second reference voltage, the second reference voltage is higher than the first reference voltage, and the second output terminal is used to output a second comparison result; a decoding module, connected to the first output terminal, the second output terminal and the selection module respectively;
[0042] The states of the plurality of temperature control signals are determined by the following steps:
[0043] Obtaining the first comparison result and the second comparison result;
[0044] The states of the plurality of temperature control signals are determined according to the first comparison result and the second comparison result.
[0045] According to some embodiments of the present invention, if the current temperature value is less than the first reference voltage, the first comparison result is a first state, if the current temperature value is greater than or equal to the first reference voltage, the first comparison result is a second state, if the current temperature value is less than the second reference voltage, the second comparison result is the first state, if the current temperature value is greater than or equal to the second reference voltage, the second comparison result is the second state; the number of the temperature control signals is three, and the three temperature control signals are used to indicate low temperature, medium temperature and high temperature, respectively;
[0046] The determining the states of the plurality of temperature control signals according to the first comparison result and the second comparison result comprises:
[0047] If both the first comparison result and the second comparison result are the first state, the state of the temperature control signal indicating low temperature is set to a valid state, and the states of the two temperature control signals indicating medium and high temperatures are set to an invalid state;
[0048] If the first comparison result is the second state and the second comparison result is the first state, the state of the temperature control signal indicating medium temperature is set to a valid state, and the states of the two temperature control signals indicating low temperature and high temperature are set to an invalid state;
[0049] If both the first comparison result and the second comparison result are the second state, the state of the temperature control signal indicating high temperature is set to a valid state, and the states of the two temperature control signals indicating low temperature and medium temperature are set to an invalid state.
[0050] According to some embodiments of the present invention, the selection module includes: a first selector, having a plurality of first selection input terminals, a plurality of first selection control terminals and a plurality of first selection output terminals, the plurality of first selection input terminals are used to input a plurality of groups of the initial adjustment data in a one-to-one correspondence, and the plurality of first selection control terminals are used to input a plurality of the temperature control signals in a one-to-one correspondence; an intermediate register module, having a plurality of register input terminals and a plurality of register output terminals, the plurality of the register input terminals are connected to the plurality of the first selection output terminals in a one-to-one correspondence; a second selector, having a second selection output terminal, a plurality of second selection input terminals and a plurality of second selection control terminals, the plurality of the second selection input terminals are connected to the plurality of the registration output terminals in a one-to-one correspondence, the plurality of the second selection control terminals are used to input a plurality of the channel control signals in a one-to-one correspondence, and the second selection output terminal is connected to the calibration module;
[0051] The target adjustment data is obtained by the following steps:
[0052] Acquire a plurality of the temperature control signals through the first selector;
[0053] Opening a plurality of first selection input terminals corresponding to the temperature control signal in a valid state and closing a plurality of first selection input terminals corresponding to the temperature control signal in an invalid state through the first selector, so as to output a plurality of sets of the initial trimming data at the temperature corresponding to the temperature control signal in a valid state to the intermediate register module;
[0054] Acquire, by the second selector, a plurality of the channel control signals and a plurality of groups of the initial trimming data at temperatures corresponding to the temperature control signals in a valid state;
[0055] The second selector is used to open multiple second selection input terminals corresponding to the channel control signal in a valid state, and to close multiple second selection input terminals corresponding to the channel control signal in an invalid state, so as to output the temperature control signal in a valid state and the target trimming data corresponding to the channel control signal.
[0056] According to some embodiments of the present invention, the calibration data is obtained by the following steps:
[0057] Acquiring the conversion result and the target adjustment data;
[0058] The conversion result and the target trimming data are added to obtain the calibration data.
[0059] According to a third aspect of the present invention, the control device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the offset error calibration method as described in the second aspect of the present invention when executing the computer program. Since the control device adopts all the technical solutions of the offset error calibration method of the above embodiment, it at least has all the beneficial effects brought by the technical solutions of the above embodiment.
[0060] According to a computer-readable storage medium of an embodiment of a fourth aspect of the present invention, computer-executable instructions are stored, and the computer-executable instructions are used to execute the offset error calibration method as described in the embodiment of the second aspect. Since the computer-readable storage medium adopts all the technical solutions of the offset error calibration method of the above embodiment, it at least has all the beneficial effects brought by the technical solutions of the above embodiment.
[0061] Other features and advantages of the present invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0063] Figure 1 is a system block diagram of an offset error calibration circuit according to an embodiment of the present invention;
[0064] Figure 2 is a schematic diagram of a temperature control signal output module according to an embodiment of the present invention;
[0065] Figure 3 is a schematic diagram of an analog-to-digital conversion module according to an embodiment of the present invention;
[0066] Figure 4 is a flow chart of an offset error calibration method according to an embodiment of the present invention;
[0067] Figure 5 is a schematic diagram of a trimming and registering module and a selection module according to an embodiment of the present invention;
[0068] Figure 6 is a schematic diagram of a calibration module according to an embodiment of the present invention.
[0069] Reference numerals:
[0070] Processing module 100;
[0071] Analog-to-digital conversion module 200, analog-to-digital converter 210, programmable gain amplifier 220, operational amplifier 230;
[0072] A temperature control signal output module 300, a temperature sensor 310, a first comparator 320, a second comparator 330, and a decoding module 340;
[0073] Modifying and registering module 400;
[0074] A first selector 510, an intermediate register module 520, and a second selector 530;
[0075] Adding circuit 610 and adjusted result register 620 . DETAILED DESCRIPTION
[0076] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0077] In the description of the present invention, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0078] In the description of the present invention, it should be understood that descriptions involving orientation, such as orientation or positional relationship indicated as up, down, etc., are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0079] In the description of the present invention, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific content of the technical solution.
[0080] The following will be combined Figures 1 to 6 The offset error calibration circuit according to the embodiment of the present invention is described clearly and completely. Obviously, the embodiment described below is only a part of the embodiments of the present invention, but not all the embodiments.
[0081] The offset error calibration circuit according to the first embodiment of the present invention includes a processing module 100, an analog-to-digital conversion module 200, a temperature control signal output module 300, a trimming register module 400, a selection module and a calibration module.
[0082] The processing module 100 is used to generate an analog signal, a temperature detection signal and a plurality of channel control signals in response to the adjustment instruction, wherein the state of the channel control signal includes a valid state and an invalid state, and one of the plurality of channel control signals is in a valid state, and the rest are in an invalid state;
[0083] The analog-to-digital conversion module 200 is connected to the processing module 100. The analog-to-digital conversion module 200 has a plurality of different conversion channels corresponding to a plurality of channel control signals. The conversion channels corresponding to the channel control signals in the effective state are used to access the analog signals, and the conversion results before adjustment are obtained by converting the analog signals.
[0084] A temperature control signal output module 300 is connected to the processing module 100. The temperature control signal output module 300 is used to detect the current temperature value in response to the temperature detection signal, and output multiple temperature control signals according to the current temperature value, wherein the state of the temperature control signal includes a valid state and an invalid state, and one of the multiple temperature control signals is in a valid state, and the rest are in an invalid state;
[0085] The trimming register module 400 is used to store multiple groups of initial trimming data, the number of which is the product of the number of channel control signals and the number of temperature control signals, and the multiple groups of initial trimming data represent the trimming data corresponding to different conversion channels at different temperatures;
[0086] A selection module, connected to the processing module 100, the temperature control signal output module 300 and the trimming register module 400, respectively, and used for selecting and outputting target trimming data from a plurality of groups of initial trimming data according to the channel control signal and the temperature control signal in the effective state;
[0087] The calibration module is connected to the selection module and the analog-to-digital conversion module 200 respectively. The calibration module is used to perform calibration according to the conversion result and the target adjustment data to obtain calibration data.
[0088] In some embodiments of the present invention, reference Figure 2 The temperature control signal output module 300 includes a temperature sensor 310 , a first comparator 320 , a second comparator 330 and a decoding module 340 .
[0089] A built-in temperature sensor 310 is used to detect the current temperature value;
[0090] The first comparator 320 has a first input terminal, a second input terminal and a first output terminal, the first input terminal is connected to the temperature sensor 310, the second input terminal is used to input a preset first reference voltage, and the first output terminal is used to output a first comparison result;
[0091] The second comparator 330 has a third input terminal, a fourth input terminal and a second output terminal, the third input terminal is connected to the temperature sensor 310, the fourth input terminal is used to input a preset second reference voltage, the second reference voltage is higher than the first reference voltage, and the second output terminal is used to output a second comparison result;
[0092] The decoding module 340 is connected to the first output end, the second output end and the selection module respectively, and is used to output a plurality of temperature control signals according to the first comparison result and the second comparison result.
[0093] In some embodiments of the present invention, the temperature calibration is a three-temperature calibration, including low temperature, medium temperature and high temperature, and the corresponding temperature control signals are temperature control signal 1, temperature control signal 2 and temperature control signal 3. The output voltage value of the temperature sensor 310 will increase with the increase of temperature. If it is necessary to apply to an environment of -40~125℃, when only the control signal of three temperatures needs to be output, the three temperature intervals can be set as: -40℃~15℃ for low temperature, 15℃~70℃ for medium temperature, and 70℃~125℃ for high temperature. If the output value of the temperature sensor 310 at 15℃ is 1V, and the output value of the temperature sensor 310 at 70℃ is 2V, then the first reference voltage can be designed to be 1V and the second reference voltage can be designed to be 2V. If the output voltage of the temperature sensor 310 is less than the reference voltage, the comparator is designed to output a low level; when the output voltage of the temperature sensor 310 is greater than or equal to the reference voltage, the comparator is designed to output a high level. In this way, when the ambient temperature is between -40℃ and 15℃, both the first comparator 320 and the second comparator 330 output a low level; when the ambient temperature is between 15℃ and 70℃, the first comparator 320 outputs a high level and the second comparator 330 outputs a low level; when the ambient temperature is between 70℃ and 125℃, both the first comparator 320 and the second comparator 330 output a high level.
[0094] The decoding module 340 outputs three temperature control signals for the first comparison result and the second comparison result through decoding logic. Specifically, the first comparator 320 and the second comparator 330 both output low level, the temperature control signal 1 is high level, and the temperature control signal 2 and the temperature control signal 3 are both low level; the first comparator 320 outputs high level, the second comparator 330 outputs low level, the temperature control signal 2 is high level, and the temperature control signal 1 and the temperature control signal 3 are both low level; the first comparator 320 and the second comparator 330 both output high level, the temperature control signal 3 is high level, and the temperature control signal 1 and the temperature control signal 2 are both low level. When the temperature control signal is low level, it indicates an invalid state, and when the temperature control signal is high level, it indicates a valid state.
[0095] It should be noted that the input signal source of the reference voltage generating circuit comes from the bandgap reference source inside the digital signal processor (the offset error calibration circuit of the embodiment of the present invention is included in the digital signal processor), and the voltage value has a temperature drift effect close to 0. Therefore, the reference voltage will not change its own voltage due to changes in ambient temperature, resulting in errors.
[0096] The embodiment of the present invention utilizes the temperature sensor 310 on the chip of the digital signal processor to collect temperature characteristics. For example, when three-temperature calibration is required, only the high temperature and low temperature reference voltages need to be set through two comparators. If calibration with higher temperature accuracy is required, more comparators and reference voltages can be designed to realize temperature partitioning. This method can realize more accurate temperature calibration. Then, the adjustment data corresponding to a certain temperature of a module to be calibrated is outputted through the comparison result of the comparator. Therefore, this process can be realized automatically without any human intervention. This method only needs to compare the analog voltage to complete the identification of the current temperature. It is realized by pure hardware and the speed is very fast. The software collects the output voltage of the external temperature sensor 310 through the analog-to-digital converter 210, and then quantizes it into a digital code. Finally, the comparison function is realized by the software to identify the current temperature (hardware + software implementation). The speed is very slow and the calibration efficiency is low.
[0097] In some embodiments of the present invention, reference Figure 3 The analog-to-digital conversion module 200 includes a built-in analog-to-digital converter 210 , a programmable gain amplifier 220 and an operational amplifier 230 .
[0098] The analog-to-digital converter 210 has a conversion result output terminal, a first analog-to-digital conversion input terminal, a second analog-to-digital conversion input terminal, a third analog-to-digital conversion input terminal and a fourth analog-to-digital conversion input terminal, the conversion result output terminal is connected to the calibration module, the first analog-to-digital conversion input terminal is connected to the processing module 100, and the second analog-to-digital conversion input terminal is connected to the temperature sensor 310;
[0099] A programmable gain amplifier 220, whose input terminal is connected to the processing module 100, and whose output terminal is connected to the third analog-to-digital conversion input terminal;
[0100] An operational amplifier 230, whose input terminal is connected to the processing module 100, and whose output terminal is connected to the fourth analog-to-digital conversion input terminal;
[0101] The analog-to-digital converter 210 itself, the analog-to-digital converter 210 and the temperature sensor 310, the analog-to-digital converter 210 and the programmable gain amplifier 220, and the analog-to-digital converter 210 and the operational amplifier 230 respectively form four conversion channels.
[0102] It is understandable that the temperature sensor 310, the programmable gain amplifier 220 (PGA) and the operational amplifier 230 (OPA) are all at the front end of the analog to digital converter 210 (ADC), and their output values are sent to the analog to digital converter 210 for sampling and quantization into digital codes. The performance of these devices is often affected by factors such as temperature and environment, resulting in offset errors. In order to ensure the accuracy and stability of the equipment, these errors need to be calibrated.
[0103] In some embodiments of the present invention, the channel control signals corresponding to the four conversion channels of the analog-to-digital converter 210 itself, the analog-to-digital converter 210 and the temperature sensor 310, the analog-to-digital converter 210 and the programmable gain amplifier 220, and the analog-to-digital converter 210 and the operational amplifier 230 are channel control signal 1, channel control signal 2, channel control signal 3, and channel control signal 4. If the conversion result of the analog-to-digital converter 210 itself needs to be calibrated, the output channel control signal 1 is high, and the channel control signal 2, channel control signal 3, and channel control signal 4 are all low. At this time, the analog signal will be connected to the input end of the analog-to-digital converter 210 itself; if the conversion result of the analog-to-digital converter 210 and the temperature sensor 310 needs to be calibrated, the output channel control signal 2 is high, and the channel control signal 1, channel control signal 3, and channel control signal 4 are all low. At this time, the analog signal will be connected to the input end of the temperature sensor 310; if the conversion result of the analog-to-digital converter 210 and the temperature sensor 310 needs to be calibrated, the output channel control signal 2 is high, and the channel control signal 1, channel control signal 3, and channel control signal 4 are all low. At this time, the analog signal will be connected to the input end of the temperature sensor 310; If the conversion results of the analog-to-digital converter 210 and the programmable gain amplifier 220 need to be calibrated, the output channel control signal 3 is high, and the channel control signals 1, 2, and 4 are all low. At this time, the analog signal is connected to the input end of the programmable gain amplifier 220; if the conversion results of the analog-to-digital converter 210 and the operational amplifier 230 need to be calibrated, the output channel control signal 4 is high, and the channel control signals 1, 2, and 3 are all low. At this time, the analog signal is connected to the input end of the operational amplifier 230. When the channel control signal is low, it indicates an invalid state, and when the channel control signal is high, it indicates a valid state.
[0104] In some embodiments of the present invention, reference Figure 1 and Figure 5The trimming register module 400 includes a low-temperature ADC+PGA trimming register, a medium-temperature ADC+PGA trimming register, a high-temperature ADC+PGA trimming register, a low-temperature ADC+OPA trimming register, a medium-temperature ADC+OPA trimming register, a high-temperature ADC+OPA trimming register, a low-temperature ADC+temperature sensor trimming register, a medium-temperature ADC+temperature sensor trimming register, a high-temperature ADC+temperature sensor trimming register, a low-temperature ADC trimming register, a medium-temperature ADC trimming register and a high-temperature ADC trimming register, which store the initial trimming data of the low-temperature ADC+PGA correspondingly. The initial adjustment data of medium temperature ADC+PGA, the initial adjustment data of high temperature ADC+PGA, the initial adjustment data of low temperature ADC+OPA, the initial adjustment data of medium temperature ADC+OPA, the initial adjustment data of high temperature ADC+OPA, the initial adjustment data of low temperature ADC+temperature sensor 310, the initial adjustment data of medium temperature ADC+temperature sensor 310, the initial adjustment data of high temperature ADC+temperature sensor 310, the initial adjustment data of low temperature ADC, the initial adjustment data of medium temperature ADC and the initial adjustment data of high temperature ADC, a total of 12 groups of 8-bit width initial adjustment data.
[0105] It should be noted that the number of sub-registers of the trim register module 400 is determined according to the number of temperature control signals and channel control signals. If the number of temperature control signals is M and the number of channel control signals is N, then the number of sub-registers is M. , the number of initial adjustment data sets is M .
[0106] In some embodiments of the present invention, reference Figure 5 The selection module includes a first selector 510 , an intermediate register module 520 and a second selector 530 .
[0107] The first selector 510 has a plurality of first selection input terminals, a plurality of first selection control terminals and a plurality of first selection output terminals, wherein the plurality of first selection input terminals are used to input a plurality of sets of initial trimming data in a one-to-one correspondence, the plurality of first selection control terminals are used to input a plurality of temperature control signals in a one-to-one correspondence, and the plurality of first selection output terminals are used to output a plurality of sets of initial trimming data at temperatures corresponding to the temperature control signals in a valid state in a one-to-one correspondence;
[0108] The intermediate register module 520 has a plurality of register input terminals and a plurality of register output terminals, and the plurality of register input terminals are connected to the plurality of first selection output terminals in a one-to-one correspondence;
[0109] The second selector 530 has a second selection output terminal, multiple second selection input terminals and multiple second selection control terminals. The multiple second selection input terminals are connected to the multiple registration output terminals in a one-to-one correspondence. The multiple second selection control terminals are used to input multiple channel control signals in a one-to-one correspondence. The second selection output terminal is used to output the channel control signal in a valid state and the target adjustment data corresponding to the temperature control signal.
[0110] like Figure 5 As shown, the intermediate register module 520 includes an ADC+PGA trimming register, an ADC+OPA trimming register, an ADC+temperature sensor trimming register and an ADC trimming register, which correspondingly store the initial trimming data of the ADC+PGA, the initial trimming data of the ADC+OPA, the initial trimming data of the ADC+temperature sensor 310 and the initial trimming data of the ADC.
[0111] In some embodiments of the present invention, reference Figure 1 and Figure 5 After the first selector 510 obtains multiple temperature control signals, it opens multiple first selection input terminals corresponding to the temperature control signals in the valid state, and closes multiple first selection input terminals corresponding to the temperature control signals in the invalid state, so as to output multiple sets of initial trimming data at the temperature corresponding to the temperature control signals in the valid state to the intermediate register module 520. Then, the second selector 530 obtains multiple channel control signals and multiple sets of initial trimming data at the temperature corresponding to the temperature control signals in the valid state, opens multiple second selection input terminals corresponding to the channel control signals in the valid state, and closes multiple second selection input terminals corresponding to the channel control signals in the invalid state, so as to output the temperature control signals in the valid state and the target trimming data corresponding to the channel control signals.
[0112] In one embodiment, if the temperature control signal 1 is at a high level, and the temperature control signal 2 and the temperature control signal 3 are at a low level, the first selector 510 outputs the four groups of initial trimming data of low temperature (i.e., the initial trimming data of low temperature ADC+PGA, the initial trimming data of low temperature ADC+OPA, the initial trimming data of low temperature ADC+temperature sensor 310, and the initial trimming data of low temperature ADC) to the intermediate register module 520; if the temperature control signal 2 is at a high level, and the temperature control signal 1 and the temperature control signal 3 are at a low level, the first selector 510 outputs the four groups of initial trimming data of medium temperature (i.e., the initial trimming data of medium temperature ADC+PGA The first selector 510 outputs the four groups of initial adjustment data of high temperature (i.e., the initial adjustment data of high temperature ADC+PGA, the initial adjustment data of high temperature ADC+OPA, the initial adjustment data of high temperature ADC+temperature sensor 310, and the initial adjustment data of high temperature ADC) to the intermediate register module 520; if the temperature control signal 3 is at a high level, the temperature control signal 1 and the temperature control signal 2 are at a low level, the first selector 510 outputs the four groups of initial adjustment data of high temperature (i.e., the initial adjustment data of high temperature ADC+PGA, the initial adjustment data of high temperature ADC+OPA, the initial adjustment data of high temperature ADC+temperature sensor 310, and the initial adjustment data of high temperature ADC) to the intermediate register module 520.
[0113] Taking the case where the temperature control signal 1 is at a high level and the temperature control signal 2 and the temperature control signal 3 are at a low level as an example, if the channel control signal 1 is at a high level and the other channel control signals are at a low level, the second selector 530 outputs the initial trimming data of the low-temperature ADC to the calibration module; if the channel control signal 2 is at a high level and the other channel control signals are at a low level, the second selector 530 outputs the initial trimming data of the low-temperature ADC+temperature sensor 310 to the calibration module; if the channel control signal 3 is at a high level and the other channel control signals are at a low level, the second selector 530 outputs the initial trimming data of the low-temperature ADC+PGA to the calibration module; if the channel control signal 4 is at a high level and the other channel control signals are at a low level, the second selector 530 outputs the initial trimming data of the low-temperature ADC+OPA to the calibration module.
[0114] The embodiment of the present invention establishes a one-to-one correspondence between the module to be calibrated (including the analog-to-digital converter 210 itself, the temperature sensor 310, the programmable gain amplifier 220 and the operational amplifier 230) and the input channel of the analog-to-digital converter 210 to obtain multiple conversion channels, and then selects and outputs the trimming data of a certain module to be calibrated through the channel control signal of the conversion channel. When the analog-to-digital converter 210 switches the input channel, the channel control signal will also change accordingly. Therefore, this process can be automatically operated without any human intervention. The embodiment of the present invention can automatically select different trimming data according to actual needs by flexibly binding the selection bit of the trimming data and the selection bit of the conversion channel, thereby improving the flexibility and efficiency of calibration.
[0115] In some embodiments of the present invention, reference Figure 6 The calibration module includes an adding circuit 610 and a trimmed result register 620 .
[0116] The adding circuit 610 has a first adding input terminal, a second adding input terminal and an adding output terminal, the first adding input terminal is connected to the analog-to-digital conversion module 200, the second adding input terminal is connected to the second selection output terminal, and the adding output terminal is used to output the calibration data after the conversion result before trimming and the target trimming data are added;
[0117] The adjusted result register 620 is connected to the addition output terminal, and the adjusted result register 620 is used to store calibration data.
[0118] The calibration data is equal to the result of adding the conversion result and the target trimming data. It should be noted that the working principle of the adding circuit 610 is a prior art known to those skilled in the art and will not be described in detail here.
[0119] The embodiment of the present invention uses a digital signal processor with a built-in temperature sensor 310, an analog-to-digital converter 210, a programmable gain amplifier 220, and an operational amplifier 230. These devices can complete the calibration of all data before leaving the factory, without the need to perform a software self-calibration process, thereby eliminating additional offset errors caused by temperature and environment, etc. In addition, the built-in temperature sensor 310 can also avoid the need for redesign and adjustment due to different device types, thereby reducing the complexity and cost of use.
[0120] It should be noted that the embodiment of the present invention is not only applicable to digital signal processors with built-in temperature sensor 310, analog-to-digital converter 210, programmable gain amplifier 220 and operational amplifier 230, but also applicable to the technology of eliminating offset errors through software programs, and has strong adaptability (complete hardware resources, and software calibration can also be selected according to needs). In addition, the embodiment of the present invention only exemplifies some amplifiers and sensors, and the output data of other amplifiers and sensors can also be calibrated, which cannot be regarded as a limitation of the present invention.
[0121] The offset error calibration circuit of the embodiment of the present invention only needs to design a programmable conversion channel to conveniently perform three-temperature calibration without complicated operations, thus greatly simplifying the operation process.
[0122] In addition, it should be noted that the data streams in the embodiments of the present invention are all expressed in the form of a bus. Taking 8 bits as an example, an 8-bit bus actually consists of 8 lines.
[0123] According to the offset error calibration circuit of the embodiment of the present invention, firstly, multiple temperature control signals are set corresponding to multiple different calibration temperatures, wherein the temperature control signal corresponding to the calibration temperature of the current temperature value is in a valid state, and the rest are in an invalid state; multiple channel control signals are set corresponding to multiple different conversion channels, wherein the channel control signal corresponding to the conversion channel that needs to convert the analog signal is in a valid state, and the rest are in an invalid state. Through the selection module, the target adjustment data can be selected from multiple groups of initial adjustment data according to the channel control signal in the valid state and the temperature control signal, and the target adjustment data is the adjustment data corresponding to the conversion result output by the conversion channel that converts the analog signal at the calibration temperature corresponding to the current temperature value, and then the calibration data is obtained by calibration according to the conversion result and the target adjustment data. The offset error calibration circuit of the embodiment of the present invention is calibrated by a full hardware method, which can improve the calibration efficiency and reduce the complexity and cost of use.
[0124] The following will be combined Figures 1 to 6 The offset error calibration method according to the embodiment of the present invention is described clearly and completely. Obviously, the embodiment described below is only a part of the embodiments of the present invention, but not all of the embodiments.
[0125] The offset error calibration method according to the second aspect of the present invention is applied to the offset error calibration circuit of the first aspect of the present invention. The offset error calibration method includes:
[0126] In response to the adjustment instruction, an analog signal, a temperature detection signal and a plurality of channel control signals are generated, wherein the states of the channel control signals include a valid state and an invalid state, one of the plurality of channel control signals is in a valid state, and the rest are in an invalid state;
[0127] According to the temperature detection signal, the temperature control signal output module 300 is controlled to detect the current temperature value, so that the temperature control signal output module 300 outputs a plurality of temperature control signals to the selection module according to the current temperature value, wherein the state of the temperature control signal includes a valid state and an invalid state, and one of the plurality of temperature control signals is in a valid state, and the rest are in an invalid state;
[0128] Input the analog signal to the conversion channel corresponding to the channel control signal in the effective state to obtain the conversion result before adjustment, and the conversion result is used to output to the calibration module;
[0129] A plurality of channel control signals are input to the selection module, so that the selection module selects and outputs target trimming data from a plurality of groups of initial trimming data stored in the trimming register module 400 according to the channel control signals in the effective state and the temperature control signals, thereby enabling the calibration module to perform calibration according to the conversion results and the target trimming data to obtain calibration data.
[0130] In some embodiments of the present invention, the temperature calibration is a three-temperature calibration, including low temperature, medium temperature and high temperature, and the corresponding temperature control signals are temperature control signal 1, temperature control signal 2 and temperature control signal 3. The output voltage value of the temperature sensor 310 will increase with the increase of temperature. If it is necessary to apply to an environment of -40~125℃, when only three-temperature control signals need to be output, the three temperature intervals can be set as: -40℃~15℃ for low temperature, 15℃~70℃ for medium temperature, and 70℃~125℃ for high temperature. If the current temperature value is in the low temperature interval, the temperature control signal 1 is in a valid state, and the other temperature control signals are in an invalid state; if the current temperature value is in the medium temperature interval, the temperature control signal 2 is in a valid state, and the other temperature control signals are in an invalid state; if the current temperature value is in the high temperature interval, the temperature control signal 3 is in a valid state, and the other temperature control signals are in an invalid state.
[0131] In some embodiments of the present invention, the channel control signals corresponding to the four conversion channels of the analog-to-digital converter 210 itself, the analog-to-digital converter 210 and the temperature sensor 310, the analog-to-digital converter 210 and the programmable gain amplifier 220, and the analog-to-digital converter 210 and the operational amplifier 230 are channel control signal 1, channel control signal 2, channel control signal 3, and channel control signal 4, respectively. If the conversion result of the analog-to-digital converter 210 itself needs to be calibrated, the output channel control signal 1 is in a valid state, and the other channel control signals are all in an invalid state. At this time, the analog signal will be connected to the input end of the analog-to-digital converter 210 itself; if the conversion result of the analog-to-digital converter 210 and the temperature sensor 310 needs to be calibrated, the output channel control signal 2 is in a valid state, and the other channel control signals are all in an invalid state. At this time, the analog signal will be connected to the input end of the temperature sensor 310; if the conversion result of the analog-to-digital converter 210 and the programmable gain amplifier 220 needs to be calibrated, the output channel control signal 3 is in a valid state, and the other channel control signals are all in an invalid state. At this time, the analog signal will be connected to the input end of the programmable gain amplifier 220; if the conversion result of the analog-to-digital converter 210 and the operational amplifier 230 needs to be calibrated, the output channel control signal 4 is in a valid state, and the other channel control signals are all in an invalid state. At this time, the analog signal will be connected to the input end of the operational amplifier 230.
[0132] The embodiment of the present invention establishes a one-to-one correspondence between the module to be calibrated (including the analog-to-digital converter 210 itself, the temperature sensor 310, the programmable gain amplifier 220 and the operational amplifier 230) and the input channel of the analog-to-digital converter 210 to obtain multiple conversion channels, and then selects and outputs the trimming data of a certain module to be calibrated through the channel control signal of the conversion channel. When the analog-to-digital converter 210 switches the input channel, the channel control signal will also change accordingly. Therefore, this process can be automatically operated without any human intervention. The embodiment of the present invention can automatically select different trimming data according to actual needs by flexibly binding the selection bit of the trimming data and the selection bit of the conversion channel, thereby improving the flexibility and efficiency of calibration.
[0133] In one embodiment, taking the case where there are M temperature control signals and N channel control signals, the adjustment register module 400 stores M Initial adjustment data, the selection module first passes the effective state temperature control signal from M N groups of initial trimming data are selected from the initial trimming data, and then a group of target trimming data is selected from the N groups of initial trimming data through a channel control signal in a valid state, thereby completing the trimming of a module to be calibrated at a certain temperature. The embodiment of the present invention is implemented by pure hardware and has high calibration efficiency.
[0134] According to the offset error calibration method of the embodiment of the present invention, firstly, multiple temperature control signals are set corresponding to multiple different calibration temperatures, wherein the temperature control signal corresponding to the calibration temperature of the current temperature value is in a valid state, and the rest are in an invalid state; multiple channel control signals are set corresponding to multiple different conversion channels, wherein the channel control signal corresponding to the conversion channel that needs to convert the analog signal is in a valid state, and the rest are in an invalid state. Through the selection module, the output target adjustment data can be selected from multiple groups of initial adjustment data according to the channel control signal in the valid state and the temperature control signal. The target adjustment data is the adjustment data corresponding to the conversion result output by the conversion channel that converts the analog signal at the calibration temperature corresponding to the current temperature value, and then the calibration data is obtained by calibration according to the conversion result and the target adjustment data. The offset error calibration method of the embodiment of the present invention is calibrated by a full hardware method, which can improve the calibration efficiency and reduce the complexity and cost of use.
[0135] In some embodiments of the present invention, reference Figure 2The temperature control signal output module 300 includes a temperature sensor 310, a first comparator 320, a second comparator 330 and a decoding module 340. The temperature sensor 310 is used to detect the current temperature value; the first comparator 320 has a first input terminal, a second input terminal and a first output terminal, the first input terminal is connected to the temperature sensor 310, the second input terminal is used to input a preset first reference voltage, and the first output terminal is used to output a first comparison result; the second comparator 330 has a third input terminal, a fourth input terminal and a second output terminal, the third input terminal is connected to the temperature sensor 310, the fourth input terminal is used to input a preset second reference voltage, the second reference voltage is higher than the first reference voltage, and the second output terminal is used to output a second comparison result; the decoding module 340 is connected to the first output terminal, the second output terminal and the selection module respectively;
[0136] The status of multiple temperature control signals is determined by the following steps:
[0137] Obtain a first comparison result and a second comparison result;
[0138] The states of the plurality of temperature control signals are determined according to the first comparison result and the second comparison result.
[0139] The first comparison result and the second comparison result can each have two states. Through the combination of the two states of the first comparison result and the second comparison result, it can be determined which range of the three temperature intervals the current temperature value is in. It is faster to determine which range of the three temperature intervals the current temperature value is in through pure hardware.
[0140] The embodiment of the present invention utilizes the temperature sensor 310 on the chip of the digital signal processor to collect temperature characteristics. For example, when three-temperature calibration is required, only the high temperature and low temperature reference voltages need to be set through two comparators. If calibration with higher temperature accuracy is required, more comparators and reference voltages can be designed to realize temperature partitioning. This method can realize more accurate temperature calibration. Then, the adjustment data corresponding to a certain temperature of a module to be calibrated is outputted through the comparison result of the comparator. Therefore, this process can be realized automatically without any human intervention. This method only needs to compare the analog voltage to complete the identification of the current temperature. It is realized by pure hardware and the speed is very fast. The software collects the output voltage of the external temperature sensor 310 through the analog-to-digital converter 210, and then quantizes it into a digital code. Finally, the comparison function is realized by the software to identify the current temperature (hardware + software implementation). The speed is very slow and the calibration efficiency is low.
[0141] In some embodiments of the present invention, reference Figure 2, if the current temperature value is less than the first reference voltage, the first comparison result is the first state, if the current temperature value is greater than or equal to the first reference voltage, the first comparison result is the second state, if the current temperature value is less than the second reference voltage, the second comparison result is the first state, if the current temperature value is greater than or equal to the second reference voltage, the second comparison result is the second state; the number of temperature control signals is three, and the three temperature control signals are used to indicate low temperature, medium temperature and high temperature respectively;
[0142] Determining states of a plurality of temperature control signals according to the first comparison result and the second comparison result includes:
[0143] If the first comparison result and the second comparison result are both in the first state, the state of the temperature control signal indicating low temperature is set to a valid state, and the states of the two temperature control signals indicating medium and high temperatures are set to an invalid state;
[0144] If the first comparison result is the second state and the second comparison result is the first state, the state of the temperature control signal indicating the medium temperature is set to the valid state, and the states of the two temperature control signals indicating the low temperature and the high temperature are set to the invalid state;
[0145] If both the first comparison result and the second comparison result are in the second state, the state of the temperature control signal indicating high temperature is set to a valid state, and the states of the two temperature control signals indicating low temperature and medium temperature are set to an invalid state.
[0146] It can be understood that the first state is a low level and the second state is a high level.
[0147] In some embodiments of the present invention, if the output value of the temperature sensor 310 is 1V at 15°C and the output value of the temperature sensor 310 is 2V at 70°C, then the first reference voltage can be designed to be 1V and the second reference voltage can be designed to be 2V. If the output voltage of the temperature sensor 310 is less than the reference voltage, the comparator is designed to output a low level; when the output voltage of the temperature sensor 310 is greater than or equal to the reference voltage, the comparator is designed to output a high level. In this way, when the ambient temperature is between -40°C and 15°C, both the first comparator 320 and the second comparator 330 output a low level; when the ambient temperature is between 15°C and 70°C, the first comparator 320 outputs a high level and the second comparator 330 outputs a low level; when the ambient temperature is between 70°C and 125°C, both the first comparator 320 and the second comparator 330 output a high level.
[0148] Specifically, the first comparison result and the second comparison result are both low levels, the temperature control signal 1 is high level, and the other temperature control signals are all low levels; the first comparison result is high level, the second comparison result is low level, the temperature control signal 2 is high level, and the other temperature control signals are all low levels; the first comparison result and the second comparison result are both high levels, the temperature control signal 3 is high level, and the other temperature control signals are all low levels. When the temperature control signal is low level, it indicates an invalid state, and when the temperature control signal is high level, it indicates a valid state.
[0149] It should be noted that the first state may also be set to a high level and the second state to a low level, which cannot be regarded as a limitation of the present invention.
[0150] In some embodiments of the present invention, reference Figure 5 The selection module includes a first selector 510, an intermediate register module 520 and a second selector 530. The first selector 510 has a plurality of first selection input terminals, a plurality of first selection control terminals and a plurality of first selection output terminals. The plurality of first selection input terminals are used to input a plurality of groups of initial adjustment data in a one-to-one correspondence, and the plurality of first selection control terminals are used to input a plurality of temperature control signals in a one-to-one correspondence; the intermediate register module 520 has a plurality of register input terminals and a plurality of register output terminals. The plurality of register input terminals are connected to the plurality of first selection output terminals in a one-to-one correspondence; the second selector 530 has a second selection output terminal, a plurality of second selection input terminals and a plurality of second selection control terminals. The plurality of second selection input terminals are connected to the plurality of registration output terminals in a one-to-one correspondence. The plurality of second selection control terminals are used to input a plurality of channel control signals in a one-to-one correspondence, and the second selection output terminal is connected to the calibration module;
[0151] The target adjustment data is obtained through the following steps:
[0152] Acquire multiple temperature control signals through the first selector 510;
[0153] The first selector 510 opens a plurality of first selection input terminals corresponding to the temperature control signal in the effective state, and closes a plurality of first selection input terminals corresponding to the temperature control signal in the invalid state, so as to output a plurality of sets of initial trimming data at the temperature corresponding to the temperature control signal in the effective state to the intermediate register module 520;
[0154] Acquire multiple groups of initial trimming data at temperatures corresponding to multiple channel control signals and temperature control signals in effective states through a second selector 530;
[0155] The second selector 530 opens multiple second selection input terminals corresponding to the channel control signals in the valid state and closes multiple second selection input terminals corresponding to the channel control signals in the invalid state to output the temperature control signals in the valid state and the target adjustment data corresponding to the channel control signals.
[0156] In one embodiment, if the temperature control signal 1 is in a valid state and the other temperature control signals are in an invalid state, the first selector 510 outputs the four groups of initial trimming data of low temperature (i.e., the initial trimming data of low temperature ADC+PGA, the initial trimming data of low temperature ADC+OPA, the initial trimming data of low temperature ADC+temperature sensor 310, and the initial trimming data of low temperature ADC) to the intermediate register module 520; if the temperature control signal 2 is in a valid state and the other temperature control signals are in an invalid state, the first selector 510 outputs the four groups of initial trimming data of medium temperature (i.e., the initial trimming data of medium temperature ADC+PGA, the initial trimming data of low temperature ADC+OPA, the initial trimming data of low temperature ADC+temperature sensor 310, and the initial trimming data of low temperature ADC) to the intermediate register module 520. The first selector 510 outputs the four groups of high-temperature initial trimming data (i.e., the initial trimming data of the high-temperature ADC+PGA, the initial trimming data of the high-temperature ADC+OPA, the initial trimming data of the high-temperature ADC+temperature sensor 310, and the initial trimming data of the high-temperature ADC) to the intermediate register module 520; if the temperature control signal 3 is in a valid state and the other temperature control signals are all in an invalid state, the first selector 510 outputs the four groups of high-temperature initial trimming data (i.e., the initial trimming data of the high-temperature ADC+PGA, the initial trimming data of the high-temperature ADC+OPA, the initial trimming data of the high-temperature ADC+temperature sensor 310, and the initial trimming data of the high-temperature ADC) to the intermediate register module 520.
[0157] Taking the case where temperature control signal 1 is in a valid state and the other temperature control signals are in an invalid state as an example, if channel control signal 1 is in a valid state and the other channel control signals are in an invalid state, the second selector 530 outputs the initial trimming data of the low-temperature ADC to the calibration module; if channel control signal 2 is in a valid state and the other channel control signals are in an invalid state, the second selector 530 outputs the initial trimming data of the low-temperature ADC+temperature sensor 310 to the calibration module; if channel control signal 3 is in a valid state and the other channel control signals are in an invalid state, the second selector 530 outputs the initial trimming data of the low-temperature ADC+PGA to the calibration module; if channel control signal 4 is in a valid state and the other channel control signals are in an invalid state, the second selector 530 outputs the initial trimming data of the low-temperature ADC+OPA to the calibration module.
[0158] In some embodiments of the present invention, reference Figure 6 , the calibration data is obtained by the following steps:
[0159] Get conversion results and target adjustment data;
[0160] Add the conversion result and the target trim data to obtain the calibration data.
[0161] It should be noted that the working principle of the adding circuit 610 is a prior art known to those skilled in the art and will not be described in detail here.
[0162] In addition, an embodiment of the present invention further provides a control device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor and the memory may be connected via a bus or other means.
[0163] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0164] The non-transient software program and instructions required to implement the offset error calibration method of the above embodiment are stored in the memory, and when executed by the processor, the offset error calibration method of the above embodiment is executed.
[0165] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0166] In addition, an embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are executed by a processor or controller, for example, by the processor of the above embodiment, so that the above processor can execute the offset error calibration method in the above embodiment.
[0167] It will be appreciated by those skilled in the art that all or some of the steps and systems in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0168] The embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the relevant technical field without departing from the purpose of the present invention.
Claims
1. An offset error calibration circuit, characterized in that: include: A processing module, for generating an analog signal, a temperature detection signal and a plurality of channel control signals in response to a trimming instruction, wherein the states of the channel control signals include a valid state and an invalid state, and one of the plurality of channel control signals is in a valid state, and the rest are in an invalid state; an analog-to-digital conversion module connected to the processing module, wherein the analog-to-digital conversion module has a plurality of different conversion channels corresponding to the plurality of channel control signals one by one, wherein the conversion channels corresponding to the channel control signals in the effective state are used to access the analog signals, and convert the analog signals to obtain conversion results before adjustment; a temperature control signal output module, connected to the processing module, and configured to detect a current temperature value in response to the temperature detection signal, and output a plurality of temperature control signals according to the current temperature value, wherein the state of the temperature control signal includes a valid state and an invalid state, and one of the plurality of temperature control signals is in a valid state, and the rest are in an invalid state; A trimming register module, used for storing a plurality of groups of initial trimming data, the number of the initial trimming data being the product of the number of the channel control signals and the number of the temperature control signals, the plurality of groups of the initial trimming data representing the trimming data corresponding to different conversion channels at different temperatures; A selection module, connected to the processing module, the temperature control signal output module and the trimming register module respectively, the selection module is used to select and output target trimming data from multiple groups of initial trimming data according to the channel control signal and the temperature control signal in a valid state; A calibration module, connected to the selection module and the analog-to-digital conversion module, respectively, and configured to perform calibration according to the conversion result and the target adjustment data to obtain calibration data; The temperature control signal output module includes a built-in temperature sensor, a first comparator, a second comparator and a decoding module. The temperature sensor is used to detect the current temperature value. The first comparator has a first input terminal, a second input terminal and a first output terminal. The first input terminal is connected to the temperature sensor. The second input terminal is used to input a preset first reference voltage. The first output terminal is used to output a first comparison result. The second comparator has a third input terminal, a fourth input terminal and a second output terminal. The third input terminal is connected to the temperature sensor. The fourth input terminal is used to input a preset second reference voltage. The second reference voltage is higher than the first reference voltage. The second output terminal is used to output a second comparison result. The decoding module is connected to the first output terminal, the second output terminal and the selection module respectively. The decoding module is used to output multiple temperature control signals according to the first comparison result and the second comparison result.
2. The offset error calibration circuit according to claim 1, characterized in that: The analog-to-digital conversion module includes built-in: an analog-to-digital converter, having a conversion result output terminal, a first analog-to-digital conversion input terminal, a second analog-to-digital conversion input terminal, a third analog-to-digital conversion input terminal and a fourth analog-to-digital conversion input terminal, wherein the conversion result output terminal is connected to the calibration module, the first analog-to-digital conversion input terminal is connected to the processing module, and the second analog-to-digital conversion input terminal is connected to the temperature sensor; A programmable gain amplifier, whose input end is connected to the processing module and whose output end is connected to the third analog-to-digital conversion input end; an operational amplifier, whose input terminal is connected to the processing module and whose output terminal is connected to the fourth analog-to-digital conversion input terminal; The analog-to-digital converter itself, the analog-to-digital converter and the temperature sensor, the analog-to-digital converter and the programmable gain amplifier, and the analog-to-digital converter and the operational amplifier respectively form the four conversion channels.
3. The offset error calibration circuit according to claim 1, characterized in that: The selection module comprises: A first selector having a plurality of first selection input terminals, a plurality of first selection control terminals and a plurality of first selection output terminals, wherein the plurality of first selection input terminals are used to input a plurality of sets of the initial trimming data in a one-to-one correspondence, the plurality of first selection control terminals are used to input a plurality of the temperature control signals in a one-to-one correspondence, and the plurality of first selection output terminals are used to output a plurality of sets of the initial trimming data at a temperature corresponding to the temperature control signals in a valid state in a one-to-one correspondence; An intermediate register module, comprising a plurality of register input terminals and a plurality of register output terminals, wherein the plurality of register input terminals are connected to the plurality of first selection output terminals in a one-to-one correspondence; The second selector has a second selection output terminal, multiple second selection input terminals and multiple second selection control terminals. The multiple second selection input terminals are connected to the multiple registered output terminals in a one-to-one correspondence. The multiple second selection control terminals are used to input multiple channel control signals in a one-to-one correspondence. The second selection output terminal is used to output the channel control signal in a valid state and the target adjustment data corresponding to the temperature control signal.
4. The offset error calibration circuit according to claim 3, characterized in that: The calibration module comprises: An adding circuit, comprising a first adding input terminal, a second adding input terminal and an adding output terminal, wherein the first adding input terminal is connected to the analog-to-digital conversion module, the second adding input terminal is connected to the second selection output terminal, and the adding output terminal is used to output the calibration data obtained by adding the conversion result before trimming and the target trimming data; The adjusted result register is connected to the addition output terminal, and the adjusted result register is used to store the calibration data.
5. A method for calibrating an offset error, characterized in that: Applied to the offset error calibration circuit as claimed in any one of claims 1 to 4, the offset error calibration method comprises: In response to the adjustment instruction, an analog signal, a temperature detection signal and a plurality of channel control signals are generated, wherein the states of the channel control signals include a valid state and an invalid state, and one of the plurality of channel control signals is in a valid state, and the rest are in an invalid state; According to the temperature detection signal, the temperature control signal output module is controlled to detect the current temperature value, so that the temperature control signal output module outputs a plurality of temperature control signals to the selection module according to the current temperature value, wherein the state of the temperature control signal includes a valid state and an invalid state, and one of the plurality of temperature control signals is in a valid state, and the rest are in an invalid state; Input the analog signal to the conversion channel corresponding to the channel control signal in the valid state to obtain a conversion result before adjustment, and the conversion result is used to output to the calibration module; The plurality of channel control signals are input into the selection module, so that the selection module selects and outputs target trimming data from a plurality of groups of initial trimming data stored in the trimming register module according to the channel control signals in the effective state and the temperature control signals, thereby enabling the calibration module to perform calibration according to the conversion results and the target trimming data to obtain calibration data.
6. The offset error calibration method according to claim 5, characterized in that: The temperature control signal output module includes: a temperature sensor for detecting the current temperature value; a first comparator having a first input terminal, a second input terminal and a first output terminal, the first input terminal is connected to the temperature sensor, the second input terminal is used to input a preset first reference voltage, and the first output terminal is used to output a first comparison result; a second comparator having a third input terminal, a fourth input terminal and a second output terminal, the third input terminal is connected to the temperature sensor, the fourth input terminal is used to input a preset second reference voltage, the second reference voltage is higher than the first reference voltage, and the second output terminal is used to output a second comparison result; a decoding module, connected to the first output terminal, the second output terminal and the selection module respectively; The states of the plurality of temperature control signals are determined by the following steps: Obtaining the first comparison result and the second comparison result; The states of the plurality of temperature control signals are determined according to the first comparison result and the second comparison result.
7. The offset error calibration method according to claim 6, characterized in that: If the current temperature value is less than the first reference voltage, the first comparison result is a first state; if the current temperature value is greater than or equal to the first reference voltage, the first comparison result is a second state; if the current temperature value is less than the second reference voltage, the second comparison result is the first state; if the current temperature value is greater than or equal to the second reference voltage, the second comparison result is the second state; The number of the temperature control signals is three, and the three temperature control signals are used to indicate low temperature, medium temperature and high temperature respectively; The determining the states of the plurality of temperature control signals according to the first comparison result and the second comparison result comprises: If both the first comparison result and the second comparison result are the first state, the state of the temperature control signal indicating low temperature is set to a valid state, and the states of the two temperature control signals indicating medium and high temperatures are set to an invalid state; If the first comparison result is the second state and the second comparison result is the first state, the state of the temperature control signal indicating medium temperature is set to a valid state, and the states of the two temperature control signals indicating low temperature and high temperature are set to an invalid state; If both the first comparison result and the second comparison result are the second state, the state of the temperature control signal indicating high temperature is set to a valid state, and the states of the two temperature control signals indicating low temperature and medium temperature are set to an invalid state.
8. The offset error calibration method according to claim 5, characterized in that: The selection module includes: a first selector, having a plurality of first selection input terminals, a plurality of first selection control terminals and a plurality of first selection output terminals, wherein the plurality of first selection input terminals are used to input a plurality of groups of the initial adjustment data in a one-to-one correspondence, and the plurality of first selection control terminals are used to input a plurality of the temperature control signals in a one-to-one correspondence; an intermediate register module, having a plurality of register input terminals and a plurality of register output terminals, wherein the plurality of the register input terminals are connected to the plurality of the first selection output terminals in a one-to-one correspondence; a second selector, having a second selection output terminal, a plurality of second selection input terminals and a plurality of second selection control terminals, wherein the plurality of the second selection input terminals are connected to the plurality of the registration output terminals in a one-to-one correspondence, and the plurality of the second selection control terminals are used to input a plurality of the channel control signals in a one-to-one correspondence, and the second selection output terminal is connected to the calibration module; The target adjustment data is obtained by the following steps: Acquire a plurality of the temperature control signals through the first selector; Opening a plurality of first selection input terminals corresponding to the temperature control signal in a valid state and closing a plurality of first selection input terminals corresponding to the temperature control signal in an invalid state through the first selector, so as to output a plurality of sets of the initial trimming data at the temperature corresponding to the temperature control signal in a valid state to the intermediate register module; Acquire, by the second selector, a plurality of the channel control signals and a plurality of groups of the initial trimming data at temperatures corresponding to the temperature control signals in a valid state; The second selector is used to open multiple second selection input terminals corresponding to the channel control signal in a valid state, and to close multiple second selection input terminals corresponding to the channel control signal in an invalid state, so as to output the temperature control signal in a valid state and the target trimming data corresponding to the channel control signal.
9. The offset error calibration method according to claim 5, characterized in that: The calibration data is obtained by the following steps: Acquiring the conversion result and the target adjustment data; The conversion result and the target trimming data are added to obtain the calibration data.
Citation Information
Patent Citations
Multi-channel ADC trimming and calibrating system and method
CN113098513A
ADC correction circuit
CN115361018A
Pipeline analog-to-digital converter correction circuit, analog-to-digital conversion circuit and method
CN115642914A