CN113341232B - High-precision capacitance detection method and detection circuit with self-adaptive measuring range - Google Patents
High-precision capacitance detection method and detection circuit with self-adaptive measuring range Download PDFInfo
- Publication number
- CN113341232B CN113341232B CN202110598932.0A CN202110598932A CN113341232B CN 113341232 B CN113341232 B CN 113341232B CN 202110598932 A CN202110598932 A CN 202110598932A CN 113341232 B CN113341232 B CN 113341232B
- Authority
- CN
- China
- Prior art keywords
- signal
- capacitor
- circuit
- range
- frequency division
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 76
- 239000003990 capacitor Substances 0.000 claims abstract description 106
- 238000013139 quantization Methods 0.000 claims abstract description 94
- 238000005259 measurement Methods 0.000 claims abstract description 22
- 230000000737 periodic effect Effects 0.000 claims abstract description 10
- 230000000630 rising effect Effects 0.000 claims description 37
- 238000000034 method Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 7
- 238000007599 discharging Methods 0.000 claims description 5
- 230000003044 adaptive effect Effects 0.000 claims description 3
- 230000010354 integration Effects 0.000 abstract description 5
- 238000011002 quantification Methods 0.000 abstract description 2
- 238000012360 testing method Methods 0.000 description 26
- 238000004088 simulation Methods 0.000 description 9
- 238000004422 calculation algorithm Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000007423 decrease Effects 0.000 description 3
- 230000003247 decreasing effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010339 medical test Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R27/00—Arrangements for measuring resistance, reactance, impedance, or electric characteristics derived therefrom
- G01R27/02—Measuring real or complex resistance, reactance, impedance, or other two-pole characteristics derived therefrom, e.g. time constant
- G01R27/26—Measuring inductance or capacitance; Measuring quality factor, e.g. by using the resonance method; Measuring loss factor; Measuring dielectric constants ; Measuring impedance or related variables
- G01R27/2605—Measuring capacitance
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Measurement Of Resistance Or Impedance (AREA)
Abstract
Description
技术领域technical field
本发明属于传感技术领域,涉及一种量程自适应的高精度电容检测方法及检测电路。The invention belongs to the field of sensor technology, and relates to a range-adaptive high-precision capacitance detection method and a detection circuit.
背景技术Background technique
近年来,随着互联网和半导体产业的不断发展,世界已经逐步迈向了万物互联的物联网时代,到2018年,物联网已经从工业界走出,被推广至家电、医疗、运输以及物流等各个领域。而飞法级电容型传感器作为最关键的支撑技术之一,得到了市场需求的大力驱动。电容传感器是将待测物理量转换成电容量变化的一种转换装置。由于其具有结构简单、灵敏度高等优点,已经被广泛应用于多种领域中,比如应用于压力检测的电容式压力传感器、应用于生物识别的电容型指纹传感器以及应用于医疗检测的电容型加速度计等。In recent years, with the continuous development of the Internet and the semiconductor industry, the world has gradually entered the era of the Internet of Things, where everything is interconnected. By 2018, the Internet of Things has gone out of the industrial world and has been extended to various fields such as home appliances, medical care, transportation, and logistics. field. Femtofarad capacitive sensors, as one of the most critical supporting technologies, have been strongly driven by market demand. A capacitive sensor is a conversion device that converts the physical quantity to be measured into a change in capacitance. Due to its simple structure and high sensitivity, it has been widely used in various fields, such as capacitive pressure sensors for pressure detection, capacitive fingerprint sensors for biometric identification, and capacitive accelerometers for medical testing. wait.
传统的电容检测方式主要有频率式、开关电容式、电阻放电式等检测方法。对于频率式检测方法,其检测精度无法达到飞法级。对于开关电容式检测法,其在对电容进行量化时首先要完成电容向电压的转换,再利用ADC完成电压像数字信号转化;但是开关电容电路的精度以及噪声等问题限制了待测电容的分辨率。电阻放电式电路一般是先对电容进行充电,最后通过片外的精确电阻进行放电,再对放电时间进行量化。虽然该电路可以达到较高的精度,但是由于电容通过电阻进行放电是指数波形,在量化时需要先对该信号进行线性化处理,由此带来的算法较为复杂,相应的量化速率以及量化电路的集成度也较低,且该量化方式对时间测量电路的精度要求较高。上述电路本身的缺点限制了高精度电容式传感器的进一步发展。此外,上述电路大多存在量程与量化精度之间相互制约的关系,在同等量化精度下,其测量范围也基本是固定的。一旦待测电容超出本身预设的量程,上述几种测量电路就无法完成测量或者需要降低量化精度来完成测量。Traditional capacitance detection methods mainly include detection methods such as frequency type, switched capacitor type, and resistance discharge type. For the frequency detection method, its detection accuracy cannot reach the femtomethod level. For the switched capacitor detection method, when quantifying the capacitance, it must first complete the conversion of the capacitance to the voltage, and then use the ADC to complete the conversion of the voltage into a digital signal; however, the accuracy and noise of the switched capacitor circuit limit the resolution of the measured capacitance. Rate. Resistive discharge circuits generally charge the capacitor first, and finally discharge through an off-chip precise resistor, and then quantify the discharge time. Although the circuit can achieve high precision, since the discharge of the capacitor through the resistance is an exponential waveform, the signal needs to be linearized before quantization, and the resulting algorithm is more complicated, and the corresponding quantization rate and quantization circuit The integration level is also low, and this quantization method has higher requirements on the accuracy of the time measurement circuit. The shortcomings of the above circuit itself limit the further development of high-precision capacitive sensors. In addition, most of the above-mentioned circuits have a mutual restrictive relationship between the range and the quantization accuracy. Under the same quantization accuracy, the measurement range is basically fixed. Once the capacitance to be measured exceeds its preset range, the above-mentioned measurement circuits cannot complete the measurement or need to reduce the quantization accuracy to complete the measurement.
发明内容Contents of the invention
为了解决上述问题,本发明实施例提供一种量程自适应的高精度电容检测电路,具有全集成、高精度、高线性度的特点,同时兼顾了电容量化电路测量量程与测量精度,解决了现有技术存在的问题。In order to solve the above problems, the embodiment of the present invention provides a range-adaptive high-precision capacitance detection circuit, which has the characteristics of full integration, high precision, and high linearity, and at the same time takes into account the measurement range and measurement accuracy of the capacitance quantization circuit. There are technical problems.
本发明实施例的另一目的是,提供一种量程自适应的高精度电容检测方法。Another object of the embodiments of the present invention is to provide a high-precision capacitance detection method with adaptive range.
本发明所采用的技术方案是,一种量程自适应的高精度电容检测电路,包括电容检测电路、控制电路、量程检测电路以及量化电路;The technical solution adopted in the present invention is a range-adaptive high-precision capacitance detection circuit, including a capacitance detection circuit, a control circuit, a range detection circuit and a quantization circuit;
所述电容检测电路,用于通过基准电流源在一定电压范围内的恒流特性产生与待测电容的电容值相关的电压信号,即信号S2;The capacitance detection circuit is used to generate a voltage signal related to the capacitance value of the capacitance to be measured through the constant current characteristic of the reference current source within a certain voltage range, that is, the signal S2;
所述控制电路,用于产生时钟信号,即信号S5,通过时钟信号的分频结果S1控制待测电容周期性充放电,将电容检测电路输出的电压信号转变为电平信号,即信号S3;根据信号S3为量化电路提供开始量化和结束量化信号;The control circuit is used to generate a clock signal, that is, signal S5, and control the periodic charge and discharge of the capacitor to be tested through the frequency division result S1 of the clock signal, and convert the voltage signal output by the capacitance detection circuit into a level signal, that is, signal S3; According to the signal S3, the quantization circuit is provided with a start quantization and an end quantization signal;
所述量程检测电路,用于检测控制电路输出的信号S3和分频结果S1,分频结果S1下降沿来临时判断信号S3是否为高电平,若为高电平,使用当前量程对待测电容进行量化;若信号S3为低电平,表明待测电容超出了预设量程,对量程检测电路当前的输出信号S6进行移位寄存后输出,输出的信号S6发送至分频器的IN1端,调整分频器的分频比,增加电路的量程以完成待测电容的测量;The range detection circuit is used to detect the signal S3 and the frequency division result S1 output by the control circuit, and judge whether the signal S3 is at a high level when the falling edge of the frequency division result S1 comes, and if it is a high level, use the current range to measure the capacitance Quantification; if the signal S3 is low level, it indicates that the capacitance to be measured exceeds the preset range, and the current output signal S6 of the range detection circuit is shifted and registered for output, and the output signal S6 is sent to the IN1 terminal of the frequency divider. Adjust the frequency division ratio of the frequency divider and increase the range of the circuit to complete the measurement of the capacitance under test;
所述量化电路,用于根据公式确定待测电容的电容值,其中,C表示待测电容的电容值,I表示基准电流源产生的放电电流,ΔV表示待测电容的放电电压,Δt表示电容放电所经历的时间;基于时间域进行电容量化并输出量化结果。The quantization circuit is used according to the formula Determine the capacitance value of the capacitor to be tested, where C represents the capacitance value of the capacitor to be measured, I represents the discharge current generated by the reference current source, ΔV represents the discharge voltage of the capacitor to be measured, and Δt represents the time elapsed for the capacitor to discharge; based on the time domain Carry out capacitance quantization and output the quantization result.
进一步的,所述电容检测电路包括电源VDD、二选一选择器、PMOS管以及基准电流源;Further, the capacitance detection circuit includes a power supply VDD, a selector, a PMOS transistor, and a reference current source;
所述电源VDD,用于为待测电容充电,电源VDD接于待测电容的两端,待测电容连接电源VDD负极的一端接地;The power supply VDD is used to charge the capacitor to be tested, the power supply VDD is connected to both ends of the capacitor to be tested, and one end of the capacitor to be tested connected to the negative pole of the power supply VDD is grounded;
所述PMOS管,用于根据分频结果S1控制待测电容周期性充放电;PMOS管连接于待测电容与电源VDD的连接回路上,分频结果S1输入至PMOS管的栅端以控制PMOS管的开启与关断;The PMOS tube is used to control the periodic charge and discharge of the capacitor under test according to the frequency division result S1; the PMOS tube is connected to the connection circuit between the capacitor under test and the power supply VDD, and the frequency division result S1 is input to the gate terminal of the PMOS tube to control the PMOS tube tube opening and closing;
所述二选一选择器,用于根据分频结果S1决定将基准电流源接至电源VDD或将基准电流源接至待测电容;分频结果S1输入至二选一选择器的输入端,二选一选择器的输出端输出电压信号S2。The one-of-two selector is used to decide to connect the reference current source to the power supply VDD or to connect the reference current source to the capacitor to be measured according to the frequency division result S1; the frequency division result S1 is input to the input terminal of the one-two selector, The output terminal of the one-of-two selector outputs a voltage signal S2.
进一步的,所述分频结果S1是一个周期性的方波,分频结果S1的高、低电平的时间由系统时钟信号S5和分频比决定。Further, the frequency division result S1 is a periodic square wave, and the high and low levels of the frequency division result S1 are determined by the system clock signal S5 and the frequency division ratio.
进一步的,所述控制电路包括时钟产生电路、比较器、上升沿检测器、分频器及基准电压源;Further, the control circuit includes a clock generation circuit, a comparator, a rising edge detector, a frequency divider and a reference voltage source;
所述时钟产生电路,用于产生系统时钟信号,即信号S5,并将信号S5分别输入至上升沿检测器的控制端和分频器的输入端;The clock generating circuit is used to generate a system clock signal, namely signal S5, and input signal S5 to the control terminal of the rising edge detector and the input terminal of the frequency divider respectively;
所述比较器,用于将信号S2转变为信号S3,并将信号S3输入上升沿检测器;比较器的反相输入端连接电容检测电路的输出端,比较器的输出端连接上升沿检测器的输入端;The comparator is used to convert the signal S2 into a signal S3, and input the signal S3 into the rising edge detector; the inverting input terminal of the comparator is connected to the output terminal of the capacitance detection circuit, and the output terminal of the comparator is connected to the rising edge detector the input terminal;
所述上升沿检测器,用于检测比较器的输出,当比较器输出的信号S3由低电平跳变至高电平时,在信号S5的下一个上升沿来临时上升沿检测器输出一个矩形脉冲,即信号S4;The rising edge detector is used to detect the output of the comparator. When the signal S3 output by the comparator jumps from a low level to a high level, the rising edge detector outputs a rectangular pulse when the next rising edge of the signal S5 comes. , namely signal S4;
所述基准电压源,用于标定待测电容的放电区间,基准电压源接比较器的同相输入端;The reference voltage source is used to calibrate the discharge interval of the capacitor to be measured, and the reference voltage source is connected to the non-inverting input terminal of the comparator;
所述分频器,包括延时单元级联构成延时链模块,除第一个和最后一个延时单元外,中间的延时单元全部首尾相连,每一个延时单元的输出接下一个延时单元的输入,每一个延时单元的输出段均接有一个D触发器,信号S3输入至延时链模块的第一个延时单元的输入端,信号S4输入至每一个D触发器的时钟端;在信号S4上升沿来临时,D触发器将对应延时单元输出的电平送至其Q端,分频器的D触发器的Q非接回D端,构成1个二分频器,对输入信号S5进行2分频,Q端输出分频结果,即S1。The frequency divider comprises a delay unit cascaded to form a delay chain module. Except for the first and last delay units, the intermediate delay units are all connected end to end, and the output of each delay unit is connected to the next delay unit. The input of the time unit, the output section of each delay unit is connected with a D flip-flop, the signal S3 is input to the input end of the first delay unit of the delay chain module, and the signal S4 is input to each D flip-flop Clock terminal; when the rising edge of the signal S4 comes, the D flip-flop sends the output level of the corresponding delay unit to its Q terminal, and the Q of the D flip-flop of the frequency divider is connected back to the D terminal to form a two-frequency division The device divides the frequency of the input signal S5 by 2, and the Q terminal outputs the frequency division result, that is, S1.
进一步的,所述待测电容充电期间,信号S2为电源VDD时,信号S3为低电平,在待测电容放电期间,随着电容电压的减小,信号S2不断减小,当信号S2电平比VREF稍小时,比较器的输出信号S3从低电平翻转为高电平,标志待测电容放电结束。Further, during the charging of the capacitor under test, when the signal S2 is the power supply VDD, the signal S3 is at a low level. During the discharge of the capacitor under test, as the capacitor voltage decreases, the signal S2 keeps decreasing. When the level is slightly smaller than VREF, the output signal S3 of the comparator turns from low level to high level, which marks the end of the discharge of the capacitor under test.
进一步的,所述量程检测电路的输出信号S6为位宽为M的二进制信号,用[M-1,0]位的二进制数表示,某位为1时,则对应该位为高电平,某位为0时,则对应该位为低电平;信号S6共有M位,能够控制M个开关,信号S6的最低位S6[0]后的延时单元级联节点上设有开关,信号S6的每一位接至对应的开关,当信号S6的某一位为0时,对应开关断开,为1时,对应开关闭合;电路上电时,预设的分频比由S6[0]前的D触发器的个数决定;电路为预设量程时,信号S6的数值为S6=[00…1],即只有信号S6的最低位S6[0]为1,其对应的开关闭合;其他位全为0,对应的开关全部断开;此时,S6[0]所控制的开关对应的D触发器输出分频结果S1;每次电路对量程进行调整时,信号S6的数值中为1的那位往前移一位,多了1个D触发器参与了分频,分频比翻倍,电路的量程翻倍。Further, the output signal S6 of the range detection circuit is a binary signal with a bit width of M, represented by a binary number of [M-1,0] bits, when a certain bit is 1, the corresponding bit is high level, When a certain bit is 0, the corresponding bit is low level; the signal S6 has M bits in total, and can control M switches. The delay unit cascade node after the lowest bit S6[0] of the signal S6 is provided with a switch, and the signal S6 Each bit of S6 is connected to the corresponding switch. When a certain bit of the signal S6 is 0, the corresponding switch is turned off, and when it is 1, the corresponding switch is closed; when the circuit is powered on, the preset frequency division ratio is determined by S6[0 The number of D flip-flops before ] is determined; when the circuit is in the preset range, the value of the signal S6 is S6=[00...1], that is, only the lowest bit S6[0] of the signal S6 is 1, and the corresponding switch is closed ;The other bits are all 0, and the corresponding switches are all turned off; at this time, the D flip-flop corresponding to the switch controlled by S6[0] outputs the frequency division result S1; every time the circuit adjusts the range, the value of the signal S6 The one that is 1 is moved forward by one bit, and one more D flip-flop participates in frequency division, the frequency division ratio is doubled, and the range of the circuit is doubled.
进一步的,所述量程检测电路的输出信号S6已经移至最后一位,仍无法完成测量,则量程检测电路的输出信号S7为1,表明待测电容已经超过了电路的最大量程;否则量程检测电路的输出信号S7一直为0。Further, the output signal S6 of the range detection circuit has been moved to the last digit, and the measurement still cannot be completed, then the output signal S7 of the range detection circuit is 1, indicating that the capacitance to be measured has exceeded the maximum range of the circuit; otherwise the range detection The output signal S7 of the circuit is always 0.
进一步的,所述量化电路,包括计数器、延时链模块以及运算单元;Further, the quantization circuit includes a counter, a delay chain module, and an arithmetic unit;
所述计数器一共有3个输入信号,其中分频结果S1、信号S3为计数器的控制信号,信号S5为计数器的输入信号,当分频结果S1为低电平时,计数器停止计数,当分频结果S1为高电平、信号S3为低电平时,计数器开始计数,此时对应的电路状态为电容开始放电,但是还未放电至标定电压;当信号S3为高电平时,表明比较器已经翻转,此时,计数器停止计数并且输出时钟周期的计数结果N;The counter has a total of 3 input signals, wherein the frequency division result S1 and signal S3 are the control signals of the counter, and the signal S5 is the input signal of the counter. When the frequency division result S1 is low level, the counter stops counting. When the frequency division result When S1 is high level and signal S3 is low level, the counter starts counting. At this time, the corresponding circuit state is that the capacitor starts to discharge, but it has not yet discharged to the calibrated voltage; when the signal S3 is high level, it indicates that the comparator has flipped. At this time, the counter stops counting and outputs the counting result N of the clock cycle;
所述延时链模块每个D触发器的输出接至运算单元的输入;The output of each D flip-flop of the delay chain module is connected to the input of the arithmetic unit;
所述运算单元,用于根据公式Δt=NT-nt计算待测电容放电所经历的时间Δt,其中,T表示时钟产生电路的时钟周期,n表示在信号S3与信号S4上升沿的间隔中延时链内所有D触发器中电平为“1”的个数,t表示延时单元的延时。The operation unit is used to calculate the time Δt experienced by the discharge of the capacitor to be measured according to the formula Δt=NT-nt, wherein T represents the clock period of the clock generating circuit, and n represents the delay between the rising edges of the signal S3 and the signal S4 The number of "1" levels in all D flip-flops in the time chain, and t represents the delay of the delay unit.
进一步的,所述比较器的精度为0.1mV。Further, the precision of the comparator is 0.1mV.
一种量程自适应的高精度电容检测电路的检测方法,采用上述一种量程自适应的高精度电容检测电路,具体按照以下步骤进行:A detection method for a range-adaptive high-precision capacitance detection circuit, using the above-mentioned range-adaptive high-precision capacitance detection circuit, specifically according to the following steps:
步骤1:电路上电时为初始分频比,S6值为S6=[00…1];Step 1: When the circuit is powered on, it is the initial frequency division ratio, and the value of S6 is S6=[00...1];
步骤2:上电后首次量化时,量程检测电路判断分频结果S1下降沿来临时信号S3是否为低电平,如果否,使用当前量程对待测电容进行量化;如果是,对S6信号移位寄存,每一次移位寄存后都要判断分频结果S1下降沿来临时信号S3是否为低电平,如果否,使用当前量程进行量化;如果是,继续对S6信号移位寄存;在S6信号进行移位寄存的过程中需要判断S6是否达到了S6=[1…00];Step 2: When quantizing for the first time after power-on, the range detection circuit judges whether the signal S3 is low when the falling edge of the frequency division result S1 comes, if not, use the current range to quantify the capacitance to be measured; if yes, shift the S6 signal Register, after each shift and register, it is necessary to judge whether the signal S3 is at low level when the falling edge of the frequency division result S1 comes, if not, use the current range for quantization; if so, continue to shift and register the S6 signal; In the process of shifting and registering, it is necessary to judge whether S6 has reached S6=[1...00];
步骤3:如果达到了S6=[1…00],继续判断分频结果S1下降沿来临时信号S3是否为低电平,如果否,使用当前量程进行量化;如果是,超出最大量程,给出标志信号S7。Step 3: If S6=[1...00] is reached, continue to judge whether the signal S3 is low level when the falling edge of the frequency division result S1 comes, if not, use the current range for quantization; if yes, exceed the maximum range, give Flag signal S7.
本发明的有益效果是:The beneficial effects of the present invention are:
本发明量程自适应的高精度量化电路采用片内集成的基准电流源放电方式,在对电容的变化量进行量化时,只需进行简单的线性运算即可,解决了传统量化电路算法复杂的问题,降低了量化算法的复杂度;同时由于不需要外界其它元件,从而提高了电容量化电路的集成度,极大的减小了量化电路的体积。The range-adaptive high-precision quantization circuit of the present invention adopts the on-chip integrated reference current source discharge mode, and only needs to perform simple linear operations when quantifying the variation of capacitance, which solves the problem of complex algorithms in traditional quantization circuits , which reduces the complexity of the quantization algorithm; at the same time, because no other external components are required, the integration of the capacitance quantization circuit is improved, and the volume of the quantization circuit is greatly reduced.
电路的量化范围由分频器的分频比以及计数器的最大计数值共同决定,而量化精度由延时链的延时单元的精度决定,在最大量程范围内,并不存在量程与精度折衷的问题,解决了量化范围和量化精度之间存在的相互制约的关系。量程能够自适应调节,且调节过程不以量化精度为代价增加自身的测量范围,即使超出了电路预设的量程,电路依然能够完成对待测电容的测量。同时,在进行电容量化时,由于量化的算法较为简单,能够快速完成量化。The quantization range of the circuit is determined by the frequency division ratio of the frequency divider and the maximum count value of the counter, and the quantization accuracy is determined by the accuracy of the delay unit of the delay chain. Within the maximum range, there is no compromise between range and accuracy. The problem solves the mutual restriction relationship between the quantization range and the quantization precision. The range can be adjusted adaptively, and the adjustment process does not increase its own measurement range at the expense of quantization accuracy. Even if it exceeds the preset range of the circuit, the circuit can still complete the measurement of the capacitance to be measured. At the same time, when performing capacitance quantization, since the quantization algorithm is relatively simple, the quantization can be completed quickly.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本发明实施例的量化方法原理框图。FIG. 1 is a functional block diagram of a quantization method according to an embodiment of the present invention.
图2为本发明实施例的电容检测电路构成。FIG. 2 shows the composition of the capacitance detection circuit of the embodiment of the present invention.
图3为本发明实施例的控制电路以及量程检测电路构成。Fig. 3 shows the composition of the control circuit and the range detection circuit of the embodiment of the present invention.
图4为本发明实施例中分频器的构成。Fig. 4 shows the composition of the frequency divider in the embodiment of the present invention.
图5为本发明实施例中调节电路逻辑框图。Fig. 5 is a logic block diagram of the regulating circuit in the embodiment of the present invention.
图6为本发明实施例中量化电路的框图。Fig. 6 is a block diagram of a quantization circuit in an embodiment of the present invention.
图7为本发明实施例在单次测量过程中各关键信号的时序波形示意图。FIG. 7 is a schematic diagram of timing waveforms of key signals in a single measurement process according to an embodiment of the present invention.
图8a-8d为本发明实施例的仿真结果。8a-8d are the simulation results of the embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
电路的基本原理如下:根据电容充放电原理,可以得出,在保证电容放电电流I恒定的情况下,通过设定电容的放电电压ΔV为固定区间,就可以得出电容的放电时间Δt和电容C的容值成线性关系,因此极大的改善了量化结果的线性度,也降低了对电容进行量化时的复杂度,上述电路均可以在集成电路内部实现,无需外接其它元器件,缩小了量化电路的体积,提升了其集成度。电路对待测电容进行量化时,会对当前量程进行检测,如果无法完成量化,则通过调整自身的量程来完成对待测电容的量化。The basic principle of the circuit is as follows: According to the principle of capacitor charging and discharging, It can be concluded that, under the condition that the discharge current I of the capacitor is kept constant, by setting the discharge voltage ΔV of the capacitor as a fixed interval, it can be obtained that the discharge time Δt of the capacitor has a linear relationship with the capacitance of the capacitor C, so the extremely large The linearity of the quantization result is improved, and the complexity of quantizing the capacitance is also reduced. The above-mentioned circuits can be implemented inside the integrated circuit without external components, which reduces the volume of the quantization circuit and improves its integration. When the circuit quantifies the capacitance to be measured, it will detect the current range. If the quantization cannot be completed, it will complete the quantization of the capacitance to be measured by adjusting its own range.
实施例1,Example 1,
一种量程自适应的高精度电容检测电路,如图1所示,包括电容检测电路、控制电路、量程检测电路以及量化电路。A range-adaptive high-precision capacitance detection circuit, as shown in FIG. 1 , includes a capacitance detection circuit, a control circuit, a range detection circuit and a quantization circuit.
电容检测电路,用于检测待测电容(Ctest)的电压,通过基准电流源(Iref)在一定电压范围内的恒流特性产生与待测电容的电容值相关的电压信号,即信号S2,并传输至控制电路。The capacitance detection circuit is used to detect the voltage of the capacitance to be tested (Ctest), and generates a voltage signal related to the capacitance value of the capacitance to be tested through the constant current characteristic of the reference current source (Iref) within a certain voltage range, that is, the signal S2, and transmitted to the control circuit.
控制电路,用于产生时钟信号、充放电控制信号以及量化电路的开始、结束信号。时钟产生电路产生时钟信号,通过时钟信号的分频结果S1控制待测电容周期性充放电,将电容检测电路输出的电压信号转变为电平信号,即信号S3;根据信号S3为量化电路提供开始量化和结束量化信号。The control circuit is used to generate the clock signal, the charge and discharge control signal, and the start and end signals of the quantization circuit. The clock generation circuit generates a clock signal, controls the periodic charge and discharge of the capacitor to be tested through the frequency division result S1 of the clock signal, and converts the voltage signal output by the capacitance detection circuit into a level signal, that is, the signal S3; provides a starting point for the quantization circuit according to the signal S3 Quantize and end quantize the signal.
量程检测电路,用于检测控制电路输出的信号S3和分频结果S1,分频结果S1下降沿来临时(即每个分频周期结束时)判断信号S3是否为高电平,若为高电平,表明当前量程能够完成对待测电容的测量,使用当前量程对待测电容进行量化;若信号S3为低电平,表明待测电容超出了预设量程,即基准电流源未能将待测电容放电至标定电压,对量程检测电路当前的输出信号S6进行移位寄存后输出,输出的信号S6发送至分频器的IN1端,调整分频器的分频比,增加单次测量过程中电容的放电时间,使得基准电流源能够将待测电容放电至标定电压,从而增加电路的量程以完成待测电容的测量。分频器根据信号S5产生分频结果S1,同时分频器能够根据量程检测电路的输出信号(S6)调整自身的分频比。The range detection circuit is used to detect the signal S3 output by the control circuit and the frequency division result S1. When the falling edge of the frequency division result S1 comes (that is, at the end of each frequency division cycle), it is judged whether the signal S3 is at a high level. Level, indicating that the current range can complete the measurement of the capacitance to be measured, and use the current range to quantify the capacitance to be measured; if the signal S3 is low, it indicates that the capacitance to be measured exceeds the preset range, that is, the reference current source cannot measure the capacitance to be measured Discharge to the calibrated voltage, shift and register the current output signal S6 of the range detection circuit, and then output it. The output signal S6 is sent to the IN1 terminal of the frequency divider to adjust the frequency division ratio of the frequency divider and increase the capacitance during a single measurement. The discharge time allows the reference current source to discharge the capacitor under test to the nominal voltage, thereby increasing the range of the circuit to complete the measurement of the capacitor under test. The frequency divider generates a frequency division result S1 according to the signal S5, and at the same time, the frequency divider can adjust its own frequency division ratio according to the output signal (S6) of the range detection circuit.
量化电路,用于根据公式确定待测电容的电容值,其中,C表示待测电容的电容值,I表示基准电流源产生的放电电流,ΔV表示待测电容的放电电压,Δt表示电容放电所经历的时间;最终输出量化结果。电容放电所经历的时间通过测量两个控制信号的时间间隔确定,输出二进制数据,完成向数字信号的转化,DOUT为最终量化结果;所采用的电容量化方式是基于时间域进行的,量程检测电路与特定的电容量化方式紧密配合,实现了量程自动调节的功能。Quantization circuit for use according to the formula Determine the capacitance value of the capacitor to be tested, where C represents the capacitance value of the capacitor to be measured, I represents the discharge current generated by the reference current source, ΔV represents the discharge voltage of the capacitor to be measured, and Δt represents the time elapsed for the capacitor to discharge; the final output is quantified result. The time of capacitor discharge is determined by measuring the time interval between two control signals, output binary data, and complete the conversion to digital signal, DOUT is the final quantization result; the capacitance quantization method adopted is based on the time domain, and the range detection circuit Working closely with the specific capacitance quantization method, the function of automatic range adjustment is realized.
参考图2,电容检测电路包括电源VDD、二选一选择器(MUX2)、PMOS管以及基准电流源(Iref),基准电流源产生1uA(微安)的基准电流。Referring to FIG. 2 , the capacitance detection circuit includes a power supply VDD, an alternative selector (MUX2), a PMOS transistor, and a reference current source (Iref). The reference current source generates a reference current of 1uA (microampere).
电源VDD,用于为待测电容充电,电源VDD接于待测电容的两端,待测电容连接电源VDD负极的一端接地;The power supply VDD is used to charge the capacitor to be tested, the power supply VDD is connected to both ends of the capacitor to be tested, and the end of the capacitor to be tested connected to the negative pole of the power supply VDD is grounded;
PMOS管,用于根据分频结果S1控制待测电容周期性充放电;PMOS管连接于待测电容与电源VDD的连接回路上,分频结果S1输入至PMOS管的栅端以控制PMOS管的开启与关断;PMOS tube, used to control the periodic charge and discharge of the capacitor under test according to the frequency division result S1; on and off;
二选一选择器,用于根据分频结果S1决定将基准电流源接至电源VDD或将基准电流源接至待测电容;分频结果S1输入至二选一选择器的输入端,二选一选择器的输出端输出电压信号S2。MUX2的A路用于将基准电流源连接至待测电容,MUX2的B路用于将基准电流源连接至电源VDD,分频结果S1连接MUX2的控制端(S)。One of the two selectors is used to decide to connect the reference current source to the power supply VDD or connect the reference current source to the capacitor under test according to the frequency division result S1; the frequency division result S1 is input to the input terminal of the one of two selectors, An output terminal of a selector outputs a voltage signal S2. The A channel of MUX2 is used to connect the reference current source to the capacitor under test, the B channel of MUX2 is used to connect the reference current source to the power supply VDD, and the frequency division result S1 is connected to the control terminal (S) of MUX2.
分频结果S1是一个周期性的方波,由系统时钟信号S5分频而来,其高、低电平的时间由系统时钟信号S5和分频比决定,见图7。当分频结果S1为低电平时,PMOS管开启,MUX2选择VDD端,直接使用电源VDD完成充电,故信号S2一直为电源VDD的电压;当分频结果S1为高电平时,PMOS管关断,MUX2选择待测电容端,信号S2为待测电容输出电压,使用恒流源对待测电容进行放电,以保证电容的放电电流恒定,待测电容上电压线性减小,也就是信号S2的斜率固定,不同电容容值,该电压信号的斜率不同。在电容充电时,将基准电流源(Iref)接至电源电压,虽然会增加一定的静态功耗,但是待测电容在完成充电向放电状态转换期间,电流源两端电压并不会发生跃变,保证了电流源内部的MOS管工作状态不会发生变化,从而保证了放电电流的恒定,避免了由于MOS管的工作状态转换改变基准电流源的恒流特性,从而引入量化结果的非线性。The frequency division result S1 is a periodic square wave, which is obtained by frequency division of the system clock signal S5, and its high and low level time is determined by the system clock signal S5 and the frequency division ratio, as shown in Figure 7. When the frequency division result S1 is low level, the PMOS tube is turned on, MUX2 selects the VDD terminal, and directly uses the power supply VDD to complete charging, so the signal S2 is always the voltage of the power supply VDD; when the frequency division result S1 is high level, the PMOS tube is turned off , MUX2 selects the terminal of the capacitor to be tested, the signal S2 is the output voltage of the capacitor to be tested, and a constant current source is used to discharge the capacitor to be tested to ensure that the discharge current of the capacitor is constant, and the voltage on the capacitor to be tested decreases linearly, that is, the slope of the signal S2 Fixed, different capacitance values, the slope of the voltage signal is different. When the capacitor is charged, the reference current source (Iref) is connected to the power supply voltage. Although a certain amount of static power consumption will be increased, the voltage across the current source will not change rapidly during the transition from charging to discharging state of the capacitor under test. , to ensure that the working state of the MOS tube inside the current source will not change, thereby ensuring the constant discharge current, and avoiding the change of the constant current characteristic of the reference current source due to the switching of the working state of the MOS tube, thereby introducing nonlinearity in the quantization result.
参考图3,控制电路包括时钟产生电路、比较器、上升沿检测器(CLK)、分频器及基准电压源(VREF)。Referring to FIG. 3, the control circuit includes a clock generation circuit, a comparator, a rising edge detector (CLK), a frequency divider and a reference voltage source (VREF).
时钟产生电路,用于产生系统时钟信号(信号S5),并将信号S5分别输入至上升沿检测器的控制端和分频器的输入端。The clock generation circuit is used to generate a system clock signal (signal S5), and input the signal S5 to the control terminal of the rising edge detector and the input terminal of the frequency divider respectively.
比较器,用于将信号S2转变为信号S3,并将信号S3输入上升沿检测器;比较器的反相输入端连接电容检测电路的输出端,比较器的输出端连接上升沿检测器的输入端;在待测电容充电期间,信号S2为电源VDD时,信号S3为低电平,在待测电容放电期间,随着电容电压的减小,信号S2不断减小,当信号S2电平比VREF稍小时,比较器的输出信号S3从低电平翻转为高电平,标志待测电容放电结束。一些实施例中比较器的精度为0.1mV,保证电容的放电区间为1V,比较器的精度越高越好。A comparator for converting the signal S2 into a signal S3 and inputting the signal S3 into the rising edge detector; the inverting input terminal of the comparator is connected to the output terminal of the capacitance detection circuit, and the output terminal of the comparator is connected to the input of the rising edge detector terminal; during the charging of the capacitor under test, when the signal S2 is the power supply VDD, the signal S3 is at low level, during the discharge of the capacitor under test, with the decrease of the capacitor voltage, the signal S2 keeps decreasing, when the signal S2 level is higher than When VREF is slightly smaller, the output signal S3 of the comparator turns from low level to high level, which marks the end of the discharge of the capacitor under test. In some embodiments, the accuracy of the comparator is 0.1 mV, and the discharge interval of the capacitor is guaranteed to be 1 V. The higher the accuracy of the comparator, the better.
上升沿检测器,用于检测比较器的输出,当比较器输出的信号S3由低电平跳变至高电平时,在信号S5的下一个上升沿来临时上升沿检测器输出一个矩形脉冲,即信号S4。The rising edge detector is used to detect the output of the comparator. When the signal S3 output by the comparator jumps from low level to high level, the rising edge detector outputs a rectangular pulse when the next rising edge of the signal S5 comes, namely Signal S4.
基准电压源,用于标定待测电容的放电区间,基准电压源接比较器的同相输入端。The reference voltage source is used to calibrate the discharge interval of the capacitor to be measured, and the reference voltage source is connected to the non-inverting input terminal of the comparator.
分频器,包括延时单元级联构成延时链模块,除第一个和最后一个延时单元外,中间的延时单元全部首尾相连,每一个延时单元的输出接下一个延时单元的输入,每一个延时单元的输出段均接有一个D触发器,信号S3输入至延时链模块的第一个延时单元的输入端,信号S4输入至每一个D触发器的时钟端;在信号S4上升沿来临时,D触发器将对应延时单元输出的电平送至其Q端,分频器的D触发器的Q非接回D端,构成1个二分频器,完成二分频的功能;对输入信号S5进行2分频,Q端输出分频结果,即S1;参考图4。m个单元级联可以实现2m分频的功能,延时链模块的每个D触发器的输出接至运算单元的输入。The frequency divider, including the delay unit, is cascaded to form a delay chain module. Except for the first and last delay unit, all the delay units in the middle are connected end to end, and the output of each delay unit is connected to the next delay unit. The output section of each delay unit is connected to a D flip-flop, the signal S3 is input to the input end of the first delay unit of the delay chain module, and the signal S4 is input to the clock terminal of each D flip-flop ; When the rising edge of the signal S4 comes, the D flip-flop sends the level output by the corresponding delay unit to its Q terminal, and the Q of the D flip-flop of the frequency divider is connected back to the D terminal to form a two-frequency divider. Complete the function of frequency division by two; divide the frequency by 2 on the input signal S5, and output the frequency division result at the Q terminal, that is, S1; refer to Figure 4. The cascade connection of m units can realize the function of 2 m frequency division, and the output of each D flip-flop of the delay chain module is connected to the input of the operation unit.
量程检测电路的输出信号S6为位宽为M的二进制信号,用[M-1,0]位的二进制数表示,某位为1时,则对应该位为高电平,某位为0时,则对应该位为低电平;信号S6共有M位,能够控制M个开关。参考图4,信号S6的最低位S6[0]后的延时单元级联节点上设有开关,信号S6的每一位(0~M-1)接至对应的开关,当信号S6的某一位为0时,对应开关断开,为1时,对应开关闭合;电路上电时,预设的分频比由S6[0]前的D触发器的个数决定;电路为预设量程时,信号S6的数值为S6=[00…1],即只有信号S6的最低位S6[0]为1,其对应的开关闭合;其他位(如S6[1]、S6[2]…S6[M-1])全为0,对应的开关全部断开;此时,S6[0]所控制的开关对应的D触发器输出分频结果S1;每次电路对量程进行调整时,信号S6的数值中为1的那位往前移一位,假设电路只调整了一次量程,即S6的数值为S6=[00…10],此时,S6[1]所控制的开关对应的D触发器输出信号S1,从图4可以得知,多了1个D触发器参与了分频,因此分频比翻倍,电路的量程也就翻倍。S6的输出每一次移位,都会多一个D触发器参与分频,分频比就会翻倍,分频后信号S1的高电平持续时间就越长,基准电流源放电的时间也就越长,则基准电源能够将更大的电容放电至标定电压,也就意味着电路能够测量的电容越大,该分频模块和量程检测电路共同完成了自动调整电路量程的功能。The output signal S6 of the range detection circuit is a binary signal with a bit width of M, represented by a binary number of [M-1,0] bits, when a certain bit is 1, the corresponding bit is high level, and when a certain bit is 0 , the corresponding bit is low level; the signal S6 has M bits in total and can control M switches. Referring to Fig. 4, a switch is provided on the cascade node of the delay unit after the lowest bit S6[0] of the signal S6, and each bit (0~M-1) of the signal S6 is connected to the corresponding switch, when a certain bit of the signal S6 When one bit is 0, the corresponding switch is off, and when it is 1, the corresponding switch is closed; when the circuit is powered on, the preset frequency division ratio is determined by the number of D flip-flops before S6[0]; the circuit is a preset range , the value of the signal S6 is S6=[00...1], that is, only the lowest bit S6[0] of the signal S6 is 1, and the corresponding switch is closed; other bits (such as S6[1], S6[2]...S6 [M-1]) are all 0, and the corresponding switches are all turned off; at this time, the D flip-flop corresponding to the switch controlled by S6[0] outputs the frequency division result S1; each time the circuit adjusts the range, the signal S6 The value of 1 is moved forward one bit, assuming that the circuit has only adjusted the range once, that is, the value of S6 is S6=[00...10], at this time, the D trigger corresponding to the switch controlled by S6[1] It can be known from Figure 4 that one more D flip-flop participates in the frequency division, so the frequency division ratio is doubled, and the range of the circuit is also doubled. Every time the output of S6 is shifted, one more D flip-flop will participate in the frequency division, and the frequency division ratio will be doubled. long, the reference power supply can discharge a larger capacitance to the calibrated voltage, which means the larger the capacitance that the circuit can measure, the frequency division module and the range detection circuit together complete the function of automatically adjusting the range of the circuit.
上述过程中S7信号一直为0,如果S6的数值为S6=[10…00],即已经移至最后一位,仍无法完成测量,则输出信号S7为1,表明待测电容已经超过了电路的最大量程;如果待测电容超出预设量程,则基准电流源在分频信号下降沿来临时无法将电容放电至标定电压,则比较器输出不会由低翻转至高。In the above process, the S7 signal is always 0. If the value of S6 is S6=[10...00], that is, it has moved to the last digit and the measurement cannot be completed, the output signal S7 is 1, indicating that the capacitance to be measured has exceeded the circuit If the capacitor to be measured exceeds the preset range, the reference current source cannot discharge the capacitor to the calibrated voltage when the falling edge of the frequency division signal comes, and the output of the comparator will not turn from low to high.
参考图6,量化电路,包括计数器(Counter)、延时链模块(Delay line)、以及运算单元(ALU)。Referring to FIG. 6 , the quantization circuit includes a counter (Counter), a delay chain module (Delay line), and an arithmetic unit (ALU).
计数器一共有3个输入信号,其中分频结果S1、信号S3为计数器的控制信号,信号S5为计数器的输入信号,当分频结果S1为低电平时,计数器停止计数,当分频结果S1为高电平、信号S3为低电平时,计数器开始计数,此时对应的电路状态为电容开始放电,但是还未放电至标定电压;当信号S3为高电平时,表明比较器已经翻转,此时,计数器停止计数并且输出对时钟周期的计数结果N,计数结果与时钟信号S5的周期相乘,就可以得到整个电容从开始放电到结束放电所经历的粗略的时间,完成粗量化。由于时钟产生电路的周期是固定的,所以信号S5的每一个周期也是固定的。但是,比较器的输出上升沿基本总是不能与S5的边沿对齐,因此仅采用计数器输出作为量化结果会带来极大的误差。The counter has 3 input signals. The frequency division result S1 and signal S3 are the control signals of the counter, and the signal S5 is the input signal of the counter. When the frequency division result S1 is low level, the counter stops counting. When the frequency division result S1 is When the signal S3 is high and the signal S3 is low, the counter starts counting. At this time, the corresponding circuit state is that the capacitor starts to discharge, but it has not yet discharged to the calibration voltage; when the signal S3 is high, it indicates that the comparator has been reversed. At this time , the counter stops counting and outputs the counting result N of the clock cycle, and the counting result is multiplied by the cycle of the clock signal S5 to obtain the rough time that the entire capacitor has experienced from the start of discharge to the end of discharge, and complete the rough quantization. Since the cycle of the clock generating circuit is fixed, each cycle of the signal S5 is also fixed. However, the rising edge of the output of the comparator cannot always be aligned with the edge of S5, so only using the counter output as the quantization result will bring a huge error.
延时链模块每个D触发器的输出接至运算单元的输入,运算单元读取到计数器的计数结果以及延时单元的结果后进行运算;The output of each D flip-flop of the delay chain module is connected to the input of the operation unit, and the operation unit reads the counting result of the counter and the result of the delay unit to perform calculation;
运算单元,用于根据公式Δt=NT-nt计算待测电容放电所经历的时间Δt,其中,T表示时钟产生电路的时钟周期,n表示在信号S3与信号S4上升沿的间隔中延时链内所有D触发器中电平为“1”的个数,t表示延时单元的延时。The arithmetic unit is used to calculate the time Δt experienced by the capacitor discharge under test according to the formula Δt=NT-nt, wherein T represents the clock period of the clock generating circuit, and n represents the delay chain in the interval between the rising edges of the signal S3 and the signal S4 The number of all D flip-flops whose level is "1", t represents the delay of the delay unit.
参考图7,S1为S5的分频结果,当S1为低电平时将电容充电至VDD,在t1时刻,S1变为高电平,电容开始放电,同时计数器开始计数。在t2时刻,电容放电至0.8V,比较器输出结果(S3)翻转,此时,控制计数器停止计数,由图7可知,计数器的量化结果为t1-t3的时间段,但是待测电容实际放电时间为t1-t2时间段,因此t2-t3时间段为粗量化引入的量化误差。Referring to Figure 7, S1 is the frequency division result of S5. When S1 is low level, the capacitor is charged to VDD. At time t1, S1 becomes high level, the capacitor starts to discharge, and the counter starts counting at the same time. At time t2, the capacitor discharges to 0.8V, and the output result of the comparator (S3) is reversed. At this time, the control counter stops counting. It can be seen from Figure 7 that the quantization result of the counter is the time period of t1-t3, but the capacitor under test is actually discharged The time is the t1-t2 time period, so the t2-t3 time period is the quantization error introduced by the coarse quantization.
在S3上升沿来临后,信号S3在延时链内部传输,每经过一个延时单元的时间间隔,就有一个延时单元的输出为高电平。在信号S3与信号S4上升沿的时间间隔内,只有有限个延时单元的输出会变为高电平,其它延时单元的输出仍然保持为0。在信号S4上升沿到来之后,运算单元ALU读出D触发器的输出。计算所有D触发器中电平为“1”的个数,就可得知信号S3与信号S4上升沿的时间间隔。After the rising edge of S3 comes, the signal S3 is transmitted inside the delay chain, and every time a time interval of a delay unit passes, the output of a delay unit is high level. During the time interval between the rising edges of the signal S3 and the signal S4, only the outputs of a limited number of delay units will become high level, and the outputs of other delay units remain at 0. After the rising edge of the signal S4 arrives, the arithmetic unit ALU reads out the output of the D flip-flop. The time interval between the rising edges of the signal S3 and the signal S4 can be obtained by calculating the number of “1” in all D flip-flops.
从图7可以看出,计数器的量化结果(t1-t3时间段)减去t2-t3时间段的结果即为电容的实际放电时间。在t2时刻,S3信号上升沿到来,该上升沿开始在延时链中传输。在t3时刻,控制模块中的上升沿检测器输出一个矩形脉冲,也就是信号S4的波形,将该信号的上升沿作为延时链的D触发器的控制信号,在t3时刻读出延时链的多位输出中“1”的个数为n,t表示延时单元的延时,则t2-t3时间段为:It can be seen from FIG. 7 that the result of subtracting the quantization result of the counter (t1-t3 time period) from the t2-t3 time period is the actual discharge time of the capacitor. At time t2, the rising edge of the S3 signal arrives, and the rising edge starts to be transmitted in the delay chain. At time t3, the rising edge detector in the control module outputs a rectangular pulse, which is the waveform of signal S4, and the rising edge of the signal is used as the control signal of the D flip-flop of the delay chain, and the delay chain is read out at time t3 The number of "1" in the multi-bit output is n, and t represents the delay of the delay unit, then the t2-t3 time period is:
t3-t2=ntt3-t2=nt
假设电容在充电期间被充电至1.8V,比较器同相输入端电压为0.8V,且由基准电流源产生的放电电流为1uA。那么量化结果为:Assume that the capacitor is charged to 1.8V during charging, the voltage at the non-inverting input of the comparator is 0.8V, and the discharge current generated by the reference current source is 1uA. Then the quantitative result is:
其中,F表示电容的单位法拉。Among them, F represents the unit farad of capacitance.
延时链模块内部由延时单元和D触发器构成,延时链模块用于完成对S3和S4信号上升沿时间间隔的测量,DOUT为最终的电容量化结果。量化电路采取精量化与粗量化相结合的方式,粗量化由计数器完成,精量化由延时链模块完成,能够兼顾量化范围与量化精度;运算单元根据粗量化以及精量化的结果完成二进制转换,最终完成待测电容的电容值向二进制数转化的功能。延时单元的延时越短,本申请所能达到的精度越高,而量化范围由S1为高电平的时间决定,高电平持续时间越长,恒流源的放电时间越长,则电路的量化范围越大。由此得出,电路的精度由延时单元的延时决定,电路的量化范围由S1为高电平的时间决定,两个参数并不存在相互制约的关系,因此可以兼顾量化范围与量化精度。The delay chain module is composed of a delay unit and a D flip-flop. The delay chain module is used to complete the measurement of the rising edge time interval of the S3 and S4 signals, and DOUT is the final capacitance quantization result. The quantization circuit adopts a combination of fine quantization and coarse quantization. The coarse quantization is completed by the counter, and the fine quantization is completed by the delay chain module, which can take into account both the quantization range and the quantization accuracy. Finally, the function of converting the capacitance value of the capacitor to be measured to a binary number is completed. The shorter the delay of the delay unit, the higher the accuracy that this application can achieve, and the quantization range is determined by the time when S1 is at a high level. The longer the high level lasts, the longer the discharge time of the constant current source is. The quantization range of the circuit is larger. It can be concluded that the accuracy of the circuit is determined by the delay of the delay unit, and the quantization range of the circuit is determined by the time when S1 is at a high level. There is no mutual restriction between the two parameters, so the quantization range and quantization accuracy can be considered .
参考图8a-8d,横坐标Ctest为待测电容的容值,纵坐标Cmear为该量化电路对应的仿真结果。图8a为待测电容的本体值为310fF时,待测电容的电容值每增加1fF的仿真结果。图8b为待测电容的本体值为1005fF时,待测电容的电容值每增加1fF的仿真结果。图8c为待测电容的本体值为300fF时,待测电容的电容值每增加10fF的仿真结果。图8d为待测电容的本体值为300fF时,待测电容的电容值每增加100fF的仿真结果。从仿真结果可以看出,即使待测电容的本体值不同,该量化电路仍然能够达到1fF的量化精度。同时,从图8c和图8d的仿真结果可以得出,即使待测电容的容值变化较大,该电路也仍然能够准确的完成测量。考虑非理想因素,图中仿真结果与待测电容实际值有极小的量化偏移,此偏移不影响量化线性度,在后期产品使用中,能够通过初始化过程中单点校准实现与实际值的平移校准。综上,该量化电路用于电容测量时,能够达到1fF的量化精度,同时量化结果在很大的范围内都具有较好的线性度。Referring to FIGS. 8a-8d, the abscissa C test is the capacitance of the capacitor to be tested, and the ordinate C mear is the simulation result corresponding to the quantization circuit. Fig. 8a is the simulation result of the capacitance value of the capacitor under test increasing by 1 fF when the bulk value of the capacitor under test is 310 fF. FIG. 8 b shows the simulation results of the capacitance value of the capacitor under test increasing by 1 fF when the bulk value of the capacitor under test is 1005 fF. Fig. 8c is a simulation result of the capacitance value of the capacitor under test increasing by 10 fF when the bulk value of the capacitor under test is 300 fF. Fig. 8d is a simulation result of the capacitance value of the capacitor under test increasing by 100 fF when the bulk value of the capacitor under test is 300 fF. It can be seen from the simulation results that even if the bulk values of the capacitors to be measured are different, the quantization circuit can still achieve the quantization accuracy of 1fF. At the same time, it can be concluded from the simulation results of FIG. 8c and FIG. 8d that even if the capacitance of the capacitor to be measured changes greatly, the circuit can still complete the measurement accurately. Considering non-ideal factors, the simulation results in the figure have a very small quantization offset from the actual value of the capacitance to be measured. This offset does not affect the quantization linearity. In the later product use, it can be achieved by single-point calibration during the initialization process. translation calibration. In summary, when the quantization circuit is used for capacitance measurement, it can achieve a quantization accuracy of 1 fF, and at the same time, the quantization results have good linearity in a large range.
本申请最大量程范围取决于分频电路在保证初始分频后额外添加的分频器的个数,每多一个分频器,最大量程就增加一倍,最大量程为12pF;同时保证量化精度的范围是0-1.5pF。现有检测电路的量程范围是0-1.5pF,量化精度是1fF。The maximum range of this application depends on the number of additional frequency dividers added by the frequency division circuit after the initial frequency division. For each additional frequency divider, the maximum range will be doubled, and the maximum range is 12pF; while ensuring the quantization accuracy The range is 0-1.5pF. The measuring range of the existing detection circuit is 0-1.5pF, and the quantization precision is 1fF.
实施例2,Example 2,
一种量程自适应的高精度电容检测方法,如图5所示,采用上述检测电路,具体按照以下步骤进行:A high-precision capacitance detection method with adaptive range, as shown in Figure 5, adopts the above-mentioned detection circuit, and specifically performs the following steps:
步骤1:电路上电时为初始分频比,S6值为S6=[00…1];Step 1: When the circuit is powered on, it is the initial frequency division ratio, and the value of S6 is S6=[00...1];
步骤2:上电后首次量化时,量程检测电路判断分频结果S1下降沿来临时信号S3是否为低电平,如果否,使用当前量程对待测电容进行量化;如果是,对S6信号移位寄存,每一次移位寄存后都要判断分频结果S1下降沿来临时信号S3是否为低电平,如果否,使用当前量程进行量化;如果是,继续对S6信号移位寄存;在S6信号进行移位寄存的过程中需要判断S6是否达到了S6=[1…00];Step 2: When quantizing for the first time after power-on, the range detection circuit judges whether the signal S3 is low when the falling edge of the frequency division result S1 comes, if not, use the current range to quantify the capacitance to be measured; if yes, shift the S6 signal Register, after each shift and register, it is necessary to judge whether the signal S3 is at low level when the falling edge of the frequency division result S1 comes, if not, use the current range for quantization; if so, continue to shift and register the S6 signal; In the process of shifting and registering, it is necessary to judge whether S6 has reached S6=[1...00];
步骤3:如果达到了S6=[1…00],继续判断分频结果S1下降沿来临时信号S3是否为低电平,如果否,使用当前量程进行量化;如果是,超出最大量程,给出标志信号S7。Step 3: If S6=[1...00] is reached, continue to judge whether the signal S3 is low level when the falling edge of the frequency division result S1 comes, if not, use the current range for quantization; if yes, exceed the maximum range, give Flag signal S7.
以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110598932.0A CN113341232B (en) | 2021-05-31 | 2021-05-31 | High-precision capacitance detection method and detection circuit with self-adaptive measuring range |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110598932.0A CN113341232B (en) | 2021-05-31 | 2021-05-31 | High-precision capacitance detection method and detection circuit with self-adaptive measuring range |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113341232A CN113341232A (en) | 2021-09-03 |
CN113341232B true CN113341232B (en) | 2023-07-28 |
Family
ID=77472444
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110598932.0A Active CN113341232B (en) | 2021-05-31 | 2021-05-31 | High-precision capacitance detection method and detection circuit with self-adaptive measuring range |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113341232B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119519673B (en) * | 2025-01-22 | 2025-05-06 | 上海维安半导体有限公司 | Capacitance detection system and method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001124813A (en) * | 1999-10-27 | 2001-05-11 | Nec Ic Microcomput Syst Ltd | Clock duty inspection circuit and microcomputer capable of carrying out clock duty inspection |
JP2002107256A (en) * | 2000-09-29 | 2002-04-10 | Matsushita Electric Works Ltd | Pressure sensor circuit |
JP2002300029A (en) * | 2001-03-29 | 2002-10-11 | Nec Corp | Pll circuit and its lock decision circuit, and test method and device |
JP2011211509A (en) * | 2010-03-30 | 2011-10-20 | Renesas Electronics Corp | Pwm signal generating circuit and semiconductor integrated circuit with the same |
CN106802372A (en) * | 2017-03-15 | 2017-06-06 | 圣邦微电子(北京)股份有限公司 | A kind of method for detecting capacitor's capacity change |
CN109525239A (en) * | 2019-01-24 | 2019-03-26 | 桂林电子科技大学 | A digital output two-stage double-precision biomedical capacitive sensor interface circuit |
-
2021
- 2021-05-31 CN CN202110598932.0A patent/CN113341232B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001124813A (en) * | 1999-10-27 | 2001-05-11 | Nec Ic Microcomput Syst Ltd | Clock duty inspection circuit and microcomputer capable of carrying out clock duty inspection |
JP2002107256A (en) * | 2000-09-29 | 2002-04-10 | Matsushita Electric Works Ltd | Pressure sensor circuit |
JP2002300029A (en) * | 2001-03-29 | 2002-10-11 | Nec Corp | Pll circuit and its lock decision circuit, and test method and device |
JP2011211509A (en) * | 2010-03-30 | 2011-10-20 | Renesas Electronics Corp | Pwm signal generating circuit and semiconductor integrated circuit with the same |
CN106802372A (en) * | 2017-03-15 | 2017-06-06 | 圣邦微电子(北京)股份有限公司 | A kind of method for detecting capacitor's capacity change |
CN109525239A (en) * | 2019-01-24 | 2019-03-26 | 桂林电子科技大学 | A digital output two-stage double-precision biomedical capacitive sensor interface circuit |
Non-Patent Citations (1)
Title |
---|
电容传感器微电容测量电路的分析与研究;祝敏;;煤炭技术(第03期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113341232A (en) | 2021-09-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111106833B (en) | Apparatus, circuit and method for calibrating time-to-digital converters | |
US6695475B2 (en) | Temperature sensing circuit and method | |
US9587964B2 (en) | Capacitive proximity detection using delta-sigma conversion | |
US7782068B2 (en) | Circuit for capacitance measurement and method therefor | |
CN101556297B (en) | Capacitance measuring circuit and method thereof | |
US7196526B2 (en) | Matched delay line voltage converter | |
US7330061B2 (en) | Method and apparatus for correcting the duty cycle of a digital signal | |
US8063710B2 (en) | Self-calibrating oscillator | |
US7420400B2 (en) | Method and apparatus for on-chip duty cycle measurement | |
CN101738544A (en) | Capacitance measuring circuit and capacitance measuring method thereof | |
CN101655524A (en) | Capacitance value measuring circuit and method thereof | |
US7459955B2 (en) | Integrated circuit temperature sensing method | |
CN112165329A (en) | Capacitance digital converter for eliminating parasitic capacitance based on SAR logic | |
CN113341232B (en) | High-precision capacitance detection method and detection circuit with self-adaptive measuring range | |
US10852197B2 (en) | Temperature sensor in an integrated circuit having offset cancellation | |
CN207215744U (en) | A kind of humidity sensor chip with built-in calibration function | |
KR20190090223A (en) | Temperature sensing device and temperature-voltage converter | |
US6687173B2 (en) | Circuit for testing ferroelectric capacitor in FRAM | |
JP5851285B2 (en) | AD conversion circuit, microcontroller, and sampling time adjustment method | |
US20030011372A1 (en) | Method and device for checking the charge state of a battery, in particular a rechargeable battery for a cellular mobile telephone | |
CN101127529B (en) | Analog-to-digital converter, phase-locked loop built-in self-test circuit and measurement method | |
US20080203998A1 (en) | On-chip power supply monitor using latch delay sensor | |
Hidalgo-López | Differential Voltage-to-Time Conversion for Digital Readout of Capacitive Sensors | |
CN217216500U (en) | A Frequency Compensated RC Oscillator | |
Hsiao et al. | A low-cost CMOS time interval measurement core |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |