Detection method of capacitive sensor

文档序号:132386 发布日期:2021-10-22 浏览:49次 中文

阅读说明:本技术 一种电容式传感器的检测方法 (Detection method of capacitive sensor ) 是由 谢进 征林 陈阜东 丁志扬 于 2021-08-12 设计创作,主要内容包括:本发明公开了一种电容式传感器的检测方法,包括以下步骤:第一步,构建电容式传感器的检测电路,将被测电容CX和配套电阻R1形成震荡电路后,接入到时基芯片LMC555的触发脚和和保持脚;第二步,将时基芯片LMC555上电后,输入到单片机的频率捕捉脚;第三步,将采集到的频率转换为电容值;第四步,按照电容值初始值和最终值的比例关系,确定当前电容值。本发明的检测方法不需要高精度的ADC或电压比较器,就可以检测出被测电容,可大大降低成本。(The invention discloses a detection method of a capacitive sensor, which comprises the following steps: firstly, a detection circuit of a capacitive sensor is constructed, and a capacitor CX to be detected and a matched resistor R1 are connected to a trigger pin and a holding pin of a time-base chip LMC555 after forming an oscillation circuit; secondly, after the time base chip LMC555 is powered on, the power is input into a frequency capturing pin of the singlechip; thirdly, converting the acquired frequency into a capacitance value; and fourthly, determining the current capacitance value according to the proportional relation between the initial value and the final value of the capacitance value. The detection method can detect the measured capacitor without a high-precision ADC or a voltage comparator, and can greatly reduce the cost.)

1. A detection method of a capacitive sensor is characterized by comprising the following steps:

firstly, a detection circuit of a capacitive sensor is constructed, and a capacitor CX to be detected and a matched resistor R1 are connected to a trigger pin and a holding pin of a time-base chip LMC555 after forming an oscillation circuit;

secondly, after the time base chip LMC555 is powered on, the power is input into a frequency capturing pin of the singlechip;

thirdly, converting the acquired frequency into a capacitance value;

and fourthly, determining the current capacitance value according to the proportional relation between the initial value and the final value of the capacitance value.

2. The method according to claim 1, wherein the detection circuit of the capacitive sensor comprises a power supply cathode GND, a power supply anode VCC, a time-base chip LMC555, a resistor R1, a capacitor C1, and a measured capacitance CX.

3. The detecting method of the capacitive sensor as claimed in claim 2, wherein the power negative electrodes GND includes a first power negative electrode GND, a second power negative electrode GND and a third power negative electrode GND.

4. The method as claimed in claim 3, wherein the voltage of the power supply cathode GND is 0V.

5. The method as claimed in claim 2, wherein the voltage of the positive electrode VCC of the power supply is 2.5-5.5V.

6. The method as claimed in claim 2, wherein the time base chip LMC555 comprises 8 pins.

7. The method as claimed in claim 2, wherein the resistance R1 is 10K.

8. The method as claimed in claim 2, wherein said capacitance C1 is 100 nF.

[ technical field ] A method for producing a semiconductor device

The invention belongs to the technical field of sensor detection, and relates to a detection method of a capacitive sensor.

[ background of the invention ]

The capacitance type sensor is a sensor which is used more at present, changes of liquid level are described through capacitance continuous change values, the defect that a traditional magnetic turning plate cannot measure continuously can be overcome, and meanwhile, a single chip microcomputer module is required to have the capacity of measuring a tiny capacitance value.

Most of the existing capacitance detection methods are based on the charge and discharge of a capacitor, the voltage for starting the charge, the end voltage and the charge time are collected by an analog-to-digital conversion chip, and the measured capacitor is calculated according to a capacitance charge and discharge formula, and the method has several defects: (1) ADCs or voltage comparators with high precision are required; (2) the requirement on the timing precision is high, which brings higher cost, and the precision is not high when the capacitance is small, which leads to inaccurate measurement; (3) in a battery powered scenario, if power supply degradation occurs, the measured value may become larger.

[ summary of the invention ]

The invention provides a detection method of a capacitive sensor, which aims to solve the problems that a measured value is larger if power supply attenuation occurs in a battery power supply scene in the existing capacitance detection method.

In order to solve the technical problems, the invention adopts the following technical scheme.

A detection method of a capacitive sensor comprises the following steps:

firstly, a detection circuit of a capacitive sensor is constructed, and a capacitor CX to be detected and a matched resistor R1 are connected to a trigger pin and a holding pin of a time-base chip LMC555 after forming an oscillation circuit;

secondly, after the time base chip LMC555 is powered on, the power is input into a frequency capturing pin of the singlechip;

thirdly, converting the acquired frequency into a capacitance value;

and fourthly, determining the current capacitance value according to the proportional relation between the initial value and the final value of the capacitance value.

Further, the detection circuit of the capacitive sensor comprises a power supply cathode GND, a power supply anode VCC, a time base chip LMC555, a resistor R1, a capacitor C1 and a measured capacitor CX.

Further, the power negative electrode GND comprises a first power negative electrode GND, a second power negative electrode GND and a third power negative electrode GND.

Further, the voltage of the power supply cathode GND is 0V.

Furthermore, the voltage of the power supply anode VCC is 2.5-5.5V.

Further, the time base chip LMC555 includes 8 pins.

Further, the resistor R1 is 10K.

Further, the capacitance C1 is 100 nF.

Compared with the existing capacitance detection method, the detection method has the following advantages:

(1) the capacitance value of the sensor can be continuously measured, so that the liquid level sensors are not discrete numerical values any more;

(2) the detection method can detect the measured capacitor without a high-precision ADC or a voltage comparator, and can greatly reduce the cost;

(3) the existing capacitance detection method has high requirement on the precision of timing, which brings higher cost, and the precision is not high when the capacitance is smaller, so that the measurement is inaccurate, but the invention can still keep higher measurement precision when the capacitance is smaller;

(4) the detection circuit of the invention is not influenced by the power supply voltage, can keep good precision within a certain voltage range, and is more accurate than the test method of the existing capacitance detection method.

[ description of the drawings ]

Fig. 1 is a schematic diagram of a detection circuit of the capacitive sensor according to the present invention.

[ detailed description ] embodiments

The present invention will be described in further detail with reference to the following detailed description and accompanying drawings. It should be emphasized that the following description is merely exemplary in nature and is not intended to limit the scope of the invention or its application.

Examples

Referring to fig. 1, the pin numbers, codes and connection relationships of the time-base chip are shown in the following table:

from FIG. 1, the component numbers, meanings and specifications are as follows:

reference numerals Means of Specification of
GND Negative pole of power supply 2.5-5.5V power supply cathode
VCC Power supply anode 2.5-5.5V power supply anode
IC-8-LMC555 Time base chip LMC555
R1 Resistance (RC) 10K, 0603 package
C1 Capacitor 104 100nF, 0603 package
CX Measured capacitance Sensor capacitance

As shown in fig. 1, a detection circuit of a capacitive sensor includes a power supply cathode GND, a power supply anode VCC, a time base chip LMC555, a resistor R1, a capacitor C1, and a measured capacitor CX; the power supply cathode GND comprises a first power supply cathode GND, a second power supply cathode GND and a third power supply cathode GND; the negative pole GND of the first power supply is connected with an eighth pin GND of the time base chip LMC 555; a first pin V + of the time-base chip LMC555 is connected with a power supply anode VCC and one end of a capacitor C1; the other end of the capacitor C1 is connected with the cathode GND of the second power supply; a seventh pin TRI of the time-base chip LMC555 is a trigger pin and is connected with one end of the capacitor CX to be detected; the other end of the capacitor CX to be detected is connected with a third power supply cathode GND; a sixth pin OUT of the time base chip LMC555 is a frequency capture pin and is connected with one end of a resistor R1; the other end of the resistor R1 is connected with the capacitor CX to be tested, a third pin of the time base chip LMC555 and a seventh pin of the time base chip LMC 555; the third pin of the time base chip LMC555 is an input holding pin; and the seventh pin of the time base chip LMC555 is a trigger pin.

The detection method of the capacitive sensor comprises the following steps:

firstly, a detection circuit of a capacitive sensor is constructed, and a capacitor CX to be detected and a matched resistor R1 are connected to a trigger pin and a holding pin of a time-base chip LMC555 after forming an oscillation circuit;

secondly, after the time base chip LMC555 is powered on, the power is input into a frequency capturing pin of the singlechip;

thirdly, converting the acquired frequency into a capacitance value;

and fourthly, determining the current capacitance value according to the proportional relation between the initial value and the final value of the capacitance value.

The time base chip LMC555 used in the method is a time base chip with low price and low power consumption, a square wave pulse is formed on a sixth pin OUT of the time base chip LMC555 by utilizing the matching of a resistor R1 and a measured capacitor CX, after power is supplied to a power supply anode VCC, a pulse port can output a pulse with a fixed duty ratio of 50%, the amplitude is as high as the power supply anode VCC, and thus CX 1/(1.4fR) can be measured, wherein f is the frequency of output pulse, R is R1, and 10K is taken.

The following data were actually measured:

through determination, the capacitance value has obvious resolution within the whole range of 2-1500 pF (see the following table), and the frequency value can be correctly read by using the timer capture function of a common single chip microcomputer, so that the corresponding capacitance value is calculated.

Through tests, the above table shows that the precision can be kept well within the power supply voltage of 2.5-5.5V of the battery, and the influence of the attenuation of a power supply is avoided.

The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种测量船用燃油舱内液面位置的传感器及其工作方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类