Design and Research of Soil Moisture Measuring Instrument Based on dsPIC30F2010

Publisher:MeshulunLatest update time:2011-08-05 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction
Soil moisture measurement generally includes drying measurement method, neutron diffusion method, electromagnetic measurement technology, time domain reflection method, frequency domain reflection method, tension measurement method, infrared telemetry method, standing wave ratio method, etc. This paper proposes a soil moisture meter based on dsPIC30F2010 single-chip microcomputer. The instrument adopts the standing wave ratio principle and can quickly and accurately measure soil moisture. Its dsPIC30F21310 has advanced performance, simple circuit structure and relatively stable system. According to the test, the soil moisture meter designed according to this measurement principle is not only low in cost, small in size, easy to carry, but also has high measurement accuracy, can collect and store multiple sets of data, and has stable performance. At the same time, it can meet the needs of modern precision agriculture water-saving irrigation and real-time soil moisture measurement, and can achieve the purpose of water-saving irrigation.

1 Measurement principle
This measurement system consists of a high-frequency signal generating circuit, a transmission line, a probe, a detection circuit, a signal processing circuit and a display circuit. The high-frequency oscillator sends a high-frequency signal, which is then transmitted to the probe through the transmission line. Since the impedance of the probe does not match the soil impedance, part of the signal will be transmitted back along the transmission line, thereby forming a standing wave on the transmission line, making the voltage at each point on the transmission line different. The voltage at both ends of the transmission line is mainly determined by the moisture content of the soil. When the moisture content of the soil changes, the impedance will change, which will cause the standing wave ratio to change, and finally the voltage at both ends of the transmission line will also change. Therefore, by measuring the voltage change at both ends of the transmission line, the corresponding change in soil moisture can be measured. In this way, the voltage at both ends of the transmission line is conditioned by the detection circuit, and then its voltage signal is sent to the single-chip microcomputer for processing through A/D conversion, and finally the result is displayed on the LCD display module.

2 Hardware structure and function
The structural block diagram of the soil moisture meter is shown in Figure 1. The main function of the system is to complete the acquisition, processing, display and control of sensor signals. A voltage signal is obtained from the sensor
, and the peak value of the voltage signal is obtained through the detection circuit, and then it is sent to the microcontroller for processing through A/D conversion, and finally the result is displayed on the LCD module.

[page]

2.1 Sensor
The equivalent circuit of the sensor in this system is shown in Figure 2. In Figure 2, Eg is the electromotive force of the high-frequency signal source; Rg is the internal resistance of the signal source; Z1 is the impedance of the transmission line; ZL is the impedance of the soil probe: R1, Gl and C1 represent the distributed resistance, conductance and capacitance on the transmission line respectively. Thus, according to the transmission line theory, the peak voltage at point A can be obtained as: Ua=A(1+ρ); and if the length of the transmission line is one-fourth of the wavelength of the electromagnetic wave, the peak voltage at point B is: Ub=A(1-ρ), so the voltage difference between points A and B is △UAB=2Aρ. Among them, ρ is the reflection coefficient of the transmission line at point A, which can be expressed by the expression.
When the probe of the sensor is inserted into the soil, ZL is mainly determined by the soil dielectric constant, which can change with the change of soil moisture, thereby causing the output voltage △UAB of the transmission line to change. Therefore
, by measuring the voltage difference at both ends of the transmission line, the soil moisture content can be indirectly obtained.
The high-frequency signal of this measurement system adopts a 100 MHz sine wave signal, the transmission line adopts a coaxial cable, and the probe is made of stainless steel. The 100 MHz signal generation circuit is shown in Figure 3.

Figure 3 uses the 0X30 series MP3030 integrated crystal oscillator. The frequency range of the oscillator is 10 to 160 MHz, the power supply voltage is +5 V, and a 20
kΩ adjustable resistor can be connected between pin 5 and pin 2. The resistance value can be adjusted through pin 1 to obtain a 100 MHz sine wave signal and output it through pin 4.
2.2 Detection circuit
The function of the detection circuit is to detect the peaks and valleys of the standing wave at both ends of the transmission line, and then perform A/D conversion through differential amplification, output adjustment, and then A/D conversion.
Since the voltage signal is generated by a 100 MHz sine wave, if the signal is not pre-processed, the dsPIC2010 will not be able to effectively process the signal, and therefore cannot obtain accurate results. The detection circuit uses peak detection. After the peak value of the voltage signal is detected, the signal is A/D converted and sent to the microcontroller for processing, thereby obtaining accurate results. The circuit diagram of its detection circuit is shown in Figure 4.

[page]

The detection circuit consists of a first-level precision diode circuit and a first-level voltage follower. D1, D2 and R1, R2, R3 form a first-level precision diode circuit, which is equivalent to an ideal rectifier element, while the op amp and C3, R4 form a first-level voltage follower. C3 is used as a keeper to latch the signal. The
operational amplifier chip AD829 is selected. AD829 is a low-noise, high-performance, high-speed operational amplifier with a slew rate of 230 V/μs, a gain-bandwidth product of 750 MHz, a ±15 V power supply, and an output voltage maximum amplitude of 28VPP, which meets the system's requirements for voltage signal peak detection.
2.3 Microcontroller and LCD display
The circuit diagram of the microcontroller and LCD display is shown in Figure 5. The dsPIC30F2010 chip used in the microcontroller chip in Figure 5 is a high-performance improved RISC CPU. It has an optimized C compiler instruction set, 83 basic instructions with flexible addressing modes, 24-bit wide instructions, 16-bit wide data bus, 12 KB on-chip flash program space, 512 bytes on-chip data RAM, 16×16-bit working register array, 27 interrupt sources and 3 external interrupts. The peripheral features of this chip include 3 16-bit timers/counters, 4 16-bit capture input function pins, 2 16-bit compare/PWM output function pins, 3-wire SPI module and addressable module with FIFO buffer. In addition, dsPIC30F2010 also has a 10-bit analog-to-digital conversion module. It uses CMOS technology, has low power consumption and a wide operating voltage range (2.5~5.5 V).


The LCD display part uses HD44780 chip. This chip is composed of several dot matrix blocks to display character groups. It has a character generator ROM, which can display 192 characters, and has 64 bytes of
custom character ROM and 80 bytes of RAM. The HD44780 module is compact and lightweight, easy to assemble, and powered by a single +5 V power supply. It has the advantages of low power consumption, long life and high reliability.
The 10-bit high-speed analog-to-digital conversion module in the dsPIC30F2010 can convert the analog input signal into a digital signal for processing. The analog voltage signal from the detection circuit
enters the analog-to-digital conversion module in the dsPIC30F2010 through the ANO pin, and then after obtaining the digital signal, the data is processed in the dsPIC30F2010. Finally, the processed result is displayed on the HD44780 chip through the RXD pin of the HD44780 chip. Since the microcontroller has its own RAM and ROM, data can be continuously collected and stored. The built-in analog-to-digital conversion module can make the circuit design simpler, thereby improving work efficiency.

Reference address:Design and Research of Soil Moisture Measuring Instrument Based on dsPIC30F2010

Previous article:Design of automatic product packaging system based on infrared detection
Next article:Development of portable temperature and humidity detector

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号