Introduction
Rice sheath blight (ShB) is a very harmful and epidemic disease, and that is why early detection and treatment are very important to prevent its further spread. The primary site of infection is the base of rice, combined with other fungi that cause similar symptoms, so it is extremely difficult and often inaccurate for farmers to detect the disease by visual observation of the phenomenon. The existing rice pathogen detection methods are either time-consuming and laborious, or expensive, requiring professional personnel and precision instruments (such as electron microscopy, fluorescence immunoassay, fluorescence quantitative PCR, etc.), which are not suitable for the target population farmers. So, we propose electronic nose detection hardware (ENose), which is lowcost, easy to use, and capable of real-time monitoring in the field.
The catcher in the rice field: ENose
ENose hardware gets data by sensors for temperature, humidity, light intensity, wind speed and gas concentration data, and then use our detection algorithm which is running on the server (see Model page to learn more) for data processing and analysis. Finally, server will send the analysis results to the client App (see Software page to learn more). It is like a catcher guarding the crops in the rice field.
In the future, other iGEM teams who want to detect other fungal diseases with our ENose, can simply use our ENose hardware to train the neural network in the detection algorithm with new data (see our contribution page for details).
Our ENose hardware mainly includes four parts: data acquisition module, communication module, control module and power module. ENose hardware obtains temperature, humidity, light intensity, wind speed and gas concentration data through data acquisition module, then processes data through control module, and finally uploads data to server through communication module. The power module powers our ENose hardware.The video below shows how our hardware works.
You may be curious about how our hardware is designed, tested, and improved. Don't worry, let's move on.
The olfactory receptors of ENose: gas sensors
The bacterial volatile organic compounds in rice rhizosphere have inhibitory effects on the growth of R. solani. Among them, five VOCs (ethyl benzoate, 3-methylbutyric acid, 2-ethyl-1-hexanol, 3-methyl-1-butanol and 6-methyl-5-heptene-2-ketone) are defensive substances released by rice. When they are used as pure compounds, there is literature modeling confirming their toxic effects on R. solani. Gas sensors are like olfactory cells, they can smell changes in the concentration of gas around them. We used six standard metal oxide semiconductor(MOS) gas sensors: TGS 2600,TGS 2602, TGS 2603, TGS 2610,TGS 2611, and TGS 2620 (Figaro Engineering Inc., Mino,Osaka Japan). Their sensitivity characteristics are as follows:
Table 1. Sensitivity characteristics of gas sensors
The gas sensor requires heater voltage (`V_H`) and circuit voltage (`V_C`). `V_H` is applied to the integrated heater to maintain sensitizer at a certain temperature suitable for the object gas. `V_C` is used for testing and load resistance of sensor series (`R_L`) circuit on the output voltage (`V_{RL}`). The sensor is polar, so circuit requires a DC power supply. As long as the electrical characteristics of the sensor can be met, `V_C` and `V_H` can share a power supply circuit.
Figure 1.Basic measuring circuit
Assuming that the current through the circuit is `I_C`, the sensor resistance is `R_S`, and the variable load resistance is `R_L`, the circuit voltage is `V_C`, according to Ohm's law is:
$$V_C=I_C(R_S+R_L) \tag{1}$$
By the series circuit law, we can know that `I_C = I_S = I_L =\frac{V_{RL}}{R_L} `, then Equation (1) is rewritten as follows:
$$V_C=\frac{V_{RL}}{R_L}(R_S+R_L) \tag{2}$$
Therefore sensor resistance (`R_S`) is calculated with a measured value of `V_{OUT}`(`V_{RL}`) by using the following equation:
$$R_S=(\frac{V_C}{V_{RL}}-1)R_L \tag{3}$$
We know the relationship between load resistance (`R_L`) and sensor resistance (`R_S`) through Equation (3), which allows us to change the sensitivity of the sensor by adjusting the size of the load resistance.
The information transmission pathway of ENose: circuit
Our ENose hardware is mainly based on Arduino Nano V3.0, including acquisition device and management device. In addition to 6 gas sensors, temperature and humidity sensors, wind speed sensors, and WiFi communication modules are also used. We designed the circuit for ENose device,and the circuit diagram is as follows:
Figure 2. Circuit diagram(Left: Acquisition device; Right: Managing device)
We use Fritzing software (version: 0.0.9) to simulate the core part, and the simulation diagram is as follows:
Figure 3. Simulation diagram used Fritzing software
We bought the parts from online stores, and tested them to ensure that each one worked properly.
Figure 4. The picture of real products
The stable system: ENose system
Before coding, we used the Unified Modeling Language (UML) to draw the Arduino program architecture. Since the ENose device has many sensors, we wanted to provide a consistent interface to a set of interfaces in the system that would be easy for Controller class to invoke. Therefore, we use Facade Pattern, which reduces the complexity of accessing internal subsystems of complex systems and simplifies the interface with control classes. We used the UML designed Appearance Pattern class diagram (Figure 5).
Figure 5. Facade Pattern class diagram of ENose Arduino program
In consideration of real-world conditions, we expect high stability and reliability of ENose hardware, such as automatic restart in the event of a crash at high temperatures. Therefore, we define a finite State machine (FSM) that describes four states of ENose device: Sleep State, Running State, Collection State, and Transmission State.
- In the Sleep State, the ENose device will check whether the receive buffer is empty. If it is empty, no state transition is triggered; If it is not empty, it will trigger a State shift to Running State.
- In Running State, the ENose device will test whether the sensor works properly. If the sensor works properly, it triggers the State migration to Collection State. If the sensor is not working properly, a State shift to Transmission State will be triggered.
- In Collection State, the ENose device collects environmental data. After the collection is complete, a State shift to Transmission State will be triggered.
- In Transmission State, the ENose device sends data to the server. If the transmission fails, no State migration occurs and the ENose device resends the transmission for three times. When the resend fails 3 times, the state will be migrated to Sleep State. If the send is successful, the state will be migrated to Sleep State and a command is removed from the receive buffer.
Figure 6. The finite state machine for ENose device
The finite State machine can ensure the stable operation of ENose system, so we modified the original Arduino program architecture and implemented the State Pattern according to the description of the finite State machine. In this way, ENose hardware can operate stably in the rice field and transmit device exception information to the server over the network.
Figure 7. State Pattern class diagram of ENose Arduino program
Finally, we coded the UML class diagram, and the Arduino source code was obtained by clicking this link.
The clothing of ENose: aluminium shell
According to an old saying, clothes make the man. A proper shell protects the sensors and allows ENose system to operate steadily. Sensors of ENose will be abnormal if they get wet or overheating in the real environment, so after considering that, we decided to place the sensor under the shell and the wind speed sensor above the shell.
Figure 8. Hardware design of the first generation ENose
After completing the first generation design, we wanted to add solar panels to power the ENose device, but it was difficult to achieve on the first generation design, which led us to redesign the second generation ENose hardware appearance. It was learned through HP that the height of the rice is about 1.2 meters, which requires us to improve the fixed height of the ENose hardware. The second generation ENose uses aluminum, which makes the ENose lighter. More importantly, the aluminum shell is treated to form a colorless oxide film that makes the shell non-conductive and increases its resistance to corrosion.
Figure 9. AutoCAD design of the second generation of ENose
The brain of ENose: detection algorithm
We placed ENose hardware in clean air, on rice leaves not inoculated with fungi (10g), on rice leaves inoculated with R.solani (10g), and on rice leaves inoculated with Magnaporthe grisea (10g) for 3 days of data collection. The original data is as follows:
Figure 10. Original data
After filtering the raw data using the Kalman filter, the data is as follows:
Figure 11. Data after using the Kalman Filter
We first augmented the data using the sliding window algorithm and then transformed the data using GASF (see the Model page for details of the detection algorithm) . Some examples are as follows:
Figure 12. Images after GASF conversion
In addition, we also test the battery life of the ENose hardware. We hope that the ENose hardware can store enough power through the solar power panel during the day. What's more, we want ENose to be able to adjust its power consumption to extend battery life in different weather conditions. We simulated the theoretical battery life for one week according to the hardware parameters from sensors specification. From the theoretical battery life curve, our ENose device can operate stably for at least one week when the weather is sunny in the real environment.
Figure 13. Theoretical endurance curve
Device Budget
We put the prices of the parts used in the ENose equipment in the table below.
Table 2. Device budget
References
[1] Xiao W, Cao YL, Feng SH, Liu YD, Jiang KL, Yu ZX, Yan L. Rice blight disease index detection based on windowed Gram-Schmidt transform and PSO-SVR algorithm[J].Spectroscopy and Spectral Analysis,2021,41(07):2181-2187. [2] Gardner J W, Bartlett P N. A brief history of electronic noses[J]. Sensors and Actuators B: Chemical, 1994, 18(1-3): 210-211. [3] Qi P F, Meng Q H, Zeng M. A CNN-based simplified data processing method for electronic noses[C]//2017 ISOCS/IEEE International Symposium on Olfaction and Electronic Nose (ISOEN). IEEE, 2017: 1-3. [4] Liu T, Zhang W, Li J, et al. A Multiscale Wavelet Kernel Regularization-Based Feature Extraction Method for Electronic Nose[J]. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 2022. [5] Lin Y J, Chou T I, Chiu S W, et al. A Transferable Feature-Based Classifier to Improve Transferability of Electronic Nose Systems[J]. IEEE Sensors Letters, 2022, 6(8): 1-4. [6] Cui H, Dong X, Shang K. An Improved Method for Long-term Drift Compensation of Electronic Nose with Batch Control[C]//2022 IEEE 12th International Conference on Electronics Information and Emergency Communication (ICEIEC). IEEE, 2022: 145-148. [7] Loulier J, Lefort F, Stocki M, et al. Detection of fungi and Oomycetes by volatiles using E-Nose and SPME-GC/MS platforms[J]. Molecules, 2020, 25(23): 5749. [8] Borowik P, Adamowicz L, Tarakowski R, et al. Development of a Low-Cost Electronic Nose for Detection of Pathogenic Fungi and Applying It to Fusarium oxysporum and Rhizoctonia solani[J]. Sensors, 2021, 21(17): 5868. [9] Liu T, Zhang W, McLean P, et al. Electronic nose-based odor classification using genetic algorithms and fuzzy support vector machines[J]. International Journal of Fuzzy Systems, 2018, 20(4): 1309-1320. [10] Chen H, Huo D, Zhang J. Gas Recognition in E-nose System: A Review[J]. IEEE Transactions on Biomedical Circuits and Systems, 2022. [11] Zhang W, Liu T, Brown A, et al. The Use of Electronic Nose for the Classification of Blended and Single Malt Scotch Whisky[J]. IEEE Sensors Journal, 2022, 22(7): 7015-7021. [12] Lessard M C, Noirhomme B, Larocque G, et al. Use of an electronic nose to estimate paper insulation degradation[C]//2012 IEEE International Symposium on Electrical Insulation. IEEE, 2012: 350-355. [13] Wang E, Liu X, Si Z, et al. Volatile Organic Compounds from Rice Rhizosphere Bacteria Inhibit Growth of the Pathogen Rhizoctonia solani[J]. Agriculture, 2021, 11(4): 368.