<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">JCC</journal-id><journal-title-group><journal-title>Journal of Computer and Communications</journal-title></journal-title-group><issn pub-type="epub">2327-5219</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/jcc.2018.66006</article-id><article-id pub-id-type="publisher-id">JCC-85567</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Computer Science&amp;Communications</subject></subj-group></article-categories><title-group><article-title>
 
 
  Plant Nutrient Solution Detection System Based on ZigBee Wireless Technology
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Binyue</surname><given-names>Chen</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Fuhai</surname><given-names>Zhang</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Key Laboratory of Photoelectronic Thin Film Devices and Technology of Tianjin, Tianjin, China</addr-line></aff><author-notes><corresp id="cor1">* E-mail:<email>cbybinyue@mail.nankai.edu.cn(BC)</email>;</corresp></author-notes><pub-date pub-type="epub"><day>05</day><month>06</month><year>2018</year></pub-date><volume>06</volume><issue>06</issue><fpage>61</fpage><lpage>68</lpage><history><date date-type="received"><day>1,</day>	<month>June</month>	<year>2018</year></date><date date-type="rev-recd"><day>24,</day>	<month>June</month>	<year>2018</year>	</date><date date-type="accepted"><day>27,</day>	<month>June</month>	<year>2018</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  Based on the limitations of traditional plant nutrient solution detection, a ZigBee plant nutrient solution detection system based on CC2530 was developed. This system uses CC2530 as the main control chip, DS18B20 as the temperature sensor for temperature acquisition, PH electrode sensor for PH value acquisition. The experiment shows that this wireless control system equipped with temperature and pH detection sensor collects and samples the main nutrient solution parameters through the main controller, performs wireless communication transmission and terminal communication, and realizes the intelligent detection of plant nutrient solution parameters. This technique of applying wireless sensor network technology to plant factories greatly improves the reliability and stability of the nutrient monitoring system.
 
</p></abstract><kwd-group><kwd>Plant Nutrient Solution</kwd><kwd> Detection System</kwd><kwd> Wireless Sensor Technology</kwd><kwd> ZigBee</kwd><kwd> Embedded Web Server</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>In plant factories, since the temperature of the nutrient solution changes faster than the temperature of the soil, it is crucial to keep the temperature of the nutrient solution constant and make it suitable for soilless cultivation [<xref ref-type="bibr" rid="scirp.85567-ref1">1</xref>] [<xref ref-type="bibr" rid="scirp.85567-ref2">2</xref>]. Therefore, it is very necessary to collect and monitor the pH and temperature of the plant nutrient solution. Traditional plant monitoring systems are unable to monitor all-weather, real-time monitoring of large-scale plant growth, coupled with the influence of natural environments and human factors, resulting in greater errors in monitoring and thus affecting plant growth. This article uses the chip of CC2530 as the core control device, using temperature sensors DS18B20 and PH electrode sensors, respectively, for temperature acquisition and PH value collection, using ZigBee-based wireless communication technology for data monitoring, to overcome the shortcomings of traditional plant nutrition monitoring system [<xref ref-type="bibr" rid="scirp.85567-ref3">3</xref>] [<xref ref-type="bibr" rid="scirp.85567-ref4">4</xref>] [<xref ref-type="bibr" rid="scirp.85567-ref5">5</xref>].</p></sec><sec id="s2"><title>2. Detection System Structure</title><p>The detection system is a remote wireless network monitoring system suitable for a plant plant nutrient solution [<xref ref-type="bibr" rid="scirp.85567-ref6">6</xref>]. The sensor of the terminal acquisition node is used to detect the pH and temperature of the nutrient solution, and the ZigBee wireless sensor network is used for data transmission. The serial program receives the wireless data information in real time and stores it in the database. The user can remotely access the web server through a browser, real-timely monitor the data collected by the terminal node, and can also perform control operations according to the data. The plant nutrient solution wireless remote monitoring system is based on the browser/server model and adopts a hierarchical structure. It is divided into three parts: ZigBee wireless sensor network, embedded web server and browser human-computer interaction client. ZigBee wireless sensor network is mainly equipped with PH and temperature sensor hardware modules to build a wireless sensor network. The transmission of nutrient fluid environmental variable data and the control of the system through the wireless network. As the core part of the entire system, the Web server plays the role of connecting remote clients and underlying sensors. The server saves the information sent by the wireless sensor network to the database. The user can remotely access the embedded Web server through the PC browser, and can query the data collected by the current system and the environment of the control system. After receiving the data request from the remote client, the detection result is displayed on the browser page. At the same time, users can send control commands to wireless sensors via the server to adjust environment variables in real time. In this plant factory, the entire system is very compact and reliable. The schematic diagram of remote plant wireless network monitoring system for plant plants is shown in <xref ref-type="fig" rid="fig1">Figure 1</xref> [<xref ref-type="bibr" rid="scirp.85567-ref7">7</xref>] [<xref ref-type="bibr" rid="scirp.85567-ref8">8</xref>] [<xref ref-type="bibr" rid="scirp.85567-ref9">9</xref>].</p></sec><sec id="s3"><title>3. System Hardware Design</title><sec id="s3_1"><title>3.1. CC2530 Chip</title><p>The chip CC2530 [<xref ref-type="bibr" rid="scirp.85567-ref10">10</xref>] is a system-on-a-chip SOC solution using the IEEE 802.15.4 protocol. It can establish powerful network nodes with very low total material costs, combining the superior performance of leading RF transceivers, and industry-standard enhancements. 8051 CPU, in-system programmable flash, 8-KB RAM and many other powerful features. This system uses this chip to complete the wireless transmission and reception of collected data. The CC2530 chip uses a well-performing RF transceiver and an enhanced 8051 micro-controller and in-system programmable flash memory, which allows good temperature and humidity acquisition. The CC2530 consumes 20.5 mA of core current at 50 dBm receiver mode. The core current consumption is 33.5 mA at</p><p>4.5 dBm transmit mode, and the core current only uses 0.6 uA at sleep mode. The work mode and sleep mode can be quickly switched. The energy consumption of the entire system will be relatively low.</p></sec><sec id="s3_2"><title>3.2. Terminal Node</title><p>The terminal node hardware of the ZigBee wireless collection section consists of a power module, a module sensor module, and a CC2530 module. The endpoint can communicate with the coordinator peer-to-peer. Because it has a temperature sensor on it, it can collect environmental variables and send it to the coordinator. In addition, the terminal also needs to respond to the operation instructions of the coordinator. Among them, the power module has 5 V and 3.3 V two kinds of DC power supply, 5V power supply from the external direct power supply, and then through the 7533 chip step down to get 3.3 V power supply for subsequent use. The 5 V power supply is mainly for supplying power to the PH detection module. The 3.3 V power supply supplies power to the CC2530 chip and the DS18B20 temperature sensor. The CC2530 minimum system uses a typical application circuit with an I/O pin out interface. The RF4CE transceiver with better performance and the enhanced 8051 microcontroller integrate the system-on-chip. This chip completes the wireless transmission and reception of collected data. The overall system power consumption will be lower. The sensor module uses a PH electrode sensor module and a DS18B20 digital temperature sensor. In this monitoring system, the liquid temperature is measured. Therefore, the temperature sensor uses a stainless steel encapsulated and waterproof type DS18B20 temperature probe. This probe uses the original DS18B20 chip and the signal line length is as long as 1 meter.It has the following characteristics: a wide temperature range, −55˚C - +125˚C; relatively high precision, 9 - 12 resolution can be set; no external components, single bus interface is very easy to use; power supply, 3.0 - 5.5 V powered by. There are many methods for measuring the pH value, such as acid-base titration, potential measurement, and the like. Due to the need for automatic measurement of the pH value, the system uses the EC-201-C PH composite electrode as the pH sensor. This composite electrode combines the PH indicator electrode and the reference electrode together. Its detection temperature range is 5˚C - 60˚C, PH measurement range is 0 - 14, accuracy is up to 0.01PH, meet the general requirements for PH testing of nutrient solution [<xref ref-type="bibr" rid="scirp.85567-ref11">11</xref>].</p><p>The processor CC2530 module first performs analog-to-digital conversion of the real-time acquisition data signal sent from the temperature sensor, and then performs processing. The processed data is sent to the coordinator node by the RF transceiver module. P0.6 of CC2530 is used as the temperature sensor’s bus interface. By writing the ROM of DS18B20, you can get the temperature value in the temperature sensor RAM; the PH value is mainly collected by using the built-in AD conversion function of CC2530 and external simulation. The voltage is collected and the corresponding value is calculated by the formula. The PH value is converted into voltage data. <xref ref-type="fig" rid="fig2">Figure 2</xref> is Sensor nodes hardware design diagram.</p></sec><sec id="s3_3"><title>3.3. Coordinator Node</title><p>The Coordinator node hardware consists of a power module, a module sensor module, and a processor CC2530 module. Since the coordinator requires constant power and the coordinator cannot enter sleep mode, it is only necessary to provide the coordinator module with 3.3 V. After the processor CC2530 module receives the data collected by the terminal node and processes it, the coordinator node can set up a network and handle the joining and exit of the terminal node. It is responsible for writing the data sent by the terminal node in the network to the server, and the terminal. The node executes the user’s operation instructions [<xref ref-type="bibr" rid="scirp.85567-ref12">12</xref>].</p></sec></sec><sec id="s4"><title>4. System Software Design</title><sec id="s4_1"><title>4.1. Terminal Node</title><p>The terminal node is equipped with a temperature sensor and a PH sensor sensor that can collect different environmental variables. After the terminal node is powered on, it can perform peer-to-peer communication with the coordinator. Its main function is to collect environmental data and send it to the coordinator. In addition, the terminal needs to respond to the operation instructions of the coordinator and immediately try to join the network formed by the coordinator</p><p>after the terminal node is powered on. After the join is successful, the network address is sent to the coordinator and the terminal node coordinator returns the instruction. If it does not receive the command sent by the coordinator, the terminal node enters the low-power mode; otherwise, the terminal node enters the data acquisition mode, and sends the data to the CC2530 module for processing and then to the coordinator, and then enters the next round. The software flow chart of the terminal node is shown in <xref ref-type="fig" rid="fig3">Figure 3</xref>.</p></sec><sec id="s4_2"><title>4.2. Coordinator Node</title><p>The ZigBee Coordinator is responsible for the formation of the network and responds to requests for other endpoints to join the network. In addition, it is also responsible for the data packet conversion of temperature data and network address information of the endpoints. The coordinator program actually enters the task polling job after the initialization process is completed. There are three main tasks: 1) to monitor whether there is a terminal node request, if there is a terminal node to join the request to assign a network number and join the node to the network; 2) if there is a terminal node in the network sent data Forwarded to the embedded Web server through the serial port; 3) If you receive a control command sent remotely, forward it to the corresponding terminal node [<xref ref-type="bibr" rid="scirp.85567-ref13">13</xref>]. Coordinator software flow chart shown in <xref ref-type="fig" rid="fig4">Figure 4</xref>.</p></sec><sec id="s4_3"><title>4.3. Embedded Web Server</title><p>The detection system is an embedded Web server built on the Linux system of the virtual machine, and can be ported to ARM embedded devices. The embedded Web server communicates data with the ZigBee Coordinator through the USB-to-Serial port and remotely accesses the user through the Ethernet based on the TCP/IP protocol. Mainly based on the virtual platform or Mini2440 hardware platform as the basis of the system, through the transplantation of Linux operating system, Boa server, Sqlite 3 database, combined with CGI dynamic web technology to achieve the establishment of embedded Web server [<xref ref-type="bibr" rid="scirp.85567-ref14">14</xref>] [<xref ref-type="bibr" rid="scirp.85567-ref15">15</xref>].</p></sec></sec><sec id="s5"><title>5. Test</title><p>The development environment used by this detection system is IAR 8.10.1. The advantage of using IAR development is that it can be programmed directly using the Z-Stack protocol provided by the chipx company. You can directly call the Z-Stack API function to program. Modify the program on the application layer on the Z-Stack protocol stack to achieve communication between nodes and drive sensors to collect data. The monitoring system adopts the B/S structure, which means that information is exchanged between the embedded device and the Internet through the browser/server model. This mode embeds a web server that can run a script or CGI programming language to generate dynamic web pages in an embedded device. The user can monitor the corresponding web page information by submitting information. The dynamic display of the web page is implemented through a CGI program. The CGI program obtains the browser’s</p><p>form and can generate the corresponding HTML page according to the conditions and send it to the user’s browser to realize the dynamic webpage. In this process, the web server reads the data entered by the browser through GET or POST, executes the CGI program based on the data, combines the data of the query database, and finally forms the structure file in the form of HTML and returns it to the browser through the web server [<xref ref-type="bibr" rid="scirp.85567-ref16">16</xref>]. The final embedded Web page of the design is shown in <xref ref-type="fig" rid="fig5">Figure 5</xref>.</p></sec><sec id="s6"><title>6. Conclusion</title><p>In this paper, the traditional plant nutrient solution monitoring and measurement methods are improved, and ZigBee wireless communication technology is used to overcome the shortcomings of traditional technologies. A low-power, low-cost and high-precision plant plant nutrient solution monitoring method is proposed. In the plant nutrient solution wireless monitoring system, the sensor node sends the collected water environment parameter analog signal to the CC2530 microprocessor for A/D conversion to obtain a digital signal. After a series of calculations and analysis, the actual parameters are obtained. The radio frequency part of the CC2530 microprocessor is sent to the serial server on the embedded device and saved to the database. The user can remotely access the Web server embedded in the embedded device through the browser on the PC, and can monitor the nutrient environment data in real time. PH value setting. The entire wireless monitoring system is simple and smart, low power consumption, and has a strong practical value in the development of modern agricultural science and technology. And this research is supported by the Fundamental Research Funds for the Central Universities.</p></sec><sec id="s7"><title>Cite this paper</title><p>Chen, B.Y. and Zhang, F.H. (2018) Plant Nutrient Solution Detection System Based on ZigBee Wireless Technology. Journal of Computer and Com- munications, 6, 61-68. https://doi.org/10.4236/jcc.2018.66006</p></sec></body><back><ref-list><title>References</title><ref id="scirp.85567-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Murase, H. (2015) The Latest Development of Laser Application Research in Plant Factory. Agriculture and Agricultural Science Procedia.</mixed-citation></ref><ref id="scirp.85567-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Hu, W.-P., Lin, C.-B., Yang, C.-Y. and Hwang, M.-S. (2018) A Framework of the Intelligent Plant Factory System. Procedia Computer Science, 131, 579-584.  
https://doi.org/10.1016/j.procs.2018.04.295</mixed-citation></ref><ref id="scirp.85567-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Qin, Y.H., Alam, A.U., Pan, S., Howlader, M.M.R., Ghosh, R., Hu, N.-X., Jin, H., Dong, S.R., Chen, C.-H. and Deen, M.J. (2018) Integrated Water Quality Monitoring System with pH, free Chlorine, and Temperature Sensors. Sensors &amp;amp; Actuators: B. Chemical, 255.</mixed-citation></ref><ref id="scirp.85567-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Mae, K.M., Erhan, A., Abdelrhman, M., Call Douglas, R. and Haluk, B. (2017) Hyperosmotic Agents and Antibiotics Affect Dissolved Oxygen and pH Concentration Gradients in Staphylococcus aureus Biofilms. Applied and Environmental Microbiology, 83.</mixed-citation></ref><ref id="scirp.85567-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Xu, X.J. (2014) Research on the Communication Nodes Design of Wireless Sensor Network Data Based on ZIGBEE. Advanced Materials Research, 3349.</mixed-citation></ref><ref id="scirp.85567-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Leng, J.W. and Wang, G. (2014) Research and Design of Embedded Intelligent Monitoring System for Plant Factory. Applied Mechanics and Materials, 3468.</mixed-citation></ref><ref id="scirp.85567-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Zhu, H.Y., Wu, P.B., Zeng, J. and Teng, W.X. (2014) Environment Monitoring System Research Based on the ZigBee Wireless Sensor Network Technology. Sensors &amp;amp; Transducers, 170.</mixed-citation></ref><ref id="scirp.85567-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Terada, M. (2009) Application of ZigBee Sensornetwork to Data Acquisition and Monitoring. Measurement Science Review, 9.  
https://doi.org/10.2478/v10048-009-0030-6</mixed-citation></ref><ref id="scirp.85567-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Li, Y., Ding, X.D. and Li, Y.T. (2015) The Electric Monitoring System Application Based on ZigBee Wireless Technology. Applied Mechanics and Applied Mechanics, 3748.</mixed-citation></ref><ref id="scirp.85567-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Lee, Z.H. and Wang, Y.D. (2014) Design of Wireless Monitoring System for Electric Equipment Based on CC2530. Applied Mechanics and Materials, 3468.</mixed-citation></ref><ref id="scirp.85567-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Molina, J., Torres, A., Espinosa, G., Sanz, M.T., Guerrero, E., Perez, B., Fernandez, J., Hoque, M. and Parris, P. (2012) Integration of MOSFET/MIM Structures Using a CMOS-Based Technology for pH Detection Applications with High-Sensitivity. Procedia Chemistry, 6, 110-116.</mixed-citation></ref><ref id="scirp.85567-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Anonymous (2009) Research and Markets: Operating Systems Used in Embedded Systems—Volume 2: Windows Embedded and Mobile. M2 Presswire.</mixed-citation></ref><ref id="scirp.85567-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Lin, W.D. (2005) A Web Services Method on Embedded Systems. Springer, Berlin Heidelberg.</mixed-citation></ref><ref id="scirp.85567-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Yuan, S., Qiu, L., Gao, S., Tong, Y. and Yang, W. (2012) Providing Self-Healing Ability for Wireless Sensor Node by Using Reconfigurable Hardware. Sensors, 12, 14570-14591. https://doi.org/10.3390/s121114570</mixed-citation></ref><ref id="scirp.85567-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Oana-Valentina, R. and Adrian-Vasile, D. (2017) Monitoring and Control Platform for Homes Based on FPGA, SoC and Web Technologies. Procedia Engineering, 181, 588-595. https://doi.org/10.1016/j.proeng.2017.02.438</mixed-citation></ref><ref id="scirp.85567-ref16"><label>16</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Han</surname><given-names> C.J. </given-names></name>,<etal>et al</etal>. (<year>2014</year>)<article-title>Research on CGI in Embedded System</article-title><source> Applied Mechanics and Materials</source><volume> 539</volume>,<fpage> 534</fpage>-<lpage>537</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref></ref-list></back></article>