---
title: "Design and Realization of Low Cost Control for Greenhouse Environment with Remote Control"
url: "https://maker.wiznet.io/emimamanna/projects/design-and-realization-of-low-cost-control-for-greenhouse-environment-with-remote-control/"
markdown_url: "https://maker.wiznet.io/emimamanna/projects/design-and-realization-of-low-cost-control-for-greenhouse-environment-with-remote-control/md"
type: "UCC: User Created Content"
author: "emimamanna"
author_url: "https://maker.wiznet.io/emimamanna/"
original_author: "Lukas Bajer"
original_url: "https://www.sciencedirect.com/science/article/pii/S240589631500837X?via%3Dihub"
published: "2022-10-14"
language: "en"
hardware: ["WIZnet W5100"]
likes: 10
views: 917
comments: 1
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Design and Realization of Low Cost Control for Greenhouse Environment with Remote Control

> This project describes the design and implementation of control unit coordinating sensors of various physical quantities and actuators.

Original author: Lukas Bajer (source: https://www.sciencedirect.com/science/article/pii/S240589631500837X?via%3Dihub)

## Components

- **WIZnet W5100** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5100))

## Article

## ABSTRACT

This project describes the design and implementation of control unit coordinating sensors of various physical quantities and actuators. Beside the data collection from sensor units, the problem consists of their local and remote visualization. The selected concept is created by the Arduino platform, which uses expansion modules for data acquisition and visualization to control the solution. The chosen solution is sufficient for home automation and is useful for a wide range of potential customers. The concept is concretized into an intelligent greenhouse environment, where complete control is designed over the environment. Such solution optimizes the quality of treatment of crops or flowers while it can also bring financial savings on subsequent operation of the system, as expected. Results of the control concept were tested with the good results during a trial run of a real greenhouse, in which the quality of the designed solution was verified. Specific procedures and design solutions are also listed within this paper to highlight the solution.

## 1. INTRODUCTION

Monitoring of intelligent environments where a large number of measured variables, static values as well as dynamic processes with different dynamics is a complicated task Pies et al. (2013) and Pies et al. (2014). Each variable has the ability to detune the character of the measured system and thereby put the system in a constant regulatory process or even non-controllable state (Luo et all. 2012), (Olvera et al. 2011), (Lee et all. 2011) and David et al. (2013).

The resulting system should include the following:

1. Visualization of values and system state

- Web interface–remote access

- Local preview with the option of scrolling through screens

- Sensorics

- Central measured variables

- temperature

- humidity

- atmospheric pressure

- real-time clock

- External measured variables

- air temperature

- air humidity

- soil moisture

- light measurement

- Actuators

- audio signalization

- ventilation

- air circulation and heating

- controls (button, potentiometer, PIR sensor)

- Ability to store and work with the measured data

- microSD

## 2. SYSTEM DESIGN

Arduino is ideal for similar types of non-industrial automation (Fuentes et al.. 2014) and (Agudo et all. 2014). Primarily its modularity and sophistication facilitates the design and implementation of the final solution. The entire solution of greenhouse automation can therefore be expressed clearly with block diagram of the HW communication of Arduino and its surroundings, as shown in figure 1. Description of individual parts with their corresponding communications follows to understand the idea of proposed solution.

## 2.1 Arduino MEGA 2560

Arduino is a control unit and the heart of the entire automation. All computing and communication processes except ethernet are handled by its microcontroller. Arduino is also adapted for modular expansion and therefore is also a base for further shield extensions.

Arduino requires a supply voltage of 7-12V (or 5V in case of programming via USB) for it to run properly. USB also serves as a means for transmitting information to the terminal via UART communication Horalek et al. (2010).

Since the Arduino MEGA is the main unit, it collects data from the sensors and controls the actuators.

![](https://maker.wiznet.io/upload/ckeditor5/58106168%5F1665777049%2Ejpeg)

Fig. 1. Block diagram of HW –composition of the automation system

## 2.2 Ethernet Shield

This unit is the extension module for Arduino platform and is used for creating web visualization of the automation Krejcar et al. (2009). An integrated special feature is the ability to record measured values or actuator states and write them onto a microSD card Krejcar (2007).

## 2.3 Meteo Shield

Meteo shield is a commercially manufactured component for the Arduino platform. In the case of greenhouse automation, it’s used to take temperature, humidity and atmospheric pressure measurements in its immediate vicinity Vozda et al. (2012). Another feature of this expansion is the ability to work with real time clock. This enables the unit to become independent in time orientation and allows for time events planning.

## 3. DESIGN AND IMPLEMENTATION OF THE SENSORIC PARTS AND ACTUATORS

This chapter is a fundamental part of the work and therefore, its subsections will be discussed more thoroughly in the paper. Main idea of the proposed solution is based on interesting projects provided by literature (Luo et all. 2012), (Olvera et al.. 2011) and (Lee et all. 2011). We also studied novel use of intelligent sensors and actuators as well as their development in Smart way as presented in (Attar et all. 2014), and (Ma et all. 2013).

For technological reasons, standard types of sensors and actuators were chosen for implementation in this project. From the large number of manufactured automation components, those who fulfilled the necessary requirements for the greenhouse automation were selected (Iwasaki et all. 2013) and (Luan et all. 2012).

370* *

## 3.1 Sensors

![](https://maker.wiznet.io/upload/ckeditor5/58106168%5F1665777043%2Ejpeg)

Fig. 2. FC-28-B –diagram of the sensor design

A commercially manufactured sensor called FC-28-B is used for the measurement, which allows the collection of analogue voltage values, which is in turn used for the soil moisture level evaluation. Another feature is the use of potentiometer to set the digital level of voltage to signal the achievement of desired moisture level. Sensor diagram is shown in figure 2.

## 3.2 Actuators

![](https://maker.wiznet.io/upload/ckeditor5/58106168%5F1665777044%2Ejpeg)

Fig. 3. Air circulation and heating–regulation schema

The airflow in an environment is directly influenced by the shape of the closed area, air density and even its moisture. These listed quantities are not nearly all the physical elements entering the regulatory system but for the purpose of this study, they will suffice Krejcar et al. (2011). Specifically, the automation will decide based on the measured temperature in different parts of the greenhouse, even outside. The control will be also influenced by the values of internal and external humidity David et al. (2012) and Machacek et al. (2012).

## 3.3 Irrigation

![](https://maker.wiznet.io/upload/ckeditor5/58106168%5F1665777045%2Ejpeg)

Fig. 4. Irrigation - schematics

To control one of the most important parts of the greenhouse automation, a transistor is used for switching a relay, which attracts the reed and switches the pump. A diode connected to the supply voltage of 5 V is used to protect the control part of the circuit when switching an inductive load. The reed is electrically isolated from its switching part which protects the control circuit from dangerous voltage needed to start up the pump motor Tutsch et al. (2010).

Since the feedback is not yet created, it is necessary to watch the water level inside the tank so the pump is not destroyed by lack of water.

## 4. DESIGN AND IMPLEMENTATION OF THE SOFTWARE SOLUTION

The colour orange shows part of the program, which consists of description of the implemented SW functionality, as well as the description of input and output parameters. Furthermore, there is a declaration part, where variables are assigned to data types and global constants are declared.

Yellow is the part of the program, which initializes hardware peripherals and communication units after the header files are imported and variables are declared. This entire part of the program is passed only once and throughout the following runtime, the return to this part is no longer possible. This part of the program is called SETUP and has no return value.

Green colour specifies the part of the program called LOOP, which has no return value as well. This part realizes the cyclical portion of the program, every function, structure and operation is running in an endless loop, which can be stopped only by giving the corresponding SW command, or disconnecting the power supply Krejcar et al. (2013).

![](https://maker.wiznet.io/upload/ckeditor5/58106168%5F1665777045%5F0%2Ejpeg)

Fig. 5. Program progress schematics

Example of blinking LED is shown in figure 6.

![](https://maker.wiznet.io/upload/ckeditor5/58106168%5F1665777050%2Ejpeg)

Fig. 6. Running program - example of blinking LED

## 5. DESIGN AND IMPLEMENTATION OF VISUALISATION

Visualization should be a part of any automation structure, because once the sensors measure some data, which the actuators have to act upon, control over the current state of the system is necessary Stankus et al. (2010). To keep control only on the uploaded program could lead to an uncertainty whether the system is performing all the tasks. Although the main idea of automation is to perform operations without human presence, it is better to have insight into the action which are being carried out. Performed actions can be monitored on different levels of access Krawiec et al. (2010).

## 5.1 MicroSD Card

The solution, which records the past states of the system, can be continuous saving of the measured values and actuator states onto a microSD card. Storing information on the memory card can be realized in several formats:

- Text document (.TXT)

- Document spreadsheet (.CSV)

To provide easier data handling and possibility to create graphs and statistics, CSV format was chosen. Support of the memory card operations is realized using a standard SD.h library, which is already implemented in the basic installation of the Arduino development environment Bodnarova et al. (2013).

## 5.2 LCD Display

LCD displays are manufactured in different sizes, backlight colors, number of lines and characters. Due to the large amount of information that needs to be continuously displayed, the 16x4 (number of characters x number of rows) variant was selected.

The actual number of lines and characters alone isn’t sufficient to visualize everything, so the possibility of switching screens with partial information is introduced. These screens can be theoretically unlimited in number.

Said switchable local visualization on LCD screen is shown in figure 7.

![](https://maker.wiznet.io/upload/ckeditor5/58106168%5F1665777050%5F0%2Ejpeg)

Fig. 7. LCD screen displaying values

This example shows LCD in the process of displaying some basic values like time, temperature, humidity and atmospheric pressure. 372* *

## 5.3 Webserver – Arduino implementation

To implement the second version of the remote visualization, an ethernet shield with Wiznet W5100 processor is needed. This processor isn’t built for large data loads in the form of complex and graphically sophisticated sites.

Therefore, the website only consists of rather basic graphics and the rest is in text form. Web application is displaying different types of thermometers, humidity measuring, atmospheric pressure and system states.

## 6. DISCUSSION OF THE IMPLEMENTED SOLUTION

In the process of creative work, next step after completing the set objectives is evaluation and consideration of the opportunities for improvement. In the beginning, the question to decide was which platform to use. The decision was narrowed to the category of non-industrial controllers, after studying a wide range of possibilities. Industrial solutions were disproportionately more expensive and would even require considerable financial resources to purchase and extend the necessary license. In this particular case of greenhouse environment, non-industrial solutions are sufficient.

The Arduino platform is probably the best we have encountered, when speaking about the realization of sensoric measurements Behan et al. (2013). It is also the most affordable solution for a wide number of potential customers. There has been no major problem with the implementation of actuator control, sensoric measurements, local visualization and even SW creation. However, deficiencies were found in database control and in uncomfortable design of the remote visualization with the creation of web server.

![](https://maker.wiznet.io/upload/ckeditor5/58106168%5F1665777051%2Ejpeg)

Fig. 8. Real testing environment during evaluation

## 7. CONCLUSION

The goal of this project was to evaluate and choose the best platform for the implementation of home automation. An example was also showcased on the automation of a garden greenhouse environment. Within an environment with a large number of mutually influencing variables, it is necessary to choose an optimal controller.

One of the main findings of this project is that the Arduino platform is an ideal tool for implementation of similar nonindustrial automations. It allows the use of multiple sensors and is able to manage a wide range of actuators. Advantage of this solution is definitely a numerous occurrences of the most widely used communication systems and especially, the price.

The resulting concept included the modular expandability feature. By layering the so called Shields on top of each other, a comfortable sensoric solution can be achieved.

The visualization requirement for displaying local values was met, as well as the requirement for remote access via a web interface. The LCD display range isn’t able to relay so much information at once, so it was necessary to add an additional switchable screen. Compared to the local display, the remote visualization is a far more complex visualization method Hajovsky et al. (2012).

The results of this project are fully sufficient while it can be used as a concept for future developments of other related projects.

---

Source: https://maker.wiznet.io/emimamanna/projects/design-and-realization-of-low-cost-control-for-greenhouse-environment-with-remote-control/
