An electronic automatic measurement system for the freshness of fruits and vegetables
By building a miniaturized fruit and vegetable freshness measurement system and using a power generation circuit and a microcontroller combined with Fourier transform technology, the problems of high cost and difficulty in miniaturization and intelligence of fruit and vegetable freshness detection in existing technologies are solved, and automated and intelligent detection of fruit and vegetable freshness is achieved.
Patent Information
- Application Number
- CN202211279575.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-19
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-10-19
AI Technical Summary
Existing methods for detecting the freshness of fruits and vegetables are costly, difficult to miniaturize, and lack intelligent and automated measurement capabilities.
Using a miniaturized power generation circuit, excitation generation circuit, self-balancing bridge, subtractor and program-controlled amplifier combination circuit, combined with a microcontroller and temperature sensor, the system automatically measures the impedance and phase angle of fruits and vegetables through sinusoidal wave excitation signals and Fourier transform technology, and uploads the data to the Internet of Things cloud platform.
It realizes the automatic and intelligent measurement of the freshness of fruits and vegetables, and displays and uploads the data to the Internet of Things platform in real time, with miniaturized and efficient detection capabilities.
Smart Images

Figure CN115901867B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of fruit and vegetable quality detection and electronic automation measurement. Technical Background
[0002] With economic development and improved living standards, people are increasingly demanding the freshness of fruits and vegetables, and the need for testing their electrical performance parameters is also growing. Existing methods for testing fruit and vegetable freshness primarily rely on bulky desktop LCR meters or complex detection circuits to derive quality parameters based on the relationship between fruit and vegetable impedance and freshness. These methods are costly, difficult to manufacture into small, embeddable testing devices, and lack intelligent, automated measurement capabilities. Summary of the Invention
[0003] The purpose of the present invention is to provide an electronic automatic measurement system for the freshness of fruits and vegetables, which can automatically and intelligently detect the freshness of fruits and vegetables.
[0004] The present invention has the characteristics of miniaturization and intelligence, and can automatically measure the freshness of fruits and vegetables and upload the data to the Internet of Things cloud platform.
[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is:
[0006] An electronic automatic measurement system for the freshness of fruits and vegetables, characterized in that the system consists of
[0007] Power generation circuit,
[0008] Excitation generating circuit,
[0009] The combination circuit of self-balancing bridge, two subtractors and program-controlled amplifier,
[0010] Temperature sensor,
[0011] Microcontroller (MCU).
[0012] The measurement system is characterized in that the power generation circuit is used to generate a power supply, so that a power supply with a voltage of 5 volts is input from the Micro USB interface, and a power supply with voltages of 3.3 volts and 1.5 volts is generated through a voltage stabilizing module.
[0013] The measurement system is characterized in that, further, the voltage stabilization modules are AMS1117-3.3 and AMS1117-1.5, which generate 3.3 volt and 1.5 volt voltages respectively. The 3.3 volt voltage source powers the microcontroller (MCU) and the op amp, and the 1.5 volt voltage source provides bias voltage for the op amp and the programmable control amplifier.
[0014] The measurement system is characterized in that the excitation generation circuit is used to generate an excitation signal, so that the microcontroller (MCU) generates a frequency-adjustable sine wave through a built-in digital-to-analog converter (DAC) under the control of a timer interrupt, and the sine wave forms an excitation signal through a third-order low-pass filter.
[0015] The measurement system is characterized in that the third-order low-pass filter is composed of three resistors and three capacitors, the resistor values are all 1000 ohms, and the capacitor values are all 100 nanofarads.
[0016] The measuring system is characterized by a combination circuit of a self-balancing bridge, two subtractors and a program-controlled amplifier, which is used to obtain the impedance and phase angle of the fruits and vegetables to be measured through the bridge.
[0017] The measurement system is characterized in that fruits and vegetables are placed in a plate measurement box to form fruits and vegetables to be measured. The plate measurement box has a total of four plates in contact with the fruits and vegetables, and every two plates constitute a measurement group, for a total of two groups. A multiplexer selects one group in time sharing to connect to the circuit for measurement. The fruits and vegetables to be measured are connected in series with the internal resistor to form a self-balancing bridge circuit. The excitation signal passes through the self-balancing bridge circuit to generate a voltage difference on both sides of the fruits and vegetables to be measured and on both sides of the internal resistor. The voltage difference between the two sides of the fruits and vegetables to be measured and the two sides of the internal resistor is obtained by two subtractors. The two voltages are amplified by a program-controlled amplifier and enter the circuit. The microcontroller (MCU) has a built-in analog-to-digital converter (ADC). The microcontroller (MCU) then performs a fast Fourier transform on the voltage signal obtained by the analog-to-digital converter (ADC) to obtain the amplitude and phase of the voltage on both sides of the fruits and vegetables, and the amplitude and phase of the voltage on both sides of the internal resistor. The internal resistor value is known, and the current flowing through the internal resistor and the fruits and vegetables to be tested is the same. Then, Ohm's law is used to obtain the impedance on both sides of the fruits and vegetables to be tested. The impedances obtained by the above two measurement groups are Z1 and Z2, respectively. Z1 and Z2 are both complex numbers, including real and imaginary parts. The phase angles θ1 and θ2 of the two groups of fruits and vegetables to be tested are obtained using the inverse trigonometric tangent function.
[0018] The measurement system is characterized in that the plate measurement box contains four electrodes, with each pair of electrodes forming a measurement group, for a total of two measurement groups. A multiplexer selects one of the measurement groups for time-sharing access to the circuit. The internal resistor is connected to an AD8606 op amp and to the fruits and vegetables to be measured, forming a self-balancing bridge. The subtractor circuit consists of an SD06 op amp and four 10,000-ohm resistors. The program amplifier is a PGA112, and the amplification factor is controlled by a microcontroller (MCU) via the SPI (Serial Peripheral Interface) protocol.
[0019] The measuring system is characterized in that it further includes an OLED display module;
[0020] Further, for data display and uploading: The microcontroller (MCU) controls the OLED display module through the SPI protocol to display the impedance, phase angle, ambient temperature, and freshness values of the current fruit or vegetable to be measured. At the same time, the microcontroller (MCU) controls the WIFI module through the serial port protocol to send the above data to the Internet of Things cloud platform.
[0021] The measurement system is characterized in that the ambient temperature is obtained through a temperature sensor:
[0022] The microcontroller (MCU) controls the temperature sensor through the IIC (Inter-Integrated Circuit) protocol to obtain the ambient temperature T.
[0023] The measurement system is characterized in that the microcontroller (MCU) calculates the freshness of the fruit or vegetable
[0024] Construct a mathematical model and according to this mathematical model:
[0025]
[0026] Calculate the freshness. K is the freshness value, T is the temperature, |θ1| and |θ2| are the phase angle moduli, |Z1| and |Z2| are the impedance moduli, a, b, c1, c2, d1, d2, e1, e2, f1, f2 are constant parameters, and n is an integer, which can be taken as 1 or 2. The freshness K has a total of 4 levels, which are divided by three thresholds, namely K0, K1, and K2. When K < K0, K0 < K < K1, K1 < K < K2, and K > K3, they represent different freshness levels respectively.
[0027] The measurement system is characterized in that the mathematical model for counting freshness is related to the ambient temperature, the impedance modulus values of 2 measurement groups, and the phase angle, and is obtained by fitting the measured data. The constant parameters are stored in the array of the microcontroller (MCU). After the microcontroller (MCU) obtains the impedance, phase angle, and ambient temperature of the fruit or vegetable to be measured, it calculates the freshness value through the mathematical model and classifies the freshness of the fruit or vegetable according to the set thresholds. Description of the Drawings
[0028] Figure 1 It is a schematic diagram of the overall measurement circuit for the freshness of fruits and vegetables.
[0029] Figure 2 It is a schematic diagram of the power generation circuit.
[0030] Figure 3 It is a schematic diagram of the excitation signal generation circuit.
[0031] Figure 4 It is a schematic diagram of the combined circuit of the self-balancing bridge, subtractor, and programmable gain amplifier.
[0032] Figure 5 This is a schematic diagram of the plate measurement box.
[0033] Figure 6 This is a flowchart of freshness calculation.
[0034] Figure 7 It is a schematic diagram of data display and upload. DETAILED DESCRIPTION
[0035] The following describes three main steps of the method technology of the present invention in conjunction with the accompanying drawings, which is conducive to a better understanding of the technical solution of the method of the present invention.
[0036] Figure 1 It is the overall measurement circuit of the freshness of fruits and vegetables. Figure 2 yes Figure 1 The power generation circuit in Figure 3 yes Figure 1 The excitation generation circuit in
[0037] Figure 4 yes Figure 1 The self-balancing bridge, two subtractors and program-controlled amplifier circuit are combined. Figure 5 yes Figure 4 The plate measurement box part in
[0038] Figure 6 This is a flowchart of calculating freshness.
[0039] The usage process includes:
[0040] Step 1. Generate power supply and sine wave excitation signal
[0041] Power supply circuit such as Figure 2 As shown, 5V voltage is obtained through the Micro USB interface, and then 3.3V voltage is output through AMS1117-3.3 and 1.5V voltage is output through AMS1117-1.5. Capacitors C1, C3, C5, and C7 are 10 microfarad electrolytic capacitors, and C2, C4, C6, and C8 are 100 nanofarad ceramic capacitors for power supply filtering.
[0042] Excitation generation circuit such as Figure 3 As shown, it consists of a microcontroller (MCU), resistors, capacitors, and op amps to generate a frequency-adjustable sine wave. Resistors R1, R2, and R3 are all 10,000 ohms, and capacitors C9, C10, and C11 are all 100 nanofarads. The above resistors and capacitors form a third-order low-pass filter. The microcontroller (MCU) has a built-in digital-to-analog converter (DAC) to generate a sine wave, which is then passed through the above-mentioned third-order low-pass filter and then through the SGM8632 (i.e. Figure 3The op amp U1 generates a sine wave.
[0043] Step 2. Impedance, Phase, and Temperature Measurement Procedure
[0044] like Figure 1 As shown, the overall measurement circuit includes a power generation circuit, an excitation generation circuit, a microcontroller (MCU), a self-balancing bridge circuit, two subtractor modules, a program-controlled amplifier, a temperature sensor, an OLED display module, and a WIFI module, wherein the microcontroller (MCU) model is STM32F103ZET6.
[0045] Figure 1 The self-balancing bridge, two subtractor modules and program-controlled amplifier in the circuit are shown in Figure 2. Figure 4 As shown, the plate measurement box is as follows Figure 5 As shown:
[0046] In the plate measurement box, plates 1 and 2 are installed under the top plate, and plates 3 and 4 are installed on the bottom plate. The top plate can be moved up and down by pulleys 1, 2, 3 and 4 to fit the fruits and vegetables to be tested. Plates 1, 2, 3 and 4 are led out through electrodes 1, 2, 3 and 4 respectively and connected to the CD4053 multiplexer ( Figure 5 ), CD4053 multiplexer sets 2 states, through the microcontroller (MCU) ( Figure 5 The CD4053 multiplexer uses two output ports, output 1 and output 2. When the selected state is 1, output 1 is connected to electrode 1 and output 2 is connected to electrode 3, forming the first measurement group; when the selected state is 2, output 1 is connected to electrode 2 and output 2 is connected to electrode 4, forming the second measurement group. Fruits and vegetables to be tested are placed in the plate measurement box and connected to the measurement circuit. R10 is an internal resistance of 100 ohms, which is the same as the internal resistance of AD8606 (i.e. Figure 4 The operational amplifier (U5) in the middle is connected in series with the fruits and vegetables to be tested to form a self-balancing bridge.
[0047] exist Figure 5 In the figure, U2 is SD06, which contains two operational amplifiers. Four resistors R5, R6, R7, and R8 with a resistance value of 10,000 ohms form a subtractor circuit. The subtractor circuit obtains the two measured voltages of the fruits and vegetables to be tested and outputs them to channel 0 (CH0) of U4.
[0048] exist Figure 5 In the figure, the subtractor formed by U3 has the same structure as U2, and the voltage across the internal resistance is output to channel 1 (CH1) of U4.
[0049] exist Figure 5In the figure, U4 is a PGA112 programmable amplifier, which controls the amplification factor and channel selection through the SPI protocol of the microcontroller (MCU), and outputs the voltage value obtained by the subtractor to the analog-to-digital converter (ADC) of the microcontroller (MCU).
[0050] Measurement process such as Figure 6 As shown:
[0051] First, the microcontroller (MCU) selects the first measurement group in the measuring electrode box that is in contact with the fruits and vegetables and connects to the circuit to form the first group of fruits and vegetables to be tested. Then the microcontroller (MCU) controls the electrodes through the SPI protocol. Figure 4 U4 in the circuit selects the voltage input of channel 0 (CH0), amplifies the input voltage, and outputs it from VOUT to the built-in analog-to-digital converter (ADC) of the microcontroller (MCU). The microcontroller (MCU) then performs a fast Fourier transform (FFT) on the input voltage to obtain the amplitude and phase of the voltage on both sides of the first group of fruits and vegetables to be tested. Next, the microcontroller (MCU) controls U4 through the SPI protocol to select the voltage input of channel 1 (CH1), amplifies the input voltage, and outputs it from VOUT to the built-in analog-to-digital converter (ADC) of the microcontroller (MCU). The amplitude and phase of the voltage on both sides of the internal resistance are obtained by performing a fast Fourier transform (FFT) on the input voltage, and then the impedance and phase angle of the first group of fruits and vegetables to be tested are obtained using Ohm's law.
[0052] Secondly, the microcontroller (MCU) selects the second measurement group in the measuring electrode box that is in contact with the fruits and vegetables to access the circuit, forming the second group of fruits and vegetables to be tested. The SPI protocol is used to control U4, causing U4 to select the voltage input of channel 0 (CH0), amplify the input voltage, and output it from VOUT to the built-in analog-to-digital converter (ADC) of the microcontroller (MCU). The microcontroller (MCU) then performs a fast Fourier transform (FFT) on the input voltage to obtain the amplitude and phase of the voltage on both sides of the second group of fruits and vegetables to be tested. Next, the microcontroller (MCU) controls U4 through the SPI protocol to select the voltage input of channel 1 (CH1), amplify the input voltage, and output it from VOUT to the built-in analog-to-digital converter (ADC) of the microcontroller (MCU). The amplitude and phase of the voltage on both sides of the internal resistance are obtained by performing a fast Fourier transform (FFT) on the input voltage, and then the impedance and phase angle of the second group of fruits and vegetables to be tested are obtained using Ohm's law.
[0053] Finally, the microcontroller (MCU) controls the temperature sensor through the IIC protocol to obtain the temperature value, and combines the impedance and phase angle of the first group of tested fruits and vegetables with the impedance and phase angle of the second group of tested fruits and vegetables, and calculates the freshness value according to the freshness value K mathematical model.
[0054] Step 3. Data display and upload steps
[0055] like Figure 7 As shown, the microcontroller (MCU) controls the WIFI module through the serial communication protocol to send the data calculated by the microcontroller (MCU) to the IoT cloud platform, where the TX port is used to send data and the RX port is used to receive data; at the same time, the microcontroller (MCU) controls the OLED display module through the SPI protocol to enable the OLED display module to display the real-time measured impedance, phase angle, temperature and freshness calculation results, where CS is the chip select signal port, MOSI is the port for the microcontroller (MCU) to send data to the OLED display module, and SCK is the clock signal port.
Claims
1. An electronic automatic measurement system for the freshness of fruits and vegetables, characterized by: System components include Power generation circuit, Excitation generating circuit, The combination circuit of self-balancing bridge, two subtractors and program-controlled amplifier, Temperature sensor, Microcontroller (MCU); The power generation circuit is used to generate a power supply, realizing a power supply with a voltage of 5 volts input from the Micro USB interface, and generating a power supply with voltages of 3.3 volts and 1.5 volts respectively through the voltage regulator module; The excitation generation circuit is used to generate an excitation signal, enabling the microcontroller (MCU) to generate a frequency-adjustable sine wave through a built-in digital-to-analog converter (DAC) under the control of a timer interrupt. The sine wave passes through a third-order low-pass filter to form an excitation signal; A combination circuit of a self-balancing bridge, two subtractors and a program-controlled amplifier is used to obtain the voltage across the fruit or vegetable to be tested and the internal resistor through the bridge; Fruits and vegetables are placed in a plate measurement box to form fruits and vegetables to be tested. The plate measurement box has a total of four plates in contact with the fruits and vegetables, and every two plates constitute a measurement group, for a total of two groups. A multiplexer is used to select one of the groups in time sharing to connect to the circuit for measurement. The fruits and vegetables to be tested are connected in series with the internal resistor to form a self-balancing bridge circuit. The excitation signal passes through the self-balancing bridge circuit to generate a voltage difference on both sides of the fruits and vegetables to be tested and on both sides of the internal resistor. The voltage differences on both sides of the fruits and vegetables to be tested and on both sides of the internal resistor are respectively obtained through two subtractors. The two voltages are amplified by a program-controlled amplifier and enter the analog-to-digital converter (ADC) built into the microcontroller (MCU). The microcontroller (MCU) then performs a fast Fourier transform on the voltage signal obtained by the analog-to-digital converter (ADC) to obtain the amplitude and phase of the voltage on both sides of the fruits and vegetables and the amplitude and phase of the voltage on both sides of the internal resistor. The internal resistor value is known, and the current flowing through the internal resistor and the fruits and vegetables to be tested is the same. Then, Ohm's law is used to obtain the impedances on both sides of the fruits and vegetables to be tested. The impedances obtained by the above two measurement groups are respectively Z 1 and Z 2, Z 1 and Z 2 are all complex numbers, including real and imaginary parts. The phase angles of the two groups of fruits and vegetables to be tested are obtained by the inverse trigonometric tangent function. θ 1 and θ 2; The internal resistor is connected to an AD8606 op amp and to the fruits and vegetables to be tested, forming a self-balancing bridge. The subtractor circuit consists of an SD06 op amp and four 10,000-ohm resistors. The programmable amplifier is a PGA112, and the amplification factor is controlled by a microcontroller (MCU) via the SPI (Serial Peripheral Interface) protocol.
2. The measuring system according to claim 1, wherein: The voltage regulator modules are AMS1117-3.3 and AMS1117-1.5, which generate 3.3V and 1.5V voltages respectively. The 3.3V voltage source powers the microcontroller (MCU) and the operational amplifier, and the 1.5V voltage source provides bias voltage for the operational amplifier and the programmable amplifier.
3. The measurement system according to claim 1, wherein: It also includes an OLED display module; Used to realize data display and upload: The microcontroller (MCU) controls the OLED display module through the SPI protocol to display the impedance, phase angle, ambient temperature and freshness values of the current fruits and vegetables to be tested. At the same time, the microcontroller (MCU) controls the WiFi module through the serial port protocol to send the above data to the IoT cloud platform.
4. The measurement system according to claim 1, wherein: Get the ambient temperature through the temperature sensor: The microcontroller (MCU) controls the temperature sensor through the IIC (Inter-Integrated Circuit) protocol to obtain the ambient temperature T .
Citation Information
Patent Citations
Multichannel microelectrode bioimpedance test system and method
CN112180166A
Portable apple freshness analyzer
CN209624456U