Self-excited soil humidity detection measuring plate with temperature compensation

By integrating design and optimizing circuitry, the problems of temperature interference, signal stability, and electrode corrosion resistance in capacitive soil moisture detection devices have been solved, achieving high-precision, anti-interference, and reliable soil moisture detection, suitable for agricultural production, horticulture, and environmental monitoring.

CN121762640APending Publication Date: 2026-03-31张衡
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-02
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing capacitive soil moisture detection devices suffer from problems such as significant temperature interference, insufficient detection accuracy, poor signal transmission stability, weak anti-interference ability, low integration level, poor electrode corrosion resistance, and inconvenience in troubleshooting.

Method used

A temperature-compensated self-excited soil moisture detection and measurement board is adopted, which integrates a microprocessor minimum system, a self-excited capacitor sensing module, a temperature measurement module, a serial port external interface module, a power supply module, and an indicator module. By optimizing the circuit and PCB design, the stability of signal transmission and anti-interference ability are enhanced, the corrosion resistance of electrodes and the level of device integration are improved, and a status indication mechanism is added to improve the system reliability and ease of use.

Benefits of technology

It achieves accurate soil capacitance value acquisition over a wide temperature range, eliminates temperature interference, improves detection accuracy and signal stability, enhances anti-interference ability and electrode corrosion resistance, adapts to different soil environments, and has high reliability and ease of use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

According to the self-excitation type soil humidity sensor with the temperature compensation function, a detection capacitor is formed by an interdigital electrode and soil, self-excitation type detection of the capacitance value of the soil capacitor is achieved through an etoBitz oscillating circuit, and the capacitance value of the soil capacitor is converted into a soil humidity value; meanwhile, a temperature sensing circuit composed of an NTC thermistor is configured, soil environment temperature signals are collected through the circuit, temperature drift compensation is carried out on capacitance detection results, and the soil humidity detection precision and environmental adaptability are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of soil moisture detection technology, specifically to a soil moisture detection and measurement board based on the principle of self-excited capacitance sensing and integrating temperature compensation function. It is suitable for in-situ real-time detection of soil moisture in scenarios such as agricultural production, horticulture planting, environmental monitoring, and greenhouses, providing hardware data support for precision irrigation, optimized allocation of water resources, and crop growth regulation. Background Technology

[0002] Soil moisture is a key basic parameter in agricultural production and ecological environment monitoring. Its detection accuracy directly affects the scientific validity and effectiveness of irrigation strategy formulation, crop growth management, and ecological environment assessment. Traditional soil moisture detection methods mainly include resistive detection, neutron scattering, and time-domain reflectometry. These methods generally have significant drawbacks: resistive detection is easily affected by soil salinity, and long-term use will lead to accuracy degradation due to electrode corrosion; neutron scattering equipment is bulky, expensive, and poses radiation safety hazards; while time-domain reflectometry has high accuracy, the equipment is complex and the operation is cumbersome, making it difficult to meet the needs of large-scale in-situ detection.

[0003] Capacitive sensing technology, with its advantages of simple structure, high sensitivity, fast response speed, and no damage to the soil, is gradually becoming the mainstream technology for soil moisture detection. However, existing capacitive soil moisture detection devices still face several technical bottlenecks: First, temperature interference is a significant problem. Changes in ambient temperature alter the soil dielectric constant and electrode physical properties, leading to significant deviations in capacitance measurements. Existing devices often lack effective temperature compensation mechanisms or rely on simple temperature correction algorithms, resulting in poor compensation and difficulty in ensuring detection accuracy over a wide temperature range. Second, signal stability is insufficient. The self-excited oscillation circuit design is flawed, making it susceptible to electromagnetic interference that distorts the frequency signal. Furthermore, the lack of targeted optimization in PCB layout and wiring further reduces signal transmission stability due to crosstalk between digital and analog circuits. Third, environmental adaptability is limited. Electrodes are often made of ordinary metals, which have weak resistance to soil corrosion, making them unsuitable for soil environments with different pH values. Additionally, the devices have low integration and large size, hindering in-situ soil burial detection. Fourth, system reliability needs improvement. The power supply filtering design is inadequate, making it susceptible to external interference affecting the stability of the detection module. Moreover, the lack of an intuitive status indication mechanism makes troubleshooting difficult.

[0004] To address these issues, related technologies have attempted to improve performance by optimizing oscillation circuit parameters or adding simple temperature sensors, but these efforts have failed to fundamentally resolve core problems such as temperature interference, signal crosstalk, and poor corrosion resistance. Therefore, developing a capacitive soil moisture detection and measurement board with accurate temperature compensation, high anti-interference capabilities, miniaturization, and high reliability has become an urgent technical need in this field. Summary of the Invention

[0005] To address the shortcomings of existing capacitive soil moisture detection devices, such as significant temperature interference, insufficient detection accuracy, poor signal transmission stability, weak anti-interference ability, low integration level, poor electrode corrosion resistance, and inconvenient troubleshooting, this invention provides a self-excited soil moisture detection and measurement board with temperature compensation. Its purpose is to achieve accurate acquisition of soil capacitance values ​​and eliminate temperature interference, thereby improving detection accuracy over a wide temperature range. By optimizing circuit and PCB design, it enhances signal transmission stability and anti-interference ability; improves electrode corrosion resistance and device integration level, making it suitable for in-situ soil detection scenarios; and adds a status indication mechanism to improve system reliability and ease of use.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is a self-excited soil moisture detection and measurement board with temperature compensation. The core of the measurement board is a double-layer printed circuit board (PCB). The PCB integrates six major functional modules: a microprocessor minimum system, a self-excited capacitance sensing module, a temperature measurement module, a serial port external interface module, a power supply module, and an indicator module. Among them, the microprocessor minimum system serves as the core control unit and is electrically connected to the other five modules. The power supply module provides stable power to all modules. The modules work together to complete soil capacitance detection, ambient temperature acquisition, temperature compensation calculation, and stable transmission of the compensated data to the host computer. The microprocessor minimum system is the core control unit of the measurement board, using an STM32F103C8T6 as the main control chip. This chip is based on the ARM Cortex-M3 core, with a maximum clock frequency of 72MHz. It has abundant GPIO ports, timers, USART serial ports, ADCs, and other peripheral resources, which can meet the functional requirements of capacitor frequency signal capture, temperature and voltage signal acquisition, temperature compensation algorithm calculation, data storage, and serial transmission. Among them, PA9 and PA10 pins are configured as USART1 serial communication pins, PA1 pin is used for temperature and voltage signal acquisition, and PA8 pin is connected to the timer channel to realize capacitor frequency signal capture. The microprocessor minimum system also includes a power supply circuit, a crystal oscillator circuit, and a reset circuit. The power supply circuit adopts a multi-power supply mode of VDD_1, VDD_2, VDD_3, and VDDA, all of which are provided with stable power by a 3.3V power supply. 100nF capacitors C4, C5, C6, C7, and C8 are connected in parallel at the power input terminal for filtering to eliminate power supply noise and avoid affecting the oscillator circuit and ADC. For acquisition accuracy, the crystal oscillator circuit uses an 8MHz external crystal oscillator X1, which, together with the PD0 / OSC_IN and PD1 / OSC_OUT pins, provides a stable clock signal for the chip, ensuring the timing accuracy of timer frequency acquisition and serial communication. The reset circuit uses the NRST pin and the reset button SW1 (model R4A25211L) to form a manual reset circuit. SW1 is pulled up by a 10kΩ resistor R12 to ensure that the system can be manually reset in abnormal situations, improving system reliability.

[0007] The self-excited capacitive sensing module is the core detection module of the measurement board, consisting of a self-excited oscillator and PCB integrated electrodes. It is used to convert soil moisture into a measurable frequency signal. The self-excited oscillator uses an inverter 74AHC14D / S400118 as its oscillation core. Its input and output terminals form a positive feedback loop through capacitors and resistors. Combined with a transistor MMBT3904, resistors R17 (220kΩ), R18 (47kΩ), R19 (2.2kΩ), capacitor C11 (100nF), a 100pF reference capacitor, and a 100nH inductor, it constitutes a complete oscillation circuit. The transistor MMBT3904 amplifies the oscillation signal, with an amplification factor ranging from 100 to 300 times, ensuring stable transmission of the frequency signal to the microprocessor's PA8 pin. Resistors R17 and R18 set the transistor's static operating point, ensuring it operates in the amplification region. Resistor R19 provides a suitable bias resistor for the inverter, ensuring stable oscillation at startup. Capacitor C11... The 100nH inductor is used for filtering to reduce high-frequency noise interference, optimizing the frequency characteristics of the oscillation circuit, suppressing noise interference, and improving the stability of the frequency signal. The PCB integrated electrode is the core component of the capacitor under test. It adopts a PCB copper foil integrated design with a tin-plated anti-oxidation treatment to ensure a stable capacitor structure with the soil after insertion, while also taking into account mechanical strength and corrosion resistance. The electrode is directly connected to the CX1 and CX2 pads through short leads. The lead width is not less than 0.5mm and the length is not more than 5mm. The short straight wiring is not parallel to other signal lines to reduce the interference of lead distributed capacitance on the measurement results. The electrode is integrated on the edge of the PCB board and adopts an exposed design for easy insertion into the soil. The electrode area is independently divided and does not cross with other lines. This module is connected to the timer channel of the microprocessor minimum system through the PA8 pin. Changes in soil moisture will change the soil dielectric constant, which will cause changes in the capacitance value of the capacitor under test (the higher the moisture, the larger the capacitance value). The change in capacitance value will directly change the oscillation frequency of the self-excited oscillator (the two are negatively correlated). The microprocessor captures this oscillation frequency through the timer and indirectly calculates the soil capacitance value.

[0008] The temperature measurement module is specifically designed for temperature compensation in capacitance measurement. It accurately collects ambient temperature data, providing a temperature compensation basis for capacitance measurement results and eliminating interference from ambient temperature. The module uses the MF52A103F3950 thermistor as the core temperature detection component. This thermistor has a nominal resistance of 10kΩ (at 25℃), a B value of 3950K, and a temperature measurement range of -40℃ to +125℃. It features high sensitivity, fast response, and good stability, covering the temperature range of most soil environments. Combined with the LM358DR2G operational amplifier, a 10kΩ resistor R23, and a graded filter capacitor unit (C13, C14, C15, and C17 are 100nF, C16 is 1uF, and C18 is 10uF), the complete measurement circuit is formed. The thermistor and the 10kΩ resistor R23... A voltage divider circuit is constructed to convert temperature changes into voltage changes. When the ambient temperature changes, the resistance of the thermistor changes, and the output voltage of the voltage divider circuit changes linearly accordingly. This voltage signal directly reflects the ambient temperature. An operational amplifier LM358DR2G forms a voltage follower circuit to buffer and amplify the voltage signal output by the voltage divider circuit, improving the signal's driving capability and stability, avoiding distortion and interference during signal transmission, and ensuring that the voltage signal acquired by the ADC accurately reflects temperature changes. A graded filtering capacitor unit implements graded filtering; C13, C14, C15, and C17 are used to filter out high-frequency noise, and C16 and C18 are used to filter out low-frequency noise, ensuring a stable output voltage signal and improving temperature measurement accuracy. This module is connected to the ADC interface of the microprocessor's minimum system through the PA1 pin. The microprocessor acquires the voltage signal through the ADC, calculates the ambient temperature value by combining it with the resistance-temperature characteristic curve of the thermistor, and then substitutes it into the temperature capacitance compensation model to correct the soil capacitance measurement results and eliminate temperature interference.

[0009] The serial port external interface module is based on the USART1 peripheral design of STM32F103C8T6, using two types of connectors: XH2.545P and PH2.5405PB2GH25. PA9 is the USART1_TX pin and PA10 is the USART1_RX pin, used to realize serial data interaction between the sensor and the host computer. It stably sends the compensated soil capacitance value and ambient temperature value to the host computer, and also supports receiving configuration commands from the host computer (such as adjusting the data acquisition frequency, serial port baud rate, etc.). In the interface circuit, a 22Ω resistor R2 and diodes D1 and D2 are connected in series to limit current and provide reverse protection, preventing damage to the sensor's internal circuitry due to excessive current or reverse polarity when external devices are connected.

[0010] The power supply module provides a stable 3.3V DC power supply to the entire hardware system. After filtering, the power input supplies power to the VDD_1, VDD_2, and VDD_3 of the microprocessor minimum system, the VCC of the temperature measurement module, and the 3.3V power supply of the self-excited capacitor sensing module. Each module's power input is connected in parallel with a 100nF ceramic capacitor (C4, C5, C6, C7, C8) to filter out high-frequency noise in the power supply. The temperature measurement module is additionally connected in parallel with a 1uF capacitor (C16) and a 10uF capacitor (C18) to filter out low-frequency noise, ensuring stable power supply to each module and preventing power fluctuations from affecting the oscillation frequency and temperature detection accuracy. Under normal operating conditions, the operating current of the measurement board does not exceed 700mA.

[0011] The indicator module consists of three XL3216UGC LED indicators (LED1, LED2, and LED3) and corresponding current-limiting resistors. These indicators visually display the system's power status, operating status, and data acquisition and serial port transmission status, allowing users to quickly understand the sensor's operation and troubleshoot problems. LED1 is connected to the 3.3V power supply and the corresponding GPIO port via a 2.2kΩ current-limiting resistor to indicate the power status; LED1 is constantly lit when the power supply is normal. LED2 is connected to the corresponding GPIO port via a 1kΩ current-limiting resistor R14 to indicate the system's operating status; LED2 flashes when the system is working normally. LED3 is connected to the PB11 pin via a 330Ω current-limiting resistor R15 to indicate the data acquisition and serial port transmission status; LED3 flashes when data acquisition is normal and serial port transmission is successful, and remains lit when acquisition is abnormal or transmission fails.

[0012] The PCB board adopts a double-layer structure. The top layer houses the core components of various functional modules, while the bottom layer contains ground lines and some signal lines. Optimized layout, routing, and electromagnetic compatibility (EMC) protection design enhance the system's anti-interference capability. In terms of layout design, the STM32F103C8T6 microprocessor is placed in the center of the PCB board to ensure the shortest signal path, reducing signal delay and interference. The oscillation circuit of the self-excited capacitor sensing module (including U3, Q1, R17 to R19, C11, and the 100nH inductor) is kept away from power modules, crystal oscillator circuits, and other strong interference sources to avoid electromagnetic interference affecting the stability of the oscillation frequency. The electrode pads are directly placed on the edge of the PCB for easy soil insertion. The electrode area is independently divided and does not intersect with other lines. The thermistor pads are close to the electrode area but do not touch the soil, ensuring that the collected temperature data accurately reflects the ambient temperature of the surrounding soil, improving compensation accuracy. Furthermore, the thermistor connection lines are avoided from being routed parallel to power lines and high-frequency lines. Filter capacitors (C4 to C8, C13) are used. All pins (up to C18) are located close to the power input terminal of the corresponding module to shorten the current loop. Thicker conductors (at least 1mm wide) are used for the power lines to reduce voltage drop. Serial connectors (XH2.545P, PH2.5405PB2GH25) are positioned at the edge of the PCB, with PA9 and PA10 pin connections extending directly to the connectors to shorten the serial signal transmission path. In terms of wiring design, power and ground lines use wide lines, with ground lines at least 1.5mm wide. Copper plating is used on the ground lines to form a complete ground plane, reducing grounding resistance and interference. Analog ground (ground of the temperature measurement module) and digital ground (ground of the microprocessor and oscillator circuit) are designed separately, with single-point grounding at the power supply to avoid interference from digital circuits to analog circuits. The output signal of the self-excited oscillator (PA8 pin connection) and the signal lines of the crystal oscillator circuit (PD0, PD1 pin connections) use short and straight wiring without bends or branches to ensure signal stability. The voltage signal lines of the temperature measurement module (PA1...)... Pin connections are routed separately to avoid crossing digital signal lines. In areas where crossing is unavoidable, a perpendicular crossing method is used. Electrode leads are strictly designed with a wire width of not less than 0.5mm and a length of not more than 5mm, and are not parallel to other signal lines to reduce external interference. Serial port signal lines (PA9, PA10 pin connections) are short and straight to avoid paralleling with high-frequency lines and ensure the stability of serial communication. In terms of electromagnetic compatibility and protection design, filter capacitors are placed at the power input terminals and the power input terminals of each module to filter out power supply noise. A grounding ring is set around the crystal oscillator circuit to reduce crystal oscillator signal radiation interference. The electrode surface is tin-plated for anti-oxidation treatment to enhance corrosion resistance. The electrode edges are chamfered to prevent damage when inserted into soil. A 22Ω current-limiting resistor and diodes D1 and D2 are connected in series on the external interface pins strictly according to the schematic diagram to achieve current limiting and reverse protection.

[0013] The core performance parameters of the measuring board of this invention are as follows: Power supply parameters: 3.3V DC power supply voltage, normal operating current ≤700mA; Detection parameters: Soil capacitance detection range 100pF±50pF, capacitance detection resolution 1pF; Temperature detection range -40℃~+125℃, temperature detection accuracy ±0.5℃ at 25℃, capacitance measurement error ≤±2pF after temperature compensation in an operating environment of -20℃~+60℃; Data acquisition frequency 1~10Hz (configurable via software); Serial communication parameters: Communication interface USART1 (PA9_TX, PA10_RX), default baud rate 9600bps (configurable via software), data format 8 data bits, 1 stop bit, no parity bit, transmitted content includes compensated soil capacitance value and ambient temperature value; Environmental parameters: Operating ambient temperature -20℃~+60℃, operating ambient humidity 0%~95% (non-condensing), possesses basic electromagnetic interference suppression capability, conforms to conventional industrial application standards, and the electrodes are compatible with common soil environments with pH values ​​of 4~9.

[0014] Compared to existing technologies, the temperature-compensated self-excited soil moisture detection and measurement board of this invention, through the high integration of six functional modules and the synergistic application of self-excited capacitance sensing and temperature compensation technologies, combined with optimized PCB design and hardware protection scheme, has the following beneficial effects: high detection accuracy, complete elimination of temperature interference, high-resolution acquisition of soil capacitance value of 1pF based on the self-excited capacitance sensing principle, and accurate correction of measurement errors introduced by temperature changes through two pathways: "soil dielectric constant shift" and "electrode physical property change" by integrating a temperature measurement module composed of a high-precision thermistor and operational amplifier, combined with a preset temperature capacitance compensation model. Within the core working environment of -20℃ to +60℃, the compensated capacitance measurement error does not exceed ±2pF, and the temperature detection accuracy reaches ±0 at 25℃.At 5℃, it provides reliable data support for accurate soil moisture determination; the signal transmission is stable and the anti-interference capability is strong. The self-excited capacitance sensing module is designed with a capacitor + inductor filtering and frequency optimization network to effectively suppress high-frequency noise and interference. The PCB board adopts a double-layer structure, with core components centrally located, separate analog and digital grounding at a single point, and short and straight wiring for high-frequency / analog signal lines to reduce signal delay and electromagnetic interference and avoid crosstalk between digital and analog circuits. The power supply module adopts a multi-stage filtering design to eliminate the impact of power supply noise on the detection module and ensure stable transmission of frequency signals, temperature and voltage signals, and serial port data. The measurement board has basic electromagnetic interference suppression capabilities and meets conventional industrial application standards. It has a high degree of integration and is suitable for in-situ detection. It highly integrates six major functional modules, including the microprocessor minimum system and the self-excited capacitance sensing module, onto a single double-layer PCB board. The layout of each module and the selection of components are optimized to achieve a miniaturized design of the measurement board. The PCB integrated electrodes are directly integrated into the PCB. The board edge design eliminates the need for external electrodes. The short, straight, and corrosion-resistant leads facilitate in-situ soil insertion for testing, making it suitable for various scenarios including agricultural production, horticulture, and environmental monitoring. It boasts wide environmental adaptability and high reliability. The PCB integrated electrodes feature copper foil with a tin-plated anti-oxidation coating, providing strong resistance to soil corrosion and adapting to common soil environments with pH values ​​of 4-9. The measuring board operates in environments ranging from -20℃ to +60℃ and 0% to 95% non-condensing humidity, making it suitable for most soil testing scenarios. The serial port interface incorporates current limiting and reverse polarity protection to prevent damage to internal circuitry due to excessive current or reverse polarity when external devices are connected. The indicator module uses three LEDs. Indicator lights provide feedback on power status, operating status, and data transmission status, allowing users to quickly locate faults and reduce maintenance costs. The design is flexible and user-friendly; parameters such as the measurement board's data acquisition frequency and serial port baud rate can be flexibly configured via software to meet the detection frequency and communication requirements of different application scenarios. The hardware modules strictly adhere to the schematic design, ensuring compatibility and facilitating future functional expansion and hardware upgrades. The modular design also promotes mass production and standardized assembly. The overall structure is simple and easy to operate, requiring no complex debugging before deployment. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a front view of the PCB structure of the present invention; Figure 2 This is a structural diagram of the back of the PCB of the present invention; Figure 3 This is a schematic diagram of the self-excited capacitive sensing principle of the present invention; Figure 4 This is a schematic diagram of the temperature sensing principle of the present invention. Detailed Implementation

[0017] This invention provides a temperature-compensated self-excited soil moisture detection electronic device, which is based on the self-excited capacitance sensing principle and introduces temperature compensation technology to solve the technical problem that traditional soil moisture detection is easily affected by temperature, resulting in low detection accuracy.

[0018] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] Example 1 Figure 1 This is a schematic diagram of a temperature-compensated self-excited soil moisture detection electronic device according to an embodiment of the present invention; see reference. Figure 1 and Figure 2 As shown, this embodiment provides a self-excited soil moisture detection electronic device with temperature compensation. The electronic device includes a printed circuit board (PCB) that integrates six modules, specifically including a microprocessor minimum system (start-up circuit 3, crystal oscillator 6, MCU7), a self-excited capacitor sensing module 4, a temperature measurement module 5, a serial port external interface module 1, a power supply module 8, and an indicator module 2.

[0020] In an optional embodiment, the soil capacitance detection resolution of the electronic device is 1pF; the capacitance measurement error after temperature compensation of the electronic device does not exceed ±2pF; and the printed circuit board adopts a double-layer board structure.

[0021] In a specific embodiment, the microprocessor minimum system is the core control module, integrated in the central area of ​​the printed circuit board; the self-excited capacitance sensing module is electrically connected to the timer frequency acquisition interface of the microprocessor minimum system; the temperature measurement module is electrically connected to the ADC analog signal acquisition interface of the microprocessor minimum system; the serial port external interface module is electrically connected to the USART serial communication interface of the microprocessor minimum system; the indicator module is electrically connected to the GPIO general-purpose control interface of the microprocessor minimum system; and the power supply module provides a stable 3.3V DC power supply to each integrated module. All modules work together to realize soil capacitance detection, temperature compensation, and data transmission to the host computer.

[0022] It is understood that the printed circuit board described in this embodiment is a double-layer board structure. The top layer houses the core components of various functional modules, while the bottom layer houses ground lines and some signal lines. Compared to the traditional single-layer circuit board design where components and ground lines are mixed, this top-bottom layer design forms an independent signal transmission and grounding network, effectively meeting the design requirements of this electronic device for high anti-interference and stable signal transmission. Furthermore, the printed circuit board adopts a centrally located layout for the core components, with the microprocessor (STM32F103C8T6) minimum system located at the center of the board. Each functional module unit is electrically connected one-to-one to the microprocessor minimum system via a dedicated hardware interface, matching independently laid-out short and straight signal lines, thus fulfilling the design requirements of this electronic device for the collaborative operation of each module. The structure, layout, and wiring design of this printed circuit board meet the high-precision and anti-interference detection requirements of this electronic device and achieve miniaturization, making the electronic device suitable for in-situ soil detection.

[0023] Example 2 Based on the above embodiments, Figure 3 This is a schematic diagram of the circuit structure of a self-excited capacitance sensing module according to an embodiment of the present invention; see reference. Figure 1 and Figure 2 As shown, the self-excited capacitance sensing module includes the following core components: an inverter 74AHC14D / S400118 (U3) as the oscillation core; a transistor MMBT3904 (Q1) as the oscillation signal amplifier; resistors R17 (220kΩ) and R18 (47kΩ) as transistor static operating point setting elements; resistor R19 (2.2kΩ) as inverter bias resistor; capacitor C11 (100nF), a 100pF reference capacitor, and a 100nH inductor as circuit filtering and frequency optimization elements; and pads CX1 and CX2 for connecting the PCB integrated electrodes. These components, connected in a specific circuit configuration, form a stable self-excited oscillation capacitance detection loop.

[0024] In a specific implementation, the self-excited capacitance sensing module is electrically connected to the timer frequency capture interface of the microprocessor minimum system via pin PA8. The self-excited capacitance sensing module includes two sub-units: a self-excited oscillator and a PCB integrated electrode. The self-excited oscillator includes an inverter 74AHC14D / S400118 (U3), a transistor MMBT3904 (Q1), resistors R17 (220kΩ), R18 (47kΩ), R19 (2.2kΩ), capacitor C11 (100nF), a 100pF reference capacitor, a 100nH inductor, and pads CX1 and CX2. The pads CX1 and CX2 are directly connected to the two ends of the PCB integrated electrode. The PCB integrated electrode is integrated on the edge of the printed circuit board and has an exposed design. After the PCB integrated electrode is inserted into the soil, it forms the capacitance to be measured together with the soil. In particular, the PCB integrated electrode adopts a copper foil with an anti-oxidation coating design, which takes into account soil contact adhesion, mechanical strength and corrosion resistance. Its connecting leads are short straight wires with a line width of ≥0.5mm and a length of ≤5mm, which can effectively avoid the interference of lead distributed capacitance on capacitance measurement.

[0025] The power module input terminal supplies power to the 3.3V power supply terminal of the self-excited capacitor sensing module. The power supply is 3.3V DC. If the power supply is normal, the indicator light LED1 of the indicator module will be constantly lit. If the electronic device system is working normally, the indicator light LED2 of the indicator module will flash, and the self-excited capacitor sensing module can work normally.

[0026] In the self-excited capacitor sensing module, the inverter 74AHC14D / S400118 (U3) is the core of the oscillation. Its input and output terminals form a positive feedback loop through capacitors and resistors. Resistor R19 (2.2kΩ) provides a suitable bias resistor for the inverter, ensuring the oscillation circuit starts operating normally. When the self-excited capacitor sensing module is powered on and operating normally, the positive feedback loop spontaneously generates a stable oscillation signal. The initial oscillation frequency is determined by the inherent parameters of the capacitors and resistors within the loop.

[0027] During module operation, the PCB integrated electrode is inserted into the soil, and the electrode and the soil together form the capacitor to be tested. The reference value of the capacitor to be tested is 100pF. When the soil moisture changes, the dielectric constant of the soil changes accordingly, and the value of the capacitor to be tested changes synchronously (moisture and capacitance are positively correlated). Thus, the soil physical moisture signal is converted into a capacitance signal.

[0028] Regarding the relationship between frequency and capacitance, the oscillation frequency of the self-excited oscillator is negatively correlated with the value of the capacitance under test. Changes in the value of the capacitance under test directly cause a reverse change in the oscillation frequency. The self-excited oscillator converts the capacitance electrical signal into an oscillation frequency signal that can be captured by the microprocessor minimum system.

[0029] During signal conversion, other components of the self-excited capacitive sensing module respond synchronously: On the one hand, capacitor C11 (100nF) and 100nH inductor form a filtering and frequency optimization unit. Capacitor C11 (100nF) suppresses high-frequency noise interference, and 100nH inductor optimizes the frequency characteristics of the oscillation frequency signal, jointly improving the stability of the oscillation signal; on the other hand, resistors R17 (220kΩ) and R18 (47kΩ) configure the static operating point of transistor MMBT3904 (Q1) (i.e., the transistor operates stably at the DC bias level in the amplification region). This transistor amplifies the optimized oscillation frequency signal by 100 to 300 times, ensuring the stable transmission of weak oscillation signals.

[0030] After the oscillation frequency signal is amplified, it is transmitted to the timer channel of the microprocessor (STM32F103C8T6) minimum system via the PA8 pin. The microprocessor minimum system accurately captures the oscillation frequency through the timer and indirectly calculates the soil capacitance value by combining the preset correspondence between frequency and capacitance, thereby achieving soil capacitance detection with a resolution of 1pF.

[0031] After capacitance detection is completed, the microprocessor minimum system transmits the signal acquisition status of the self-excited capacitance sensing module to the indicator module in real time, and the indicator LED3 of the indicator module provides corresponding status indication. When the oscillation frequency signal is stably acquired and the capacitance value is calculated normally, the indicator LED3 of the indicator module flashes at a preset frequency. When the acquired oscillation signal is distorted or the frequency acquisition is abnormal, the indicator LED3 remains on. The indicator module provides intuitive feedback on the sensor detection status, making it easy for users to detect faults in a timely manner.

[0032] In this embodiment, the self-excited capacitance sensing module works in conjunction with the microprocessor minimum system, power supply module, and indicator module to effectively ensure high resolution, high stability, and anti-interference capability of soil capacitance detection. Specifically, the power supply module provides stable power to the self-excited capacitance sensing module, the microprocessor minimum system performs accurate conversion of soil capacitance values, and the indicator module provides real-time feedback on the detection status. The collaborative action of these modules enables this electronic device to stably and accurately acquire soil capacitance within a detection range of 100pF±50pF, while exhibiting strong resistance to interference from the soil's physical environment, making it adaptable to the actual needs of different in-situ soil detection methods.

[0033] Example 3 Based on the above embodiments, Figure 4 This is a schematic diagram of the circuit structure of a temperature measurement module provided in an embodiment of the present invention; see reference. Figure 1 and Figure 2As shown, the core components of the temperature measurement module include a thermistor MF52A103F3950, an operational amplifier LM358DR2G(U4), a resistor R23 (10kΩ), and a graded filter capacitor unit; wherein, the graded filter capacitor unit is composed of capacitors C13 (100nF), C14 (100nF), C15 (100nF), C16 (1uF), C17 (100nF), and C18 (10uF); the components are connected in a specific circuit to form a stable temperature-voltage signal conversion loop.

[0034] Specifically, based on the circuit connections, the working principle of this temperature measurement module is as follows: Thermistor MF52A103F3950: This is the core temperature sensing device of the temperature measurement module. In this embodiment, the thermistor has a reference resistance of 10kΩ and a B value of 3950K at a nominal environment of 25℃. Its temperature measurement range is -40℃ to +125℃, and it possesses high sensitivity, fast response, and good operational stability. The thermistor is connected in series with resistor R23 (10kΩ) to form a voltage divider circuit. Unlike the arrangement of integrated electrodes on the PCB, the thermistor's pads are arranged adjacent to the PCB integrated electrode area, and these pads do not directly contact the soil.

[0035] Operational amplifier LM358DR2G (U4): This is the core signal conditioning device of the temperature measurement module. In this embodiment, its non-inverting input (1IN+, pin 3) is connected to the output of a voltage divider circuit composed of thermistor MF52A103F3950 and resistor R23 (10kΩ); its inverting input (1IN-, pin 2) is directly shorted to the output of the operational amplifier itself (1OUT, pin 1), together forming a voltage follower. Its output (1OUT, pin 1) is connected to pin PA1, outputting the voltage signal of the temperature measurement module.

[0036] Hierarchical Filtering Capacitor Unit: In this embodiment, multiple capacitors are connected in parallel in the temperature measurement module circuit to form a hierarchical filtering capacitor unit, which realizes hierarchical filtering; wherein, capacitors C13 (100nF), C14 (100nF), C15 (100nF), and C17 (100nF) are used to filter out high-frequency noise, and capacitors C16 (1uF) and C18 (10uF) are used to filter out low-frequency noise.

[0037] The power module input provides power to the VCC terminal of the temperature measurement module using a 3.3V DC power supply. If the power supply is normal, indicator light LED1 will remain constantly lit. If the electronic system is functioning correctly, indicator light LED2 will flash, indicating that the temperature measurement module is operating normally. When the temperature measurement module is powered on and operating normally, the module begins to run.

[0038] During module operation, the PCB integrated electrode is inserted into the soil, and the thermistor in the area adjacent to the electrode (not in contact with the soil) senses the soil ambient temperature around the electrode; when the ambient temperature changes, the resistance of the thermistor changes (temperature and resistance are negatively correlated), and the thermistor converts the temperature change into a resistance change.

[0039] After the resistance value changes, since the thermistor and resistor R23 (10kΩ) are connected in series to form a voltage divider circuit, the output voltage of the voltage divider circuit changes linearly with the change of the thermistor resistance value. The voltage divider circuit converts the above resistance value change into a corresponding voltage signal change, realizing the linear conversion from temperature signal to voltage signal.

[0040] After the voltage signal is generated, the voltage follower composed of the operational amplifier LM358DR2G (U4) buffers the voltage signal output by the voltage divider circuit. The voltage signal is filtered by a graded filtering capacitor unit. High-frequency noise is filtered out by a 100nF capacitor, and low-frequency noise is filtered out by 1μF and 10μF capacitors, resulting in a stable and interference-free temperature voltage signal.

[0041] After obtaining a stable and interference-free temperature and voltage signal, the signal is transmitted via the PA1 pin to the ADC analog signal acquisition interface of the microprocessor (STM32F103C8T6) minimum system. The microprocessor minimum system accurately acquires the voltage signal through the ADC, calculates the actual ambient temperature value by combining the resistance-temperature characteristic curve of the thermistor, and then substitutes the temperature data into the preset temperature capacitance compensation model to correct the original soil capacitance value of the self-excited capacitance sensing module in real time, thereby eliminating the capacitance measurement error caused by the shift in soil dielectric constant and the change in electrode physical properties due to temperature changes.

[0042] In this embodiment, the compensated soil capacitance and temperature values ​​are ultimately transmitted to the external serial interface module and stably sent to the host computer via the USART1 serial communication interface. The microprocessor minimum system synchronously feeds back the serial port transmission status to the indicator module. When the serial port data is transmitted stably, the indicator LED3 flashes at a preset frequency. When a serial port transmission failure occurs, the indicator LED3 remains constantly lit.

[0043] Specifically, the microprocessor minimum system, self-excited capacitor sensing module, temperature measurement module, serial port external interface module, power supply module, and indicator module work together to ensure that the temperature-compensated capacitance measurement error of the electronic devices does not exceed ±2pF in an operating environment ranging from -20℃ to +60℃, and the temperature detection accuracy reaches ±0.5℃ in a nominal environment of 25℃. This provides reliable data support for accurate determination of soil moisture and can meet the high-precision detection requirements of precision agriculture for quantitative soil moisture data.

[0044] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions of the present invention, or equivalent substitutions can be made to some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A circuit structure of a soil capacitance sensor, characterized by comprising: The minimum system comprises an STM32F103C8T6 microprocessor, a self-excitation capacitance sensing module, a temperature measuring module, a serial communication module, a 3.3V power module and an LED indication module connected to the system; the self-excitation capacitance sensing module is provided with an integrated electrode, the electrode and soil form a to-be-measured capacitance and is connected to a CX1 / CX2 interface, and the module outputs an oscillation frequency signal changing with the capacitance value to the microprocessor; the temperature measuring module is composed of a thermistor and an operational amplifier, and outputs a temperature voltage signal to the microprocessor to provide a capacitance compensation basis; the serial communication module is connected in series with a current limiting resistor and a reverse protection diode and is used for transmitting compensated data; The LED indication module displays the sensor power supply, working and data transmission states.

2. A method for measuring the earth capacitance based on the circuit structure according to claim 1, characterized by the steps of The minimum system comprises: 1) the self-excitation capacitance sensing module generates and amplifies an oscillation frequency signal and transmits the signal to the STM32F103C8T6 microprocessor; 2) the integrated electrode and soil form a to-be-measured capacitance, and convert soil humidity change into corresponding change of oscillation frequency; 3) the temperature measuring module converts ambient temperature into a conditioned voltage signal and transmits the signal to the microprocessor; 4) the microprocessor captures the oscillation frequency to calculate a capacitance original value and collects a voltage signal to calculate a real-time temperature value; 5) the real-time temperature value is substituted into a temperature-capacitance compensation model to correct the capacitance original value, and the microprocessor sends the compensated capacitance value and temperature value through the serial communication module.