1. Introduction
Over the past decade, the development and integration of wireless sensor networks (WSN) within the agriculture and food industry, along with a greater understanding of the theory and potential application of such devices, has seen considerable growth [
1,
2,
3,
4,
5,
6,
7,
8,
9]. Indeed, there is now a multitude of devices designed to provide information on precision agriculture, environmental monitoring, machine and process control, facility automation, food packaging, food inspection and quality control [
3,
7].
Surprisingly, the use of WSN in vineyards and wineries is still quite rare. In terms of vineyard monitoring, several reports have appeared recently detailing the use of WSN to monitor not only a vineyard’s microclimate but also the risk of vine damage due to frost, pests and disease [
10,
11,
12]. There have also been several reports utilising WSN to monitor the quality of wine in terms of cellaring [
13], and temperature control at the various stages of vinification [
14,
15]. Controlling the temperature during primary fermentations of wine is extremely important in terms of the development of the “bouquet” or “aroma” of a wine. For example, white wines are usually fermented at around 15 °C with higher temperatures (e.g., 20 °C) potentially resulting in the loss of volatile “aroma” due to the sweeping away of these volatiles by the carbon dioxide gas generated during fermentation [
16]. In addition, the control of the temperature of wines undergoing malolactic fermentation or maturation in barrels is vital to ensure the control of potentially unwanted bacterial growth or oxidative damage [
17]. Currently, the temperature of wines in barrels is simply measured with a thermometer, which means the barrels need to be opened and potentially exposed to oxygen, whilst the temperature is controlled by simply moving the barrels from one cold room to another.
Another key parameter that is monitored for wines in barrels is the extent of ullage. Ullage is defined as the empty space that lies between the wine and the closure,
i.e., the space between a bung in a barrel and the surface of the wine, or the space between a cork or screw cap in a bottle and the surface of the wine. Given that this air contains around 20.95% oxygen, minimising ullage is very important to avoid chemical oxidative damage or bacterial damage of the wine [
18]. For example, acetobacter (acetic acid bacteria) which converts ethanol to acetic acid is facilitated by the presence of oxygen thereby increasing the volatile acidity of the wine [
19]. To our knowledge ,there is yet to be any report on the development of a WSN to monitor ullage.
In this paper, we demonstrate a WSN platform that can be embedded inside wine barrels bung and used to monitor the temperature and ullage of the wine in each individual barrel during both the fermentation and maturation stages of winemaking. Similar pioneer works of potential for the deployment of WSN in wineries have been reported in recent years [
20,
21]. However, the size, cost and energy consumption are still not ideal for large scale winery use. Our design is particularly focused on these aspects. For instance, Di Gennaro reported that the basic components of the WineDuino node (excluding the actual sensors) cost more than 90 euros each [
21]. The aim was to design a device that was of low cost, low-energy consumption and could be used in large barrel rooms containing thousands of barrels with the information being sent to remote computer workstations or a winemaker’s iPhone for consideration. This early warning system thus allows a winemaker to make immediate modifications to winemaking processes to ensure the highest quality wines are being produced. The “smart-bung” and WSN platform developed also allows for the addition of other sensor modules in the future in order to extend its functionality and allow for even closer monitoring of all important analytes and parameters of wine during the vinification and maturation stages of winemaking.
2. The Overall Systems Architecture
The distributed wine monitoring platform consisted of a small central node and a subsystem where sensor modules may be attached, a schematic of which is depicted in
Figure 1. The subsystem was an energy-saving small signal chip computer with an on-board FM radio system and general purpose IO interface that could be used to connect to the sensor modules. The subsystem and the sensor modules were to be powered by a long-life battery and consume no energy when in an idle state (most of the time), whilst the subsystem and the sensor modules attached would only be powered on when in data requisition mode. This ensures that the subsystem would run on a single battery for an extended period of time (12 months) without recharging of the battery. The subsystem was small enough that it could be embedded into a barrel bung. The central node was to be built upon a single computer board running a custom build standard Linux operation system which can support running a wide range of programs for gathering and processing the data received from the subsystems. The central node also had the capability of receiving and transmitting both FM radio and WIFI signals. It should be noted that the FM radio modules would consume much less power when compared to WIFI technology which would be used in the central nodes to communicate with the remote computer center.
The subsystems acquire data, push it to the central node and power off immediately at a fixed interval. The central nodes receive the data from the subsystems, identify the source barrels of the data, conduct preliminary data processing and upload the data to the server in the computer room. The server logs and analyses the data, puts them on the web interface and sends out alerts when necessary.
Figure 1.
The schematics of the distributed wine monitor system.
Figure 1.
The schematics of the distributed wine monitor system.
Specifically, a FriendlyARM Mini210s single computer board computer was used as the basis of the central node whilst an ATMega328 chip based Arduino-like single chip microcontroller (Moteino) was used as the basis of the subsystem. An additional Moteino chip was connected to the Mini210s via a USB port serving as a FM radio transceiver. Currently, the Moteino software supports 65,280 chips in its networks, but there is no hardware limitation. The ullage and temperature modules were built using a SHARP GP2Y0A41SK0F (measures 4–30 cm) infrared distance sensor and Dallas DS18B20 1-wire temperature sensor (measures from −55 °C to +125 °C with ±0.5 °C from −10 °C to +85 °C), respectively.
Figure 2 depicts the distance sensor assembled in a barrel bung (top left) and an unprotected temperature sensor (bottom left). The temperature sensor was protected with a heat conducing shell and hanging from the bung into the wine. The entire assembled subsystem is depicted in the right photo of
Figure 2 and had a total cost of $27 AUD retail price, which could be further scaled down if the system was produced at scale.
Figure 2.
(Left) The distance sensor inside a bung and a naked temperature sensor; (Right) An assembled subsystem on a wine barrel and its schematic as the inset.
Figure 2.
(Left) The distance sensor inside a bung and a naked temperature sensor; (Right) An assembled subsystem on a wine barrel and its schematic as the inset.
In the work by Sainz
et al., bluetooth was used as the wireless network interface and an analogue temperature sensor TM35DZ for temperature measurement. Such modules suffer from several drawbacks including that the usual transmission range for bluetooth devices is only a few meters which makes the monitoring system unsuitable for practical use in large wineries where the barrels are constantly being moved around, whilst the accuracy of the analogue temperature sensor would not be as good if a digital temperature was used [
14]. Consequently, it appeared to us that our system, which employs a Moteino microcontrollor with an integrated low power FM radio as the sensor platform and main network interface along with a digital temperature probe, will offer additional advantages over what has thus far been reported. Such a radio system would have a coverage of 300–400 m radius at the BAUD rate of 55 kbps (or 1.5 mile range at 1200 bps), more than enough to cover most winery cellar areas. In addition, whilst Boquete
et al. employed high-precision digital temperature sensors (DS1631 ±0.5 °C from 0 to 70 °C) and an XBee wireless interface with a range of 20–30 m [
15], it is now recognised that the price of a XBee wireless module alone is more than the price of an entire microcontrollor plus wireless module, thus our WNS would come in at a much lower cost.
The assembly of the subsystem was rather straightforward. As shown in the top left photo in
Figure 2, a slot is cut in the bottom of a bung where the SHARP infrared distance sensor is to be installed. The edge of the distance sensor is coplanar to the bottom of the bung to allow easy measurement of the position of the distance sensor. A small hole is drilled through the bung from bottom to top for any wires including the temperature sensor. The Moteino chip is installed on the top-side of the bung and connected to a battery. The distance sensor and the temperature sensor were soldered onto the Moteino chip according to the schematic shown in
Figure 2. A 10 K pull-up resistor was used together with temperature sensor. The 10 μF capacitor between pin A1 and GND was used for reducing voltage fluctuation from the distance sensor. The NPN transistor was used as a switch allowing the program to switch the power to the distance sensor to save energy. The Moteino chip allows the user to use any power supply from 3.3 V to 12 V. We used both packs of 4 AA batteries (6 V) and 9 V batteries to power the subsystem in this work. The central node can be installed anywhere convenient inside the wine cellar next to a power source. Each central node hosts a unique radio network. Each subsystem was pre-programmed with a unique ID and can be assigned to any radio network, which allows each wine barrel to be easily identified by the winemaker. Our design approach greatly reduces the cost of the entire WSN.
Table 1 shows the cost of each of the components used.
Table 1.
The cost of the elements used in this work.
Table 1.
The cost of the elements used in this work.
Central Node |
---|
FriendlyARM Mini210S with WIFI | $225.89 |
Moteino R4 with RFM69WH | $19.95 |
Total: $245.84 AUD |
Subsystem |
Moteino R4 with RFM69WH | $19.95 |
SHARP GP2Y0A41SK0F | $6.20 |
Dallas DS18B20 | $0.60 |
Heat Conducing Shell | $0.40 |
10K Resistor | $0.01 |
10 uF Capacitor | $0.01 |
2N2222 NPN Transistor | $0.03 |
Total: $27.20 AUD |
Specific software was designed which would run on both the central node and computer server. It was written in C/C++ utilizing Qt [
22] and Wt [
23] packages to ensure portability. The software on the central node collects and processes the sensor data whilst the software on the central computer node serves as a webpage server as shown in
Figure 3. The web page consists of two important sections. On the left, the operator can select one of many parameters to be monitored by the “smart bungs”. For example, temperature, ullage, pH
etc. To the right of this menu is a pane, which displays each individual barrel of wine and graphically or numerically displays what the current status of that parameter is. This setup allows users to access the sensor data using any remote web browser with early warning messages being sent out via emails to the winemakers if pre-set parameters are not being adhered to. For example, if the winemaker wished the wine to be stored in barrels at 15 °C for six months and the temperature deviated by more than 2 °C (pre-set in the software by the winemaker), then an alert would be sent wirelessly to warn of such an instance so remedial action could be taken. The ullage readings were not calibrated to physical units, however, it could be given that the ullage values are inversely proportional to the voltages read from the IR distance sensors. To calibrate the inversed voltage to physical units, one may use the relationship:
L =
a * 1/
V +
b, where
L is the distance, and
V is the voltage, to fit the voltages manually measured for different wine levels to obtain the calibration coefficients
a and
b, and input them into the software. The code on Moteino was developed using the Arduino toolkit. Moteino is fully compatible with the Arduino Uno platform.
Figure 3.
The temperature sensor page of the web interface shows eight virtual barrels.
Figure 3.
The temperature sensor page of the web interface shows eight virtual barrels.