Analog-to-digital converter, detection device, conversion method and adjustment method
By using a variable power supply and a lookup table in the comparison unit of the analog-to-digital converter for offset voltage compensation, the problem of accuracy degradation of the successive approximation register analog-to-digital converter in the face of offset voltage is solved, and higher quantization accuracy is achieved. and detection accuracy.
Patent Information
- Application Number
- CN202210936445.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-05
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-08-05
AI Technical Summary
When the existing successive approximation register analog-to-digital converter (SAR ADC) faces the offset voltage introduced by non-ideal factors, the quantization results are greatly affected, and the existing technology is difficult to effectively compensate, affecting the accuracy.
By setting a variable second power supply in the comparison unit of the analog-to-digital converter, and using a lookup table to obtain the compensation voltage value of each conversion bit, and sequentially comparing and outputting the conversion values, the impact of the offset voltage on the quantization result is eliminated and the quantization accuracy is improved.
It effectively improves the quantification accuracy of the analog-to-digital converter, compensates for the influence of offset voltage existing in the existing technology, improves the accuracy of the detection device, and has practical application value.
Smart Images

Figure CN115441868B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an analog-to-digital converter using a successive approximation register, and also relates to a detection device, an analog-to-digital conversion method and an adjustment method using the analog-to-digital converter, belonging to the technical field of analog circuits. Background Art
[0002] In the prior art, the working principle of an analog-to-digital converter using a successive approximation register (SAR ADC for short) is to continuously compare the analog input voltage with the reference voltage of the digital-to-analog converter. For example, during the first clock cycle, the first bit determination associated with the most significant bit (MSB) is based on whether the analog input voltage is greater than half of the reference voltage, and during the next clock cycle, the other bit determination associated with the second most significant bit (MSB-1) is based on whether the analog input voltage is greater than one quarter or three quarters of the reference voltage. The conversion process continues accordingly and the output of the DAC converges to the analog input voltage one by one, while estimating one bit during each clock cycle, thereby accurately converting the analog input voltage into a digital input voltage.
[0003] SAR ADC is widely used in various detection devices. However, due to the offset voltage introduced by non-ideal factors, the quantization result of SAR ADC is greatly affected. For this reason. In the Chinese invention patent with patent number ZL 201910834219.4, a high-precision SAR ADC structure and calibration method are disclosed, including a sampling and holding circuit, a main DAC (digital-to-analog converter), a bridge capacitance calibration module, a calibration DAC (digital-to-analog converter), a comparator, a digital calibration and logic control module; the bridge capacitance calibration module is controlled by the digital calibration and logic control module to perform bridge capacitance calibration on the main DAC; the calibration DAC is controlled by the digital calibration and logic control module to perform capacitance mismatch calibration on the main DAC. This technical solution does not require a complex calibration circuit, does not affect the normal quantization process of the SAR ADC, can be turned on for calibration at any time, does not require additional input signals during calibration, and can be widely used in capacitor array SAR ADCs. Summary of the invention
[0004] The primary technical problem to be solved by the present invention is to provide an analog-to-digital converter using a successive approximation register.
[0005] Another technical problem to be solved by the present invention is to provide a detection device, an analog-to-digital conversion method and an adjustment method using the above analog-to-digital converter.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] According to a first aspect of an embodiment of the present invention, there is provided an analog-to-digital converter using a successive approximation register, comprising at least two conversion bits, and further comprising: a sampling and holding unit, a comparison unit and a conversion unit, wherein the comparison unit comprises a first power supply and a second power supply;
[0008] In the sampling and holding stage, according to the first power supply, the signal to be converted is sampled by the sampling and holding unit to obtain a sampling signal, and the sampling signal is held in the sampling and holding unit;
[0009] In the comparison and conversion stage, according to the number of the conversion bits, the comparison unit compares the second power supply and the sampling signal one by one according to each conversion bit and outputs the comparison results one by one. According to the comparison results, the conversion unit outputs the conversion value of each conversion bit one by one to form the digital conversion value of the signal to be converted.
[0010] Preferably, the second power supply is a variable power supply, which is used to compensate for the offset voltage of the analog-to-digital converter during the comparison and conversion stages.
[0011] Preferably, the analog-to-digital converter further includes a lookup table, including each conversion bit and a corresponding compensation voltage value.
[0012] In the comparison and conversion stage, the second power supply successively obtains the compensation voltage value of each conversion bit according to the lookup table.
[0013] Preferably, the sampling and holding unit comprises a first switch, a reference power supply and a capacitor array, wherein the capacitor array comprises capacitor branches corresponding to the number of the conversion bits;
[0014] The comparison unit includes a second switch, a third switch, a comparator, the first power supply and a second power supply;
[0015] In a sampling phase, in response to the first switch, the second switch and the third switch, according to the first power supply, the signal to be converted is sampled through the capacitor array of the sampling and holding unit to obtain a sampling signal;
[0016] In a holding phase, in response to the first switch, the second switch and the reference power supply, the sampling signal is held in each capacitor branch of the sampling and holding unit;
[0017] In the comparison and conversion stage, in response to the first switch, the second switch, the third switch and the reference power supply, the second power supply obtains the corresponding compensation voltage value from the lookup table, and according to the compared conversion bit, compares the second power supply and the sampling signal stored in the corresponding capacitor branch through the comparison unit and outputs the comparison result, outputs the conversion value of the corresponding conversion bit through the conversion unit according to the comparison result, and forms the digital conversion value of the signal to be converted according to the conversion value of each conversion bit.
[0018] Preferably, the capacitor branch includes a capacitor and a fourth switch, and the capacitance values of the capacitor branches are set proportionally.
[0019] Preferably, the conversion unit is a D flip-flop.
[0020] According to a second aspect of an embodiment of the present invention, there is provided a detection device, which uses an analog-to-digital converter of the successive approximation register described above.
[0021] According to a third aspect of an embodiment of the present invention, there is provided an analog-to-digital conversion method, which is implemented by using the analog-to-digital converter of the successive approximation register, and comprises the following steps:
[0022] In the sampling and holding stage, according to the first power supply, the signal to be converted is sampled by the sampling and holding unit and the sampling signal is obtained, and the sampling signal is held in the sampling and holding unit;
[0023] In the comparison and conversion stage, according to the number of conversion bits, the comparison unit compares the second power supply and the sampling signal one by one according to each conversion bit and outputs the comparison results one by one. According to the comparison results, the conversion unit outputs the conversion value of each conversion bit one by one and forms the digital conversion value of the signal to be converted.
[0024] Preferably, the sampling and holding unit includes a first switch, a reference power supply and a capacitor array, wherein the capacitor array includes capacitor branches corresponding to the number of the conversion bits; the comparison unit includes a second switch, a third switch, a comparator, the first power supply, a second power supply and a lookup table, wherein the second power supply is a variable power supply, and the lookup table includes the conversion bits and the corresponding compensation voltage values, and the analog-to-digital conversion method further includes:
[0025] In a sampling phase, in response to the first switch, the second switch and the third switch, according to the first power supply, the signal to be converted is sampled through the capacitor array of the sampling and holding unit to obtain a sampling signal;
[0026] In a holding phase, in response to the first switch, the second switch and the reference power supply, the sampling signal is held in each capacitor branch of the sampling and holding unit;
[0027] In the comparison and conversion stage, in response to the first switch, the second switch, the third switch and the reference power supply, the second power supply obtains the corresponding compensation voltage value from the lookup table, and according to the compared conversion bit, compares the second power supply and the sampling signal stored in the corresponding capacitor branch through the comparison unit and outputs the comparison result, and outputs the conversion value of the corresponding conversion bit through the conversion unit according to the comparison result, and forms the digital conversion value of the signal to be converted according to the conversion value of each conversion bit.
[0028] According to a fourth aspect of an embodiment of the present invention, there is provided a method for adjusting an analog-to-digital converter, comprising:
[0029] Convert a preset signal to be converted by using an analog-to-digital converter of a successive approximation register and obtain a corresponding digital conversion value, wherein the digital conversion value includes a conversion value of each conversion bit;
[0030] Comparing a reference conversion value with the digital conversion value and outputting a conversion difference value, wherein the reference conversion value is an ideal conversion value of the signal to be converted, including a reference value of each conversion bit, and the conversion difference value includes a bit difference value of each conversion bit;
[0031] According to the number of the conversion bits, the compensation voltage value of each conversion bit is obtained according to the bit difference value, and a lookup table including the conversion bits and the corresponding compensation voltage values is formed.
[0032] Preferably, the step of obtaining the compensation voltage value of each conversion bit according to the bit difference value based on the number of the conversion bits further includes:
[0033] According to the bit difference value, a compensation voltage value corresponding to the conversion bit is obtained through a preset step adjustment value.
[0034] Compared with the prior art, the analog-to-digital converter using a successive approximation register provided by the present invention, by setting a first power supply for sampling and a second power supply for comparison in a comparison unit, by adjusting the variable second power supply, and by utilizing the difference between the first power supply and the second power supply to compensate for the offset voltage of the analog-to-digital converter using the successive approximation register, thereby eliminating the influence of the offset voltage on the comparison quantization result of the analog-to-digital converter, compensating for the problems existing in the prior art, effectively improving the quantization accuracy of the analog-to-digital converter, and having practical application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A block diagram of an analog-to-digital converter in one embodiment of the present invention;
[0036] Figure 2 A circuit diagram of an analog-to-digital converter in one embodiment of the present invention;
[0037] Figure 3 A flowchart of an analog-to-digital conversion method in one embodiment of the present invention;
[0038] Figure 4 A flowchart of an adjustment method in one embodiment of the present invention;
[0039] Figure 5 The present invention is another embodiment of a schematic diagram of the structure of a computer device. DETAILED DESCRIPTION
[0040] The technical content of the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0041] like Figure 1 As shown, the present invention proposes an analog-to-digital converter using a successive approximation register, comprising: a sampling and holding unit having at least two conversion bits, a comparison unit, and a conversion unit; wherein the comparison unit comprises a first power supply and a second power supply;
[0042] In the sampling and holding stage, according to the first power supply, the signal to be converted is sampled by the sampling and holding unit to obtain a sampling signal, and the sampling signal is held in the sampling and holding unit;
[0043] In the comparison and conversion stage, according to the number of the conversion bits, the comparison unit compares the second power supply and the sampling signal one by one according to each conversion bit and outputs the comparison results one by one. According to the comparison results, the conversion unit outputs the conversion value of each conversion bit one by one to form the digital conversion value of the signal to be converted.
[0044] In this embodiment, by setting a first power supply for sampling and a second power supply for comparison in a comparison unit, by adjusting the variable second power supply, and using the difference between the first power supply and the second power supply to compensate for the offset voltage of the analog-to-digital converter using a successive approximation register, the influence of the offset voltage on the comparison quantization result of the analog-to-digital converter is eliminated, the problems existing in the prior art are compensated, the quantization accuracy of the analog-to-digital converter is effectively improved, and the embodiment has practical application value.
[0045] <First Embodiment>
[0046] In a specific embodiment, Figure 2 FIG. 1 is a circuit diagram of an analog-to-digital converter using a successive approximation register according to the present embodiment, which includes a sampling and holding unit 100 , a comparing unit 200 , and a converting unit 300 .
[0047] Specifically, the sampling and holding unit 100 includes a first switch Sa, a reference power supply Vrefp and a capacitor array, wherein the capacitor array includes capacitor branches corresponding to the number of conversion bits. The first switch Sa is used to connect the signal to be converted Vin, or to connect the reference power supply Vrefp, wherein the reference power supply Vrefp is a preset fixed power supply, for example, 3.3V; this embodiment is an 8bit SAR ADC with 8 conversion bits. Correspondingly, the capacitor array has 8 capacitor branches, each capacitor branch includes a capacitor and a fourth switch, for example, the first capacitor branch includes a first capacitor and a switch S1 of the first capacitor, the second capacitor branch includes a second capacitor and a switch S2 of the second capacitor, the third capacitor branch includes a third capacitor and a switch S3 of the third capacitor, ..., and the eighth capacitor branch includes an eighth capacitor and a switch S8 of the eighth capacitor. The capacitance value of each capacitor branch decreases proportionally. For example, the capacitance value of the second capacitor is half of the capacitance value of the first capacitor, the capacitance value of the third capacitor is one quarter of the capacitance value of the first capacitor, the capacitance value of the fourth capacitor is one eighth of the capacitance value of the first capacitor, ..., the capacitance value of the eighth capacitor is one hundred and twenty-eighth of the capacitance value of the first capacitor.
[0048] The comparison unit includes a second switch Sc, a third switch Scal, a comparator CMP, the first power supply Vsmp and a second power supply Vsar, wherein:
[0049] The second switch Sc is used to connect the non-inverting terminal and the reverse terminal of the comparator CMP.
[0050] The third switch Scal is used to control the access to the first power supply Vsmp or the second power supply Vsar, the first power supply Vsmp is a power supply signal accessed by the analog-to-digital converter in the sampling phase, and the second power supply Vsar is a power supply signal accessed by the analog-to-digital converter in the comparison phase. Specifically, the second power supply Vsar is a variable power supply, which is used to compensate for the offset voltage of the analog-to-digital converter in the comparison and conversion phases. In this embodiment, the second power supply Vsar satisfies 1.62V≤Vsar≤1.68V.
[0051] In an optional embodiment, the analog-to-digital converter further includes a lookup table, the lookup table includes a compensation voltage value, the compensation voltage value may be a fixed value, for example, the same voltage value is used from the highest bit to the lowest bit, and the compensation voltage value may also be a compensation voltage value corresponding to each conversion bit. In the comparison and conversion stage, the second power supply obtains the compensation voltage value of each conversion bit according to the lookup table.
[0052] It is worth noting that the present invention does not specifically limit the compensation voltage value of the second power supply. Those skilled in the art should select an appropriate compensation voltage value according to actual application requirements to achieve compensation for the quantization error caused by the offset voltage of the analog-to-digital converter as a design criterion, which will not be repeated here.
[0053] For example, when the compensation voltage value can also be a compensation voltage value corresponding to each conversion bit, a lookup table is set in the analog-to-digital converter so that in the comparison stage, when each conversion bit is converted one by one, the second power supply obtains the corresponding voltage value from the lookup table so as to compensate for the quantization error caused by the offset voltage of the analog-to-digital converter. Specifically, when the highest bit is converted, the second power supply obtains the compensation voltage value corresponding to the highest bit from the lookup table, and compares the compensation voltage value with the sampling signal and transmits the comparison result to the conversion unit; when the second highest bit is converted, the second power supply obtains the compensation voltage value corresponding to the second highest bit from the lookup table, and compares the compensation voltage value with the sampling signal and transmits the comparison result to the conversion unit; ..., and so on, the sampled signals obtained by sampling are compared one by one and output to the conversion unit in sequence, so as to obtain the digital conversion value corresponding to the signal to be converted.
[0054] In this embodiment, the compensation voltage value is a fixed value, and in the successive approximation process, the second power supply can obtain the compensation voltage value by only one table lookup. Specifically, the comparator CMP compares the sampling signal of the second power supply input at the same direction end and the corresponding conversion bit input at the reverse direction end, and outputs the comparison result.
[0055] In this embodiment, the conversion unit is a D flip-flop, which is used to obtain an input comparison result according to a clock edge of the input clock signal CLK_ADC, and to hold the comparison result and output it at the next clock edge.
[0056] It is worth noting that this embodiment is only used to illustrate the specific implementation process of the present invention. The present invention does not specifically limit the specific devices and circuits of the sampling and holding unit, the comparison unit and the conversion unit. Those skilled in the art should select appropriate devices and circuits according to actual application requirements to realize the digital signal conversion of the signal to be converted.
[0057] The following is an example of converting the analog signal to a digital signal:
[0058] Sampling stage: the first switch Sa is connected to the signal to be converted Vin, the second switch Sc is connected to the inverting terminal of the comparator, and the third switch Scal is connected to the first power supply Vsmp. At the end of the sampling stage, the first switch Sa is open and the second switch Sc is open. The capacitor charge corresponding to the sampling stage is:
[0059] Q=2C*(Vi n-Vsmp)
[0060] In other words, in the sampling phase, the analog-to-digital converter responds to the states of the first switch Sa, the second switch Sc and the third switch Scal, samples the signal to be converted through the capacitor array of the sampling and holding unit according to the first power supply Vsmp and obtains the sampling signal.
[0061] Holding stage: the first switch Sa is connected to the reference power supply Vrefp, and the fourth switches S1 to S8 of each capacitor branch of the capacitor array are connected to the ground respectively. The capacitor charge corresponding to the holding stage is:
[0062] Q=2C*(0-Vdac)
[0063] According to the principle of charge conservation, the output voltage of the DAC (digital-to-analog converter) is:
[0064] Vdac=Vsmp-Vi n
[0065] In other words, in the holding phase, in response to the states of the first switch Sa and the second switch Sc, the sampled signal is held in each capacitor branch of the sample-and-hold unit according to the reference power supply Vrefp.
[0066] In the comparison and conversion stage, the comparison is performed in order from high to low in the conversion bit, and the offset voltage Vos introduced by the non-ideal factors of the analog-to-digital converter is considered. The third switch is connected to the second power supply Vsar, that is, the offset voltage is eliminated by the second power supply Vsar, that is, the following is satisfied:
[0067] Vsar=Vsmp-Vos
[0068] During the first approximation, the second power supply obtains the compensation voltage value Vsar from the lookup table, and the switch S1 of the first capacitor branch is connected to Vrefp. The corresponding capacitor charge is:
[0069] Q=C*(Vrefp-Vdac)+C*(0-Vdac)
[0070] According to the principle of charge conservation, the output voltage of DAC is:
[0071] Vdac=Vsmp-Vi n+(1 / 2)*Vrefp
[0072] The comparator CMP compares the voltage with Vsar to obtain a first approximation comparison output result Vout_cmp, which is the highest bit of the SAR ADC quantization output.
[0073] During the second approximation, the compensation voltage value Vsar of the second power supply remains unchanged, the switch S2 of the second capacitor branch is connected to Vrefp, and the comparison object depends on the output result of the first comparison:
[0074] If the first comparison output result Vout_cmp is high, S1 remains connected to Vrefp and S2 is connected to Vrefp. This corresponds to the second approximation stage, and the corresponding capacitor charge is:
[0075] Q=(C+C / 2)*(Vrefp-Vdac)+(C / 2)*(0-Vdac)
[0076] According to the principle of charge conservation, the output voltage of DAC is:
[0077] Vdac=Vsmp-Vi n+(3 / 4)*Vrefp
[0078] The comparator CMP compares the voltage with Vsar to obtain a second approximation comparison output result Vout_cmp, which is the second highest bit of the ADC quantization output.
[0079] If the first comparison output result Vout_cmp is low, S1 is connected to the ground, S2 is connected to Vrefp, and the compensation voltage value Vsar of the second power supply remains unchanged. At this time, it corresponds to the second approximation stage, and the corresponding capacitor charge is:
[0080] Q=(C / 2)*(Vrefp-Vdac)+(C+C / 2)*(0-Vdac)
[0081] According to the principle of charge conservation, the output voltage of DAC is:
[0082] Vdac=Vsmp-Vi n+(1 / 4)*Vrefp
[0083] The comparator CMP compares the voltage with Vsar to obtain a second approximation comparison output result Vout_cmp, which is the second highest bit of the ADC quantization output.
[0084] Similarly, when the comparison result is high, the switch state of the capacitor branch of the current bit remains unchanged, and the switch state of the capacitor branch of the next bit is connected to the reference power supply Vrefp; when the comparison result is low, the switch state of the capacitor branch of the current bit is connected to the ground, and the switch state of the capacitor branch of the next bit is connected to the reference power supply Vrefp. Approximation and comparison are performed on the remaining bits one by one, and the comparison results are sequentially used as the quantized output of each bit from MSB to LSB, and finally triggered by the clock signal CLK_ADC to output as the quantized output result of the ADC DATA_ADC<7:0>.
[0085] In other words, in the comparison and conversion stage, in response to the states of the first switch Sa, the second switch Sc, and the third switch Scal, according to the reference power supply Vrefp, the second power supply is based on the compensation voltage value Vsar obtained from the lookup table, and according to the compared conversion bit, the second power supply Vsar is compared with the sampling signal stored in the corresponding capacitor branch through the comparison unit CMP and a comparison result Vout_cmp is output. According to the comparison result Vout_cmp, the conversion value of the corresponding conversion bit is output through the conversion unit, and the digital conversion value DATA_ADC<7:0> of the signal to be converted is formed according to the conversion value of each conversion bit.
[0086] At this point, the digital signal conversion of the signal to be converted is completed.
[0087] In this embodiment, in order to eliminate the influence of the non-zero offset voltage Vos on the quantization result, in the sampling stage, Vdac is connected to the first voltage Vsmp, and in the successive approximation stage, the comparator non-inverting terminal is connected to the second voltage Vsar. When Vsar=Vsmp-Vos is satisfied, the offset voltage of the analog-to-digital converter using the successive approximation register is compensated by using the difference between the first power supply and the second power supply, thereby eliminating the influence of the offset voltage on the comparative quantization result of the analog-to-digital converter, compensating for the problems existing in the prior art, and effectively improving the quantization accuracy of the analog-to-digital converter, which has practical application value.
[0088] <Second Embodiment>
[0089] Based on the above analog-to-digital converter using a successive approximation register, another embodiment of the present invention further provides an analog-to-digital conversion method using the above analog-to-digital converter using a successive approximation register, comprising the following steps:
[0090] In the sampling and holding stage, according to the first power supply, the signal to be converted is sampled by the sampling and holding unit and the sampling signal is obtained, and the sampling signal is held in the sampling and holding unit;
[0091] In the comparison and conversion stage, according to the number of conversion bits, the comparison unit compares the second power supply and the sampling signal one by one according to each conversion bit and outputs the comparison results one by one. According to the comparison results, the conversion unit outputs the conversion value of each conversion bit one by one and forms the digital conversion value of the signal to be converted.
[0092] In this embodiment, by using a first power supply for sampling and a second power supply for comparison of an analog-to-digital converter using a successive approximation register, by adjusting the variable second power supply, the offset voltage of the analog-to-digital converter using the successive approximation register is compensated by using the difference between the first power supply and the second power supply, thereby eliminating the influence of the offset voltage on the comparative quantization result of the analog-to-digital converter, compensating for the problems existing in the prior art, effectively improving the quantization accuracy of the analog-to-digital converter, and further improving the accuracy of the detection device, which has practical application value. The specific implementation method refers to the aforementioned embodiment, which will not be repeated here.
[0093] In an optional embodiment, the sampling and holding unit includes a first switch, a reference power supply and a capacitor array, the capacitor array includes capacitor branches corresponding to the number of the conversion bits; the comparison unit includes a second switch, a third switch, a comparator, the first power supply, a second power supply and a lookup table, the second power supply is a variable power supply, the lookup table includes a compensation voltage value, and the analog-to-digital conversion method further includes:
[0094] In a sampling phase, in response to the first switch, the second switch and the third switch, according to the first power supply, the signal to be converted is sampled through the capacitor array of the sampling and holding unit to obtain a sampling signal;
[0095] In a holding phase, in response to the first switch, the second switch and the reference power supply, the sampling signal is held in each capacitor branch of the sampling and holding unit;
[0096] In the comparison and conversion stage, in response to the first switch, the second switch, the third switch and the reference power supply, the second power supply obtains a compensation voltage value from the lookup table, and according to the compared conversion bit, compares the second power supply with the sampling signal stored in the corresponding capacitor branch through the comparison unit and outputs a comparison result, and outputs a conversion value of the corresponding conversion bit through the conversion unit according to the comparison result, and forms a digital conversion value of the signal to be converted according to the conversion value of each conversion bit.
[0097] In this embodiment, by setting a lookup table in the analog-to-digital converter, the second power supply obtains a compensation voltage value, and the offset voltage is compensated, which can eliminate the influence of the offset voltage on the comparative quantization result of the analog-to-digital converter, make up for the problems existing in the prior art, effectively improve the quantization accuracy of the analog-to-digital converter, and further improve the accuracy of the detection device, which has practical application value. The specific implementation method refers to the aforementioned embodiment, which will not be repeated here.
[0098] <Third Embodiment>
[0099] Based on the above analog-to-digital converter using a successive approximation register, another embodiment of the present invention further provides a method for adjusting the above analog-to-digital converter using a successive approximation register, comprising the following steps:
[0100] Convert a preset signal to be converted by using an analog-to-digital converter of a successive approximation register and obtain a corresponding digital conversion value, wherein the digital conversion value includes a conversion value of each conversion bit;
[0101] Comparing a reference conversion value with the digital conversion value and outputting a conversion difference value, wherein the reference conversion value is an ideal conversion value of the signal to be converted, including a reference value of each conversion bit, and the conversion difference value includes a bit difference value of each conversion bit;
[0102] A compensation voltage value is obtained according to the number of the conversion bits and the bit difference value, and a lookup table is formed.
[0103] In this embodiment, the analog-to-digital converter using a successive approximation register is adjusted by a preset signal to be converted and a digital conversion value of the signal to be converted in an ideal situation, that is, a digital conversion value without the influence of the offset voltage. Specifically, the analog-to-digital converter using a successive approximation register is used to convert the preset signal to be converted. For example, if the actual output digital conversion value is 10101010, and the digital conversion value in the ideal situation is 10000000, the compensation voltage value is determined according to the difference between the actual value and the ideal value, and a lookup table is formed, so that the analog-to-digital converter can obtain the compensation voltage value of the second power supply through the lookup table in the actual application process to compensate for the influence of the offset voltage on the analog-to-digital converter, thereby improving the quantization accuracy of the analog-to-digital converter.
[0104] In an optional embodiment, acquiring the compensation voltage value according to the number of conversion bits and the bit difference value further includes: acquiring the compensation voltage value by a preset step adjustment value according to the bit difference value.
[0105] In this embodiment, by setting a step adjustment value, for example, 1.65V is used as the initial value of the second power supply and 0.5mV is used as a step value, the compensation voltage value of the second power supply is adjusted, and the digital conversion value output by the analog-to-digital converter after adjustment is verified until the digital conversion value output by the analog-to-digital converter is equal to the digital conversion value under ideal conditions, and the compensation voltage value at this time is stored in the lookup table, thereby eliminating the influence of the offset voltage on the comparative quantization result of the analog-to-digital converter, compensating for the problems existing in the prior art, and effectively improving the quantization accuracy of the analog-to-digital converter.
[0106] <Fourth Embodiment>
[0107] Another embodiment of the present invention further provides a detection device, which includes the above-mentioned analog-to-digital converter using a successive approximation register.
[0108] In this embodiment, the detection device is used to detect an analog electrical signal output by a unit to be tested, such as an analog electrical signal output by a sensor, and converts the analog electrical signal into a digital electrical signal and outputs it through an analog-to-digital converter using a successive approximation register. The detection device uses a first power supply for sampling and a second power supply for comparison in the analog-to-digital converter, and adjusts the variable second power supply, and uses the difference between the first power supply and the second power supply to compensate for the offset voltage of the analog-to-digital converter using a successive approximation register, thereby eliminating the influence of the offset voltage on the comparison quantization result of the analog-to-digital converter, compensating for the problems existing in the prior art, effectively improving the quantization accuracy of the analog-to-digital converter, and further improving the accuracy of the detection device, which has practical application value.
[0109] <Fifth Embodiment>
[0110] like Figure 5 As shown, the fifth embodiment of the present invention provides a computer device. Figure 5 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
[0111] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0112] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0113] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5not shown, usually called a "hard drive"). Although Figure 5 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0114] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0115] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 20. Figure 5 As shown, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with computer device 12, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0116] The processor unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing an analog-to-digital conversion method or an adjustment method provided by an embodiment of the present invention.
[0117] It should be noted that Figure 5 The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0118] Compared with the prior art, the analog-to-digital converter using a successive approximation register provided by the present invention, by setting a first power supply for sampling and a second power supply for comparison in a comparison unit, by adjusting the variable second power supply, and by utilizing the difference between the first power supply and the second power supply to compensate for the offset voltage of the analog-to-digital converter using the successive approximation register, thereby eliminating the influence of the offset voltage on the comparison quantization result of the analog-to-digital converter, compensating for the problems existing in the prior art, effectively improving the quantization accuracy of the analog-to-digital converter, and having practical application value.
[0119] The above is a detailed description of the analog-to-digital converter, detection device, conversion method and adjustment method provided by the present invention. For those skilled in the art, any obvious changes made to it without departing from the essence of the present invention will constitute an infringement of the patent right of the present invention and will bear corresponding legal responsibilities.
Claims
1. An analog-to-digital converter using a successive approximation register, comprising at least two conversion bits, Features The analog-to-digital converter comprises a sampling and holding unit, a comparison unit and a conversion unit, wherein the comparison unit comprises a first power supply and a second power supply; the second power supply is a variable power supply, which is used to obtain a compensation voltage value according to a lookup table in the comparison and conversion stages to compensate for the offset voltage of the analog-to-digital converter; In the sampling and holding stage, according to the first power supply, the signal to be converted is sampled by the sampling and holding unit to obtain a sampling signal, and the sampling signal is held in the sampling and holding unit; In the comparison and conversion stage, according to the number of the conversion bits, the comparison unit compares the second power supply and the sampling signal one by one according to each conversion bit and outputs the comparison results one by one. According to the comparison results, the conversion unit outputs the conversion value of each conversion bit one by one to form the digital conversion value of the signal to be converted.
2. The analog-to-digital converter according to claim 1, Features: The sampling and holding unit comprises a first switch, a reference power supply and a capacitor array, wherein the capacitor array comprises capacitor branches corresponding to the number of the conversion bits; The comparison unit includes a second switch, a third switch, a comparator, the first power supply and a second power supply; In a sampling phase, in response to the first switch, the second switch and the third switch, according to the first power supply, the signal to be converted is sampled through the capacitor array of the sampling and holding unit to obtain a sampling signal; In a holding phase, in response to the first switch, the second switch and the reference power supply, the sampling signal is held in each capacitor branch of the sampling and holding unit; In the comparison and conversion stage, in response to the first switch, the second switch, the third switch and the reference power supply, the second power supply compares the second power supply with the sampling signal stored in the corresponding capacitor branch according to the compensation voltage value obtained from the lookup table and the compared conversion bit through the comparison unit and outputs the comparison result, outputs the conversion value of the corresponding conversion bit through the conversion unit according to the comparison result, and forms the digital conversion value of the signal to be converted according to the conversion value of each conversion bit.
3. The analog-to-digital converter according to claim 2, Features: The capacitor branch includes a capacitor and a fourth switch, and the capacitance values of the capacitor branches are set proportionally; and / or the conversion unit is a D trigger.
4. A detection device, Features The analog-to-digital converter comprises any one of claims 1 to 3.
5. An analog-to-digital conversion method, implemented by using the analog-to-digital converter according to any one of claims 1 to 3, Features The steps include: In the sampling and holding stage, according to the first power supply, the signal to be converted is sampled by the sampling and holding unit and the sampling signal is obtained, and the sampling signal is held in the sampling and holding unit; In the comparison and conversion stage, according to the number of conversion bits, the comparison unit compares the second power supply and the sampling signal one by one according to each conversion bit and outputs the comparison results one by one. According to the comparison results, the conversion unit outputs the conversion value of each conversion bit one by one and forms the digital conversion value of the signal to be converted.
6. The analog-to-digital conversion method as claimed in claim 5, Features: The sampling and holding unit includes a first switch, a reference power supply and a capacitor array, wherein the capacitor array includes capacitor branches corresponding to the number of the conversion bits; the comparison unit includes a second switch, a third switch, a comparator, the first power supply, a second power supply and a lookup table, wherein the second power supply is a variable power supply, and the lookup table includes a compensation voltage value. The analog-to-digital conversion method also includes: In a sampling phase, in response to the first switch, the second switch and the third switch, according to the first power supply, the signal to be converted is sampled through the capacitor array of the sampling and holding unit to obtain a sampling signal; In a holding phase, in response to the first switch, the second switch and the reference power supply, the sampling signal is held in each capacitor branch of the sampling and holding unit; In the comparison and conversion stage, in response to the first switch, the second switch, the third switch and the reference power supply, the second power supply obtains a compensation voltage value from the lookup table, and according to the compared conversion bit, compares the second power supply with the sampling signal stored in the corresponding capacitor branch through the comparison unit and outputs a comparison result, and outputs a conversion value of the corresponding conversion bit through the conversion unit according to the comparison result, and forms a digital conversion value of the signal to be converted according to the conversion value of each conversion bit.
7. A method for adjusting the analog-to-digital converter according to any one of claims 1 to 3, Features The steps include: Converting a preset signal to be converted by using an analog-to-digital converter of a successive approximation register and obtaining a corresponding digital conversion value, wherein the digital conversion value includes a conversion value of each conversion bit; Comparing a reference conversion value with the digital conversion value and outputting a conversion difference value, wherein the reference conversion value is an ideal conversion value of the signal to be converted, including a reference value of each conversion bit, and the conversion difference value includes a bit difference value of each conversion bit; The compensation voltage value is obtained according to the number of conversion bits and the bit difference value, and a lookup table is formed.
8. The adjustment method according to claim 7, Features: The obtaining of the compensation voltage value according to the number of the conversion bits and the bit difference value further comprises: According to the potential difference value, the compensation voltage value is obtained by a preset step adjustment value.
