Humidity detection method based on polymer impedance type humidity sensitive element
By applying leakage current compensation and Gaussian polynomial fitting technology in polymer impedance moisture-sensitive element hygrometers, combined with the K nearest neighbor classification algorithm, the existing hygrometer has solved the problem of narrow measurement range and low accuracy, and achieved small, high-precision and wide measurement range humidity detection.
Patent Information
- Application Number
- CN202411957509.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-25
AI Technical Summary
Existing polymer impedance type moisture-sensitive element type hygrometers have problems with narrow measurement range and low accuracy, which is difficult to meet the needs of wide measurement range and high accuracy.
By using the leakage current compensation formula to broaden the measurement range of the impedance measurement system, and establish a relative humidity-impedance Gaussian polynomial fitting formula at different temperatures, combined with the K nearest neighbor classification algorithm, adjust the step value of the relative humidity value, obtain a test data set with a large amount of data, and finally achieve high-precision humidity detection.
It realizes humidity detection with a small, high precision and wide measurement range, overcomes the problems of narrow measurement range and low accuracy in the prior art, and has the characteristics of miniaturization and high accuracy.
Smart Images

Figure CN119881024A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of humidity detection, and in particular relates to a humidity detection method based on a polymer impedance-type humidity-sensitive element with small size, high precision and wide measurement range. Background Art
[0002] Humidity sensors are widely used in environmental monitoring, industrial production, smart home, medical health, scientific research and innovation, etc., ensuring appropriate environmental humidity, improving production efficiency and product quality, optimizing living and working environment, promoting sustainable use of resources, and promoting interdisciplinary research and technological innovation.
[0003] Polymer impedance-type humidity sensors have the characteristics of fast response speed, small size, good linearity, and good long-term stability. However, most existing polymer impedance-type humidity sensors have problems such as narrow measurement range and low accuracy. The narrow measurement range is due to the large impedance range of polymer impedance-type humidity sensors, which reaches the megohm level at low relative humidity, and has high requirements for the hardware measurement system; the low accuracy is due to defects in the measurement accuracy and data processing of the hardware measurement system. Therefore, it is very important to develop a humidity detection system with a wide measurement range and high measurement accuracy. Summary of the invention
[0004] The purpose of the present invention is to provide a humidity detection method based on a polymer impedance type humidity sensor with a small size, high precision and wide measurement range. The present invention first uses a leakage current compensation formula to broaden the measurement range of the impedance measurement system to obtain the impedance of the humidity sensor, and establishes a relative humidity-impedance Gaussian polynomial fitting formula according to the characteristics of the humidity sensor at different temperatures, and then adjusts the step value of the relative humidity value according to the polynomial fitting formula to obtain a test data set with a large amount of data, and finally uses a K nearest neighbor classification algorithm to give the current relative humidity according to the current impedance and temperature values. The method has the characteristics of a wide measurement range, high measurement accuracy, and miniaturization.
[0005] In order to achieve the above technical requirements, the present invention adopts the following technical solutions:
[0006] The detection system used in the humidity detection method based on the polymer impedance type humidity sensor described in the present invention is composed of two parts: a polymer impedance type humidity sensor and an impedance measurement system. The impedance of the polymer impedance type humidity sensor is negatively correlated with the relative humidity. The structure of the humidity sensor can refer to the invention patent CN118274989B (from top to bottom, it is composed of a polytetrafluoroethylene upper packaging layer, a non-homogeneous temperature-sensitive hydrogel film, a flexible polyethylene terephthalate substrate with gold interdigital electrodes plated on the upper surface, and a polytetrafluoroethylene lower packaging layer. The overall thickness of the obtained sensor is 0.521-0.723 mm. The impedance of the polymer impedance type humidity sensor refers to the impedance value between the gold interdigital electrodes). In order to prevent the polarization effect of the humidity sensor, the voltage signal applied between the two interdigital electrodes of the humidity sensor is generally The impedance measurement system is divided into an analog part and a digital part. The analog part is composed of a DDS unit (direct digital frequency synthesizer, which can output different signals), a signal processing unit, an IV conversion (current-voltage conversion) unit, and a DFT unit (discrete Fourier transform, which can perform amplitude-frequency conversion to obtain different frequency signal amplitudes). The digital part is composed of a microprocessor (STM32F103C8T6), an OLED display (organic electroluminescent display), buttons and a temperature sensor. The DDS and DFT units are integrated in AD5933. The microprocessor (STM32F103C8T6) controls the DDS unit to generate a sinusoidal voltage signal and obtains the AC voltage signal amplitude U obtained by the DFT unit by communicating with AD5933. FB .
[0007] like Figure 2As shown, the DDS unit in the analog part generates a sine wave voltage signal with a frequency greater than or equal to 1kHz and an amplitude of 1V under the control of a microprocessor (STM32F103C8T6), and then the sine wave voltage signal enters a signal processing unit, which consists of a high-pass filter and a low-pass filter. The 50nF NP0 capacitor C1 and the resistors R1 and R2 with resistance values of 50kΩ respectively form a high-pass filter; the resistors R1 and R2 are connected in series, one end of which is connected to the VDDA voltage and the other end is connected to GND to divide the voltage of VDDA; one end of the capacitor C1 is connected to the output end of the DDS unit, and the other end is connected between R1 and R2; the high-pass filter filters out the DC component of the DDS output, and then the resistors R1 and R2 divide the VDDA voltage (3.3V) and apply a DC component of 1.65V to the sine wave voltage signal processed by the high-pass filter; in order to eliminate high-frequency interference, the resistors R3 and R4 with resistance values of 10kΩ and 100pF NP0 capacitor C2, 200pF NP0 capacitor C3 and operational amplifier AD8605 form a Sallen-Key low-pass filter; one end of resistor R3 is connected between resistors R1 and R2, the other end of resistor R3 is connected to resistor R4 and one end of capacitor C3, the other end of capacitor C3 is respectively connected to pin 1 and pin 4 of operational amplifier AD8605, the other end of resistor R4 is respectively connected to one end of capacitor C2 and pin 3 of operational amplifier AD8605, and the other end of capacitor C2 is connected to GND; pin 2 of operational amplifier AD8605 is connected to GND, and pin 5 is connected to VDDA voltage; the signal processed by the low-pass filter is output to SMA-A via pin 1 of operational amplifier AD8605.
[0008] like Figure 2As shown in the figure, when the DDS unit outputs a 3kHz, 1V sine wave voltage signal, the function of the signal processing unit is to filter and amplify the sine wave voltage signal output by the DDS to 1.65+cos(6000πt)V, and the frequency signals output by the other DDS are processed in this way to 1.65+cos(2πft) style. At this time, the 1.65+cos(6000πt)V voltage signal output by the signal processing unit is output to SMA-A through the operational amplifier AD8605 pin 1, and then applied to the interdigital electrode at one end of the humidity sensor by SMA-A. The voltage signal of the interdigital electrode at the other end of the humidity sensor is provided by SMA-B. The IV conversion unit is composed of an operational amplifier AD8605, resistors R5 and R6 with resistance values of 50kΩ respectively, and a feedback circuit part. Pin 2 of the operational amplifier AD8605 is connected to GND, pin 5 is connected to the VDDA voltage, and the feedback circuit part is connected between pins 1 and 4. Resistors R5 and R6 are connected in series to form a voltage divider circuit. The series terminal of R5 and R6 is connected to pin 3 of the operational amplifier AD8605, the other end of the resistor R5 is connected to the VDDA voltage, and the other end of R6 is connected to GND, so that the input voltage of pin 3 of AD8605 is 1.65V; SMA-B is connected to pin 4 of the operational amplifier AD8605 in the IV conversion unit. According to the virtual short principle of the negative feedback circuit of the operational amplifier, the voltage of pin 4 of AD8605 is equal to the voltage of pin 3 of AD8605, which is 1.65V, so the voltage between the two interdigital electrodes of the humidity sensor is cos(6000πt)V.
[0009] like Figure 2 As shown, the two interdigital electrodes of the humidity sensor are connected between SMA-A and SMA-B. The current flowing through the two interdigital electrodes of the humidity sensor will flow from SMA-B to the feedback circuit part between pin 4 and pin 1 of the operational amplifier AD8605 in the IV conversion unit (according to the virtual disconnection principle of the operational amplifier, no current will flow into pin 4 of AD8605). The feedback circuit part is composed of analog switch ADG704 and feedback resistors R7, R8, R9, R10 and decoupling capacitor C4. Pin 5 and pin 6 of ADG704 are connected to VDDA voltage, pin 6 is connected to GND after passing through 100nF decoupling capacitor C4, and pin 3 is connected to GND; pin 2, pin 9, pin 4, and pin 7 are respectively connected to one side of 10kΩ feedback resistor R7, 100kΩ feedback resistor R8, 200kΩ feedback resistor R9 and 1MΩ feedback resistor R10, and feedback resistor R FB The other side of (R7~R10) is connected to pin 1 of operational amplifier AD8605 in IV conversion unit. During the feedback process, the current signal from SMA-B will first enter pin 8 of ADG704. The high and low level combination of pin 1 and pin 10 of ADG704 can be controlled by microprocessor to form a path between pin 8 and any one of pin 2, pin 9, pin 4 and pin 7. After the current signal is converted into a voltage signal through the feedback resistor (UFB =I*R FB ) is output from pin 1 of the operational amplifier AD8605 in the IV conversion unit as (1.65-U FB )V, and then input to AD5933 pin 4 through the series connection of resistors R11 and R12 with a resistance value of 20kΩ respectively. The series connection of R11 and R12 is connected to AD5933 pin 5. The function of this part is to provide a 1.65V reference voltage to ensure that the sine wave signal input from AD8605 pin 1 to AD5933 pin 4 is only phase-shifted by 180 degrees but the amplitude remains unchanged, so the signal is (1.65-U FB ) becomes (1.65+U FB )V. AD5933 pins 15 and 16 are connected to VDDA voltage (maintained high level when IIC is not communicating) through 2kΩ pull-up resistors R1 and R2 respectively. AD5933 pins 15 and 16 are used as SDA and SCL signal lines to communicate with the microprocessor respectively. The current between the two interdigital electrodes of the transmission sensor flows through the feedback circuit R FB The AC voltage amplitude U FB To the microprocessor. In terms of power supply, AD5933 pins 9, 10, and 11 are connected to the VDDA voltage, where 10μF capacitor C52 and 0.1μF capacitor C53 are connected to VDDA and GND at one end as filter capacitors, and AD5933 pins 11, 12, and 13 are connected to GND. Pin 8 is connected to the external active crystal oscillator 16MHz signal.
[0010] In the digital part, the microprocessor (STM32F103C8T6) is responsible for IIC communication with AD5933 to control the DDS unit to generate a sine wave voltage signal and obtain the AC voltage signal amplitude U obtained by the DFT unit. FBTo calculate the impedance value between the two interdigital electrodes of the humidity-sensitive element. At the same time, the microprocessor can also record the number of effective button presses to adjust the output frequency of DDS (by counting the number of effective button presses, the internal program of the microprocessor communicates with AD5933 to make the output frequency of DDS change between 1kHz and 5kHz), so that the impedance value between the two interdigital electrodes of the sensor changes to within the effective measurement range of 30MΩ; in addition, the microprocessor is also responsible for controlling the high and low levels of the analog switch ADG704 pin 1 and pin 10 of the IV conversion unit. In order to prevent the large current from appearing in the large resistance sampling, the microprocessor must promptly control the ADG704 to switch to small resistance sampling; in order to avoid the influence of temperature, the microprocessor also obtains the temperature value of the sensor when it is actually working through the temperature sensor. In addition, the microprocessor can also control the display of OLED (displaying impedance, temperature, humidity and a channel information currently sampled) to observe data changes and then adjust the DDS output through the button. When the impedance value is observed to be greater than the effective measurement range of 30MΩ, the component impedance can be reduced by pressing the button to increase the output frequency of DDS.
[0011] The two interdigitated electrodes of the humidity sensor are welded on the pads in the test base. At this time, the connection sequence is interdigitated electrode-test base pad-IPEX patch antenna carrier-IPEX to SMA RF cable-SMA antenna carrier. Therefore, the voltage difference between the two interdigitated electrodes is the voltage difference between SMA antenna carrier A (SMA-A) and SMA antenna carrier B (SMA-B) in the simulation part. Therefore, the impedance value between the two interdigitated electrodes of the humidity sensor is calculated as follows:
[0012]
[0013] Where Z m is the calculated impedance value between the two interdigital electrodes of the humidity sensor, R FB is the feedback resistor in the feedback circuit of the IV conversion unit, U FB The current between the two interdigital electrodes of the sensor flows through the feedback resistor R FB The AC voltage amplitude on (that is, the voltage amplitude obtained by the DFT unit in the above process).
[0014] In order to suppress the influence of electromagnetic interference on weak signals in the impedance measurement system, on the basis of paying attention to layout and wiring (power supply filtering, digital analog single point connection to GND, adjacent wires follow the 3W principle, etc.), in order to further compensate for the conversion error caused by the IV conversion part, connection components and filters, an impedance compensation formula is established:
[0015]
[0016] Where Z is the impedance value after compensation, I DIt is the leakage current existing in the circuit, wherein the leakage current value needs to be measured through multiple sets of calibration resistors. The leakage current can be calculated according to the difference between the actual resistance values of the multiple sets of calibration resistors and the measured resistance values. For specific measures, please refer to the embodiments.
[0017] On the basis of improving the impedance measurement system in the humidity detection method, the present invention also provides a humidity detection method based on a polymer impedance-type humidity sensor, and the steps are as follows:
[0018] (1) Under a constant temperature environment, a controllable relative humidity environment is established in the test chamber through the gas distribution system, and the controllable relative humidity range is 2% to 95% RH; the two interdigital electrodes of the polymer impedance type humidity sensor are respectively welded on the pads of the test base, and the pads are respectively connected to the IPEX patch antenna seat, and an IPEX to SMA RF cable is connected to each IPEX patch antenna seat, and the two IPEX to SMA RF cables are respectively connected to the SMA antenna seat A and SMA antenna seat B in the external impedance measurement system through the 3.2mm air hole on the test chamber; therefore, the voltage difference between the two interdigital electrodes is the voltage difference between the SMA antenna seat A and the SMA antenna seat B in the simulation part, and then the polymer impedance type humidity sensor and the test base are placed in the test chamber;
[0019] (2) The microprocessor controls the DDS to output a 3kHz sine wave voltage, which is filtered and amplified by the signal processing unit to be a voltage signal of 1.65+cos(6000πt)V. The voltage signal is then applied to the interdigital electrode at one end of the humidity sensor through the SMA antenna carrier A, the IPEX to SMA RF cable, the IPEX patch antenna carrier, and the pad. The 1.65V voltage signal from the IV conversion unit is applied to the interdigital electrode at the other end through the SMA antenna carrier B, the IPEX to SMA RF cable, the IPEX patch antenna carrier, and the pad. The microprocessor internally converts the measured humidity sensor impedance Z into a value every 500ms. m Calculate Z according to the compensation formula and display it on the OLED. Adjust the relative humidity every 10 minutes (the relative humidity range is 2-95% RH, with 2-20% RH increasing by 1% RH and 21-95% RH increasing by 5% RH. When the humidity sensor is in a new humidity environment, it will continuously absorb and desorb, causing the impedance to change continuously. After 10 minutes, the impedance value will tend to be stable). At the same time, record the humidity sensor impedance value Z displayed on the OLED.
[0020] (3) After collecting the relative humidity x-impedance Z data through the air distribution system and the impedance measurement system, the relative humidity x-impedance Z data is fitted using the Gaussian polynomial fitting formula on the MATLAB platform according to the characteristics of the humidity sensor. The purpose of the fitting is to improve the accuracy of the data estimation by adding more relative humidity x-impedance Z data. During the fitting process, the relative humidity x is increased by 0.5% RH in the range of 2% to 95% RH. The Gaussian polynomial fitting formula is as follows:
[0021]
[0022] Where Z F is the impedance fitting, x is the relative humidity, a is the height of the Gaussian peak, b is the center position of the Gaussian peak, c is the width of the Gaussian peak, n is the polynomial order, the coefficient a of the polynomial is determined through the fitting process, and the specific values of each parameter in the Gaussian polynomial fitting are calculated by MATLAB; at the beginning of the fitting process, x and Z F The 34 sets of relative humidity x-impedance Z data sets obtained in step (2) are used in this step to interpolate these 34 sets of xZ data to obtain 187 sets of xZ F Data sets, thereby improving the accuracy of data estimates;
[0023] (4) In an environment with the same relative humidity but different temperatures, the impedance values of the humidity sensor are different. Therefore, the ambient temperature is changed, that is, the temperature is increased by 0.5°C in the temperature range of 20 to 30°C, and steps (1) to (3) are repeated to obtain a total of 21 sets of temperature values xZ F Data set; The purpose of this step is to collect the impedance characteristics of the humidity sensor at different temperatures and eliminate the influence of temperature during the detection process;
[0024] (5) The variables that affect the impedance of the humidity sensor are relative humidity and temperature. The same impedance value can correspond to multiple combinations of relative humidity and temperature. When actually measuring the humidity of the environment to be tested, the temperature value of the environment to be tested is first detected by the temperature sensor in the digital part, and then the K nearest neighbor classification algorithm is used to calculate the impedance-temperature combination with the smallest standard Euclidean distance D with the test data set, which is the estimated point, thereby obtaining the relative humidity of the environment to be tested, where
[0025]
[0026] D is the standard Euclidean distance, Z d , K d is the actual measured impedance value and temperature value of the test environment, Z F is the impedance value at temperature K during the Gaussian fitting process in step (4). During the calculation process, Z d -K d The combination should be with each ZF -K combination calculates the standard Euclidean distance, so there are 3927 values of D (21 groups of temperatures, each group of temperature has 187 impedance data); V z 、V k is the variance of the impedance value and the temperature value in step (4), the variance V z 、V k It can be calculated by referring to the following formula:
[0027]
[0028] Where V is the variance, N is the Z in the fitting process F -K, X is the impedance value or temperature value, X i It is the average value of the impedance value or temperature value. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a structural block diagram of the impedance measurement system of the present invention;
[0030] Figure 2 It is a schematic diagram of the structure of the signal processing and IV conversion unit of the impedance measurement system of the present invention;
[0031] Figure 3 It is a polymer impedance type humidity sensitive element test base in the present invention (1 is a soldering pad, 2 is a substrate, and 3 is an IPEX patch antenna seat);
[0032] Figure 4 4 is a schematic diagram of the connection between the IPEX to SMA radio frequency cable and the test base in the present invention (4 is the IPEX to SMA radio frequency cable);
[0033] Figure 5 Schematic diagram of the humidity gas distribution system in the present invention (5 is a nitrogen gas cylinder, 6 is a flow control device, 7 is a humidifying device, and 8 is a test chamber);
[0034] Figure 6 It is a flow chart of the humidity detection method based on the polymer impedance type humidity sensor of the present invention;
[0035] Figure 7 It is the impedance data Z of the humidity sensitive element measured by the impedance measurement system at 25°C under 2% to 95% RH in the present invention. DETAILED DESCRIPTION
[0036] Example 1
[0037] In order to explain the principles, technical solutions and advantages of the present invention in detail, the following is further described in detail with reference to the accompanying drawings and implementation examples:
[0038] like Figure 1As shown, in the humidity detection method of the present invention, the impedance measurement system is divided into an analog part and a digital part. The analog part is composed of a DDS, a signal processing unit, a polymer impedance-type humidity-sensitive element, an IV conversion unit, and a DFT unit, and the digital part is composed of a microprocessor (STM32F103C8T6), an OLED, a button, and a temperature sensor.
[0039] In order to suppress the power supply interference of analog circuits and digital circuits, the analog part requires the use of LDO type regulators with a supply voltage of 3.3V to prevent the excessive ripple in the circuit from affecting the measurement accuracy. The digital part requires the use of DC-DC type regulators with a supply voltage of 3.3V to prevent the power consumption in the circuit from being too high and LDO cannot meet the requirements. The models of LDO type regulators and DC-DC type regulators are TPS7A2033PDBVR and TPS82130SILR respectively.
[0040] The DDS unit in the analog part generates a sinusoidal voltage signal with a frequency greater than or equal to 1kHz and an amplitude of 1V under the control of the microprocessor (STM32F103C8T6). The sinusoidal voltage signal then enters the signal processing unit, which consists of a high-pass filter and a low-pass filter. The 50nF NP0 capacitor C1 and the resistors R1 and R2 with resistance values of 50kΩ respectively form a high-pass filter; the resistors R1 and R2 are connected in series, one end of which is connected to the VDDA voltage and the other end is connected to GND to divide the voltage of VDDA; one end of the capacitor C1 is connected to the output end of the DDS unit, and the other end is connected between R1 and R2; the high-pass filter filters out the DC component of the DDS output, and then the resistors R1 and R2 divide the VDDA voltage (3.3V) and apply a DC component of 1.65V to the sinusoidal voltage signal processed by the high-pass filter; in order to eliminate high-frequency interference, the resistors R3 and R4 with resistance values of 10kΩ and 100pF NP0 capacitor C2, 200pF NP0 capacitor C3 and operational amplifier AD8605 form a Sallen-Key low-pass filter; one end of resistor R3 is connected between resistors R1 and R2, the other end of resistor R3 is connected to resistor R4 and one end of capacitor C3, the other end of capacitor C3 is respectively connected to pin 1 and pin 4 of operational amplifier AD8605, the other end of resistor R4 is respectively connected to one end of capacitor C2 and pin 3 of operational amplifier AD8605, and the other end of capacitor C2 is connected to GND; pin 2 of operational amplifier AD8605 is connected to GND, and pin 5 is connected to VDDA voltage; the signal processed by the low-pass filter is output to SMA-A via pin 1 of operational amplifier AD8605.
[0041] When the DDS unit outputs a 3kHz, 1V sine wave voltage signal, the function of the signal processing unit is to filter and amplify the sine wave voltage signal output by the DDS to 1.65+cos(6000πt)V, and the frequency signals output by the other DDS are processed in this way to 1.65+cos(2πft) style. At this time, the 1.65+cos(6000πt)V voltage signal output by the signal processing unit is output to SMA-A through the operational amplifier AD8605 pin 1, and then applied to the interdigital electrode at one end of the humidity sensor by SMA-A. The voltage signal of the interdigital electrode at the other end of the humidity sensor is provided by SMA-B. The IV conversion unit is composed of an operational amplifier AD8605, resistors R5 and R6 with resistance values of 50kΩ respectively, and a feedback circuit part. Pin 2 of the operational amplifier AD8605 is connected to GND, pin 5 is connected to the VDDA voltage, and the feedback circuit part is connected between pins 1 and 4. Resistors R5 and R6 are connected in series to form a voltage divider circuit. The series terminal of R5 and R6 is connected to pin 3 of the operational amplifier AD8605, the other end of the resistor R5 is connected to the VDDA voltage, and the other end of R6 is connected to GND, so that the input voltage of pin 3 of AD8605 is 1.65V; SMA-B is connected to pin 4 of the operational amplifier AD8605 in the IV conversion unit. According to the virtual short principle of the negative feedback circuit of the operational amplifier, the voltage of pin 4 of AD8605 is equal to the voltage of pin 3 of AD8605, which is 1.65V, so the voltage between the two interdigital electrodes of the humidity sensor is cos(6000πt)V.
[0042] The two interdigitated electrodes of the humidity sensor are connected between SMA-A and SMA-B. The current flowing through the two interdigitated electrodes of the humidity sensor will flow from SMA-B to the feedback circuit part between pin 4 and pin 1 of the operational amplifier AD8605 in the IV conversion unit (according to the virtual disconnection principle of the operational amplifier, no current will flow into pin 4 of AD8605). The feedback circuit part is composed of analog switch ADG704 and feedback resistors R7, R8, R9, R10 and decoupling capacitor C4. Pin 5 and pin 6 of ADG704 are connected to VDDA voltage, pin 6 is connected to GND after passing through 100nF decoupling capacitor C4, and pin 3 is connected to GND; pin 2, pin 9, pin 4, and pin 7 are respectively connected to one side of 10kΩ feedback resistor R7, 100kΩ feedback resistor R8, 200kΩ feedback resistor R9 and 1MΩ feedback resistor R10, and the feedback resistor R FB The other side of (R7~R10) is connected to pin 1 of operational amplifier AD8605 in IV conversion unit. During the feedback process, the current signal from SMA-B will first enter pin 8 of ADG704. The high and low level combination of pin 1 and pin 10 of ADG704 can be controlled by microprocessor to form a path between pin 8 and any one of pin 2, pin 9, pin 4 and pin 7. After the current signal is converted into a voltage signal through the feedback resistor (U FB =I*RFB ) is output from pin 1 of the operational amplifier AD8605 in the IV conversion unit as (1.65-U FB )V, and then input to AD5933 pin 4 through the series connection of resistors R11 and R12 with a resistance value of 20kΩ respectively. The series connection of R11 and R12 is connected to AD5933 pin 5. The function of this part is to provide a 1.65V reference voltage to ensure that the sine wave signal input from AD8605 pin 1 to AD5933 pin 4 is only phase-shifted by 180 degrees but the amplitude remains unchanged, so the signal is (1.65-U FB ) becomes (1.65+U FB )V. AD5933 pins 15 and 16 are connected to VDDA voltage (maintained high level when IIC is not communicating) through 2kΩ pull-up resistors R1 and R2 respectively. AD5933 pins 15 and 16 are used as SDA and SCL signal lines to communicate with the microprocessor respectively. The current between the two interdigital electrodes of the transmission sensor flows through the feedback circuit R FB The AC voltage amplitude U FB To the microprocessor. In terms of power supply, AD5933 pin 9, pin 10, pin 11 are connected to the VDDA voltage, where 10μF capacitor C52 and 0.1μF capacitor C53 are connected to VDDA and GND at one end as filter capacitors, AD5933 pin 11, pin 12, pin 13 are connected to GND; pin 8 is connected to the external active crystal oscillator 16MHz signal.
[0043] In the digital part, the microprocessor (STM32F103C8T6) is responsible for IIC communication with AD5933 to control the DDS unit to generate a sine wave voltage signal and obtain the AC voltage signal amplitude U obtained by the DFT unit. FBTo calculate the impedance value between the two interdigital electrodes of the humidity-sensitive element. At the same time, the microprocessor can also record the number of effective button presses to adjust the output frequency of DDS (by counting the number of effective button presses, the internal program of the microprocessor communicates with AD5933 to make the output frequency of DDS change between 1kHz and 5kHz), so that the impedance value between the two interdigital electrodes of the sensor changes to within the effective measurement range of 30MΩ; in addition, the microprocessor is also responsible for controlling the high and low levels of the analog switch ADG704 pin 1 and pin 10 of the IV conversion unit. In order to prevent the large current from appearing in the large resistance sampling, the microprocessor must promptly control the ADG704 to switch to small resistance sampling; in order to avoid the influence of temperature, the microprocessor also obtains the temperature value of the sensor when it is actually working through the temperature sensor. In addition, the microprocessor can also control the display of OLED (displaying impedance, temperature, humidity and a channel information currently sampled) to observe data changes and then adjust the DDS output through the button. When the impedance value is observed to be greater than the effective measurement range of 30MΩ, the component impedance can be reduced by pressing the button to increase the output frequency of DDS.
[0044] In order to suppress noise interference in the circuit and protect weak signals in the circuit, the coupling effect between test cables can be greatly weakened by metal shielding wires, power supply noise can be eliminated by combining capacitors with different capacitance values, and common ground impedance coupling can be connected to GND at a single point to minimize interference. Weak signal routing needs to be protected by grounding, and the spacing between adjacent wires follows the 3W principle.
[0045] The two interdigital electrodes of the humidity sensor are welded on Figure 3 On pad 1 in the test base, the connection sequence is interdigitated electrode-test base pad-test base IPEX patch antenna carrier-IPEX to SMA RF cable-SMA antenna carrier. Therefore, the voltage difference between the two interdigitated electrodes is the voltage difference between SMA antenna carrier A and SMA antenna carrier B in the analog part. Therefore, the impedance calculation formula is as follows:
[0046]
[0047] Where Z m is the impedance value measured before compensation, R FB It is the feedback resistor of the IV conversion part. Its function is to transfer the current flowing through the feedback resistor R FB The current is converted into voltage, U FB is the AC voltage on the feedback resistor when the current flows through it, U FB The amplitude can be obtained later by the DFT unit.
[0048] In order to overcome the design limitations brought by PCB process, chip leakage current and circuit design, when the measured current is as low as nA, a certain error will occur. The leakage current range can be estimated by measuring multiple groups of 0.1% precision resistors, and finally the impedance value after calibration can be recalculated according to the impedance compensation formula. The specific formula is as follows:
[0049]
[0050] Where Z is the impedance value after compensation, Z m is the impedance value measured before compensation, I D is the leakage current in the circuit. The leakage current value needs to be measured through multiple sets of calibration resistors. D The calculation formula is as follows:
[0051]
[0052] Where Z m is the impedance value measured before compensation, I D Take the average value of multiple groups of calibration resistance. Figure 1 Replace the humidity sensitive element with a calibrated resistor and use a multimeter to measure the actual resistance reading Z of the calibrated resistor. FB , the detection system measures the impedance value Z m Then replace the next calibration resistor. Table 1 shows the current embodiment R FB Calculation data of leakage current when the value is 1MΩ:
[0053] Table 1: Leakage current calculation data in the present invention
[0054] Nominal resistance(kΩ) <![CDATA[Universal display value Z FB (kΩ)]]> <![CDATA[Measured value Z before compensation m (kΩ)]]> Leakage current (nA) 10000 10023.8 9812 2.15 15100 15109.6 14598 2.31 20000 20004.8 19110 2.30
[0055] So R FB When I is 1MΩ D =(2.15+2.31+2.30) / 3=2.25nA, which means that when ADG704 selects 1MΩ among the four feedback resistors, the leakage current I D It is 2.25nA.
[0056] As shown in Table 2, after calibration with the formula, the impedance measurement system has a measurement accuracy better than 1% within 30 MΩ and also maintains good accuracy within 47 MΩ.
[0057] Table 2: Impedance measurement accuracy in the present invention
[0058]
[0059]
[0060] like Figure 6As shown, the humidity detection method based on the polymer impedance type humidity sensor of the present invention is divided into five steps:
[0061] Step 1: polymer impedance type humidity sensor such as Figure 3 As shown, it is placed on the test base. Figure 3 The names of the various parts are: pad 1, substrate 2 (fixed humidity sensor, providing a path for connecting the interdigital electrodes), IPEX patch antenna carrier 3, and the interdigital electrodes of the humidity sensor are connected through Figure 3 The pad 1 is fixed on the substrate 2, such as Figure 4 The IPEX to SMA RF cable is connected to the IPEX patch antenna holder, and the IPEX to SMA RF cable passes through the 3.2mm air hole in the test cavity and is connected to the SMA antenna holder in the external impedance measurement system. The relative humidity environment required for impedance measurement is Figure 5 The valve train shown provides, Figure 5 The names of the various parts are: nitrogen cylinder 5, flow control device 6, humidification device 7, test cavity 8. The cylinder is filled with nitrogen, which is transmitted through two pipes. When the gas humidity is selected by the software, the nitrogen enters the test cavity through a pipe through the flow control device, and at the same time, the nitrogen passes through another pipe through the flow control device and then passes through the humidification device again to finally enter the test cavity. Different humidity environments can be formed in the test cavity by mixing dry and wet nitrogen in different ratios.
[0062] When the impedance measurement system is used for the first time, the appropriate measurement frequency is not yet determined. Figure 1 The specific measurement method is to adjust the dynamic gas distribution system to the lowest 2% RH, and the measurement frequency increases from 1kHz to 500Hz. It should be noted that when the measurement frequency is changed, the impedance measurement system needs to be recalibrated (leakage current and other parameters are measured again). The calibration coefficient can be preset in the IDE (integrated development environment) in advance. When the impedance measurement value is within the effective measurement range, the measurement frequency is determined.
[0063] Step 2: Keep the test environment at a constant temperature. After determining the measurement frequency, the microprocessor will measure the humidity sensor impedance Z every 500ms. m According to the compensation formula, it is calculated as Z and displayed on the OLED. During this period, the relative humidity is adjusted every 10 minutes (the relative humidity range is 2-95% RH, with 2-20% RH increasing by 1% RH and 21-95% RH increasing by 5% RH). At the same time, the impedance value Z of the humidity sensor displayed on the OLED is recorded. The measured data at the current temperature is as follows Figure 7 It can be seen that the impedance measurement system responds when the polymer humidity sensor is at 2%-95% RH.
[0064] Step 3: After completing the humidity-impedance data collection, use the MATLAB platform to fit the Gaussian polynomial according to the existing literature and the characteristics of the humidity sensor:
[0065]
[0066] Where Z F is the impedance fitting, x is the relative humidity, a is the height of the Gaussian peak, b is the center position of the Gaussian peak, c is the width of the Gaussian peak, n is the polynomial order, the coefficient a of the polynomial is determined through the fitting process, and the specific values of each parameter in the Gaussian polynomial fitting are calculated by MATLAB; at the beginning of the fitting process, x and Z F The 34 sets of relative humidity x-impedance Z obtained in step 2 are shown in Table 3. The error is higher in the high humidity segment and lower in the medium and low humidity segments. It can be seen that the fitting effect of low humidity and medium humidity is good.
[0067] Table 3: Impedance fitting accuracy in the present invention
[0068]
[0069]
[0070] After polynomial fitting, the independent variable x is relative humidity. Set the independent variable x to 2:0.5:95 (2%-95% RH, increasing by 0.5% RH). Calculate the impedance Z at different relative humidity according to the formula F The purpose of this process is to interpolate the original data and improve the estimation accuracy by adding more relative humidity-impedance data.
[0071] Step 4: Get a set of Z F Then the ambient temperature should be changed and the above process should be repeated. The reason is that the impedance of the polymer impedance type humidity sensor is inversely correlated with the relative humidity, that is, the higher the relative humidity, the smaller the impedance. When the relative humidity of the two environments is the same, but the ambient temperature is different, the impedance of the polymer impedance type humidity sensor will also be different. Therefore, in the impedance measurement system, it is still necessary to use a temperature sensor to measure the temperature signal to better estimate the relative humidity.
[0072] Step 5: When the impedance measurement system measures the impedance of the humidity sensor and the ambient temperature, it will be matched with the xZ in the above data fitting. F For comparison, considering that the variables that affect the impedance of the humidity-sensitive element are relative humidity and temperature, the same impedance value can find multiple sets of relative humidity and temperature combinations. By determining the temperature value, the current relative humidity can be estimated using the K nearest neighbor classification algorithm. The formula for the standard Euclidean distance is as follows:
[0073]
[0074] D is the standard Euclidean distance between samples, u is the sample feature vector, v is another sample vector, and V is the variance corresponding to the feature vectors in all samples.
[0075] In the specific implementation process, the eigenvector has two items, namely the impedance value and the temperature value, that is, the formula can be simplified as:
[0076]
[0077] D is the standard Euclidean distance, Z d , K d is a set of impedance and temperature values currently measured, Z F is the impedance value at temperature K during Gaussian fitting. In the calculation process, Z d -K d The combination should be with each Z F -K combination calculates the standard Euclidean distance, so there are 3927 values of D (21 groups of temperatures, each group of temperature has 187 impedance data), V z 、V k V is the variance of the impedance value and temperature value after fitting. Variance V z 、V k It can be calculated by referring to the following formula:
[0078]
[0079] Where V is the variance, N is the number of KZs in the fitting process, X is the impedance value or temperature value, and X i is its average value.
[0080] Table 4: Humidity detection accuracy data in the present invention
[0081] Humidity bottle parameters (RH) Estimated humidity x(RH) Measurement error (RH) 7% 7.0% 0% 11% 12.0% 1.0% 23% 22.5% 0.5% 33% 32.0% 1.0% 54% 52.5% 1.5% 75% 71.5% 3.5% 95% 91.0% 4.0%
[0082] Calculate the standard Euclidean distance between the current measured impedance value, temperature value and each sample in the above Gaussian fitting, and select the impedance-temperature combination with the smallest standard Euclidean distance to give the current relative humidity. Verification was performed using a humidity bottle at 25°C. As shown in Table 4, the measurement error below 33% RH is about 1% RH, and the error increases with increasing humidity. The main reason is that the impedance values corresponding to each humidity are close at high humidity and there are errors in Gaussian fitting. Therefore, this humidity detection method has good measurement accuracy in the low humidity range.
Claims
1. A humidity detection method based on a polymer impedance-type humidity sensor, characterized in that: The detection system used is composed of two parts: a polymer impedance-type humidity sensor and an impedance measurement system. The impedance measurement system is divided into an analog part and a digital part. The analog part is composed of a DDS unit, a signal processing unit, an IV conversion unit, and a DFT unit. The digital part is composed of a microprocessor, an OLED display, buttons, and a temperature sensor. The DDS and DFT units are integrated in AD5933. The microprocessor controls the DDS unit to generate a sinusoidal voltage signal by communicating with AD5933 and obtains the AC voltage signal amplitude U obtained by the DFT unit. FB , the detection steps are as follows: (1) Under a constant temperature environment, a controllable relative humidity environment is established in the test chamber through the gas distribution system, and the controllable relative humidity range is 2% to 95% RH; the two interdigital electrodes of the polymer impedance type humidity sensor are respectively welded on the pads of the test base, and the pads are respectively connected to the IPEX patch antenna seat, and an IPEX to SMA radio frequency line is connected to each IPEX patch antenna seat, and the two IPEX to SMA radio frequency lines are respectively connected to the SMA antenna seat A and SMA antenna seat B in the external impedance measurement system through the air holes of the test chamber; therefore, the voltage difference between the two interdigital electrodes is the voltage difference between the SMA antenna seat A and the SMA antenna seat B in the simulation part, and then the polymer impedance type humidity sensor and the test base are placed in the test chamber; (2) The microprocessor controls the DDS to output a 3kHz sine wave voltage, which is filtered and amplified by the signal processing unit to be a voltage signal of 1.65+cos(6000πt)V. The voltage signal is then applied to the interdigital electrode at one end of the humidity sensor through the SMA antenna carrier A, the IPEX to SMA RF cable, the IPEX patch antenna carrier, and the pad. The 1.65V voltage signal from the IV conversion unit is applied to the interdigital electrode at the other end through the SMA antenna carrier B, the IPEX to SMA RF cable, the IPEX patch antenna carrier, and the pad. The microprocessor internally converts the measured humidity sensor impedance Z into a value every 500ms. m According to the compensation formula, it is calculated as Z and displayed on the OLED. During this period, the relative humidity is adjusted every 10 minutes. The relative humidity range is 2-95% RH, where the 2-20% RH interval increases by 1% RH, and the 21-95% RH interval increases by 5% RH. At the same time, the impedance value Z of the humidity sensor displayed on the OLED is recorded; (3) After collecting the relative humidity x-impedance Z data through the air distribution system and the impedance measurement system, the relative humidity x-impedance Z data is fitted using the Gaussian polynomial fitting formula on the MATLAB platform according to the characteristics of the humidity sensor. The accuracy of data estimation is improved by adding more relative humidity x-impedance Z data. During the fitting process, the relative humidity x is increased by 0.5% RH in the range of 2% to 95% RH. The Gaussian polynomial fitting formula is as follows: Where Z F is the impedance fitting, x is the relative humidity, a is the height of the Gaussian peak, b is the center position of the Gaussian peak, c is the width of the Gaussian peak, n is the polynomial order, the coefficient a of the polynomial is determined through the fitting process, and the specific values of each parameter in the Gaussian polynomial fitting are calculated by MATLAB; at the beginning of the fitting process, x and Z F The 34 sets of relative humidity x-impedance Z data sets obtained in step (2) are interpolated by the interpolation method to obtain 187 sets of xZ F Datasets; (4) Changing the ambient temperature, that is, increasing the temperature by 0.5°C in the range of 20 to 30°C, repeating steps (1) to (3), and obtaining a total of 21 sets of xZ values under different temperature values F Datasets; (5) The temperature value K of the environment to be tested is detected by the temperature sensor in the digital part d Then, the K nearest neighbor classification algorithm is used to calculate the impedance-temperature combination with the minimum standard Euclidean distance D of the test data set, which is the estimated point, thereby obtaining the relative humidity of the environment to be tested, where D is the standard Euclidean distance, Z d , K d is the actual measured impedance value and temperature value of the test environment, Z F is the impedance value at temperature K during the Gaussian fitting process in step (4); during the calculation process, Z d -K d The combination should be with each Z F -K combinations calculate the standard Euclidean distance; V z 、V k is the variance of the impedance value and the temperature value in step (4): Where V is the variance, N is the Z in the fitting process F -K, X is the impedance value or temperature value, X i It is the average value of the impedance value or temperature value.
2. A humidity detection method based on a polymer impedance type humidity sensor as claimed in claim 1, characterized in that: The DDS unit generates a sine wave voltage signal with a frequency greater than or equal to 1kHz and an amplitude of 1V under the control of the microprocessor STM32F103C8T6. The sine wave voltage signal then enters the signal processing unit, which consists of a high-pass filter and a low-pass filter. The 50nF NP0 capacitor C1 and the resistors R1 and R2 with resistance values of 50kΩ respectively form a high-pass filter. The resistors R1 and R2 are connected in series, one end of which is connected to the VDDA voltage and the other end is connected to GND to divide the voltage of VDDA. One end of the capacitor C1 is connected to the output end of the DDS unit, and the other end is connected between R1 and R2. The high-pass filter filters out the DC component of the DDS output, and then the resistors R1 and R2 divide the 3.3V VDDA voltage and apply a DC component of 1.65V to the sine wave voltage signal processed by the high-pass filter. The resistors R3 and R4 with resistance values of 10kΩ, 100pF NP0 capacitor C2, and 200pF NP0 capacitor C3 and operational amplifier AD8605 form a Sallen-Key low-pass filter to eliminate high-frequency interference; one end of resistor R3 is connected between resistors R1 and R2, the other end of resistor R3 is connected to resistor R4 and one end of capacitor C3, the other end of capacitor C3 is respectively connected to pins 1 and 4 of operational amplifier AD8605, the other end of resistor R4 is respectively connected to one end of capacitor C2 and pin 3 of operational amplifier AD8605, and the other end of capacitor C2 is connected to GND; pin 2 of operational amplifier AD8605 is connected to GND, and pin 5 is connected to VDDA voltage; the signal processed by the low-pass filter is output to SMA-A via pin 1 of operational amplifier AD8605.
3. A humidity detection method based on a polymer impedance type humidity sensor as claimed in claim 1, characterized in that: The IV conversion unit is composed of an operational amplifier AD8605, resistors R5 and R6 with resistance values of 50kΩ respectively, and a feedback circuit part. Pin 2 of the operational amplifier AD8605 is connected to GND, pin 5 is connected to a 3.3V VDDA voltage, and the feedback circuit part is connected between pins 1 and 4. Resistors R5 and R6 are connected in series to form a voltage divider circuit. The series connection of R5 and R6 is connected to pin 3 of the operational amplifier AD8605, the other end of the resistor R5 is connected to a 3.3V VDDA voltage, and the other end of R6 is connected to GND, so that the input voltage of pin 3 of AD8605 is 1.65V; SMA-B is connected to pin 4 of the operational amplifier AD8605 in the IV conversion unit. According to the virtual short principle of the negative feedback circuit of the operational amplifier, the voltage of pin 4 of AD8605 is equal to the voltage of pin 3 of AD8605, which is 1.65V. Therefore, the voltage between the two interdigital electrodes of the humidity sensor is cos(6000πt)V; the feedback circuit part is composed of an analog switch ADG704 and a feedback resistor R FB (R7, R8, R9, R10) and decoupling capacitor C4, ADG704 pins 5 and 6 are connected to 3.3V VDDA voltage, pin 6 is connected to GND after 100nF decoupling capacitor C4, and pin 3 is connected to GND; pins 2, 9, 4, and 7 are connected to one side of 10kΩ feedback resistor R7, 100kΩ feedback resistor R8, 200kΩ feedback resistor R9, and 1MΩ feedback resistor R10 respectively, and feedback resistor R FB The other side of (R7, R8, R9, R10) is connected to pin 1 of AD8605, an operational amplifier in the IV conversion unit. During the feedback process, the current signal from SMA-B will first enter pin 8 of ADG704. The microprocessor controls the high and low level combination of pin 1 and pin 10 of ADG704 to form a path between pin 8 and any one of pin 2, pin 9, pin 4, and pin 7. The current signal is converted into a voltage signal through the feedback resistor and then output from pin 1 of AD8605, an operational amplifier in the IV conversion unit, as (1.65-U FB )V, and then input to AD5933 pin 4 through the series connection of resistors R11 and R12 with resistance values of 20kΩ respectively (1.65-U FB )V becomes (1.65+U FB )V, where R11 and R12 are connected in series to AD5933 pin 5; AD5933 pin 15 and pin 16 are connected to 3.3V VDDA voltage through 2kΩ pull-up resistors R1 and R2 respectively. AD5933 pin 15 and pin 16 are used as SDA and SCL signal lines to communicate with the microprocessor respectively, and the current between the two interdigital electrodes of the transmission sensor flows through the feedback circuit R FB The AC voltage amplitude U FB to the microprocessor.
4. A humidity detection method based on a polymer impedance type humidity sensor as claimed in claim 3, characterized in that: The calculation formula of humidity sensor impedance is: Where Z m is the impedance value measured before compensation, R FB is the feedback resistor of the IV conversion part, U FB is the AC voltage on the feedback resistor when the current flows through it, U FB The magnitude is obtained from the DFT unit.
5. A humidity detection method based on a polymer impedance type humidity sensor as claimed in claim 1, characterized in that: The impedance compensation formula is: Among them, Z is the impedance value after compensation, Z m is the impedance value measured before compensation, I D is the leakage current in the circuit, I D The calculation formula is as follows Among them, Z FB The actual impedance data of the calibration resistor measured by the multimeter. When measuring, the humidity sensitive element needs to be replaced with the calibration resistor. The detection system measures the impedance value Z m Then replace the next calibration resistor, I D Take the average value after measuring multiple groups of calibration resistance.
6. A humidity detection method based on a polymer impedance type humidity sensor as claimed in claim 1, characterized in that: The humidity sensitive element is composed of a polytetrafluoroethylene upper packaging layer, a non-homogeneous temperature-sensitive hydrogel film, a flexible polyethylene terephthalate substrate with gold interdigital electrodes plated on the upper surface, and a polytetrafluoroethylene lower packaging layer from top to bottom. The impedance of the humidity sensitive element refers to the impedance value between the gold interdigital electrodes.
Citation Information
Patent Citations
A flexible temperature sensor based on heterogeneous temperature-sensitive hydrogel film, preparation method and application thereof
CN118274989B