Crop nitrogen content detector
By using microcontrollers and phase-locked demodulation technology, combined with photoelectric processing circuits, the problem of low efficiency in measuring crop nitrogen content in traditional spectral detection technology has been solved, achieving rapid and accurate measurement of crop nitrogen content, improving measurement efficiency and shielding against natural light interference.
Patent Information
- Application Number
- CN202511080403.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-08-04
AI Technical Summary
Traditional spectral detection techniques cannot quickly and accurately measure crop nitrogen content, especially under adverse weather conditions or when a dark room is required, as they cannot avoid interference from natural light and the measurement location is limited.
Employing a microcontroller, reference signal conditioning circuit, drive signal conditioning circuit, multiplexing circuit, photoelectric processing circuit, and phase-locked demodulation circuit, the system transmits a specific frequency AC square wave current signal and, combined with phase-locked demodulation technology, shields against natural light interference and obtains the spectral reflectance of each band on the blade surface.
It enables rapid and accurate measurement of crop nitrogen content without the need for a darkroom, improving measurement efficiency, avoiding interference from natural light, and not limiting measurement locations.
Smart Images

Figure CN120577267B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of spectrum analysis, in particular to a crop nitrogen content detector. BACKGROUND
[0002] With the rapid development of world agriculture, the extensive use of chemical substances such as fertilizers and pesticides has had an adverse effect on farmland ecosystems and crop health. In the face of growing demand for soil and crop composition analysis, traditional chemical analysis methods are gradually being replaced by rapid non-destructive detection technologies based on spectrum analysis technology due to their low efficiency and destructiveness.
[0003] Traditional spectrum detection technologies for crop nitrogen content include passive light detection and active light detection. Passive light detection uses sunlight as a light source to measure its reflectivity. This type of instrument needs to be frequently calibrated according to the angle of the sun on the day, whether it is blocked by clouds, and other different conditions, and relies on the weather at the time of measurement. Once it encounters unfavorable weather such as rain and overcast, the measurement result will be inaccurate. In active light detection, active light is used as a detection light source, which requires a dark room to shield external light interference. Large equipment needs to build and adjust the dark room in real time according to the test environment of the equipment; small equipment uses leaf clamping to measure active light transmittance to create a dark room, but the clamping method limits the measurement position and can only measure the edge of the leaf. For large leaves, the center cannot be measured. Therefore, traditional spectrum detection technologies cannot quickly measure crop nitrogen content. SUMMARY
[0004] The purpose of the present application is to provide a crop nitrogen content detector that can greatly improve the efficiency of measuring crop nitrogen content.
[0005] To achieve the above purpose, the present application provides the following solutions.
[0006] The present application provides a crop nitrogen content detector, comprising: a microcontroller, a reference signal conditioning circuit, a driving signal conditioning circuit, a multiplexing circuit, a photoelectric processing circuit, a phase-locked demodulation circuit and a plurality of LEDs.
[0007] The reference signal conditioning circuit is used to receive a square wave voltage signal, condition the received square wave voltage signal into a reference signal, and deliver it to the phase-locked demodulation circuit. The driving signal conditioning circuit is used to receive a square wave voltage signal, condition the received square wave voltage signal into a constant current driving signal, and deliver it to the multiplexing circuit. The multiplexing circuit is used to direct the constant current driving signal to the plurality of LEDs in turn according to the interval time set by the microcontroller, driving the plurality of LEDs to emit alternating current light signals carrying direct current signals to the leaf surface in turn; the plurality of LEDs are LEDs of different wavebands.
[0008] The photoelectric processing circuit is used for receiving the reflected light signals of the leaf surface for different wave bands in sequence, filtering the direct current signals in the reflected light signals, and transmitting the retained reflected alternating current signals to the phase-locked demodulation circuit; the reflected light signals include natural light signals and active light signals, and the active light signals are alternating current light signals carrying direct current signals.
[0009] The phase-locked demodulation circuit is used for demodulating the retained reflected alternating current signals for different wave bands according to a reference signal, filtering the direct current signals in the natural light signals and the active light signals, and outputting a direct current signal that is linearly proportional to the amplitude of the alternating current light signal in the active light signal.
[0010] The microcontroller is used for sampling the direct current signals for different wave bands output by the phase-locked demodulation circuit, and obtaining the spectral reflectance of the leaf surface for each wave band according to the direct current signals for different wave bands; the spectral reflectance of each wave band represents the nitrogen content of the crop.
[0011] Optionally, the reference signal conditioning circuit includes a first amplification circuit and a direct current bias adjustment circuit; the first amplification circuit is used for reducing the voltage amplitude of the square wave voltage signal; the direct current bias adjustment circuit is used for superimposing a direct current bias on the square wave voltage signal after the voltage amplitude is reduced to obtain the reference signal; the reference signal is an alternating current signal with a constant amplitude.
[0012] Optionally, the photoelectric processing circuit includes a photodetector and a photoelectric conversion circuit; the photodetector is used for receiving the reflected light signals of the leaf surface for different wave bands, and converting the reflected light signals into current signals; the photoelectric conversion circuit is used for converting the current signals transmitted by the photodetector into voltage signals, amplifying the voltage signals, filtering the direct current signals in the amplified voltage signals, and retaining the alternating current signals in the amplified voltage signals.
[0013] Optionally, the photoelectric conversion circuit includes a T-type feedback network, a high-pass filter, an inverting amplifier and a subtractor; the T-type feedback network is used for converting the current signals transmitted by the photodetector into voltage signals, and amplifying the voltage signals; the high-pass filter is used for filtering the direct current signals in the amplified voltage signals, and retaining the alternating current signals in the amplified voltage signals; the inverting amplifier is used for amplifying the retained alternating current signals to obtain amplified alternating current signals; and the subtractor is used for adjusting the voltage of the amplified alternating current signals to 0.
[0014] Optionally, the phase-locked demodulation circuit comprises: a second amplification circuit, a phase-sensitive detector and a low-pass filter; the second amplification circuit is configured to amplify the reflected AC signal reserved for different wave bands to obtain an amplified reflected AC signal; the phase-sensitive detector is configured to demodulate the amplified reflected AC signal according to the reference signal, extract the amplitude information of the amplified reflected AC signal from noise, and output a demodulated signal; and the low-pass filter is configured to filter out high-frequency components in the demodulated signal to obtain a direct current signal that is linearly proportional to the amplitude of the AC light signal in the active light signal.
[0015] Optionally, the microcontroller is specifically configured to obtain the spectral reflectance of the blade surface for each wave band according to the direct current signals of the different wave bands, including: dividing the direct current signal of each wave band by the whiteboard reflection signal of the respective wave band to obtain the spectral reflectance of the blade surface for each wave band; and the whiteboard reflection signal of the respective wave band is a reflection signal collected in advance by using a plurality of LEDs for the same 90% diffuse reflection board.
[0016] Optionally, the crop nitrogen content detector further comprises: a square wave voltage signal generation circuit; the square wave voltage signal generation circuit is configured to generate a square wave voltage signal and transmit the square wave voltage signal to the reference signal conditioning circuit and the driving signal conditioning circuit, respectively.
[0017] Optionally, the square wave voltage signal generated by the square wave voltage signal generation circuit is a square wave voltage signal with a frequency of 1 kHz, an output amplitude of 5 V and a direct current bias of 2.5 V; the frequency, output amplitude and direct current bias of the square wave voltage signal are set in the following manner: the frequency and signal waveform of the square wave voltage signal are set in a visual window of a computer, transmitted to the single-chip microcomputer through a USB interface, the single-chip microcomputer converts the set frequency and signal waveform into an electrical signal, and controls the frequency and signal waveform of the square wave voltage signal generated by the square wave voltage signal generation circuit according to the converted electrical signal; the signal waveform includes the output amplitude and the direct current bias.
[0018] Optionally, the microcontroller is an STM32F103C8T6 microprocessor, and the multiplexing circuit adopts a 74HC4051 eight-way multiplexing chip; the A12, A11 and A10 serial ports of the STM32F103C8T6 microprocessor are connected to the S0, S1 and S2 serial ports of the 74HC4051 eight-way multiplexing chip in a one-to-one correspondence, respectively; the A9 serial port of the STM32F103C8T6 microprocessor is connected to the E serial port of the 74HC4051 eight-way multiplexing chip as an enable terminal; and the A0 serial port of the STM32F103C8T6 microprocessor is connected to the phase-locked demodulation circuit.
[0019] Optionally, the crop nitrogen content detector further comprises a key, an OLED screen backboard and an indicator light; the B1 serial port of the STM32F103C8T6 microprocessor is connected with the key; the B8 serial port and the B9 serial port of the STM32F103C8T6 microprocessor are connected with the OLED screen backboard through a 4P female header; when the STM32F103C8T6 microprocessor receives a measurement instruction of the key, the indicator light is turned on through the control of the OLED screen backboard, and the enable end is pulled down to the level, and the work of the multi-path gating is started.
[0020] According to the specific embodiments provided in the application, the application has the following technical effects.
[0021] The application provides a crop nitrogen content detector. The AC square wave current signal of the preset frequency is loaded with a DC signal, so that the plurality of LEDs serving as the active light source can emit the light signal of the preset frequency. When the reflected light signal of different wave bands on the leaf surface is received, the phase-locked demodulation circuit can demodulate the reflected AC signal reserved for different wave bands according to the reference signal, filter the DC signal in the natural light signal and the active light signal, and output the DC signal that is linearly proportional to the amplitude of the AC light signal in the active light signal, so as to obtain the spectral reflectivity of the leaf surface for each wave band. Through the adjustment of the circuit structure, the natural light interference can be shielded without creating a dark room, and the measurement point is not limited, and the efficiency of measuring the crop nitrogen content is greatly improved. BRIEF DESCRIPTION OF DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the application or the related art, the drawings needed to be used in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0023] Figure 1 The structure schematic diagram of the crop nitrogen content detector provided by the application.
[0024] Figure 2 The circuit principle schematic diagram of the STM32 minimum system backboard provided by the application.
[0025] Figure 3 The circuit principle schematic diagram of the AD9833 chip provided by the application.
[0026] Figure 4 The circuit principle schematic diagram of the NE5532 chip and the constant current source chip HX301-1A40 provided by the application.
[0027] Figure 5A circuit principle schematic diagram of a 74HC4051 eight-way gating chip provided for the present application.
[0028] Figure 6 A circuit principle schematic diagram of a photoelectric conversion circuit provided for the present application.
[0029] Figure 7 A circuit principle schematic diagram of a phase-sensitive detection chip AD630 provided for the present application.
[0030] Figure 8 A circuit principle schematic diagram of an OLED screen backplane provided for the present application. DETAILED DESCRIPTION
[0031] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0032] The above purposes, features and advantages of the present application will be more apparent and easy to understand. The present application will be further described in detail below with reference to the drawings and specific embodiments.
[0033] In an exemplary embodiment, as shown in Figure 1 a crop nitrogen content detector is provided, comprising: a microcontroller, a reference signal conditioning circuit, a driving signal conditioning circuit, a multi-way gating circuit, a photoelectric processing circuit, a phase-locked demodulation circuit and a plurality of LEDs.
[0034] The reference signal conditioning circuit is configured to receive a square wave voltage signal, condition the received square wave voltage signal into a reference signal, and deliver the reference signal to the phase-locked demodulation circuit. The square wave voltage signal is an alternating square wave voltage signal with a preset frequency and a DC signal carried thereon. The driving signal conditioning circuit is configured to receive the square wave voltage signal, condition the received square wave voltage signal into a constant-current driving signal, and deliver the constant-current driving signal to the multi-way gating circuit.
[0035] The multi-way gating circuit is configured to sequentially direct the constant-current driving signal to the plurality of LEDs according to an interval time set by the microcontroller, and drive the plurality of LEDs to sequentially emit alternating light signals with the DC signal carried thereon to the leaf surface. The plurality of LEDs are LEDs of different wavebands.
[0036] The photoelectric processing circuit is configured to sequentially receive reflected light signals of different wavebands from the leaf surface, filter out the DC signal in the reflected light signals, and transmit the remaining reflected alternating signals to the phase-locked demodulation circuit. The reflected light signals include natural light signals and active light signals, and the active light signals are alternating light signals with the DC signal carried thereon.
[0037] The phase-locked demodulation circuit is used for demodulating the reflected alternating current signals reserved for different wave bands according to the reference signal, filtering out the direct current signals in the natural light signals and the active light signals, and outputting the direct current signals in linear proportion to the amplitude of the alternating current signals in the active light signals.
[0038] The microcontroller is used for sampling the direct current signals for different wave bands output by the phase-locked demodulation circuit, and obtaining the spectral reflectivity of the leaf surface for each wave band according to the direct current signals for different wave bands; the spectral reflectivity of each wave band represents the nitrogen content of the crop.
[0039] The crop nitrogen content detector provided in the application relates to active light signal modulation and demodulation technology. A direct current signal is carried on a specific frequency alternating square wave current signal, so that the active light source (a plurality of LEDs) can emit a special frequency light signal, and when receiving the light signal, the special frequency photoelectric signal is extracted, that is, the natural light interference can be shielded without creating a dark room by adjusting the circuit structure, and the measurement point is not limited, and the efficiency of measuring the nitrogen content of the crop is greatly improved.
[0040] As an optional implementation, Figure 1 The crop nitrogen content detector further includes a square wave voltage signal generating circuit. The square wave voltage signal generating circuit is used for generating a square wave voltage signal and delivering the square wave voltage signal to the reference signal conditioning circuit and the driving signal conditioning circuit respectively.
[0041] The crop nitrogen content detector is divided into light signal generation and modulation, and reflected light signal reception and demodulation according to functions. In the light signal generation and modulation, a square wave voltage signal generating circuit, a reference signal conditioning circuit, a driving signal conditioning circuit and a multiplexer circuit are mainly used. In the reflected light signal reception and demodulation, a photoelectric processing circuit and a phase-locked demodulation circuit are used. The structures in the crop nitrogen content detector will be described in detail below.
[0042] (1) Microcontroller.
[0043] The microcontroller is the main control core of the crop nitrogen content detector, which is an STM32F103C8T6 microprocessor.
[0044] The microcontroller obtains the spectral reflectivity of the leaf surface for each wave band according to the direct current signals for different wave bands, specifically including: dividing the direct current signal of each wave band by the whiteboard reflection signal of the respective wave band to obtain the spectral reflectivity of the leaf surface for each wave band; the whiteboard reflection signal of the respective wave band is the reflection signal collected by using a plurality of LEDs on a same 90% diffuse reflection board in advance.
[0045] The STM32F103C8T6 microprocessor (hereinafter referred to as STM32 microcontroller) uses a circuit structure consisting of an STM32 minimum system backplane and an STM32 minimum system board. For example... Figure 2 The schematic diagram of the STM32 minimum system backplane circuit shown is shown. The STM32 minimum system backplane mainly includes four 20P headers ( Figure 2 The 20-pin connector (U1, U2, U3, and U4) is used to assemble the STM32 minimum system board. The connection section includes serial ports B8 and B9 for connection to the OLED screen backplane, serial ports A12, A11, A10, and A9 for connection to the multiplexing circuit, serial port B1 for connection to button control, and serial port A0 for connection to the phase-locked demodulation output. These connections are sequentially represented by the 4-pin wire-pair board (...). Figure 2 CN3), 5P wire-to-board ( Figure 2 U6 in the middle), 2P wire to board ( Figure 2 CN2) and the motherboard. Among them, U1, U2, U3 and U4 all use PM254-1-20-Z-8.5 chips, CN3 uses ZX-XH2.54-4PWZ chips, U6 uses ZX-XH2.54-5PWZ chips, and CN2 uses ZX-XH2.54-2PWZ chips.
[0046] (ii) Square wave voltage signal generation circuit.
[0047] The square wave voltage signal generator circuit outputs a square wave whose frequency and amplitude do not require an STM32 microcontroller; these settings are pre-configured via a USB interface. Currently, the frequency is set to 1kHz, the output amplitude to 5V, and the DC bias to 2.5V. The square wave voltage signal needs to be split into a reference signal and a drive signal. The reference signal is a necessary component in the phase-locked loop demodulation circuit, used to demodulate the reflected AC optical signal. The drive signal, on the other hand, drives the LED to emit an AC optical signal carrying a DC signal (when the LED is not modulated, the emitted light is a DC signal; after adding the modulated AC signal, it becomes an AC optical signal carrying a DC signal).
[0048] The square wave voltage signal generation circuit uses the AD9833 chip as its core. It is not controlled by an STM32 microcontroller, but rather by a microcontroller (e.g., a CH554E microcontroller) via a USB interface. Connected to a computer via USB, the output frequency and waveform can be set in a visual window on the computer. The CH554E microcontroller receives the frequency and waveform from the USB interface and converts it into the electrical signal required by the AD9833. Currently, the circuit is set to a square wave voltage signal with a frequency of 1kHz, an output amplitude of 5V, and a DC bias of 2.5V. The output square wave voltage signal is then fed into the reference signal conditioning circuit and the drive signal conditioning circuit.
[0049] Figure 3 This is the circuit schematic of the AD9833 chip. Figure 3 Part (a) shows the connection relationship of the CH554E chip. Figure 3 Part (b) shows the connection relationship of the filter capacitors. Figure 3 Section (c) shows the connection of the power indicator lights. Figure 3 Section (d) shows the USB interface connection relationship. Figure 3 Part (e) shows the 2P pin header connection relationship. Figure 3 Section (f) shows the direct digital signal frequency synthesis circuit.
[0050] (iii) Reference signal conditioning circuit.
[0051] The reference signal needs to be free of DC and its amplitude cannot exceed 5V. A reference signal conditioning circuit is provided here, consisting of a first amplifier circuit and a DC bias adjustment circuit, which can condition the square wave voltage signal into a suitable reference signal. The first amplifier circuit is used to reduce the voltage amplitude of the square wave voltage signal. The DC bias adjustment circuit is used to superimpose a DC bias onto the square wave voltage signal after the voltage amplitude has been reduced to obtain the reference signal, which is an AC signal with a constant amplitude. For example, a high-pass filter can also be placed between the first amplifier circuit and the DC bias adjustment circuit.
[0052] The square wave voltage signal enters the reference signal conditioning circuit built around the NE5532 chip. First, the voltage amplitude is reduced by the first amplification circuit built by pins 1, 2, 3, 4, and 8 of the NE5532 chip. Then, the DC bias adjustment circuit built by pins 5, 6, and 7 of the NE5532 chip adds DC bias to the AC signal, so that the output reference signal is an AC signal with a stable amplitude.
[0053] (iv) Drive signal conditioning circuit.
[0054] The core component of the drive signal conditioning circuit is the HX301-1A40 constant current source chip. A square wave voltage signal enters the HX301-1A40 constant current source chip, which outputs a current signal with a constant current of 40mA to drive LEDs of different wavelengths.
[0055] The driving signal needs to be directed to LEDs of different wavelengths, and the operating voltage of LEDs of different wavelengths is different. This application uses constant current source technology to keep the output driving signal current constant, and the voltage can be adaptively adjusted according to the voltage required by the LED.
[0056] Figure 4The circuit principle diagram of NE5532 chip and constant current source chip HX301-1A40. Figure 4 The part (a) in the figure shows the connection relationship of filter capacitors, Figure 4 The part (b) in the figure shows the connection relationship of driving signal conditioning circuit, first amplification circuit and DC bias adjustment circuit.
[0057] (five) multiplexing circuit.
[0058] The multiplexing circuit takes 74HC4051 eight-way multiplexing chip as the core, and only six ways are used in the application. The control principle is the logical switching of three serial ports S0, S1 and S2. The A12, A11 and A10 serial ports of the STM32 microcontroller are connected to S0, S1 and S2 respectively. When the STM32 microcontroller receives the measurement instruction from the button, the indicator light is turned on, and the enable end is pulled down to the level, and the driving signal comes to the input port of the multiplexing circuit waiting for transmission. According to the interval time set by the STM32 microcontroller, the six LEDs emit modulated light signals in turn, and the STM32 microcontroller samples the demodulated direct current signals in turn. Figure 5 The backplate circuit principle diagram of 74HC4051 eight-way multiplexing circuit. Figure 5 The chip model of U1 is PM254-1-07-Z-8.5, the chip model of U2 is PM254-1-10-Z-8.5, the chip model of U9 is ZX-XH2.54-3PWZ-Y, the chip model of U10 is ZX-XH2.54-3PWZ, the chip model of U11 is ZX-XH2.54-5PWZ, the chip model of CN1 is ZX-XH2.54-2PWZ, and the chip model of U3 to U8 is DB125-2.54-2P-GN-S.
[0059] The A12, A11 and A10 of the STM32 microcontroller are connected to the S0, S1 and S2 serial ports for six logic state switching. The A9 serial port of the STM32 microcontroller is connected to the E serial port of the 74HC4051 eight-way multiplexing chip, which is the enable end. Only when the A9 serial port is pulled down to the level, the multiplexing can work. Z is the signal input end, and 2P wire pair board is connected with the driving signal. The output serial ports Y0, Y1, Y2, Y3, Y4 and Y5 lead to six different waveband LEDs respectively.
[0060] (six) photoelectric processing circuit.
[0061] The photoelectric processing circuit includes a photodetector and a photoelectric conversion circuit. The photodetector receives reflected light signals from the blade surface at different wavelengths and converts these reflected light signals into current signals. The photoelectric conversion circuit converts the current signal transmitted by the photodetector into a voltage signal, amplifies the voltage signal, filters out the DC signal from the amplified voltage signal, and retains the AC signal in the amplified voltage signal.
[0062] The photodetector used is a UV-series silicon photodetector with a receiving wavelength range of 200nm~1000nm. The signal received by the photodetector includes natural light signals and active light signals. The natural light signal does not change in a short period of time and can be regarded as a DC signal. Similarly, the active light signal also contains a part of the DC signal.
[0063] The main function of the photoelectric processing circuit is to convert the minute current signal transmitted by the photodetector into a voltage signal, amplify it to a suitable level for demodulation, and filter out the DC signal, ready for demodulation. (Refer to...) Figure 6 The circuit principle of the photoelectric conversion circuit shown is as follows: The photoelectric conversion circuit adopts a four-stage circuit architecture, including a T-type feedback network, a high-pass filter, a single-stage inverting amplifier, and a subtractor. The first stage is the T-type feedback network. Since the received current signal is very small, and the signal will be very unstable after amplification when the single resistor is too large, the T-type feedback network is chosen to convert it into a voltage signal while performing preliminary amplification. The second stage is the high-pass filter. A simple high-pass filter is built using resistors and capacitors to filter out the DC signal. If the signal is filtered out after amplification, there may be a problem of excessive DC signal amplification. The third stage is the single-stage inverting amplifier. The amplification factor here is determined by resistor R4. The fourth stage is the subtractor (also known as a DC bias adjustment circuit). In photoelectric conversion, dark current is involved. When the photodetector is in a dark environment, its output needs to be kept at 0. The subtractor is used to adjust the voltage to 0, which is convenient for the acquisition of the unipolar ADC.
[0064] Therefore, the photoelectric conversion circuit includes a T-type feedback network, a high-pass filter, an inverting amplifier, and a subtractor. It filters out the DC signal from the reflected light signal while amplifying the AC signal to a suitable amplitude for demodulation. The T-type feedback network converts the current signal transmitted by the photodetector into a voltage signal and amplifies it. The high-pass filter filters out the DC signal from the amplified voltage signal, retaining the AC signal. The inverting amplifier amplifies the retained AC signal to obtain the amplified AC signal. The subtractor adjusts the amplified AC signal voltage to zero.
[0065] Figure 6Part (a) of FIG. 1 shows a four-stage cascade circuit architecture adopted by the photoelectric conversion circuit, a T-type feedback network with AD825ARZ-REEL7 as the core, and a C x and R x comprise a high-pass filter, an inverting amplifier with NE5532 (U3.1) as the core, and a subtractor with NE5532 (U3.2) as the core. Figure 6 Part (b) of FIG. 1 shows the power-on circuit, Figure 6 Part (c) of FIG. 1 shows the connection relationship of the filter capacitor.
[0066] (Seven) Phase-locked demodulation circuit.
[0067] To obtain the reflectivity of the active alternating current light signal, the amplitude information of the alternating current part at a specific frequency needs to be obtained, and the direct current signal interference in the active light and the ambient light needs to be filtered out. Using the phase-locked amplification technology, the basic principle is to use the reference signal and the signal to be measured for phase comparison. When the reference signal and the signal to be measured have the same frequency and phase, the signal is demodulated by a phase sensitive detector (PSD), and the amplitude information of the signal is extracted from the noise. Since the phase of the noise signal and the reference signal does not match, it will be suppressed during demodulation, while the useful signal is retained and amplified. Finally, after filtering out the high-frequency components by a low-pass filter, a direct current signal output proportional to the amplitude of the measured signal is obtained.
[0068] The phase-locked demodulation circuit uses the phase sensitive detection chip AD630 as the core demodulation device, and builds a peripheral circuit including an amplification circuit, a phase-locked circuit and a low-pass filter circuit. The output direct current signal is connected to the A0 serial port of the STM32 microcontroller, and is sampled after each LED is turned on for 1500 ms. Figure 7 The circuit principle of the phase sensitive detection chip AD630 is shown in FIG. 2. Figure 7 Part (a) of FIG. 2 shows the connection relationship of the filter capacitor in the phase sensitive detection chip AD630, Figure 7 Part (b) of FIG. 2 shows the low-pass filter circuit in the phase sensitive detection chip AD630.
[0069] The phase sensitive detection chip AD630 is a high-performance low-noise dual operational amplifier with excellent noise performance, excellent output driving capability and very high small signal bandwidth. The phase-locked demodulation circuit mainly includes three parts: AC signal amplification processing, phase-locked demodulation and low-pass filter. After the signal is input, it enters the 10 times amplification circuit constructed by the OPA627AU / 2K5 chip Figure 7 The phase sensitive detection chip AD630 has two working states, namely phase-locked amplification mode and balanced modulation mode, and the present application is built in phase-locked amplification mode. The output is connected to the NE5532 Figure 7The low-pass filter (NE5532DR-YJLTY) is used to filter out high-frequency components and retain only the DC component containing amplitude information.
[0070] As an optional implementation, the crop nitrogen content detector also includes: buttons, an OLED screen back panel, and indicator lights. When the STM32F103C8T6 microprocessor receives a measurement command from the buttons, it controls the OLED screen back panel to turn on the indicator lights and simultaneously pulls down the enable pin to enable multiplexing.
[0071] Reference Figure 8 The circuit principle of the OLED screen back panel is shown. Figure 8 Part (a) shows the 4P female connector connection relationship, and Figure 8 Part (b) shows the 2P female connector connection. The main function of the OLED screen backplane is to connect the circuitry of the OLED screen and also to provide a fixed mounting. The OLED screen backplane uses 4P female connectors to plug into the screen and 4P wires to connect to the serial ports B8 and B9 of the STM32 microcontroller, which controls the screen display. Additionally, 2P female connectors are used to connect the buttons, and 2P wires are used to connect to the serial port B1 of the STM32 microcontroller. When a button is pressed, the B1 serial port level is pulled down, and the STM32 microcontroller receives a detection command.
[0072] The control process of the crop nitrogen content detector of the present application is: through the STM32 microcontroller as the control core, after receiving the measurement instruction, the multi-channel gating work is started. At this time, the square wave voltage signal generation circuit with AD9833 as the core chip generates square wave voltage signals, which are adjusted into reference signals and constant current driving signals suitable for different waveband LEDs through the reference signal conditioning circuit and the driving signal conditioning circuit, and then the reference signals are sent to the phase-locked demodulation circuit to wait for the reflected alternating current light signals for demodulation, and the constant current driving signals are sent to the multi-channel gating circuit for LED driving. The control of multi-channel gating is realized by three serial ports of the STM32 microcontroller, and the driving signals are sequentially guided to different LEDs through six kinds of logic conversion, and the alternating current light signals carrying direct current signals are emitted by the six kinds of LEDs in turn. The light signals are received by the photodetector after being reflected by the leaves, and the small light signals are converted into electrical signals through the photoelectric conversion and amplification circuit, and the direct current signals demodulated by the phase-locked demodulation circuit are linearly proportional to the reflected alternating current signal amplitude, which are connected with the A0 serial port of the STM32 microcontroller for ADC sampling. The sampled values are stored in the STM32 microcontroller, and after all the sampling is completed, six sampled values are obtained. Dividing the six sampled values by the six whiteboard reflection data, that is, the spectral reflectance of the leaf surface to each waveband can be obtained, and the whiteboard reflection data is the reflection data collected by the same 90% diffuse reflection plate using the six kinds of LEDs in advance and stored in the STM32 microcontroller.
[0073] The crop nitrogen content detector of the present application can realize rapid, accurate and non-destructive nitrogen content determination, optimize the fertilization scheme, improve the yield and quality of crops, reduce environmental pollution, and further promote the sustainable development of agriculture. The present application will help to reduce cost, shorten logistics time, reduce logistics cost, improve the popularity and accessibility of agricultural technology, and promote the wide application of related technology in the field of agriculture.
[0074] The technical features of the above embodiments can be combined arbitrarily, and to make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present application.
[0075] The principles and implementation modes of the present application are described by specific examples in this paper, and the above examples are only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed. In view of the above, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A crop nitrogen content detector, characterized by, The crop nitrogen content detector comprises a microcontroller, a reference signal conditioning circuit, a driving signal conditioning circuit, a multi-path gating circuit, a photoelectric processing circuit, a phase-locked demodulation circuit and a plurality of LEDs; The square wave voltage signal generation circuit is used for generating a square wave voltage signal and delivering the square wave voltage signal to the reference signal conditioning circuit and the driving signal conditioning circuit respectively; The reference signal conditioning circuit is used for receiving the square wave voltage signal, conditioning the received square wave voltage signal into a reference signal and delivering the reference signal to the phase-locked demodulation circuit; the square wave voltage signal is an alternating square wave voltage signal with a preset frequency and a DC signal carried thereon; The reference signal conditioning circuit comprises a first amplification circuit and a DC bias adjustment circuit; the first amplification circuit is used for reducing the voltage amplitude of the square wave voltage signal; the DC bias adjustment circuit is used for superimposing a DC bias on the square wave voltage signal with the voltage amplitude reduced to obtain the reference signal; the reference signal is an alternating signal with a constant amplitude; the reference signal does not contain DC and the amplitude is not more than 5V; The driving signal conditioning circuit is used for receiving the square wave voltage signal, conditioning the received square wave voltage signal into a constant-current driving signal and delivering the constant-current driving signal to the multi-path gating circuit; The multi-path gating circuit is used for sequentially directing the constant-current driving signal to the plurality of LEDs according to the interval time set by the microcontroller to drive the plurality of LEDs to sequentially emit alternating light signals with the DC signal carried thereon to the leaf surface; the plurality of LEDs are LEDs of different wave bands; The photoelectric processing circuit is used for sequentially receiving the reflection light signals of different wave bands from the leaf surface and filtering the DC signal in the reflection light signals, and transmitting the retained reflection alternating signals to the phase-locked demodulation circuit; the reflection light signals comprise natural light signals and active light signals, the active light signals are alternating light signals with the DC signal carried thereon; the voltage of the retained reflection alternating signals is 0; The phase-locked demodulation circuit is used for demodulating the retained reflection alternating signals of different wave bands according to the reference signal, filtering the DC signal in the natural light signals and the active light signals and outputting a DC signal that is linearly proportional to the amplitude of the alternating light signal in the active light signal; The microcontroller is used for sampling the DC signals of different wave bands output by the phase-locked demodulation circuit and obtaining the spectral reflectance of the leaf surface to each wave band according to the DC signals of different wave bands; the spectral reflectance of each wave band represents the nitrogen content of the crop; the microcontroller specifically comprises: dividing the DC signal of each wave band by the whiteboard reflection signal of the respective wave band to obtain the spectral reflectance of the leaf surface to each wave band; the whiteboard reflection signal of the respective wave band is a reflection signal collected by using the plurality of LEDs on a same 90% diffuse reflection board in advance.
2. The crop nitrogen content detector according to claim 1, characterized by, The photoelectric processing circuit comprises a photodetector and a photoelectric conversion circuit; The photodetector is used for receiving the reflection light signals of different wave bands from the leaf surface and converting the reflection light signals into current signals; The photoelectric conversion circuit is used for converting the current signal transmitted by the photodetector into a voltage signal, amplifying the voltage signal, filtering the direct current signal in the amplified voltage signal, and retaining the alternating current signal in the amplified voltage signal.
3. The crop nitrogen content detector according to claim 2, characterized in that, The photoelectric conversion circuit comprises a T-type feedback network, a high-pass filter, an inverting amplifier and a subtractor. The T-type feedback network is used for converting the current signal transmitted by the photodetector into a voltage signal and amplifying the voltage signal. The high-pass filter is used for filtering the direct current signal in the amplified voltage signal and retaining the alternating current signal in the amplified voltage signal. The inverting amplifier is used for amplifying the retained alternating current signal to obtain an amplified alternating current signal. The subtractor is used for adjusting the voltage of the amplified alternating current signal to 0 point.
4. The crop nitrogen content detector according to claim 1, characterized by, The phase-locked demodulation circuit comprises a second amplification circuit, a phase-sensitive detector and a low-pass filter. The second amplification circuit is used for amplifying the retained reflected alternating current signal for different wave bands to obtain an amplified reflected alternating current signal. The phase-sensitive detector is used for demodulating the amplified reflected alternating current signal according to a reference signal, extracting the amplitude information of the amplified reflected alternating current signal from noise, and outputting a demodulated signal. The low-pass filter is used for filtering high-frequency components in the demodulated signal to obtain a direct current signal that is linearly proportional to the amplitude of the alternating current signal in the active optical signal.
5. The crop nitrogen content detector according to claim 1, characterized by, The square wave voltage signal generated by the square wave voltage signal generation circuit is a square wave voltage signal with a frequency of 1 kHz, an output amplitude of 5 V and a direct current bias of 2.5 V. The frequency, output amplitude and direct current bias of the square wave voltage signal are set in the following manner: the frequency and signal waveform of the square wave voltage signal are set in the visual window of the computer, are transmitted to the single-chip microcomputer through the USB interface, the set frequency and signal waveform are converted into electrical signals by the single-chip microcomputer, and the frequency and signal waveform of the square wave voltage signal generated by the square wave voltage signal generation circuit are controlled according to the converted electrical signals. The signal waveform includes the output amplitude and the direct current bias.
6. The crop nitrogen content detector according to claim 1, characterized by, The microcontroller is an STM32F103C8T6 microprocessor, and the multi-channel gating circuit adopts a 74HC4051 eight-channel gating chip. The A12 serial port, the A11 serial port and the A10 serial port of the STM32F103C8T6 microprocessor are connected to the S0 serial port, the S1 serial port and the S2 serial port of the 74HC4051 eight-channel gating chip respectively. The A9 serial port of the STM32F103C8T6 microprocessor is connected to the E serial port of the 74HC4051 eight-channel gating chip as an enable terminal. The A0 serial port of the STM32F103C8T6 microprocessor is connected to the phase-locked demodulation circuit.
7. The crop nitrogen content detector according to claim 6, characterized in that, The crop nitrogen content detector further comprises a key, an OLED screen backboard and an indicator light. The B1 serial port of the STM32F103C8T6 microprocessor is connected to the key, and the B8 serial port and the B9 serial port of the STM32F103C8T6 microprocessor are connected to the OLED screen backboard through a 4P female connector. When the STM32F103C8T6 microprocessor receives a measurement instruction from the key, the indicator light on the OLED screen backboard is turned on, and the enable terminal is pulled down to the low level to enable the multi-channel gating circuit.
Citation Information
Patent Citations
Method and device for detecting total nitrogen and organic matters in soil
CN116465849A