GreenSphere Control Hub is an IoT-driven Greenhouse Monitoring and Control System, leveraging efficient ESP8266 Units. The system enables seamless monitoring and precise control via an intuitive web-based dashboard.

Responsive image

1 The Research

Greenhouses are used to mitigate the effects of adverse weather conditions and allow for a steady year-round crop production by controlling the microclimate to ensure optimal crop growth. Greenhouses are an essential component of crop production worldwide as the yield is significantly better than Open Field Cultivation, according to this research conducted in 2011.

Since providing a controlled environment is one of the primary advantages of a Greenhouse, it is desirable to automate the process of climate control using sensors and actuators. The aim of this project is to leverage IoT technology to develop an autonomous monitoring and control system that optimizes growth conditions. Additionally, the system will be accompanied by a Web Dashboard.

The most advantageous aspect of a web dashboard is remote accessibility and a user-friendly interface. It is impractical to monitor the sensor readings at one place and then access each actuator individually within the greenhouse. The web dashboard provides a centralised approach to this issue where the conditions can be monitored and the actuators can be instantaneously controlled based on our requirements. Manual Control is an optional feature and if turned off, the system will decide when to turn an actuator on or off based on preset conditions.

The two core features of my IoT Projects are the inclusion of a Rainfall Collection System and Complete control over setting Optimal Temperature and Humidity. According to this study published in the International Journal of Research - GRANTHAALAYAH which focuses on the Kirsehir province in Turkey, the researchers came to a conclusion that 61.49% of water demand in heated greenhouses and 47.74% of water demand in unheated greenhouses can be met by harvesting rainwater.

Responsive image

According to this this study published in 2021, different plants have different optimal growing conditions. Because of this, setting predefined conditions on the microcontroller can be detrimental when the crop is changed in the next cycle of plantation. For this reason, allowing the users to adjust certain optimal conditions based on the crop is an attractive feature.

2 Sensors and Actuators

Since the NodeMCU ESP8266 Unit is the choice of microcontroller for this system, all of the sensors and actuators chosen will be compatible with it. This is the list of sensors and actuators used in this project.

Responsive image

3 System Design

The subdivision of actuators and sensors into three distinct nodes — the "Brain," "Inside," and "Outside" nodes — represents a strategic and practical approach. This design allows for the distribution of control across separate microcontrollers, facilitating the placement of components at greater distances without the constraint of overloading a single microcontroller. Beyond the logistical advantages, this modular organization enhances code modularity and cleanliness, providing a streamlined and efficient structure. Additionally, the segmented architecture simplifies troubleshooting procedures. This meticulous separation not only optimizes functionality but also ensures a robust and maintainable system architecture that can easily be expanded upon if necessary.

The Brain Node serves as the centralized control center for the IoT system, receiving sensor data from both the Inside and Outside nodes. It sends control flags to activate or deactivate actuators based on the received readings as it compares these values to the optimal values stored in it. This hierarchical structure ensures that decision-making is centralized, enhancing system coherence.

Positioned within the greenhouse, the Inside Node monitors and manages internal conditions. Equipped with DHT22 Temperature and Humidity Sensors and a Soil Moisture Sensor, it interfaces with actuators such as the L9110 Fan Module and Submersible Water Pump, allowing direct influence on greenhouse conditions.

The outside node is designed to be placed outside the greenhouse system and will monitor the external conditions. This node will be connected to the Rainfall Sensor, the LDR Module, the Micro Servo that is responsible for controlling the rainfall collection system and an additional L9110 Fan Module.

This is the overall design of this IoT System.

Responsive image

4 Communication Protocol

In the initial stages of communication protocol consideration, the idea of utilizing the TX (Transmitter) and RX (Receiver) pins in the ESP8266 unit for wired communication between nodes was explored. However, this approach quickly revealed its impracticality due to several constraints. The Brain Node, being the central hub, necessitates bidirectional communication with both the Inside and Outside nodes. The limited number of ports available on the ESP8266 posed a significant challenge. Moreover, the constraint of wire length compelled nodes to be in close proximity.

In response to these challenges, the WiFi communication protocol emerged as a more viable solution. This presented two distinct options: leveraging an existing WiFi network for inter-node communication or utilizing the ESP8266's built-in WiFi capabilities to transform one node into a WiFi access point. The former allows all three nodes to connect to an existing, shared network for seamless data exchange, while the latter establishes a dedicated access point for efficient information transfer between nodes.

The latter option was chosen because by creating a self-contained WiFi environment through the dedicated access point, the IoT system gains autonomy and reliability, mitigating potential issues associated with external network dependencies. This choice enhances the system's resilience but also ensures a more consistent and controlled communication environment, aligning with the robust and self-sufficient nature of the IoT architecture.

The data format chosen is JSON, utilizing Arduino's support for easy encoding. By leveraging the HTTP protocol, JSON files can be efficiently sent and received, streamlining communication in the Greenhouse system. It was essential to add a timeout which essentially states how long the node has to wait between data packets. Since the Brain Node has to handle requests from both the inside and outside node, the time which it takes to send a response can vary at each iteration as this is dependent on the current conditions. This timeout adds a buffer time which allows the other nodes to be idle for the time it takes to receive its next data packet. This timeout has to be increased if more nodes are added to the system to account for the increased load.

Responsive image

5 Brain Node

The Brain Node is the central decision-making unit and access point for the communication protocol for the IoT System. It receives the sensor readings through this established connection from the other nodes, compares it with the optimal conditions stored in it and responds with actuator control flags. Since this node is the access point, it also contains the code for the Web Dashboard that can monitor the sensor readings, control the actuators and adjust the optimal conditions of the greenhouse.

This node also contains the Ultrasound Sensor and the Buzzer and they work in conjunction in order to notify the users about the water level in the reservoir. If the water level gets too low, the Ultrasound Sensor will be able to detect it and if this happens, the buzzer sounds in order to notify the users. This feedback allows the reservoir to never be empty and ensures that there's always water for the plants when necessary. In addition to this, it also displays the current conditions of the Greenhouse system such as Temperature, Humidity, Soil Moisture and the IP Address for accessing the Web Dashboard on the LCD Screen.

Responsive image Responsive image

6 Inside Node

The Inside Node is responsible for monitoring and controlling the internal conditions of the greenhouse. It interfaces with the Brain Node directly and consequentially, with the outside node indirectly. It connects to the access point created by the Brain Node and transmits sensor readings in JSON format to the Brain Node and receives control flags in response.

This node contains the DHT22 Temperature and Humidity Sensor, the Soil Moisture Sensor, L9110 Fan Module, Submersible Water Pump and LED Lights. It sends these sensor readings to the Brain Node and if the Soil Moisture is too low, it responds with a control flag that turns on the relay that is connected to a Submersible Water Pump. If the temperature or humidity is too high, it responds with a control flag that turns on the L9110 Fan Module. LED Lights, while in this node, are controlled based on LDR Module readings from the Outside Node.

Responsive image Responsive image

7 Outside Node

The Outside node behaves very similarly to the Inside Node, except that it is responsible for monitoring and controlling the external conditions of the greenhouse.

This node contains the LDR (Light Dependent Resistor) Module, the Rainfall Sensor, Micro Servo and an additional L9110 Fan Module. If the sensor detects rainfall, it sends this information to the Brain Node which responds with a control flag to open the Micro Servo. This is intended to simulate a rainfall collection system as it has been previously established that a majority of the water needs in a Greenhouse can be met by collecting rainfall. If the LDR Module detects that the ambient light is too low, it sends this information to the Brain Node which instead of responding back, relays a control flag to the Inside Node, asking it to turn on the LED Lights. On the other hand, the control flag for the fan module is sent by the Brain Node based on the interior temperature and humidity detected by the Inside Node. This setup simulates cases where the sensor and actuator are present in the same node as well as opposite nodes and showcases how robust the designed communication protocol is.

Responsive image Responsive image

7 Web Dashboard

Utilizing the capabilities of the Arduino IDE, we embed a Web Page into the ESP8266 node, specifically the Brain Node, which serves as the access point for other nodes in the system. This Web Page will be displayed whenever a user connects to it and visits its IP Address.

The initial user interface prominently features near real-time Monitoring of the current greenhouse conditions. The Brain Node, having access to sensor readings from both the Inside and Outside nodes, seamlessly displays this information to users. By using Ajax Requests, this information can be displayed in near real-time. To ensure optimal performance, a delay is deliberately added to the Brain Node during this process. This not only reduces the computational load on the Brain Node but is also practical as the conditions of the Greenhouse do not drastically change within a very short amount of time and thus, a delay is not detrimental for the functionality of the system.

Responsive image

The second aspect of this dashboard is "Control". This allows the users to control all the actuators present in this system. Initially, there were some issues with this and this is better explained with an example.

If a user turns off the water pump because the reservoir level is too low, what is stopping the system from turning it back on because it detects that the soil moisture level is lower than the set threshold? If it does turn on automatically because of this, then what is the purpose of the manual control provided in this dashboard?

For this reason, I have introduced a 'Manual Override' feature. Activating this mode instantly sets all actuators to an 'off' state, enabling users to assume complete control, regardless of current conditions. In this mode, users have the flexibility to activate or deactivate actuators based on their preferences or immediate needs. Once deactivated, actuators revert to a state dictated by the system's automated conditions. The distinction between these two states is prominently displayed in the dashboard UI. This valuable addition ensures adaptability for users with specific preferences and swift responses during unforeseen circumstances or emergencies.

Responsive image

The final feature of the dashboard is "Setting Optimal Conditions." Since it has been established based on prior research that different plants have different optimal conditions, using fixed, uneditable values can be detrimental. Even minor adjustments to these values can contribute to optimized plant growth which is the main attraction of choosing Greenhouses over Open Field Cultivation. Hence, the inclusion of a customizable form in the dashboard empowers users to modify and fine-tune the optimal values tailored to the specific needs of their plants.

Responsive image

The dashboard proves to be a valuable enhancement to our IoT system, providing a seamless means to monitor greenhouse conditions, intuitive control over actuators, and effortless customization of optimal settings for optimal plant growth. Its user-friendly interface ensures that users can efficiently manage and tailor the system to meet their specific needs, fostering an environment conducive to healthy plant cultivation.

8 Conclusion

In conclusion, this IoT system presents a tailored solution for small-scale greenhouse management. The modular design, highlighted by the Brain, Inside, and Outside nodes, provides a responsive framework for environmental control and monitoring. This can easily be expanded upon by including more nodes if necessary as the communication protocol is robust enough to handle them. The system, adept at simulating scenarios like rainfall collection and adaptive lighting, is specifically crafted in a sustainable way for smaller agricultural setups.

This system comes equipped with a Web Dashboard and offers real-time insights and control options. Notably, the system, while robust and adaptable, is designed with a focus on the unique requirements of smaller greenhouse operations. As such, it excels in optimizing resource utilization and sustainability within a limited scope, differentiating it from larger-scale agricultural systems. Future developments could explore scalability options for broader applications.

9 References

https://www.researchgate.net/profile/Ghanshyam-Patle/publication/316859923_Techno-feasibility_criteria_in_design_and_construction_of_low_cost_poly_houses/links/5ffc10f7a6fdccdcb8467e26/Techno-feasibility-criteria-in-design-and-construction-of-low-cost-poly-houses.pdf

https://www.granthaalayahpublication.org/journals/granthaalayah/article/view/IJRG19_A02_2128/883

https://www.researchgate.net/profile/Ibrahim-Hameed/publication/350639973_Temperature_and_Humidity_Control_for_the_Next_Generation_Greenhouses_Overview_of_Desiccant_and_Evaporative_Cooling_Systems/links/606b57ce458515614d3a2d93/Temperature-and-Humidity-Control-for-the-Next-Generation-Greenhouses-Overview-of-Desiccant-and-Evaporative-Cooling-Systems.pdf