CN115165208A - A sensor calibration system and method - Google Patents
A sensor calibration system and method Download PDFInfo
- Publication number
- CN115165208A CN115165208A CN202210821708.8A CN202210821708A CN115165208A CN 115165208 A CN115165208 A CN 115165208A CN 202210821708 A CN202210821708 A CN 202210821708A CN 115165208 A CN115165208 A CN 115165208A
- Authority
- CN
- China
- Prior art keywords
- module
- capacitor
- sensor
- calibration
- chip
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 230000008569 process Effects 0.000 claims abstract description 8
- 239000003990 capacitor Substances 0.000 claims description 92
- 238000006243 chemical reaction Methods 0.000 claims description 11
- 238000013102 re-test Methods 0.000 claims description 8
- 238000001914 filtration Methods 0.000 claims description 6
- 238000010606 normalization Methods 0.000 claims description 6
- 230000003321 amplification Effects 0.000 claims description 4
- 238000013480 data collection Methods 0.000 claims description 4
- 238000003199 nucleic acid amplification method Methods 0.000 claims description 4
- 238000012545 processing Methods 0.000 claims description 4
- 230000000694 effects Effects 0.000 abstract description 11
- 238000010586 diagram Methods 0.000 description 13
- 230000006870 function Effects 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 4
- 230000035945 sensitivity Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 230000003750 conditioning effect Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01L—MEASURING FORCE, STRESS, TORQUE, WORK, MECHANICAL POWER, MECHANICAL EFFICIENCY, OR FLUID PRESSURE
- G01L25/00—Testing or calibrating of apparatus for measuring force, torque, work, mechanical power, or mechanical efficiency
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01L—MEASURING FORCE, STRESS, TORQUE, WORK, MECHANICAL POWER, MECHANICAL EFFICIENCY, OR FLUID PRESSURE
- G01L27/00—Testing or calibrating of apparatus for measuring fluid pressure
- G01L27/002—Calibrating, i.e. establishing true relation between transducer output value and value to be measured, zeroing, linearising or span error determination
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01L—MEASURING FORCE, STRESS, TORQUE, WORK, MECHANICAL POWER, MECHANICAL EFFICIENCY, OR FLUID PRESSURE
- G01L27/00—Testing or calibrating of apparatus for measuring fluid pressure
- G01L27/002—Calibrating, i.e. establishing true relation between transducer output value and value to be measured, zeroing, linearising or span error determination
- G01L27/005—Apparatus for calibrating pressure sensors
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Measuring Fluid Pressure (AREA)
Abstract
本发明属于传感器校准技术领域,提供一种传感器校准系统及方法,包括:电路电源模块、单片机模块、传感器模块、前级放大模块、模拟量采集模块、上位机模块、模拟量输出模块以及数字量输出模块;传感器模块用于将压力信号转化成电压信号;前级放大模块用于将电压信号进行放大;模拟量采集模块用于通过模数转换器将接收的电压信号转化成数字信号;单片机模块用于将数字信号进行处理并分别传递到上位机模块、模拟量输出模块及数字量输出模块上;上位机模块用于通过标准的ModBus_RTU协议与单片机模块进行通讯连接;模拟量输出模块与数字量输出模块用于将单片机模块计算后的数据进行对外输出。本发明能提高传感器的校准效率,线性补偿效果好。
The invention belongs to the technical field of sensor calibration, and provides a sensor calibration system and method, comprising: a circuit power supply module, a single-chip microcomputer module, a sensor module, a pre-amplifier module, an analog quantity acquisition module, a host computer module, an analog quantity output module and a digital quantity Output module; the sensor module is used to convert the pressure signal into a voltage signal; the preamplifier module is used to amplify the voltage signal; the analog acquisition module is used to convert the received voltage signal into a digital signal through an analog-to-digital converter; the microcontroller module It is used to process the digital signal and transmit it to the host computer module, analog output module and digital output module respectively; the host computer module is used to communicate with the single-chip module through the standard ModBus_RTU protocol; the analog output module is connected to the digital output module. The output module is used to output the data calculated by the microcontroller module to the outside. The invention can improve the calibration efficiency of the sensor, and the linear compensation effect is good.
Description
技术领域technical field
本发明属于传感器校准技术领域,尤其涉及一种传感器校准系统及方法。The invention belongs to the technical field of sensor calibration, and in particular relates to a sensor calibration system and method.
背景技术Background technique
目前压阻式传感器校准大部分使用的是特定的调理芯片进行校准,但并不是所以压阻式传感器都适合使用此种校准方法,使用调理芯片进行校准存在校准点压力点有限、校准后无法细调、无法选择校准点和无法做到一键清零效果等缺点,部分调理芯片还存在校准算法固定,无法根据实际应用场合修改校准算法的问题。At present, most of the piezoresistive sensor calibrations use a specific conditioning chip for calibration, but not all piezoresistive sensors are suitable for this calibration method. There are limited pressure points at the calibration point for calibration using the conditioning chip, and it cannot be refined after calibration. Some conditioning chips still have the problem that the calibration algorithm is fixed, and the calibration algorithm cannot be modified according to the actual application.
现有技术方案,在对传感器的线性补偿中,常用的是线性插值法与多项式曲线拟合法,两种方法都有其各自的缺点,线性插值法中目前大部分传感器线性补偿系统无法做到选点补偿,只能做到均分补偿。多项式曲线拟合法随着补偿点数的增加,计算量将越来越大,且会出现过拟合现象,校准效果差。In the existing technical solutions, in the linear compensation of the sensor, the linear interpolation method and the polynomial curve fitting method are commonly used, and both methods have their own shortcomings. Point compensation can only achieve equal compensation. In the polynomial curve fitting method, with the increase of the number of compensation points, the amount of calculation will become larger and larger, and the phenomenon of over-fitting will occur, and the calibration effect will be poor.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种传感器校准系统及方法,能够提高传感器的校准效率,补偿效果好。The embodiments of the present invention provide a sensor calibration system and method, which can improve the calibration efficiency of the sensor and have a good compensation effect.
第一方面,本发明实施例提供一种传感器校准系统,包括:电路电源模块、单片机模块、传感器模块、前级放大模块、模拟量采集模块、上位机模块、模拟量输出模块以及数字量输出模块;In a first aspect, an embodiment of the present invention provides a sensor calibration system, including: a circuit power supply module, a single-chip microcomputer module, a sensor module, a pre-amplifier module, an analog quantity acquisition module, a host computer module, an analog quantity output module, and a digital quantity output module ;
所述电路电源模块用于为电路供电;The circuit power supply module is used for supplying power to the circuit;
所述传感器模块用于将压力信号转化成电压信号,并将所述电压信号传递到所述前级放大模块上;The sensor module is used to convert the pressure signal into a voltage signal, and transmit the voltage signal to the pre-amplification module;
所述前级放大模块用于将所述电压信号进行放大处理后,传递到所述模拟量采集模块上;The pre-amplifier module is used to amplify the voltage signal and transmit it to the analog quantity acquisition module;
所述模拟量采集模块用于通过模数转换器将接收的所述电压信号转化成数字信号,并将所述数字信号传递到所述单片机模块上;The analog quantity acquisition module is used to convert the received voltage signal into a digital signal through an analog-to-digital converter, and transmit the digital signal to the single-chip microcomputer module;
所述单片机模块用于将所述数字信号进行处理并分别传递到所述上位机模块、所述模拟量输出模块及所述数字量输出模块上;The single-chip microcomputer module is used to process the digital signal and transmit it to the upper computer module, the analog output module and the digital output module respectively;
所述上位机模块用于通过标准的ModBus_RTU协议与所述单片机模块进行通讯连接;The host computer module is used to communicate and connect with the single-chip microcomputer module through the standard ModBus_RTU protocol;
所述模拟量输出模块与所述数字量输出模块用于将所述单片机模块计算后的数据进行对外输出。The analog output module and the digital output module are used for externally outputting the data calculated by the single-chip microcomputer module.
进一步地,所述电路电源模块包括稳压和降压电路。Further, the circuit power supply module includes a voltage regulator and a step-down circuit.
进一步地,所述降压电路包括:稳压芯片、第一电容、第二电容、第三电容及第四电容,所述第一电容与所述第二电容连接在所述稳压芯片的第一端,所述第一电容与所述第二电容并联设置,所述第三电容与所述第四电容连接在所述稳压芯片的第二端,所述第三电容和所述第四电容并联设置。Further, the step-down circuit includes: a voltage regulator chip, a first capacitor, a second capacitor, a third capacitor and a fourth capacitor, and the first capacitor and the second capacitor are connected to the first capacitor of the voltage regulator chip. one end, the first capacitor and the second capacitor are arranged in parallel, the third capacitor and the fourth capacitor are connected to the second end of the voltage regulator chip, the third capacitor and the fourth capacitor Capacitors are set in parallel.
进一步地,所述单片机模块的型号为STM32G030F6P6芯片。Further, the model of the single-chip microcomputer module is STM32G030F6P6 chip.
进一步地,所述前级放大模块包括:前级放大芯片、分别与所述前级放大芯片连接的第五电容、第六电容、第七电容、第八电容、第九电容、第十电容、第一电阻、第二电阻及第三电阻,所述第五电容与所述第二电阻并联后与所述第一电阻的第一端连接,所述第六电容与所述第三电阻并联后与所述第一电阻的第二端连接,所述第七电容、所述第八电容、所述第九电容及所述第十电容的一端接地。Further, the pre-amplification module includes: a pre-amplifier chip, a fifth capacitor, a sixth capacitor, a seventh capacitor, an eighth capacitor, a ninth capacitor, a tenth capacitor, A first resistor, a second resistor and a third resistor, the fifth capacitor is connected in parallel with the second resistor and then connected to the first end of the first resistor, and the sixth capacitor is connected in parallel with the third resistor connected to the second end of the first resistor, and one end of the seventh capacitor, the eighth capacitor, the ninth capacitor and the tenth capacitor is grounded.
进一步地,所述模拟量采集模块包括:带PGA模块的AD转换芯片、连接在所述AD转换芯片的一端上的多个电阻、以及连接在所述AD转换芯片的另一端的电容。Further, the analog quantity acquisition module includes: an AD conversion chip with a PGA module, a plurality of resistors connected to one end of the AD conversion chip, and a capacitor connected to the other end of the AD conversion chip.
进一步地,所述数字量输出模块的型号为DAC5571。Further, the model of the digital output module is DAC5571.
第二方面,本发明实施例还提供了一种传感器校准方法,所述方法包括以下步骤:In a second aspect, an embodiment of the present invention further provides a sensor calibration method, the method includes the following steps:
算法初始化:通过读取单片机Flash中有关校准的参数,将校准点的压力百分比、校准压力点对应的归一化值、校准点数等数据读取出来,再利用这些参数计算出不同折线段对应的斜率与截距,得出函数表达式;Algorithm initialization: By reading the calibration parameters in the MCU Flash, the pressure percentage of the calibration point, the normalized value corresponding to the calibration pressure point, the number of calibration points and other data are read out, and then the parameters corresponding to different polyline segments are calculated. Slope and intercept, get the function expression;
采集电压值:通过所述单片机控制ADC采集当前的电压值并进行相应滤波处理;Collect voltage value: control ADC to collect current voltage value and perform corresponding filtering processing through the single chip microcomputer;
计算归一化值:将采集到的所述电压值换算成ADC对应的归一化值;Calculate the normalized value: convert the collected voltage value into the normalized value corresponding to the ADC;
计算压力百分比:根据计算出来的压力归一化值找到该压力归一化值对应的折线段,根据所述折线段的函数表达式计算出压力百分比;Calculate the pressure percentage: find the polyline segment corresponding to the pressure normalization value according to the calculated pressure normalization value, and calculate the pressure percentage according to the functional expression of the polyline segment;
输出所需信号:根据预设的硬件、计算出的压力百分比,并将信号输出。Output the required signal: According to the preset hardware, the calculated pressure percentage, and output the signal.
进一步地,所述方法还包括上位机模块的校准,包括步骤:Further, the method also includes the calibration of the host computer module, including the steps:
选择对应好串口并打开;Select the corresponding serial port and open it;
选择好传感器参数并写入;Select the sensor parameters and write them;
校准DAC;calibrate the DAC;
将选择的加压百分比数值输入到对应位置;Input the selected pressure percentage value into the corresponding position;
将传感器加压到对应压力百分比的压力点,点击旁边对应按钮,完成数据采集;Press the sensor to the pressure point corresponding to the pressure percentage, and click the corresponding button next to it to complete the data collection;
将所有压力点采集完后点击校准按钮,提示完成校准即代表校准成功;After collecting all pressure points, click the calibration button, and it will prompt that the calibration is completed, which means the calibration is successful;
点击复测按钮,进行复测。Click the retest button to retest.
本发明所达到的有益效果:本发明通过提供一种传感器校准系统及方法,通过电路电源模块用于为电路供电,方便提供稳定的电压和充足的功率;传感器模块用于将压力信号转化成电压信号,并将电压信号传递到前级放大模块上;前级放大模块用于将电压信号进行放大处理后,传递到模拟量采集模块上;模拟量采集模块用于通过模数转换器将接收的电压信号转化成数字信号,并将数字信号传递到单片机模块上;单片机模块用于将数字信号进行处理并分别传递到上位机模块、模拟量输出模块及数字量输出模块上;上位机模块用于通过标准的ModBus_RTU协议与单片机模块进行通讯连接;模拟量输出模块与数字量输出模块用于将单片机模块计算后的数据进行对外输出;系统整体抗干扰能力强,对传感器的线性补偿效果好,使用广泛。The beneficial effects achieved by the present invention: the present invention provides a sensor calibration system and method, and the circuit power supply module is used to supply power to the circuit, so as to provide stable voltage and sufficient power conveniently; the sensor module is used to convert the pressure signal into a voltage signal, and transmit the voltage signal to the pre-amplifier module; the pre-amplifier module is used to amplify the voltage signal and transmit it to the analog acquisition module; the analog acquisition module is used to receive the received signal through the analog-to-digital converter The voltage signal is converted into a digital signal, and the digital signal is transmitted to the single-chip microcomputer module; the single-chip microcomputer module is used to process the digital signal and transmit it to the upper computer module, the analog output module and the digital output module respectively; the upper computer module is used for Through the standard ModBus_RTU protocol to communicate with the single-chip module; the analog output module and the digital output module are used to output the data calculated by the single-chip module; the overall anti-interference ability of the system is strong, and the linear compensation effect of the sensor is good. widely.
附图说明Description of drawings
图1是本发明实施例提供的一种传感器校准系统的模块图;1 is a block diagram of a sensor calibration system provided by an embodiment of the present invention;
图2是本发明实施例提供的电路电源模块的降压电路的电路图;2 is a circuit diagram of a step-down circuit of a circuit power supply module provided by an embodiment of the present invention;
图3是本发明实施例提供的单片机模块的电路图;3 is a circuit diagram of a single-chip microcomputer module provided by an embodiment of the present invention;
图4是本发明实施例提供的前级放大模块的电路图;4 is a circuit diagram of a pre-amplifier module provided by an embodiment of the present invention;
图5是本发明实施例提供的模拟量采集模块的电路图;5 is a circuit diagram of an analog quantity acquisition module provided by an embodiment of the present invention;
图6是本发明实施例提供的模拟地与数字地隔离的电路图;6 is a circuit diagram of an analog ground and a digital ground isolation provided by an embodiment of the present invention;
图7是本发明实施例提供的一种传感器校准方法的方法流程图。FIG. 7 is a method flowchart of a sensor calibration method provided by an embodiment of the present invention.
其中,10、电路电源模块,20、单片机模块,30、传感器模块,40、前级放大模块,50、模拟量采集模块,60、上位机模块,70、模拟量输出模块,80、数字量输出模块。Among them, 10, circuit power supply module, 20, microcontroller module, 30, sensor module, 40, preamplifier module, 50, analog acquisition module, 60, host computer module, 70, analog output module, 80, digital output module.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
现有技术方案在对传感器的线性补偿中,常用的是线性插值法与多项式曲线拟合法,两种方法都有其各自的缺点,线性插值法中目前大部分传感器线性补偿系统无法做到选点补偿,只能做到均分补偿。多项式曲线拟合法随着补偿点数的增加,计算量将越来越大,且会出现过拟合现象,校准效果差。而本申请是通过电路电源模块用于为电路供电,方便提供稳定的电压和充足的功率;传感器模块用于将压力信号转化成电压信号,并将电压信号传递到前级放大模块上;前级放大模块用于将电压信号进行放大处理后,传递到模拟量采集模块上;模拟量采集模块用于通过模数转换器将接收的电压信号转化成数字信号,并将数字信号传递到单片机模块上;单片机模块用于将数字信号进行处理并分别传递到上位机模块、模拟量输出模块及数字量输出模块上;上位机模块用于通过标准的ModBus_RTU协议与单片机模块进行通讯连接;模拟量输出模块与数字量输出模块用于将单片机模块计算后的数据进行对外输出;系统整体抗干扰能力强,对传感器的线性补偿效果好,使用广泛。In the linear compensation of the sensor in the prior art solutions, the linear interpolation method and the polynomial curve fitting method are commonly used. Both methods have their own shortcomings. Most of the current sensor linear compensation systems in the linear interpolation method cannot achieve point selection. Compensation can only be done equally. In the polynomial curve fitting method, with the increase of the number of compensation points, the amount of calculation will become larger and larger, and the phenomenon of over-fitting will occur, and the calibration effect will be poor. In this application, the circuit power module is used to supply power to the circuit, which is convenient to provide stable voltage and sufficient power; the sensor module is used to convert the pressure signal into a voltage signal, and transmit the voltage signal to the preamplifier module; The amplifying module is used to amplify the voltage signal and transmit it to the analog acquisition module; the analog acquisition module is used to convert the received voltage signal into a digital signal through an analog-to-digital converter, and transmit the digital signal to the single-chip microcomputer module. ; The single chip microcomputer module is used to process the digital signal and transmit it to the upper computer module, the analog output module and the digital output module respectively; the upper computer module is used to communicate with the single chip computer module through the standard ModBus_RTU protocol; the analog output module With the digital output module, it is used to output the data calculated by the single-chip microcomputer module to the outside; the overall system has strong anti-interference ability, good linear compensation effect on the sensor, and is widely used.
实施例一Example 1
参见图1-6所示,图1是本发明实施例提供的一种传感器校准系统的模块图;图2是本发明实施例提供的电路电源模块的降压电路的电路图;图3是本发明实施例提供的单片机模块的电路图;图4是本发明实施例提供的前级放大模块的电路图;图5是本发明实施例提供的模拟量采集模块的电路图;图6是本发明实施例提供的模拟地与数字地隔离的电路图。通过提供了一种传感器校准系统100,包括:电路电源模块10、单片机模块20、传感器模块30、前级放大模块40、模拟量采集模块50、上位机模块60、模拟量输出模块70以及数字量输出模块80;所述电路电源模块10用于为电路供电,方便提供稳定的电压和充足的功率;所述传感器模块30用于将压力信号转化成电压信号,并将所述电压信号传递到所述前级放大模块40上;所述前级放大模块40用于将所述电压信号进行放大处理后,传递到所述模拟量采集模块50上;所述模拟量采集模块50用于通过模数转换器将接收的所述电压信号转化成数字信号,并将所述数字信号传递到所述单片机模块20上;所述单片机模块20用于将所述数字信号进行处理并分别传递到所述上位机模块60、所述模拟量输出模块70及所述数字量输出模块80上;所述上位机模块60用于通过标准的ModBus_RTU协议与所述单片机模块20进行通讯连接;所述模拟量输出模块70与所述数字量输出模块80用于将所述单片机模块20计算后的数据进行对外输出。通过电路电源模块10将输入电源进行稳压和稳定功率处理,方便对单片机模块20、传感器模块30、前级放大模块40、模拟量采集模块50、上位机模块60、模拟量输出模块70以及数字量输出模块80进行供电。通过模拟量采集模块50将从前级放大模块40上采集的传感器电压信号使用高精度的ADC将模拟信号转化为数字信号,并通过单片机模块20承担着数据接收、运算、存取、输出与外设配置等至上位机模块60、模拟量输出模块70和数字输出模块上。通过上位机模块60进行人机交互,通过标准的ModBus_RTU协议与单片机模块20进行通讯。通过模拟量与数字量输出将单片机计算后的数据进行对外输出。传感器向下补充效果良好,精度高,适应广泛。Referring to Figures 1-6, Figure 1 is a block diagram of a sensor calibration system provided by an embodiment of the present invention; Figure 2 is a circuit diagram of a step-down circuit of a circuit power module provided by an embodiment of the present invention; Figure 3 is a circuit diagram of the present invention The circuit diagram of the single-chip microcomputer module provided by the embodiment; FIG. 4 is the circuit diagram of the pre-amplifier module provided by the embodiment of the present invention; FIG. 5 is the circuit diagram of the analog quantity acquisition module provided by the embodiment of the present invention; FIG. 6 is provided by the embodiment of the present invention. Circuit diagram with analog ground isolated from digital ground. A sensor calibration system 100 is provided, including: a circuit power supply module 10, a single-chip microcomputer module 20, a sensor module 30, a pre-amplifier module 40, an analog quantity acquisition module 50, a host computer module 60, an analog quantity output module 70 and a digital quantity The output module 80; the circuit power module 10 is used to supply power to the circuit, so as to provide stable voltage and sufficient power; the sensor module 30 is used to convert the pressure signal into a voltage signal, and transmit the voltage signal to the on the pre-amplifier module 40; the pre-amplifier module 40 is used to amplify the voltage signal and transmit it to the analog quantity acquisition module 50; the analog quantity acquisition module 50 is used for The converter converts the received voltage signal into a digital signal, and transmits the digital signal to the single-chip module 20; the single-chip module 20 is used to process the digital signal and transmit it to the upper position respectively On the computer module 60, the analog output module 70 and the digital output module 80; the host computer module 60 is used to communicate with the single-chip module 20 through the standard ModBus_RTU protocol; the analog output module 70 and the digital quantity output module 80 are used for externally outputting the data calculated by the single chip microcomputer module 20 . The input power is regulated and processed by the circuit
更具体的,所述电路电源模块10包括稳压和降压电路。通过降压电路对电路电源模块10使用成本低廉的GM6155-3.3ST25R负责将5V电压转换值3.3V电压,合适的电源模块可以为整个电路提供稳定电压和充足的功率,降压效果好,安全性高。More specifically, the
具体的,所述降压电路包括:稳压芯片A1、第一电容C1、第二电容C2、第三电容C3及第四电容C4,所述第一电容C1与所述第二电容C2连接在所述稳压芯片的第一端(引脚1、2、3),所述第一电容C1与所述第二电容C2并联设置,所述第三电容C3与所述第四电容C4连接在所述稳压芯片的第二端(引脚5),所述第三电容C3和所述第四电容C4并联设置。通过电容的设置能够进行充电,在电路不稳定是可以通过电容进行放电保证电路正常运行。通过降压电路对电路电源模块10使用成本低廉的稳压芯片GM6155-3.3ST25R负责将5V电压转换值3.3V电压,合适的电源模块可以为整个电路提供稳定电压和充足的功率,降压效果好,安全性高。Specifically, the step-down circuit includes: a voltage regulator chip A1, a first capacitor C1, a second capacitor C2, a third capacitor C3 and a fourth capacitor C4, the first capacitor C1 and the second capacitor C2 are connected at At the first end (pins 1, 2, 3) of the voltage regulator chip, the first capacitor C1 and the second capacitor C2 are arranged in parallel, and the third capacitor C3 and the fourth capacitor C4 are connected to each other. At the second end (pin 5) of the voltage regulator chip, the third capacitor C3 and the fourth capacitor C4 are arranged in parallel. It can be charged through the setting of the capacitor. When the circuit is unstable, the capacitor can be discharged to ensure the normal operation of the circuit. The low-cost voltage regulator chip GM6155-3.3ST25R is used for the circuit
更具体的,所述单片机模块20的型号为STM32G030F6P6芯片。单片机模块20分别连接VCC、DGND。通过使用的单片机模块20部分使用STM32G030F6P6,此款芯片封装小,内部资源完全满足本电路要求,具有两个串口、128K-FLASH、DMA等等功能,在此电路中使用一个串口、一个DAM通道、内部Flash(通用闪存接口)和若干IO口,充分的使用到了接口的功能。同时,单片机可以对整个电路进行控制以及对传感器的补偿,控制着前级的放大倍数、采集速率以及输出的模式等,在内部进行计算,使用线性插值法对传感器的线性进行补偿。More specifically, the model of the single-
更具体的,所述前级放大模块40包括:前级放大芯片A5、分别与所述前级放大芯片A5连接的第五电容C10、第六电容C12、第七电容C13、第八电容C14、第九电容C15、第十电容C11、第一电阻R12、第二电阻R11及第三电阻R13,所述第五电容C10与所述第二电阻R11并联后与所述第一电阻R11的第一端连接,所述第六电容C12与所述第三电阻R13并联后与所述第一电阻R11的第二端连接,第七电容C13、第八电容C14、第九电容C15及第十电容C11的一端接地。通过前级放大芯片与电容、电阻组合成的电路,能够起到对信号进行放大的效果,便于单片机对接收的信号的处理。More specifically, the
其中,前级放大芯片A5的型号为OPA2378运算放大器,使用OPA2378作为前级放大可以降低对传感器灵敏度的要求,在灵敏度低的情况下也可以使用此电路进行校准,校准效果良好。Among them, the model of the pre-amplifier chip A5 is OPA2378 operational amplifier. Using OPA2378 as the pre-amplifier can reduce the requirements for the sensitivity of the sensor. In the case of low sensitivity, this circuit can also be used for calibration, and the calibration effect is good.
其中,上述的第五电容C10、第六电容C12的值为10pF,第七电容C13、第八电容C14的值均为0.01uF,第九电容C15及第十电容C11的值为0.1uF。第一电阻R12的阻值10K欧姆,第二电阻R11和第三电阻R13均为25K欧姆。The values of the fifth capacitor C10 and the sixth capacitor C12 are 10pF, the values of the seventh capacitor C13 and the eighth capacitor C14 are both 0.01uF, and the values of the ninth capacitor C15 and the tenth capacitor C11 are 0.1uF. The resistance value of the first resistor R12 is 10K ohm, and the second resistor R11 and the third resistor R13 are both 25K ohm.
更具体的,所述模拟量采集模块50包括:带PGA模块的AD转换芯片A4、连接在所述AD转换芯片A4的一端上的多个电阻(R6-R12)、以及连接在所述AD转换芯片A4的另一端的电容C10。ADC采集使用ADS1247,ADS1247是一个24位、带PGA模块的AD转换芯片,PGA模块可以软件设定放大倍数,可以在不改变硬件的情况下调整整个采集部分的放大倍数。More specifically, the analog
更具体的,模拟量输出模块70的型号可以是H2U-2416MR、H2U-2416MT等。方便模拟量进行输出。More specifically, the model of the
更具体的,所述数字量输出模块80的型号为DAC5571。More specifically, the model of the
更具体的,数字量输出模块80(DAC输出模块)包括:U1、电容C5及电容C6,电容C5连接在U1的两端,该电容C5的一端连接电源,另一端接地。电容C6的一端连接在U1的3和4引脚上,另一端接地。More specifically, the digital output module 80 (DAC output module) includes: U1, a capacitor C5 and a capacitor C6, the capacitor C5 is connected to both ends of U1, one end of the capacitor C5 is connected to the power supply, and the other end is grounded. One end of capacitor C6 is connected to
具体的,该数字量输出模块80有使用简单,输出精度高等优点,通过常用的IIC接口与单片机进行通讯,在中间时间电平转换电路以匹配电平。此电路还可使用单片机剩余的IO口进行扩展以满足模拟量的输出。电路中存在模拟量与数字量的一个模块,通过两个0欧姆的电路与地连接起来,可以实现滤波,降低互相的干扰。Specifically, the
具体实施时,此电路电源模块10设计有电源模块的降压使用成本低廉的GM6155-3.3ST25R负责将5V电压转换值3.3V电压,合适的电源模块可以为整个电路提供稳定电压和充足的功率。使用OPA2378作为前级放大可以降低对传感器灵敏度的要求,在灵敏度低的情况下也可以使用此电路进行校准,模拟量采集模块50ADC采集使用ADS1247,ADS1247是一个24位、带PGA模块的AD转换芯片,PGA模块可以软件设定放大倍数,可以在不改变硬件的情况下调整整个采集部分的放大倍数。In specific implementation, the
单片机部分使用STM32G030F6P6,此款芯片封装小,内部资源完全满足本电路要求,具有两个串口、128K-FLASH、DMA等等功能,在此电路中使用一个串口、一个DAM通道、内部Flash和若干IO口,充分的使用到了功能。The microcontroller part uses STM32G030F6P6. This chip has a small package and internal resources fully meet the requirements of this circuit. It has two serial ports, 128K-FLASH, DMA and other functions. In this circuit, one serial port, one DAM channel, internal Flash and several IOs are used. mouth, the function is fully used.
单片机可以对整个电路进行控制以及对传感器的补偿,控制着前级的放大倍数、采集速率以及输出的模式等,在内部进行计算,使用线性插值法对传感器的线性进行补偿。The single-chip microcomputer can control the entire circuit and compensate the sensor, control the magnification of the front stage, the acquisition rate and the output mode, etc., perform calculations internally, and use the linear interpolation method to compensate the linearity of the sensor.
DAC模块使用DAC5571,此模块有使用简单,输出精度高等优点,通过常用的IIC接口与单片机进行通讯。此电路还可使用单片机剩余的IO口进行扩展以满足模拟量的输出。电路中存在模拟量与数字量的一个模块,通过两个0欧姆的电路与地连接起来,可以实现滤波,降低互相的干扰。The DAC module uses DAC5571. This module has the advantages of simple use and high output precision. It communicates with the microcontroller through the commonly used IIC interface. This circuit can also use the remaining IO ports of the microcontroller to expand to meet the analog output. There is a module of analog quantity and digital quantity in the circuit. By connecting two 0 ohm circuits to the ground, filtering can be realized and mutual interference can be reduced.
实施例二
参见图7所示,图7是本发明实施例提供的一种传感器校准方法的方法流程图。本发明实施例还提供了一种传感器校准方法,所述方法包括以下步骤:Referring to FIG. 7 , FIG. 7 is a method flowchart of a sensor calibration method provided by an embodiment of the present invention. The embodiment of the present invention also provides a sensor calibration method, the method includes the following steps:
S01、算法初始化:通过读取单片机Flash中有关校准的参数,将校准点的压力百分比、校准压力点对应的归一化值、校准点数等数据读取出来,再利用这些参数计算出不同折线段对应的斜率与截距,得出函数表达式。S01. Algorithm initialization: By reading the calibration parameters in the MCU Flash, the pressure percentage of the calibration point, the normalized value corresponding to the calibration pressure point, the number of calibration points and other data are read out, and then these parameters are used to calculate different polyline segments The corresponding slope and intercept, the function expression is obtained.
S02、采集电压值:通过所述单片机控制ADC采集当前的电压值并进行相应滤波处理。S02. Collect voltage value: control the ADC to collect the current voltage value through the single chip microcomputer and perform corresponding filtering processing.
S03、计算归一化值:将采集到的所述电压值换算成ADC对应的归一化值。S03. Calculate the normalized value: convert the collected voltage value into a normalized value corresponding to the ADC.
S04、计算压力百分比:根据计算出来的压力归一化值找到该压力归一化值对应的折线段,根据所述折线段的函数表达式计算出压力百分比。S04. Calculate the pressure percentage: find the polyline segment corresponding to the pressure normalization value according to the calculated pressure normalization value, and calculate the pressure percentage according to the functional expression of the polyline segment.
S05、输出所需信号:根据预设的硬件、计算出的压力百分比,并将信号输出。S05. Output the required signal: according to the preset hardware, the calculated pressure percentage, and output the signal.
具体的,补偿的方式使用的是压力点非均分补偿,同时可以在上位机软件中输入需要校准点的百分比,这样的好处是可以做到选择性补偿,对于一些大量程的传感器,在较低压力段线性不好的,可以针对性补偿,在低压力段设置多几个校准点。补偿点数最高支持到11点,最少2点,这样设计可以满足基本上所有的应用场合。通过算法初始化过程主要是读取单片机Flash中有关校准的参数,将校准点的压力百分比、校准压力点对应的归一化值、校准点数等数据读取出来,再利用这些参数计算出不同折线段对应的斜率与截距,得出函数表达式。单片机控制ADC采集当前的电压值并进行相应滤波处理;将采集到的电压值换算成ADC对应的归一化值;根据计算出来的压力归一化值找到此压力归一化值对应的折线段,根据此段的函数表达式计算出压力百分比。根据提前设计好的硬件、计算出的压力百分比,将信号输出。Specifically, the compensation method uses non-uniform pressure point compensation. At the same time, the percentage of the points to be calibrated can be input in the host computer software. The advantage of this is that selective compensation can be achieved. If the linearity of the low pressure section is not good, it can be compensated in a targeted manner, and several more calibration points can be set in the low pressure section. Compensation points are supported up to 11 points and at least 2 points, so the design can meet basically all applications. The algorithm initialization process is mainly to read the parameters related to the calibration in the Flash of the microcontroller, read out the pressure percentage of the calibration point, the normalized value corresponding to the calibration pressure point, the number of calibration points, etc., and then use these parameters to calculate the different polyline segments The corresponding slope and intercept, the function expression is obtained. The microcontroller controls the ADC to collect the current voltage value and perform corresponding filtering processing; convert the collected voltage value into the normalized value corresponding to the ADC; find the line segment corresponding to the pressure normalized value according to the calculated pressure normalized value , the pressure percentage is calculated according to the function expression in this section. According to the pre-designed hardware and the calculated pressure percentage, the signal is output.
更具体的,所述方法还包括上位机模块的校准,包括步骤:More specifically, the method also includes calibration of the host computer module, including the steps:
第一步:选择对应好串口并打开。Step 1: Select the corresponding serial port and open it.
第二步:选择好传感器参数并写入。Step 2: Select the sensor parameters and write them.
第三步:校准DAC。Step 3: Calibrate the DAC.
第四步:将选择的加压百分比数值输入到对应位置。Step 4: Enter the selected pressure percentage value into the corresponding position.
第五步:将传感器加压到对应压力百分比的压力点,点击旁边对应按钮,完成数据采集。Step 5: Press the sensor to the pressure point corresponding to the pressure percentage, and click the corresponding button next to it to complete the data collection.
第六步:将所有压力点采集完后点击校准按钮,提示完成校准即代表校准成功。Step 6: After collecting all the pressure points, click the calibration button, and it will prompt that the calibration is completed, which means the calibration is successful.
第七步:点击复测按钮,进行复测。Step 7: Click the retest button to retest.
具体的,选择对应好串口并打开。选择好传感器参数并写入。校准DAC。Specifically, select the corresponding serial port and open it. Select the sensor parameters and write them. Calibrate the DAC.
将选择的加压百分比数值输入到对应位置。将传感器加压到对应压力百分比的压力点,点击旁边对应按钮,完成数据采集。将所有压力点采集完后点击校准按钮,提示完成校准即代表校准成功。点击复测按钮,进行复测。补偿点数2-11点可选,目前市面上大多传感器线性补偿系统无法做到这点。校整个多点补偿系统可以满足绝大多数传感器补偿需求,可以选择输出模拟量、数字量等多样化信号。校准点位不需要均分且可以使用上位机软件输入校准点压力值的百分比,目前市面上的大多补偿需要进行均分补偿,且无法输入补偿点的百分比数值。整个补偿系统应用简单,只需接入传感器,选择对应输出,校准后即可使用。整个电路设计为工业使用环境,抗干扰能力强。Enter the selected pressure percentage value into the corresponding position. Press the sensor to the pressure point corresponding to the pressure percentage, and click the corresponding button next to it to complete the data collection. After collecting all the pressure points, click the calibration button, and it will prompt that the calibration is completed, which means the calibration is successful. Click the retest button to retest. The number of compensation points can be selected from 2 to 11 points. At present, most sensor linear compensation systems on the market cannot do this. The entire multi-point compensation system can meet the compensation needs of most sensors, and can choose to output various signals such as analog quantity and digital quantity. The calibration point does not need to be divided and the percentage of the pressure value of the calibration point can be input by using the host computer software. Most of the compensations on the market currently need to be divided into compensation, and the percentage value of the compensation point cannot be input. The entire compensation system is simple to use, just connect the sensor, select the corresponding output, and use it after calibration. The whole circuit is designed for industrial use environment and has strong anti-interference ability.
需要说明的是,本申请的说明书和权利要求书及附图说明中的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。本申请的说明书和权利要求书或附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。It should be noted that the terms "comprising" and "having" in the description and claims of the present application and the description of the drawings and any modifications thereof are intended to cover non-exclusive inclusion. The terms "first", "second" and the like in the description and claims of the present application or the drawings are used to distinguish different objects, rather than to describe a specific order. Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
以上仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included in the protection scope of the present invention. Inside.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210821708.8A CN115165208A (en) | 2022-07-13 | 2022-07-13 | A sensor calibration system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210821708.8A CN115165208A (en) | 2022-07-13 | 2022-07-13 | A sensor calibration system and method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115165208A true CN115165208A (en) | 2022-10-11 |
Family
ID=83492709
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210821708.8A Pending CN115165208A (en) | 2022-07-13 | 2022-07-13 | A sensor calibration system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115165208A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107084818A (en) * | 2017-03-22 | 2017-08-22 | 深圳市博巨兴实业发展有限公司 | A kind of calibration method of high-precision pressure sensor chip |
CN107741295A (en) * | 2017-09-15 | 2018-02-27 | 江苏大学 | A MENS capacitive air pressure sensor test calibration device and method |
CN107941417A (en) * | 2017-11-10 | 2018-04-20 | 苏州华兴源创电子科技有限公司 | The output calibrating installation and method of a kind of pressure sensor |
CN207782659U (en) * | 2017-12-26 | 2018-08-28 | 杭州之山智控技术有限公司 | Promote the reduction voltage circuit of circuit reliability |
CN208887841U (en) * | 2018-11-15 | 2019-05-21 | 苏州真感微电子科技有限公司 | A kind of cell pressure calibrating installation |
CN112798180A (en) * | 2021-01-04 | 2021-05-14 | 珠海格力电器股份有限公司 | Fault detection method of force sensor and computer-readable storage medium |
CN113375853A (en) * | 2021-06-09 | 2021-09-10 | 上海钧嵌传感技术有限公司 | Air pressure sensor module and calibration method thereof |
-
2022
- 2022-07-13 CN CN202210821708.8A patent/CN115165208A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107084818A (en) * | 2017-03-22 | 2017-08-22 | 深圳市博巨兴实业发展有限公司 | A kind of calibration method of high-precision pressure sensor chip |
CN107741295A (en) * | 2017-09-15 | 2018-02-27 | 江苏大学 | A MENS capacitive air pressure sensor test calibration device and method |
CN107941417A (en) * | 2017-11-10 | 2018-04-20 | 苏州华兴源创电子科技有限公司 | The output calibrating installation and method of a kind of pressure sensor |
CN207782659U (en) * | 2017-12-26 | 2018-08-28 | 杭州之山智控技术有限公司 | Promote the reduction voltage circuit of circuit reliability |
CN208887841U (en) * | 2018-11-15 | 2019-05-21 | 苏州真感微电子科技有限公司 | A kind of cell pressure calibrating installation |
CN112798180A (en) * | 2021-01-04 | 2021-05-14 | 珠海格力电器股份有限公司 | Fault detection method of force sensor and computer-readable storage medium |
CN113375853A (en) * | 2021-06-09 | 2021-09-10 | 上海钧嵌传感技术有限公司 | Air pressure sensor module and calibration method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102032974B (en) | Temperature compensation method for pressure sensor | |
CN102176142A (en) | FPGA (Field Programmable Gate Array)-based high-speed data acquisition system | |
CN104614593A (en) | Self-calibration based high-precision intelligent instrument system and application method thereof | |
CN102692883B (en) | An analog input circuit for engineering-machinery-dedicated controller | |
CN104457817A (en) | Single chip integrated sensor signal processing circuit | |
CN106707895B (en) | A high-precision synchronous vibration data acquisition card integrating multiple types of detection signals | |
CN110031700A (en) | A kind of satellite load universal grounding detection board based on PXI bus | |
CN107516410B (en) | Be applied to host computer MBUS receiving circuit of multinode | |
CN115165208A (en) | A sensor calibration system and method | |
CN201682485U (en) | Analog-to-digital combined data acquisition device | |
CN203824578U (en) | Digital temperature and humidity sensor | |
CN202583361U (en) | Power quality data acquisition circuit | |
CN112858611A (en) | Dissolved oxygen sensor interface middleware | |
CN111628777A (en) | A conversion circuit based on ADC chip for passive secondary loop check table | |
CN103616086A (en) | Thermal resistance temperature transmitter | |
CN111223283A (en) | Multi-path data classification type big data acquisition method | |
CN203642965U (en) | Multi-interface temperature and humidity data collector | |
CN202033737U (en) | FPGA-based high-speed data acquisition system | |
CN205228671U (en) | Temperature measuring apparatus | |
CN210428141U (en) | Digital sensor | |
CN206532118U (en) | A kind of S type force-sensing sensors of data signal output | |
CN207248369U (en) | A kind of radio-frequency power amplifier temperature sensing circuit | |
CN208207583U (en) | Signal acquisition circuit | |
CN221686943U (en) | A single bus conversion circuit for industrial communication | |
CN214896589U (en) | Serial port-to-USB conversion circuit |
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 |