Intelligent Greenhouse Monitoring System Based on Embedded Web Server

Publisher:心灵舞动Latest update time:2011-06-11 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The abstract describes an automatic control system for a greenhouse. The system uses Luminary's LM3S102 processor and a streamlined TCP/IP protocol stack to build an embedded Web server to realize the Ethernet-based intelligent greenhouse monitoring function. The system collects signals such as light intensity, temperature, and humidity, allowing users to remotely monitor the status of the greenhouse through an IE browser on any computer terminal, and realize real-time control of greenhouse electric roller shutters, greenhouse electric heaters, plant growth lights, micro-tube sprinkler irrigation and other systems. Users can also achieve on-site monitoring of the greenhouse through the LCD screen and keyboard. The system uses PoE technology and does not require additional transmission lines. It makes full use of the LM3S102 peripherals to make the measurement and control system meet the needs of grassroots production.
Keywords Greenhouse monitoring Embedded Ethernet power supply Protocol stack Web server LM3S102


Modern greenhouse monitoring systems are used to collect real-time environmental parameters such as temperature, humidity, light, soil temperature, CO2 concentration, leaf humidity, dew point temperature, etc. in the greenhouse, and provide various sound and light alarm information according to the needs of the crops grown. When the temperature and humidity exceed the set value, the specified equipment is automatically turned on or off. Most of the existing greenhouse monitoring systems use wireless methods, and the transmission range is limited, the price is relatively expensive, and the compatibility with other systems is not good. This design proposes an Ethernet-based greenhouse monitoring system, using Luminary's LM3S102 processor, building a streamlined TCP/IP protocol stack on its limited memory space, implementing a general embedded Web server, and realizing Ethernet-based intelligent greenhouse monitoring functions.


1 System Design
The system consists of four parts: sensor subsystem, Web server subsystem, peripheral control subsystem, and human-machine interface subsystem. The basic structure is shown in Figure 1.

The system workflow is briefly described as follows: Through the sensor subsystem, key information such as light, temperature, and humidity in the greenhouse is acquired and processed, and then converted into Ethernet data packets that can be transmitted via the TCP/IP protocol. Data transmission adopts the active acquisition method of the monitoring terminal computer, which can be acquired all the time or when needed. The monitoring terminal computer only needs to have a general IE browser to access the control interface of the embedded Web server, view the data information of each greenhouse monitoring node, and realize real-time control of greenhouse electric roller shutter machines, greenhouse electric heaters, plant growth lights, micro-tube sprinkler irrigation and other systems.
This paper introduces the design and implementation of the system from four parts. First, the main sensor subsystem, Web server subsystem, and peripheral control subsystem are constructed from the hardware perspective, and then from the software perspective, a streamlined TCP/IP protocol stack is designed and implemented.
1.1 Sensor subsystem
Considering the limited interface of LM3S102, traditional analog sensors need A/D conversion before use, which is not suitable for this system. The design uses the digital sensor SHT10 with an I2C interface. The sensor collects the humidity and temperature information of the external environment and stores it in its own memory. It is connected to the I2C bus of the LM3S102 processor to read the data. As can be seen in the subsequent section, a dedicated chip for expanding the I/O port is also connected to the I2C bus. The temperature and humidity sensor circuit is shown in Figure 2.

Figure 3 is a scheme for obtaining external light conditions. The design uses a cheap phototube. When the light intensity is high, the phototube conducts a large current, resulting in a lower voltage at the VIN_N terminal. The VIN_N terminal is connected to the analog comparator built into the LM3S102, and the collected data is stored in the RAM. Together with the humidity and temperature information collected by the SHT10, it is encapsulated and sent by the TCP/IP protocol.

1.2 Web server subsystem
In order to build a Web server subsystem, it is necessary to find a suitable method to implement network functions. As shown in Figure 4, the system uses the SPI interface network chip ENC28J60 to implement the network MAC and PHY functions, making full use of the peripheral interface of LM3S102. The TPOUT and TPIN terminals are sent to the isolation transformer and connected to the universal RJ45 network port. The subsequent section will introduce the implementation of the TCP/IP protocol on this hardware platform.

1.3 Peripheral control subsystem
In order to realize the remote intelligent lifting and lowering control of the greenhouse automatic roller shutter, the design adopts the method of PWM control of the stepper motor. The stepper motor is an open-loop control element that converts the electrical pulse signal into angular displacement or linear displacement. In the case of non-overload, the speed and stop position of the motor only depend on the frequency and number of pulses of the pulse signal, and are not affected by the load change, that is, when a pulse signal is added to the motor, the motor rotates a step angle. The existence of this linear relationship, coupled with the characteristics of the stepper motor having only periodic errors but no cumulative errors, makes it very simple to use stepper motors to control in the fields of speed, position and other control. The interface chip MPC17529 is used to drive the stepper motor. In actual application, various methods can be used to increase the driving capacity of the subsequent circuit to achieve free control of heavy roller shutter doors. Figure 5 shows the implementation method of the motor control circuit.

Since the I/O port of LM3S102 is limited, this design uses the PCA9554, a dedicated chip for expanding the I/O port with the I2C interface. The chip connected to the I2C bus can expand 8 GPIOs. In the demonstration, 8 LED lights are used to represent common greenhouse equipment such as greenhouse electric heaters, plant growth lights, micro-tube sprinkler irrigation, and gas fertilizer release machines. In actual application, adding a relay circuit can easily realize real-time control of many scientific and technological agricultural control systems in the greenhouse. The motor control circuit is shown in Figure 6.

Through the hardware design of each subsystem, the on-chip interface and on-chip resources of LM3S102 are fully utilized.

1.4 Design and implement a streamlined TCP/IP protocol stack
The target systems running embedded Web servers are mostly various special-purpose devices with very limited memory and storage resources. It is usually used as a monitoring and management method to control and configure various electronic devices to realize the intelligence and informatization of the equipment. The application system framework of the embedded Web server is shown in Figure 7.

Considering the limitations of the embedded Web server's slow hardware processing speed and relatively small storage capacity, it is sufficient to implement ARP, IP, and TCP protocols in the TCP/IP protocol stack. A streamlined TCP/IP protocol stack is used to implement the HTTP protocol at the upper layer. Including the driver of the ENC28J60 network chip and the correspondence between IP packets and ARP packets, the sending and receiving of HTTP packets based on the TCP protocol is realized. The protocol stack omits the UDP protocol and ICMP protocol that are not required for the streamlined Web server, and does not implement the SOCKET function, so that the code space is reduced to a minimum, but all the required functions can be completed. The structure of the trimmed embedded dedicated TCP/IP protocol stack is shown in Figure 8, and the hierarchical workflow of the software modules is shown in Figure 9.

2 Experimental results and analysis
After the above steps are completed, the next main task is to build the entire system and debug it. Remote personnel only need to log in to the node service interface to achieve the monitoring and control effect of being in the greenhouse in person. The realization of this function provides great convenience for greenhouse management staff and scientific research staff.
In the laboratory, the greenhouse environment is simulated, the temperature and light are simulated with incandescent bulbs, and the greenhouse humidity is increased by artificial spraying to test the working performance of the system. The experimental results show that after debugging, the system can complete the corresponding functions according to the design principle, achieve the preset goals, and measure each parameter with high accuracy (temperature measurement can reach 0.5℃, humidity can reach 4.5%), and realize real-time monitoring of electric equipment such as electric roller shutters and micro-spray irrigation. It is flexible in operation, simple in construction, and has good stability and applicability. This system is not only suitable for agriculture but also for animal husbandry. At the same time, multiple spare interfaces are set up to facilitate transformation and development and upgrading. It has high application value and good commercial prospects.

Reference address:Intelligent Greenhouse Monitoring System Based on Embedded Web Server

Previous article:Application of Bluetooth Technology in Short-distance Wireless Remote Control
Next article:A Practical Method for Determining Phase Sequence of Brushless DC Motor

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


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

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