Prototype of a Low-Cost Electronic Platform for Real Time Greenhouse Environment Monitoring: An Agriculture 4.0 Perspective

The Internet of Things has a high impact on upgrade and transformation of the traditional greenhouse agricultural techniques. It is necessary to control the environmental factors for obtaining the optimum growth conditions for the crop and extend the production season to get the optimum yield. These aspects are fundamental for Agriculture 4.0, that uses technology not simply for the sake of innovation but to improve and address the real needs of consumers. In this paper, a prototype of a low-cost electronic platform for real time greenhouse environment monitoring has been designed, developed and built. The prototype has been developed with the purpose of firmware and software prototyping, in order to make the most of device performances. The electronic board is composed by a Main Board, a Green House Core, a Wi-Fi Module, a RS485 Module, an Analog-to-Digital Converter Module and a USB Module. The system permits to collect data by external sensors, elaborate and send them to external devices as laptop, smartphone and internet gateway, using both wired and wireless connection. These data concern to main greenhouse environmental parameters, such as air temperature, humidity, solar radiation, air velocity and CO2 concentration. A Web application has been implemented to allow users a consultation of greenhouse environmental state in a simple and fast way.
components
details

Photo-of-the-electronic-board.jpg Figure 10. Photo of the electronic board.

1. Introduction

The Internet of Things (IoT) represents a set of technologies which refer to the interconnection and data exchange between sensors and electronic devices. The IoT has a high impact on several aspects of every-day life and behavior of potential users. From the point of view of a private user, the most important effects of the IoT will be visible in both working and domestic fields, with assisted living, smart homes and offices, e-health and enhanced learning [1]. Similarly, from the perspective of business users, the most apparent consequences will be equally visible in automation and industrial manufacturing, logistics, business process management and intelligent transportation of people [1].
As regards the primary sector, thanks to these recent research progresses, it was found that the old farming methods are unable to meet the needs of social development [2]. Consequently, an upgrade and transformation of the traditional agricultural techniques has been necessary. Agriculture 4.0 represents the coming agricultural revolution, which aims to improve and address the real needs of consumers and reengineer the value chain, using technological research [3]. Thanks to this, modern farms and agricultural operations will work in a different way, primarily because of improvement in technology such as devices, sensors, machines and other sophisticated technologies, such as robots, which will let business be more profitable, efficient, safer and environmentally friendly. Agriculture 4.0 will no longer have to depend on applying water, fertilizers and pesticides across entire fields. On the contrary, farmers will use the minimum quantities or even completely remove them from the supply chain, thanks to the analysis of information collected by the use of technology [3].
The greenhouse agriculture has become a major trend in the development of high-tech agriculture in the Agriculture 4.0 point of view. In particular, it needs to control the environmental factors for obtaining the optimum growth conditions for the crop and extend the production season to get the optimum yield [2]. Artificial management, for detecting and controlling environment factors (i.e., air temperature, humidity, solar radiation, air velocity and CO2 concentration), wastes lots of manpower and relatively large of monitoring error, which affect the growth of crops. Measurements of meteorological parameters are important for adjusting the environmental conditions and a computerized system is necessary for controlling greenhouse environment efficiently. In the modern greenhouses, several measurement points are required to trace down the local climate parameters in different parts of the big greenhouse to make the greenhouse automation system work properly. Cabling would make the measurement system expensive and vulnerable. Moreover, the cabled measurement points are difficult to relocate once they are installed. Thus, a wireless sensor network (WSN) consisting of small-size wireless sensor nodes is an attractive and cost-efficient solution to build the required measurement system. For providing suitable environment for the growth of crops, many systems were studied and developed by researchers worldwide. An embedded systems approach to monitor and control greenhouse systems has become quite important nowadays. Considering this approach, Rangan et al. proposed a system to measure the main greenhouse environmental parameters, and to send measured, processed, controlled and updated data to owner through Short Message Service (SMS) communication technology [4]. Candido et al. described the development of an embedded real time system, based on hierarchical state machines extended with timing constraints, devoted to microclimate control in a complex greenhouse. This system is directed by parameters entered at configuration time through a user-friendly graphical interface, which depends on the use of Java technologies and on a specific methodology suited to the development of real time systems [5]. Another system was developed such as a multi-platform application based on Android technology and using a wireless mesh network to monitor and control intensive agriculture [6]. In order to overcome the possible disadvantages of wired and wireless constraints, such as complicated wiring, difficult maintenance and distance, to monitor and control the applications, Kumar implemented a system based on embedded systems where the threshold levels of the sensors are set manually with the help of push button keys or remotely via Global System for Mobile Communications (GSM) communication mode [7]. Yuquan et al. proposed a master-slave distributed measurement and control system composed by personal computer, soil moisture measurement, temperature, humidity and CO2 monitoring and control module, in which personal computer is taken as the host [8]. Ahonen et al. developed a wireless sensor node for greenhouse monitoring by integrating a sensor platform with three commercial sensors capable to measure four climate variables, with the goal to collect data to evaluate the network reliability and its ability to detect the microclimate layers, which typically exist in the greenhouse between lower and upper flora [9]. Pahuja et al. developed, using a WSN, an online microclimate monitoring and control system for greenhouses [10]. Somov et al. presented an IoT system in a tomato greenhouse in Russia, based on WSN, cloud computing, and artificial intelligence. This system helps in monitoring and controlling of both plants and greenhouse conditions as well as predicting the growth rate of tomatoes [11].
The study of the state of the art showed that in many WSNs the ZigBee technology that works on IEEE standard 802.15.4 is used. This technology, with its low cost, low power and long communication distance, is an efficient wireless communication device widely used in home-network. Qiu et al. designed an intelligent greenhouse environment monitoring system based on ZigBee and embedded technology, adopting the idea of intelligent home, achieving intelligent control for the greenhouse fans, lights and irrigation equipment [2]. Dan et al. reported the design and implementation of an agriculture greenhouse environment monitoring system based on ZigBee technology, which was made up of front-end data acquisition, data processing, data transmission and data reception. In synthesis, processed data was send to the intermediate node through a wireless network, which aggregates all data and sends them to the computer through a serial port. In this way, there was the possibility to view, analyze and storage the data by the computer, in real time mode [12]. Chen et al. proposed a system for greenhouse environmental monitoring based on WSN that works within the China-specific 780 MHz frequency band and fully complies with the IEEE802.15.4c standard (extension of ZigBee technology) [13]. Li et al. presented a low-cost system for easy temperature control and modulation in this type of environment, with simple structure, convenient installation and using [14]. Tsai et al. designed and reported a simple ZigBee-based sensor network for the campus greenhouse monitoring with mobile device. The system consists of three modules, a mesh structure network, data processing center, and mobile application program [15].
In addition to the devices and the systems already described, there are other systems that used also commercial electronic platforms. As an example, Geng et al. developed a system, based on embedded system approach and using wireless sensors, which combines the Raspberry Pi and the Arduino chip, which was integrated into a mobile system for shorting the physical distance between the on-site data collection and the data processing backend, in order to improve the data transmission reliability [16]. Vimal et al. developed a simple, low cost, Arduino based system to monitor the values of environmental parameters and that are continuously updated and controlled in order to achieve optimum plant growth and yield [17].
Other important aspects could be measured in a greenhouse environment using electronic system based on embedded systems technology. As an example, the collection of accurate information concerning the spatial variability within fields are necessary for precision farming of so-called specialty crops. This variability is affected by a variety of factors, which can be measured using various types of sensing technologies. Lee et al. presented a review of these technologies and discussed how they are used for precision agriculture and crop management, especially for specialty crops [18]. Another interesting aspect regards dew condensation on the leaf surface of greenhouse crops, that can promote diseases caused by fungus and bacteria, affecting the growth of the crops, Park et al. presented a WSN-based automatic monitoring system to prevent dew condensation in a greenhouse environment [19].
In this paper, a prototype of a low-cost electronic platform for greenhouse environment monitoring has been designed, developed and built. The system is an Agriculture 4.0 perspective that has the aim to permit elaboration and sending data, collected by external sensors, to external devices as laptop, smartphone and internet gateway, and on-line databases. The prototype has been developed with the purpose of firmware and software prototyping, in order to make the most of device performances. Since from the state of the art there are available non-flexible works that respect their project requirements only for specific scenario [4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19], we have chosen a flexible modular approach, for the design of our prototype, in order to test the best solution case by case basis. The electronic board is composed by a Green House Core, a Wi-Fi Module, a RS485 Module, an Analog-to-Digital Converter Module and a USB Module, all hosted on a Main Board. The hardware has been developed in modular way with the goal to test several combinations with optimized dedicated firmware and software, based on the scenario where the device may be involved. For example, in certain applications there might be the necessity to have only Ethernet interface for connection with external devices, and the requirement to work with only digital sensors (RS485 module). Consequently, thanks to our modular prototype, it is possible to develop the best firmware and software solution considering only the modules involved in this particular scenario (GHC module and RS485 module), and to develop, at a later time, a compact board that includes only these chips. The same reasoning can be made for other modules based on application needs. Accordingly, starting from our electronic prototype that guarantees maximum flexibility in terms of applicable scenarios, it is possible to develop an integrated, compact and robust board that includes only desired modules.
We have chosen each component of our electronic platform in order to respect requirements considering low-cost solution. Since the electronic board is developed with the purpose of firmware and software prototyping, we have decided to implement a device with wired and wireless network interfaces. In particular, the installation of Ethernet and Wi-Fi module on the board permits to develop and study the best solution of firmware and software for wired and wireless connections, making the prototype useful for several scenarios. The collected data concern to main greenhouse environmental parameters, such as air temperature, humidity, solar radiation, air velocity and CO2concentration. Thanks to the connectivity features of our board, these datasets are immediately available, for example, to the other IoT devices that could work in the greenhouse. In this way, the agricultural production process of the greenhouse could be executed by automation system that increases productivity by reducing the need for human workforce, guaranteeing a smart management of the greenhouse. On the other hand, we have implemented a Web application in order to allow also users a consultation of greenhouse environmental state, through a user-friendly graphical interface, in a simple and fast way.

2. Sensors Selection in Respect of Measurement Accuracy of Physical Parameters

We have developed our prototype with the aim to use it in a traditional naturally ventilated single-sloped greenhouse, considering the environmental conditions data collected by Hua et. al [20] in a measurement campaign in order to validate their deterministic and stochastic model for estimation of greenhouse microclimate. In particular, in this kind of greenhouse there is a daily variation temperature in the range between 10 °C to 40 °C and a daily relative humidity (RH) from 10% to about 90%. As a matter of facts, our electronic platform has been designed to guarantee best performances in these environmental conditions. The board permits to collect a set of measurements of the main greenhouse environment parameters, with an accuracy reported in Table 1, according to data collected by Hua et. al. On the basis of these specifications, for each physical parameter can be chosen a sensor for performing measurements, from the analysis of the state of art.

Table 1. Measurement accuracy for each physical parameter.
Physical ParameterMeasurement Accuracy
Air temperature0.1 °C
Air humidity1% UR
Solar radiation5 W/m2
Air velocity0.1 m/s
CO2 concentration0.01%
The choice of the air temperature sensor should be dictate by the necessity to have an overtime reliability maintaining a measurement accuracy of 0.1 °C. In the state of art, there are several air temperature sensors based on thermistor, such as resistance temperature detector (RTD), thermistor negative temperature coefficient (NTC) and thermistor positive temperature coefficient (PTC). Thermistors are generally produced using powdered metal oxides (i.e., platinum or nickel and copper). Regarding platinum thermistors, they are preferable thanks to the platinum high stability at high temperature range of greenhouse environment. In commerce there are two main components: Pt100 and Pt1000. The second one is characterized by a greater accuracy and it could be chosen for this application.
Humidity sensors can be found in a variety of applications with unique requirements [21]. Their wide range use has resulted in numerous sensor designs that typically incorporate capacitive, resistive, gravimetric, or optical techniques [22]. In particular, this type of sensors is classified as capacitive and resistive, from the electrical point of view. The firsts one are designed for measuring the RH and their behavior is characterized by measuring electrical permittivity variation of a dielectric material at the humidity variation. A capacitive humidity sensor is made up a capacitor where in its plates a dielectric material with a dielectric constant value, which varies with the humidity, is inserted. Whereas, the resistive humidity sensors are characterized by the principle that the conductivity in a non-metallic conductor material depends on the humidity (or, in other words, depends on water content of the material). The conventional sensing materials for resistive-type humidity sensors are mainly oxide ceramics and polymers [23]. For this application, a unique device, which integrates a capacitive humidity sensor and a Pt100 temperature sensor, could be selected from the analysis of commercial components (its features are reported in [24]).
The principal desired features of a solar radiation sensor are fast time response (typically less than 1 s) and wide wavelength spectrum (between 0.3 μm and 0.5 μm) [25]. The sensor which could be selected for this application is a thermopile solar radiation sensor. This kind of devices uses a set of thermocouples for measuring the temperature difference between two different surfaces of the system. In this way, the sensor can perform linear measurements that respect project specifications. Many models are available in commerce, and one that respects specification of Table 1 is described in [26].
One of the most performant sensors for measuring air velocity is the 3D ultrasonic anemometer, which measures the U-V-W Cartesian components of the wind speed, the wind direction and the sonic temperature [27]. A typical system is composed by five analog output channels with different voltages and currents. For the magnetic North orientation, the sensor could be equipped with a compass features magneto resistive sensor. Further details of one system present on the market are reported in [28].
As concern CO2 concentration sensors, one of the commercial devices that respects the measurement accuracy of Table 1, is described in [29]. It is a nondispersive infrared sensor (NDIR sensor), which consists of a simple spectroscopic sensor, nondispersive in the sense of optical dispersion since the infrared energy is allowed to pass through the atmospheric sampling chamber without deformation [30].

3. Methods: Design and Development of the Electronic Board

The electronic board prototype, useful for monitoring greenhouse environment, has been designed and developed using Autodesk EAGLE software. Autodesk EAGLE is an electronic design automation (EDA) software, which allows to enabling printed circuit board (PCB) designers to seamlessly connect schematic diagrams, component placement, PCB routing, and comprehensive library content [31].
The electronic board has the goal to acquire analog and digital data collected by external sensors, and sending them to electronic devices such as internet gateway and databases, laptop and smartphone. In particular, the board permits communication based on Wi-Fi, Ethernet, Universal Serial Bus (USB) interface, RS485, Serial Peripheral Interface (SPI), Universal Asynchronous Receiver-Transmitter (UART) and Inter Integrated Circuit (I2C). The system has been developed with the purpose of firmware and software prototyping. Considering this aspect, we have decided to implement a device with both Ethernet and Wi-Fi network interfaces. In this way, it is possible to develop and study the best solution of firmware and software for wired and wireless connections, according to user needs. On the other hand, thanks to both wired and wireless connections, the device has the possibility to work in several scenarios. As an example, the board could be connected to a wired network (with RS485 Ethernet connector) and it might provide a Wi-Fi connection to the sensors, working in hotspot mode; it could be connected directly to an available wireless network and it could generate a wired connection, working as a Wi-Fi-to-Ethernet adapter, maintaining a high versatility as concerns programming and employment of the sensors.
The designing of the board has been realized in modular approach to facilitate hardware and software prototyping. In particular, on the board are inserted all connectors useful for high prototyping performances, such as 2.54 mm connectors to facilitate connections of power supplies and communication buses of every sensor. In Figure 1 is shown a general block diagram of the board, which is composed by the Green House Core (GHC), the Wi-Fi Module, the RS485 Module, the Analog-to-Digital Converter (ADC) Module and the USB Module, all hosted on the Main Board. Each component of our electronic board has been chosen in order to respect requirements considering low-cost solution.
Figure 1. Block diagram of the electronic board.

A 3D view of the board with its modules integrated in the Main Board, is shown in Figure 2. Each module has been descripted in the following sub-sections.

Figure 2. 3D view of the electronic board.

In order to allow on-site use, a dedicated box has been designed, using an appropriate CAD, to protect the board from environmental agents, such as weather conditions, fertilizer emission, intrusion, dust, accidental contact and water. For these reasons, the development of the box has respected the IEC standard 60529-IP56 [32]. The box has six holes (one for power supply, one for Ethernet port and four for external sensors) in order to permits connections between board and sensors, power supply and internet gateway. For assembling the board on the box, four 5-mm diameter rounded turrets have been designed and positioned on each box angle. The box size is 172 × 192 × 110 millimeters.

Figure 3 shows a 3D view of the box.

Figure 3. A 3D view of the board dedicated box: (a) base of the box; (b) box cap.

3.1. Green House Core (GHC)

The Green House Core module contains the core of the board and consequently it permits to manage all modules intended to data acquisition and communication. In particular, 8-bit Atmel ATmega2560-16AU microcontroller (Table 2) has been chosen [33]. We have selected an 8-bit platform, instead of a more recent 32-bit platform, as well as for the economic aspect, for the following main reasons [34,35,36]:

Table 2. Specifications of the Atmel ATmega2560-16AU microcontroller.
Maximum clock frequency16 MHz
Programmable memoryFlash
Flash capability256 kB
CPU speed16 MIPS
EEPROM4 kB
SRAM8 kB
I/O pin86
PWM resolution16-bit
PWM channels12
Serial UARTs4
Serial SPI5
Serial I2C1
ADC resolution10-bit
ADC channels16
Timers/Counters2 × 8-bit, 4 × 16-bit
Temperature range−40–85 °C
Voltage supply4.5–5.5 V
Max Current supply14 mA
  1. The majority of 8-bit devices are proposed in DIP packaging. This aspect makes them easy to plug into a breadboard and get starting with the prototype experiments, guaranteeing a fast and easy solution.
  2. Most 8-bit devices run on 5 volts, as well as the ATmega2560-16AU microcontroller. 5-volt systems provide better noise immunity and the majority of industry standard modules use 5-volt logic levels, as you can see from most of selected chips of our board.
  3. 8-bit devices are robust and it results harder to damage an 8-bit device than a 32-bit device [34].
  4. The use of an 8-bit device guarantees a low and fast learning curve as concerns the firmware development [34].
  5. Many modern microcontrollers incorporate some hardware functions that serve to help the CPU operate as efficiently as possible, such as the Peripheral Event System, which allows peripherals to interact without intervention from the CPU. In the case of detecting a hardware event, it is important to first detect the event and then switch control to the desired interrupt service routine (ISR). In these situations, CPU speed isn’t the single determining factor. It is a question of how long, in terms of cycles, does it take to respond to the interrupt, run the ISR, and return. As shown in Table 2 of [35], 8-bit devices can be more efficient in handling hardware near actions. In fact, the average clock cycles employed in an 8-bit MCU are lower than 32-bit MCU (i.e., for detect interrupt, jump to interrupt vector, return from interrupt, etc.).
The ATmega2560-16AU microcontroller has a maximum clock frequency of 16 MHz and equipped with a 256-kB flash memory, an 8-kB Static Random Access Memory (SRAM) and a 4-kB Electrically Erasable Programmable Read-Only Memory (EEPROM). The microcontroller holds a 16-channel ADC with 10-bit resolution and several serial communication protocols.
The GHC module has been designed to set up the board for communication with SPI, I2C and UART protocols. In addition, an Ethernet port, with a dedicated Ethernet controller designed for embedded applications, has been inserted in the project to guarantee a wired internet connection. As mentioned above, we have chosen each component of our electronic board with the aim to have a low-cost solution. In this way, we have supposed that in our greenhouse might not be a significant number of IP addresses and consequently we have opted for an IPv4 chip, which has more restrained cost and a lower curve learning than a more complex IPv6 chip. The selected Ethernet controller is the WIZnet W5100 model that supports many protocols, such as TCP, UDP, ICMP, IPv4 ARP, IGMP, PPPoE and Ethernet [37]. A SPI serial bus connection has been implemented for communication between Atmel ATmega2560-16AU and WIZnet W5100 controllers (see Figure 1).
Figure 4 shows front side and back side of the GHC 3D model. As you may notice, in the project has been inserted five LEDs for a visual check of the board state. In particular, one for noticing ON state, one for seeing board working, one for Ethernet ON state and two for specifying transmission or reception in Ethernet communication.
Figure 4. A 3D view of the GHC module: (a) front side; (b) back side.

3.2. Wi-Fi Module

This module permits wireless communication between the GHC module and external devices, such as laptop, smartphone and internet gateway. The Wi-Fi chip used for the Wi-Fi module is the ATWINC1500-MR210PA model from Microchip Atmel [38], an IoT chip that guarantees a low energy consumption. It is composed by a flash memory and a 2.4 GHz antenna (ISM band) for signal transmitting and receiving with a rate of 20 MHz. This chip is designed for communicating with SPI, UART and I2C protocols. Main features of the module are listed in Table 3.
Table 3. Specifications of the Microchip ATWINC1500-MR210PA chip installed in the Wi-Fi module.
Transmitting/Receiving frequency bandISM, 2.4 GHz
Transmitting/Receiving rate20 MHz
Output power20.6 dBm
CPU speed16 MIPS
Communication protocolsSPI, UART, I2C
SRAM8 kB
Flash memory4 Mb
Voltage supply1.8 V, 2.5 V, 3.3 V
Max Current supply269 mA
Temperature range−40–85 °C

Since the maximum voltage supply of this chip and also its communication signals have a voltage equal to 3.3 V, a voltage stabilizer and a level shifter have been used for adapting 5 V to desired voltage of 3.3 V. As well as the GHC module, three LEDs (i.e., red, yellow and green) have also been inserted in the Wi-Fi module, for noticing the state of the module during firmware testing and developing phase. Figure 5 shows front side and back side of the 3D Wi-Fi module.

Figure 5. A 3D view of the Wi-Fi module: (a) front side; (b) back side.

3.3. RS485 Module

The RS485 module permits to communicate with external sensors equipped with this output protocol and consequently acquire digital signals from them. Since many sensors are developed for working with both RS485 and RS422 protocols, in developing phase has been chosen the MAX3468CSA chip from Maxim Integrated [39]. This allows a maximum data rate of 40 Mb/s and a signal delay less than 20 ns. Main characteristics of this chip are listed in Table 4. Figure 6 shows front side and back side of the 3D RS485 module.
Figure 6. A 3D view of the RS485 module: (a) front side; (b) back side.

Table 4. Specifications of the Maxim Integrated MAX3468CSA chip used in the RS485 module.

Communication protocolsRS422, RS485
Data rate40 Mb/s
Number of receivers1
Receiver delay20 ns
Number of transmitters1
Transmitter delay15 ns
Maximum number of transceivers on the bus128
Voltage supply4.75–5.25 V
Max Current supply2.5 mA
Temperature range0–70 °C

3.4. ADC Module

The ADC module allows the conversion of analog signal, collected by external sensors, to digital signal, required for data processing by the board and subsequently routing to the database via the internet gateway (using Ethernet or Wi-Fi interface). In designing phase, we have selected the ADS1015 chip from Texas Instruments [40], characterized by an internal voltage reference, a programmable gain amplifier (PGA) and a digital comparator, an oscillator and a I2C protocol interface. In particular, the chip has a 12-bit resolution, a sampling frequency of 3.3 ksps, two differential channels and four single-ended channels. In Figure 7 are shown front side and back side of the 3D view and in Table 5 are reported the main characteristics of the ADS1015 chip.
Figure 7. A 3D view of the ADC module: (a) front side; (b) back side.
Table 5. Main features of the ADS1015 chip used in the ADC module.
Bit resolution12-bit
Sampling frequency3.3 ksps
Input channels differential (single-ended)2 (4)
Number of transmitters1
Communication protocolI2C
Voltage supply2.0–5.5 V
Max Current supply150 uA
Temperature range−40–125 °C

3.5. USB Module

The USB module is shown in Figure 8 and it is useful for communication with external devices, such as laptop and smartphone and eventually for uploading and updating firmware. The chose module is the FT232R from FTDI chip [41], a standard USB 2.0 with Universal Asynchronous Receiver-Transmitter (UART) technology. This system allows the data transmitting and receiving with a data-rate of 12 Mb/s. The chip is equipped with a 1024-bit EEPROM that permits configuration system. In the design of this module, two LEDs have been added for verifying correct tasks of data receiving/transmitting. In Table 6 the main characteristics of the FT232R chip are reported.
Figure 8. A 3D view of the USB module: (a) front side; (b) back side.
Table 6. Main features of the FT232R chip used in the USB module.
USB standard2.0
Frequency12 MHz
Data rate12 Mb/s
EEPROM1024 bit
Voltage supply−0.5–6.0 V
Max Current supply24 mA
Temperature range−40–85 °C

3.6. Main Board

The Main Board hosts the other modules (the GHC module, the Wi-Fi Module, the RS485 Module, the ADC Module and the USB Module) and guarantees power supply, filtering and protection to each of them thanks to Power Supply Unit (PSU) module (see Figure 1). Since one of the aims of the board concerns prototyping firmware and software in order to make the most of device performances, the Main Board has been designed without any strict electrical connection between various modules hosted (see Figure 9). In this way, it is possible to connect various modules as needed of the firmware and software developer (input/output ports selected, timer, pin optimization, etc.), which should program the board using an In Circuit Serial Programming (ICSP) interface. The board is 12–32 V powered and it provides, thanks to on-board DC converter [42], two different voltages, 12 V and 5 V, according to needs. In fact, the other modules are developed to operate with a 5 V power supply, whereas all sensors could be fed to 5 V, 12 V and 24 V power supply [24,25,26] and [28,29]. A power consumption calculation has been done in order to evaluate the maximum power supply for each module and consequently the maximum power consumption of our electronic board. In the calculation, the power consumption of outline electronics, such as resistors, capacitors, etc., is considered negligible compared to main modules consumption. The calculation is obtained considering maximum current (Imax) and voltage (Vmax) supply, in the worst case, of every chips involved in the board, using the following formula:

Pmax=n=1mVmax,n×Imax,n

where m is the number of modules involved in the prototype. In Table 7, the maximum Voltage supply (Vmax), the maximum current supply (Imax) and the maximum power supply (Pmax) for each module are reported. Using the previous formula, the maximum power consumption of our prototype is equal to about 1619 mW. Since the board is 12 V–32 V powered, we have also calculated the energy consumption for each voltage, with the following formula:

IV=12V=Pmax12/=134.91 mA
IV=32V=Pmax32/=50.59 mA
Figure 9. A 3D view of the Main Board: (a) front side; (b) back side.
Figure 9. A 3D view of the Main Board: (a) front side; (b) back side.

 

Table 7. Power consumption calculation.

ModuleChipMaximum Voltage Supply
[V]
Maximum Current Supply
[mA]
Maximum Power Consumption
[mW]
GHCAtmega256051470
EthernetWiznet W51003.3160528
Wi-FiATWINC1500_MR210PA3.3269887.7
RS485MAX3468CSA52.512.5
ADCADS101550.1500.750
USBFT232R524120

Consequently, the energy consumption decreases when the Voltage powered increases.

As achievement of power consumption calculation, and considering that the board could also power external sensors, we have chosen the typical current supply equal to 1.5 A. In this way, we have an oversized electronic system that guarantees absolute flexibility for the board power and the external sensors connection and power. Naturally, for the sensors that request more current supply, it is necessary to have an external power supply.

4. Results: Prototype Realization and Dedicated Firmware and Software Development

The prototype of the electronic platform for real time greenhouse environment monitoring, designed and developed in previous section, has been realized and it is shown in Figure 10. As mentioned above, the hardware of our electronic platform has been designed in modular way with the goal to test several combinations with optimized dedicated firmware and software, based on the scenario where the device may be involved. For example, in certain applications there might be the necessity to have only Ethernet interface for connection with external devices, and the requirement to work with both digital sensors (RS485 module) and analogic sensors (ADC module). Consequently, thanks to tests performed using our modular prototype (Figure 10), it is possible to develop the best firmware and software solution considering only the modules involved in this particular scenario (the GHC module, the RS485 module and the ADC module, whose designs are shown in Figure 4, Figure 6 and Figure 7), and to develop, at a later time, a new compact board that includes only these chips. In this way, starting from our electronic prototype that guarantees maximum flexibility in terms of applicable scenarios, it is possible to develop a new integrated, compact and robust board which includes only desired modules, whose design is shown in Figure 11. Naturally, the same reasoning can be made for other modules based on application needs.
Figure 10. Photo of the electronic board.
Figure 11. Design of the new integrated, compact and robust board. It is composed by only GHC (Figure 4), RS485 (Figure 6) and ADC (Figure 7) chips. Starting from our prototype, the new board is developed to work in a scenario where is necessary only Ethernet connection and the possibility to acquire data from analogic and digital sensors.
As mentioned above, our electronic board has been developed with the purpose of firmware and software prototyping. A dedicated firmware and software has been implemented in order to make the most of device performances. The electronic prototype aims to acquire analog and digital signals collected by external sensors for air temperature, humidity, solar radiation, air velocity and CO2 concentration measurements, simultaneously. Subsequently, after data acquisition and processing, the processed data are shared to users through connection between the board and internet gateways, laptops or smartphones.
The software could conceptually be divided in two blocks: one dedicated to board bootloader and firmware, the second one for a web application for the management of acquired data by users.
The whole firmware and software package has been implemented to have a bi-directional communication between the board and the web server. For this kind of communication, performed by Ethernet and Wi-Fi modules, the standard Used Datagram Protocol (UDP) has been used to allow transmitting and receiving data string, quickly. In particular, with the objective of developing a real time monitoring prototype, which collects data with a high acquisition frequency and sends them to external devices, we have used UDP protocol because it guarantees a simple connectionless communication model with a minimum of protocol mechanisms. It is suitable for application such our project where error checking and correction are either not necessary. In addition, we have considered Constrained Application Protocol (CoAP) in order to ensure reliability of the transmission process.

4.1. Development of the Dedicated Firmware

The bootloader and the firmware, which have been developed in C language, have been added at the time of manufacturing and are useful to run user programs on the board and can be thought of as the software that allows hardware to run.
The bootloader runs when the board is turned on and it is very similar to a computer BIOS. It allows ports and microcontroller pins setting for permitting communication between the board and external devices.
On the other hand, the firmware enables data acquisition from sensors (RS485 and ADC modules) and communication with internet gateway (Wi-Fi module and Ethernet port). A block diagram of the firmware is reported in Figure 12. The Setup block is dedicated for modules and protocols setup and permits the initialization each time the board is switched on. During the design phase, we have installed a real time clock on the board. But despite this aspect, an initial synchronization is necessary connecting on the server. In addition, we have planned a periodical synchronization of our system nodes in order to compensate their time shifting. Consequently, the Synchronization block guarantee a synchronization with real time-clock from Internet for automatic time association to acquired data. If the synchronization is not performed, it is repeated while it will be successful. When the synchronization is done, the board starts the data acquisition from external sensors. A data elaboration is carried out using a sequential Kalman filter, namely Unscented Kalman Filter (UKF) [43], which permits to stabilize data acquired in the previous block. In fact, the UKF uses a series of measurements observed over time, containing statistical noise and other inaccuracies, and produces an estimated achievement that tend to be more accurate than those based on a single measurement alone. After this elaboration, the Data communication block allows to save data in a standard format for web server communication with UDP and CoAP protocols.
Figure 12. Block diagram of the firmware.
Figure 12. Block diagram of the firmware.

In order to investigate the stability of the acquired data and the results of the data elaboration using the UKF, we have tested the board during a time acquisition window of 30 s. The experiment has been studied with the goal of simulating a typical use scenario of the board. A resistive potentiometer has been powered by the board with a voltage of 5 V, and its voltage reading has been stored and elaborated using the UKF by the board. We have decided to test the board for voltages reading between 500 mV and 2000 mV, that are typical values of commercial sensors. In Figure 13 are shown the graphical results of the experiment.

Figure 13. Graphical results of the experiment for data acquisition and elaboration: (a) acquired data at voltages of about 500 mV; (b) acquired data at voltages of about 1000 mV; (c) acquired data at voltages of about 1500 mV; (d) acquired data at voltages of about 2000 mV.
Thanks to the analysis of Figure 12, we can see the advantages of using the UKF in terms of the collected data quality and stability. In particular, the board is able to collect data with voltages reading of 500 mV (Figure 13 a), 1000 mV (Figure 13b), 1500 mV (Figure 13c) and 2000 mV (Figure 13d), with maximum ripples of about 60 mVpp (see blue curves of Figure 13, named “No UKF”), according with features of the on-board DC converter [42]. This stage is performed by the Data acquisition block of Figure 12. When these data are elaborated by the Elaboration data block of Figure 12, using the UKF (see red curves of Figure 13, named “UKF”), the values of voltage readings have ripples of few mVpp. This result highlights an improvement of the data quality and stability after the elaboration stage and it is in line with the accuracy of commercial sensors that could be used in greenhouse monitoring [24,25,26,27,28,29].

4.2. Development of the Dedicated Software and Web Application

Thanks to the connectivity features of our board, the collected datasets are immediately available, for example, to the other IoT devices that could work in the greenhouse. In this way, the agricultural production process of the greenhouse could be executed by automation system that increases productivity by reducing the need for human workforce, guaranteeing a smart management of the greenhouse. On the other hand, we have implemented a Web application in order to allow also users a consultation of greenhouse environmental state, through a user-friendly graphical interface, in a simple and fast way.
The web application (that is a client-server computer program that the client runs in a web browser) has been developed using Java servlet and Java Server Pages (JSP). A Java servlet is a Java software component that implements web containers for hosting web applications on web servers and thus qualify as a server-side servlet web application. JSP is a server-side programming technology that enables the creation of dynamic, platform-independent method for building web applications in HTML language.
The Web application (see Figure 14) allows users to synchronize the board from Internet, to acquire data information collected by the board, to storage these data in a on-line dedicated database and to show them via a web browser.
Figure 14. A screenshot of the dedicated Web application.
Figure 14. A screenshot of the dedicated Web application.

5. Discussion and Conclusions

In this study, the design, development (Figure 1 and Figure 2) and realization (Figure 10) of a flexible electronic prototype for greenhouse environment monitoring, based on the IoT architecture, is proposed. The device represents an Agriculture 4.0 perspective and its use in a greenhouse will contribute to improve and address the real needs of farmers and reengineer the monitoring of this environment. The hardware of our electronic platform has been designed in modular way with the goal to test several combinations with optimized dedicated firmware and software, based on the scenario where the device may be involved. The system is a prototype composed by a Green House Core, a Wi-Fi Module, a RS485 Module, an ADC Module and a USB Module, all hosted by a Main Board. The board permits communication based on Wi-Fi, Ethernet, USB interface, RS485, SPI, UART and I2C. Since the board will be used for prototyping firmware and software, the Main Board has been designed without any strict electrical connection between various hosted modules. In this way, it is possible to connect various modules as needed to the firmware and software developer. Starting from our electronic prototype that guarantees maximum flexibility in terms of applicable scenarios, it is possible to develop a new integrated, compact and robust board which includes only desired modules for a particular application (Figure 11). The electronic platform permits to collect data from external sensors, elaborate and send them to external electronic devices. In order to investigate the performances of the device, in particular the stability of the acquired data and the results of the data elaboration using the UKF, we have tested the board during a time acquisition window of 30 s. The collected data concern to main greenhouse environmental parameters, such as air temperature, humidity, solar radiation, air velocity and CO2 concentration. A Web application has been implemented to allow users a consultation of greenhouse environmental state in a simple and fast way.

Author Contributions

Conceptualization, T.P. and P.O.; methodology, P.O. and L.S.; software, S.G.; validation, T.P., P.O., L.S., S.G. and C.M.; formal analysis, S.G. and C.M.; investigation, S.G. and C.M.; resources, P.O.; data curation, P.O., L.S., S.G. and C.M.; writing—original draft preparation, L.S.; writing—review and editing, L.S.; visualization, L.S.; supervision, T.P.; project administration, T.P.; funding acquisition, T.P. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Gubbi, J.; Buyya, R.; Marusic, S.; Palaniswami, M. Internet of Things (IoT): A vision, architectural elements, and future directions. Futur. Gener. Comput. Syst. 2013, 29, 1645–1660. [Google Scholar] [CrossRef]
  2. Qiu, W.; Dong, L.; Wang, F.; Yan, H. Design of intelligent greenhouse environment monitoring system based on ZigBee and embedded technology. In Proceedings of the 2014 IEEE International Conference on Consumer Electronics, Shenzhen, China, 9–13 April 2014; pp. 1–3. [Google Scholar]
  3. Marsh & McLennan Companies. Agriculture 4.0: The Future of Farming Technology. Available online: https://www.mmc.com/content/dam/mmc-web/insights/publications/2018/november/agriculture-4-0/Oliver-Wyman-Agriculture-4.0.pdf (accessed on 27 April 2020).
  4. Rangan, K.; Vigneswaran, T. An Embedded systems approach to monitor green house. In Proceedings of the International Conference on Recent Advances in Space Technology Services and Climate Change 2010 (RSTS & CC-2010), Chennai, India, 13–15 November 2010; pp. 61–65. [Google Scholar]
  5. Candido, A.; Cicirelli, F.; Furfaro, A.; Nigro, L. Embedded real-time system for climate control in a complex greenhouse. Int. Agrophys. 2007, 21, 17–27. [Google Scholar]
  6. Montoya, F.G.; Gómez, J.; Cama, A.; Zapata-Sierra, A.J.; Martínez, F.; De La Cruz, J.L.; Manzano-Agugliaro, F.; Cama-Pinto, A. A monitoring system for intensive agriculture based on mesh networks and the android system. Comput. Electron. Agric. 2013, 99, 14–20. [Google Scholar] [CrossRef]
  7. Kumar D.N., N. ARM based remote monitoring and Control System for environmental parameters in greenhouse. In Proceedings of the 2015 IEEE International Conference on Electrical, Computer and Communication Technologies (ICECCT), Coimbatore, India, 5–7 March 2015. [Google Scholar]
  8. Yuquan, M.; Shufen, H.; Qingzhu, W. New environment parameters monitoring and control system for greenhouse based on master-slave distributed. In Proceedings of the 2010 International Conference on Computer and Communication Technologies in Agriculture Engineering, Chengdu, China, 12–13 June 2010; Volume 1, pp. 31–35. [Google Scholar]
  9. Ahonen, T.; Virrankoski, R.; Elmusrati, M. Greenhouse Monitoring with Wireless Sensor Network. In Proceedings of the 2008 IEEE/ASME International Conference on Mechtronic and Embedded Systems and Applications, Beijing, China, 12–15 October 2008; pp. 403–408. [Google Scholar]
  10. Pahuja, R.; Verma, H.; Uddin, M. A Wireless Sensor Network for Greenhouse Climate Control. IEEE Pervasive Comput. 2013, 12, 49–58. [Google Scholar] [CrossRef]
  11. Somov, A.; Shadrin, D.; Fastovets, I.; Nikitin, A.; Matveev, S.; Seledets, I.; Hrinchuk, O. Pervasive Agriculture: IoT-Enabled Greenhouse for Plant Growth Control. IEEE Pervasive Comput. 2018, 17, 65–75. [Google Scholar] [CrossRef]
  12. Dan, L.; Xin, C.; Chongwei, H.; Liangliang, J. Intelligent Agriculture Greenhouse Environment Monitoring System Based on IOT Technology. In Proceedings of the 2015 International Conference on Intelligent Transportation, Big Data and Smart City, Halong Bay, Vietnam, 19–20 December 2015; pp. 487–490. [Google Scholar]
  13. Chen, X.; Guo, P.; Lan, Y. Design and experiment based on wireless sensor network with 780 MHz in greenhouse. Trans. Chin. Soc. Agric. Eng. 2014, 30, 113–120. [Google Scholar]
  14. Li, W.; Luo, Q.; Li, Z.; Li, Y. The Design and Implementation of a Low Cost Temperature Control System for Agriculture Greenhouses. In Proceedings of the 2009 International Conference on Energy and Environment Technology, Guilin, China, 16–18 October 2009; Volume 1, pp. 399–401. [Google Scholar]
  15. Tsai, C.-F.; Hung, K.-C. Campus greenhouse monitoring with a simple ZigBee-based sensor network. In Proceedings of the 2016 International Conference on Advanced Materials for Science and Engineering (ICAMSE), Tainan, Taiwan, 12–13 November 2016; pp. 305–308. [Google Scholar]
  16. Geng, X.; Zhang, Q.; Wei, Q.; Zhang, T.; Cai, Y.; Liang, Y.; Sun, X. A Mobile Greenhouse Environment Monitoring System Based on the Internet of Things. IEEE Access 2019, 7, 135832–135844. [Google Scholar] [CrossRef]
  17. Vimal, P.V.; Shivaprakasha, K.S. IOT based greenhouse environment monitoring and controlling system using Arduino platform. In Proceedings of the 2017 International Conference on Intelligent Computing, Instrumentation and Control Technologies (ICICICT), Kannur, India, 6–7 July 2017; pp. 1514–1519. [Google Scholar]
  18. Lee, W.S.; Alchanatis, V.; Yang, C.; Hirafuji, M.; Moshou, D.; Li, C. Sensing technologies for precision specialty crop production. Comput. Electron. Agric. 2010, 74, 2–33. [Google Scholar] [CrossRef]
  19. Park, D.-H.; Park, J.-W. Wireless Sensor Network-Based Greenhouse Environment Monitoring and Automatic Control System for Dew Condensation Prevention. Sensors 2011, 11, 3640–3651. [Google Scholar] [CrossRef] [PubMed]
  20. Hua, Y.; Qi-Fang, L.; Huai-Qing, Y. Deterministic and stochastic modelling of greenhouse microclimate. Syst. Sci. & Control Eng. 2019, 7, 65–72. [Google Scholar]
  21. Fenner, R.; Zdankiewicz, E. Micromachined water vapor sensors: A review of sensing technologies. IEEE Sensors J. 2001, 1, 309–317. [Google Scholar] [CrossRef]
  22. Rittersma, Z. Recent achievements in miniaturised humidity sensors—A review of transduction techniques. Sens. Actuators A Phys. 2002, 96, 196–210. [Google Scholar] [CrossRef]
  23. Chen, Z.; Lu, C. Humidity Sensors: A Review of Materials and Mechanisms. Sens. Lett. 2005, 3, 274–295. [Google Scholar] [CrossRef]
  24. Nesa srl. Available online: https://www.nesasrl.eu/media/pdf/UTA.pdf (accessed on 25 October 2019).
  25. Lima, A.M.N.; Deep, G.; Neto, J.; Freire, R.C.S.; Lobo, P. Identification of thermoresistive solar radiation sensors. IEEE Trans. Instrum. Meas. 1994, 43, 133–138. [Google Scholar] [CrossRef]
  26. Nesa srl. Available online: https://www.nesasrl.eu/media/pdf/RSG1.pdf (accessed on 25 October 2019).
  27. Dubov, D.; Aprahamian, B.; Aprahamian, M. Comparison of Wind Data Measurment Results of 3D Ultrasonic Anemometers and Calibrated Cup Anemometers Mounted on a Met Mast. In Proceedings of the 2019 16th Conference on Electrical Machines, Drives and Power Systems (ELMA), Varna, Bulgaria, 6–8 June 2019; pp. 1–5. [Google Scholar]
  28. Gill Instruments: Meteorological Technology. Available online: http://www.gillinstruments.com/data/datasheets/1210-0012%20R3-50%20Iss%202.pdf (accessed on 25 October 2019).
  29. SplusS Regeltechnik. Available online: https://spluss.de/fileadmin/assets/ACO2-SD-TYR2__IT-safe.pdf(accessed on 25 October 2019).
  30. Wang, Y.; Nakayama, M.; Yagi, M.; Nishikawa, M.; Fukunaga, M.; Watanabe, K. The NDIR CO/sub 2/ monitor with smart interface for global networking. IEEE Trans. Instrum. Meas. 2005, 54, 1634–1639. [Google Scholar] [CrossRef]
  31. Autodesk EAGLE. Available online: https://www.autodesk.com/products/eagle/overview (accessed on 25 October 2019).
  32. IEC Standard 60529. Available online: https://www.iecee.org/ (accessed on 2 April 2020).
  33. Microchip ATmega2560. Available online: https://www.microchip.com/wwwproducts/en/ATmega2560(accessed on 25 October 2019).
  34. Trinirobotics, The word of Electronics in One Place. 8-bit VS 32-bit Microcontrollers: Which should I choose? Available online: https://trinirobotics.com/2019/03/23/8-bit-vs-32-bit-microcontrollers-which-should-i-choose/ (accessed on 24 March 2020).
  35. Electronic Design. 8 Bit or 32 Bit? Choosing Your Next Design’s MCU. Available online: https://www.electronicdesign.com/technologies/microcontrollers/article/21800448/8-bit-or-32-bit-choosing-your-next-designs-mcu (accessed on 24 March 2020).
  36. Altium. 8-bit vs. 32-bit MCU: Choosing the Right Microcontroller for Your PCB Design. Available online: https://resources.altium.com/pcb-design-blog/8-bit-vs-32-bit-mcu-choosing-the-right-microcontroller-for-your-pcb-design (accessed on 24 March 2020).
  37. WIZnet W5100. Available online: https://www.wiznet.io/product-item/w5100/ (accessed on 25 October 2019).
  38. Microchip ATWINC1500. Available online: https://www.microchip.com/wwwproducts/en/ATwinc1500(accessed on 25 October 2019).
  39. Mouser Electronics. Available online: https://www.mouser.it/Search/Refine?Keyword=MAX3468CSA(accessed on 25 October 2019).
  40. Texas Instruments. Available online: http://www.ti.com/product/ADS1015 (accessed on 25 October 2019).
  41. Future Technology Devices International Ltd. Available online: https://www.ftdichip.com/ (accessed on 25 October 2019).
  42. Recom DC Converter R-78B-2.0. Available online: https://eu.mouser.com/datasheet/2/468/R-78B-2.0-1711238.pdf (accessed on 7 April 2020).
  43. Losacco, M.; Schirru, L. Orbit Determination of Resident Space Objects Using the P-Band Mono-Beam Receiver of the Sardinia Radio Telescope. Appl. Sci. 2019, 9, 4092. [Google Scholar] [CrossRef]
documents
Others
PDF

COMMENTS

Please Login to comment
  Subscribe  
Notify of