1. Introduction
Wine, like many traditional fermented foods, is often produced through spontaneous fermentation, driven by naturally occurring yeasts found on grape skins and in the surrounding environment. The process is also strongly influenced by external factors such as temperature and humidity [
1,
2]. The winemaking process, from harvesting and pressing to fermentation, aging, and bottling, represents a complex interaction of biochemical reactions and human expertise [
3]. During fermentation, yeast converts sugars in the must into ethanol, carbon dioxide CO
2, and secondary metabolites that define the wine’s aroma and flavor. Monitoring changes in must density, which gradually decreases as sugars are consumed, provides valuable insight into fermentation dynamics [
4]. Among the parameters affecting fermentation, temperature and specific gravity are particularly important, because temperature affects yeast activity and fermentation kinetics, while specific gravity reflects sugar content and potential alcohol [
5]. To maintain quality and consistency, winemakers must continuously monitor these parameters throughout the production process. Low-cost, modular measurement systems provide an effective way to achieve accurate, real-time control. This approach makes advanced monitoring accessible to wineries of all sizes.
The modular wine monitoring system, Winnie, was developed as an affordable and reliable solution for tracking key winemaking parameters. By using sensors and a remote control system, it continuously monitors temperature and sulfur dioxide SO2, enabling early detection of changes. The system combines a cost-effective and modular design that allows easy customization and integration of various sensors. Data are transferred in real time to a remote server, and the software provides intuitive visualization and control. The system’s automated, sensor-based approach reduces the need for manual sampling and laboratory analysis, improving efficiency and lowering costs. Despite its benefits, the system has certain limitations. Sensor accuracy may be affected by environmental noise or insufficient calibration, and some parameters still require occasional manual validation.
Early research laid the theoretical foundation for understanding fermentation dynamics. Authors in [
6] gave an in-depth review of fermentation kinetics, describing sugar consumption and ethanol production during yeast metabolism. One of the earliest examples of laboratory automation is described in [
7], where the authors developed a flow-injection analysis platform capable of measuring pH, SO
2, and alcohol content. These studies represent the beginning of automated and semi-automated wine measurement systems.
The wine industry is increasingly embracing digital transformation to enhance monitoring and control of fermentation processes. Recent advancements demonstrate the importance of fast, automated, and non-invasive systems that provide real-time data while reducing manual labor. In [
8], authors reviewed Brix measurement technologies, illustrating the transition from traditional manual methods to optical biosensor-based monitoring systems, which supports more accurate and frequent analysis.
Despite these advancements, challenges such as system complexity, high initial costs, and integration difficulties, especially in small wineries, remain significant barriers. Studies in [
9,
10,
11] emphasize the importance of sensing technologies, automation, and artificial intelligence (AI) for maintaining wine quality and sustainability. Portable and small sensor instruments have made it possible to monitor wineries on site. Compact gas analyzers designed to detect fermentation-related volatile compounds were introduced in [
12,
13], while robust IoT (Internet of Things) sensor networks capable of operating in humid, variable conditions were presented in [
14,
15,
16].
Reliable communication is essential for winery environments. Industrial protocols such as Recommended Standard 485 (RS-485) ensure noise-resistant transmission across multiple sensor nodes, supporting long-distance and multi-parameter monitoring of temperature, humidity, and CO
2 [
15,
17]. This modular and scalable architecture allows seamless integration of new technologies into existing winery infrastructure without disrupting ongoing operations.
In parallel, spectroscopic techniques have gained attention for rapid and non-invasive wine composition analyses. Near-InfraRed (NIR), Mid-InfraRed (MIR), and Fourier-transform infrared (FTIR) spectroscopy provide detailed compositional data, while machine learning algorithms improve spoilage detection, product authentication, and origin classification [
18,
19]. Electrochemical sensor systems combined with AI algorithms have been used for wine authentication and adulteration detection [
20]. The monitoring of SO
2, a key preservative in winemaking, has evolved from traditional methods like the Ripper method to enhanced spectrophotometric approaches, such as the
P-rosaniline method [
21,
22]. Although spectroscopy and AI-driven systems deliver high analytical accuracy, their cost and complexity limit their adoption in small-scale wineries [
23].
Machine learning (ML) has become a central tool for improving wine quality assessment and fermentation control. Ref. [
24] applied ML models using chemical and physical parameters to predict wine quality with high accuracy, while [
25] reviewed AI applications across winemaking, emphasizing their role in intelligent decision-making. Predictive models like Support Vector Machine (SVM), XGBoost, and gradient boosting have been used to forecast wine quality, fermentation stage, and spoilage risk [
26,
27,
28,
29]. Ref. [
30] showed improved classification accuracy through ML analyses of chemical and sensory data, and [
31] highlighted AI applications in yield and disease prediction. Advanced Artificial Neural Network (ANN) predictive control models can estimate fermentation rates from temperature and gas production data [
32], while biosensor IoT platforms enable real-time sugar and ethanol monitoring [
33]. These data-driven approaches enhance process optimization by identifying irregularities and preventing fermentation failures [
34].
In addition to the digital transformation in the wine industry, this paper presents the Winnie system. The main contributions of this work are the design and implementation of a modular and remotely accessible system for monitoring key parameters during wine fermentation. The proposed system, focused on cost-effective embedded technology and centralized colorimetric analysis, facilitates real-time data collection from multiple barrels through a shared analysis unit. Integrating local sensing with distributed RS-485 communication and centralized sample processing enables scalable implementation and reduces operating costs. In contrast to current systems that are expensive or restricted to laboratory settings, the proposed system provides web-based scheduling, wireless data transmission, and automatic colorimetric analysis of free sulfur dioxide. These contributions aim to improve digital traceability and process control in traditional wine production for small and medium-sized wineries.
The rest of this paper is organized as follows. Related work is presented in
Section 2. The proposed measurement system is explained in
Section 3. The results and evaluation of the system are provided in
Section 4.
Section 5 provides a discussion along with suggestions for future work. Finally,
Section 6 concludes this paper with final remarks.
2. Related Work
The literature surrounding low-cost modular wine measurement systems has evolved significantly over the past decade, reflecting the industry’s growing need for efficient and innovative analytical techniques. In this review, we explore key contributions from various studies that highlight advancements in wine analysis and measurement technologies.
Table 1 presents an overview of selected wine monitoring systems from the literature, comparing them based on measured parameters, advantages (pros), and limitations (cons). The table includes representative works that illustrate the diversity of approaches in terms of sensor integration, system architecture, and application scope.
The “Year” column in
Table 1 refers to the year in which each referenced study was published, indicating the chronological development of wine monitoring technologies. The most commonly measured parameters include temperature, pH, and humidity, reflecting their important roles in fermentation monitoring. The system proposed in this work extends previous efforts by focusing on cost-effectiveness and accessibility while maintaining support for key parameters like temperature, CO
2, and SO
2 with real-time wireless data transmission. Compared to commercial systems or high-end research prototypes, the solution aims to bridge the gap between accuracy and scalability, making it more suitable for small wineries and on-site applications.
Many authors have tried to automate measurements during the wine production process to minimize the possibility of any error. There are different IoT sensor-based, real-time, and data-driven solutions for measuring crucial parameters during the production process. Most solutions are specific to fermentation, the main phase in the production chain. Furthermore, the implementation of automated systems requires a basic level of technical knowledge, which could present a barrier for small-scale wine producers without prior experience in embedded systems or data analysis. Ref. [
36] presents a fully automated amperometric biosensor system based on flow injection analysis for real-time monitoring of winemaking processes, measuring glucose, ethanol, lactic acid, and phenol concentrations without human intervention. The system has a central manager unit coordinating multiple local measurement units, each embedding enzyme-based screen-printed electrodes and microcontroller-driven signal conditioning for online sample analysis. Automated sample handling uses precision pumps and selector valves to control dilution and injection into the FIA circuit, ensuring consistent measurement repeatability and extended input ranges. Experimental trials on model solutions and actual fermentations demonstrated high agreement with standard laboratory methods, low uncertainty (0.4–2%), and reduced measurement time and operator involvement.
The development of IoT technologies has enabled the transition from standalone measurement platforms to distributed, network-connected systems for monitoring wineries while reducing the need for continuous on-site operator attendance. The research presented in [
55] provides an automated system for real-time monitoring of glucose and phenolic compound concentrations during both white and red wine fermentation. It integrates a potentiostat with screen-printed electrodes and sampling-conditioning modules controlled by dedicated software. Experimental results indicate that glucose levels drop more rapidly in response to temperature peaks associated with the fermentation process. The remote monitoring IoT capability reduces the need for continuous on-site operator attendance. Authors in [
50] used a network of temperature and humidity sensors in aging cellars to prove that long-term monitoring can help maintain wine quality. A modular sensor unit developed in [
52] was designed for integration with individual wine barrels, allowing the detailed and localized monitoring of environmental and process conditions during aging or fermentation. This method showed how easy it was to implement within the current cellar infrastructure. Additionally, the authors of [
53] concentrated their work on improving system scalability by developing networked sensor architectures that could be expanded across multiple tanks or locations without requiring significant hardware or communication protocol changes. Study [
47] presents a wireless sensor system for continuous monitoring of environmental conditions in wineries, focusing on temperature, humidity, CO
2, volatile organic compounds, and airborne particles. The system enables real-time data access through web-based graphical displays, supporting facility managers in making informed decisions about ventilation, safety, and operational efficiency. It has been deployed across five facilities, demonstrating how fermentation processes significantly impact indoor air quality, particularly through CO
2 emissions, and how buildings manage these changes. The design emphasizes low energy consumption, ease of installation, and robust wireless communication, offering a practical solution for optimizing the design and operation of fermented food production environments. On the other hand, paper [
37] introduces a novel wireless sensor node architecture mounted on the bung of oak barrels to monitor fermentation conditions: temperature, CO
2, pH, and volatile acidity. By integrating sensors into the bung instead of the barrel body, the system offers low-power, push-button-activated measurements and reliable wireless communication, even in cave-like environments. Periodic and on-demand sensing modes enable seamless data collection and automatic transmission to an external server, facilitating efficient, portable monitoring during wine aging. Research [
42] presents a low-cost (27 AUD) IoT wireless sensor network embedded in the barrel bung for simultaneous monitoring of wine temperature and ullage during fermentation and maturation stages. The system uses a low-power FM radio to transmit temperature readings and ullage measurements via an infrared distance sensor. Temperature tracking across multiple barrels eliminates the need for manual measurements and reduces contamination risks by keeping barrels closed. Ullage monitoring provided early warnings for topping and allowed winemakers to maintain optimal storage conditions, with software alerts triggered when parameters deviated from predefined thresholds. The study in [
40] introduces WineDuino, an open-source, affordable IoT system intended for the real-time surveillance of winemaking processes, particularly during the aging of wine in barrels. Nodes integrated into silicone barrel bungs measure enological parameters, including temperature and pH, supporting the decision-making process during wine production.
Automated titration systems using embedded microcontrollers and optical sensors perform free SO
2 iodometric titrations with real-time RGB detection, enabling small and medium wineries to monitor SO
2 levels on site [
69]. Authors in [
69] used the TCS34725 RGB color sensor to detect a color change in a wine sample after adding a certain amount of reagents to enable SO
2 measurement. On the other hand, the modified Ripper method with potentiometric detection is used in [
57] to overcome endpoint visualization in colored wines by measuring electrical potential, yielding a detection limit of
mg/L without significant bias versus automatic titrators. Authors in [
67] utilized a fast photometric method based on the reaction of SO
2 with a certain reagent. They achieved quantification limits of 2 mg/L and linearity
on a sequential analyzer. This approach delivers precision comparable to official methods [
67]. Emerging IoT-enabled systems integrate these sensors for cloud-based quality control and traceability. Overall, advanced titrimetric, photometric, potentiometric, and spectroscopic tools have modernized SO
2 measurement in wine and must, improving speed, cost-effectiveness, and analytical robustness [
57,
67,
69].
Study [
65] presents a reconfigurable integrated electronic tongue combining a miniaturized sensor array with ML models for rapid analysis of fruit juices and wines. It demonstrates high classification accuracy in identifying different juices and bottled Italian wines based on their chemical and sensory profiles. The system’s portability and cloud-enabled data processing make it a promising tool for product authentication, quality control, and sensory evaluation in beverage analysis. On the other hand, authors in [
56] introduced a portable electronic nose system using six metal-oxide sensors and a Deep MLP (Multilayer Perceptron) classifier, a form of Deep Neural Network (DNN), to detect wine spoilage by acetic acid in just 2.7 s with 97.7% accuracy, vastly outperforming traditional methods. The compact, real-time system enables fast, user-friendly quality monitoring in commercial wineries without complex preprocessing or specialist staff.
Vibrational spectroscopy techniques such as near-infrared (NIR), mid-infrared (MIR), and Raman spectroscopy have been widely applied in the wine industry for rapid and non-destructive analysis. These methods enable monitoring of grape growth, fermentation, and final wine quality with high accuracy. They offer promising alternatives to traditional analytical techniques, improving efficiency and sustainability in wine production [
48]. In [
64], NIR spectroscopy is used to determine problems with wines. Authors presented a low-cost electronic nose combined with ML models to identify twelve common wine faults in red and white wines. The models achieved high classification accuracy (92–97%), demonstrating the ability for rapid, predictive, and objective wine quality assessment during production. Authors in [
39] developed a fiber optic probe that was used as part of the auto-calibration Fourier transform Raman spectroscopy system for real-time monitoring of key components, including sugar, ethanol, and glycerol, during wine fermentation. The probe was sealed with NIR-transparent glass and dipped into the wine fermentation vessel to directly collect Raman spectra for analysis. The system uses a dual optical path to correct for variations in temperature and laser performance, enabling precise, in situ chemical analysis. Their chemometric models showed excellent correlation with HPLC (High-Performance Liquid Chromatography) reference measurements, proving the method’s effectiveness for continuous fermentation monitoring [
39]. Authors in [
35] used infrared transmission spectroscopy to perform multi-parameter analysis of wine components: sugar, alcohol, and acids, enabling non-contact and rapid measurements. An approach suggested by [
59,
61] employed a pressure sensor array strategically placed at various depths within fermentation tanks to track density variations, thus estimating sugar consumption and alcohol production. This system had ML models that could guess what stage of fermentation was going on. In [
51], an IoT fermentation control system for temperature and sugar level monitoring was introduced. However, it lacked integration with chemical analysis methods, limiting its ability to provide a full picture of the fermentation process. Furthermore, authors of [
63] developed an in-line Brix monitoring solution based on differential pressure sensing, specifically designed for continuous application in small-scale wineries.
Recent advances in optoelectronic sensor technology have demonstrated the significant potential of LED-based systems as cost-effective alternatives to expensive analytical instrumentation in wine production monitoring. The integration of low-cost LED-based sensing platforms has yielded versatile, high-performance tools for multiple stages of wine production monitoring [
38,
41,
43,
44,
46,
67]. Research in [
38] details a refractive index sensor employing a 655 nm laser diode and position-sensitive detector with a sensitivity of
RIU at a cost one to two orders of magnitude lower than standard refractometers. Authors in [
43] demonstrate that visible-wavelength LEDs (420, 520, 620 nm) can replicate spectrophotometric color analysis with absorbance resolutions of 1.0–2.4
AU, while [
44,
46] introduce NIR LED systems (1.20, 1.30, 1.72
m) for real-time ethanol monitoring with
v/
v and capital costs reduced by 95%. Reference [
41] expands capability through a multi-wavelength UV/visible LED sensor for in-line color and total phenolics measurement (
). Article [
67] validates an automated LED-photometric assay for SO
2 determination, underscoring the broad applicability of affordable LED photonics in oenological analysis.
Several low-cost methods for Brix monitoring are presented in the literature. The use of an analog refractometer together with a digital image acquisition system is presented in [
60] for decentralized and remote information gathering. On the other hand, research [
62] utilized image processing methods to determine the amount of present sugar and ethanol. The approach in [
62] utilizes an ESP-32 CAM module and a 3D-printed mount to enable camera focus and a controlled lighting environment. Another cost-effective and innovative solution is buoyancy-based liquid density estimation, where a submerged object is connected to a load cell [
66]. Fluctuations in buoyancy force indicate changes in sugar concentration, enabling non-invasive and continuous Brix monitoring. Even though these systems are innovative, they frequently have limitations, including the requirement for human interaction, limited coverage of parameters, and a lack of integration with chemical or optical analysis, or limited ability to adapt to small-scale, completely automated environments.
Despite improvements in low-cost devices and digitalization approaches, challenges remain in overcoming measurement precision, hardware robustness, and affordability. Many systems continue to experience high costs, restricted modularity, or a lack of validation across different production areas, limiting their wider implementation. In addition, several commercial systems have been introduced, including modular fermentation analyzers [
49] and Hanna Instruments’ wine testing equipment [
54]. These solutions offer high precision and reliability, with features like automatic temperature compensation and direct measurement of alcohol, sugar, pH, and total acidity. The system presented in [
49] supports structured data export using REST APIs and interfaces with laboratory information systems through platforms like AP Connect or DAVIS 5. Such functionality makes it easy to share data in formats like JSON [
54] allows data transfer through USB or RS232 using PC-compatible software for data visualization and archiving. However, despite their robustness and laboratory-grade accuracy, such systems often come with high costs, require trained personnel, and are typically optimized for lab-based workflows, limiting their suitability for in situ or small-scale winery integration.
3. Wine Measurement System Development
The development of wine measurement systems has advanced rapidly to meet the growing demand for precise, real-time monitoring of essential parameters during the winemaking process. These cost-effective technologies enable winemakers to optimize production, ensuring consistent quality and efficiency throughout fermentation and beyond. Traditional methods, including hydrometers and handheld refractometers, while still widely used, rely on manual sampling and subjective interpretation, which can introduce human error and reduce measurement frequency and consistency. To overcome these limitations, modern solutions increasingly incorporate embedded systems, IoT technologies, and smart sensors enabling real-time monitoring. Within this context, the goal of our research and development process was to design and construct an integrated, low-cost measurement device capable of simultaneously monitoring multiple essential parameters in wine production. Specifically, the system focuses on measuring ambient temperature, air CO2 concentration, wine SO2 content, temperature, and color. To achieve this, we systematically developed and tested several modular components, each tailored to a specific measurement task, and gradually integrated them into a unified, multifunctional device optimized for use in winery environments. The system architecture consists of two key physical units: the Barrel Device and the Hub Device. The Barrel Device is installed directly at each wine barrel and is responsible for temperature measurements, gas concentration measurements, and wine sample handling. It integrates a peristaltic pump, a servo-operated valve, and associated sensors. The Hub Device works as a central processing and communication unit. It performs colorimetric analysis of SO2, executes user commands through a web interface, and transmits data to a remote server. This modular, distributed architecture enables accurate measurements, stable operation, and effective scalability for use over numerous barrels.
3.1. Winnie Development Board
The internal hardware architecture of the measurement system is shown in
Figure 1. The system is centered around an ESP32 microcontroller [
70], which manages sensing, actuation, and communication tasks. The main control board integrates memory modules (EEPROM [
71] and PSRAM [
72]), a real-time clock (DS3231 [
73]), and multiple digital interfaces, including UART, I
2C, and RS-485 via RJ45. Peripheral expansion is enabled through a dedicated expansion port, connecting to external modules, motor drivers (DRV8837 [
74] for DC motors and A4988 [
75] for stepper motors), as well as input devices like buttons and Hall-effect sensors. Environmental sensing is handled by components including the BME680 [
76] (for temperature, humidity, and pressure) and the DS18B20 [
77] digital temperature sensor, while wine color analysis is conducted using the TCS34725 [
78] RGB sensor. Actuation components, including a peristaltic pump and servo-operated three-way valve, are driven by their corresponding motor controllers (DRV8837 and MG996R [
79]). This modular structure enables flexible integration of sensing and actuation units while ensuring compatibility with the system’s RS-485-based communication protocol and low-power operation requirements.
The custom-designed hardware architecture of the wine measurement system is implemented through two dedicated printed circuit boards (PCBs): the Main Board and the Expansion Board, as shown in
Figure 2. The Main Board, cf.
Figure 2a,b, integrates core processing and communication components including the ESP32 microcontroller, EEPROM and PSRAM memory, microSD slot, RS-485 transceiver, and UART and I2C (Inter-Integrated Circuit) expansion interfaces. It is the central processing unit that runs measurement algorithms, manages communication between clients and servers, communicates with peripheral modules, and handles system scheduling. The Expansion Board, cf.
Figure 2c,d, extends the system’s functionality by providing dedicated motor driver circuits (for stepper and DC motors), servo connectors, and additional sensor inputs. This modular separation improves reliability and allows for scalable hardware configurations tailored to specific measurement tasks, including fluid control and fluid routing and valve control in SO
2 analysis.
The ESP32 microcontroller uses over ten I/O channels to control sensors and actuators distributed across the Main and Expansion Boards. Communication with the server is achieved via Wi-Fi, while reliable communication between other devices is ensured using RS-485. Environmental and temperature sensors communicate via I2C, while the DS18B20 temperature sensor uses the 1-Wire interface (GPIO14). Motor drivers and actuators are controlled through digital and Pulse Width Modulation (PWM) pins. The modular board architecture simplifies integration of components like temperature, gas, and color sensors, as well as pumps and valves, enabling efficient adaptation to various measurement tasks, including SO2 analysis.
3.2. DC Motor Peristaltic Pump
A peristaltic pump, ref. [
80] powered by a DC motor, was used to move wine samples from the barrel to the analysis unit. Since the fluid only comes into contact with the inside surface of the tubing, this type of pump is suitable for handling liquids in applications involving food, as it prevents contamination and ensures cleanliness. The ESP32 microcontroller is connected to a DRV8837 motor driver, which controls the pump. Digital signals control activation and speed, providing reliable and consistent sample delivery. The peristaltic pump’s size and operation principle make it simple to install and incorporate into the modular system. During each measurement cycle, it consistently moves the necessary amount of wine through the tubing without needing calibration or maintenance.
3.3. Servo Motor Three-Way Valve
A servo-operated (MG996R) three-way valve [
81] was used to control fluid flow in the system. The valve provides three flow paths: wine sampling, water rinsing between measurements, and a closed position. The servo is driven by PWM signals generated by the ESP32 microcontroller. A custom 3D-printed holder, shown in
Figure 3, secures the servo and valve, ensuring stable integration into the tubing network and reliable operation during measurement, cleaning, and idle cycles.
The valve has three defined positions, each corresponding to a specific output fluid. PWM signals from the ESP32 control the servo rotation angle, which in turn determines the valve position. This arrangement provides precise and repeatable control over fluid routing.
Table 2 lists the valve positions, servo angles, and their functions, ensuring correct sampling, tube rinsing, and waste handling during the measurement process.
3.4. Wine Monitoring System
The overall operation and interaction between the Barrel Device and the Hub Device are schematically illustrated in
Figure 4. The left portion of the diagram shows the structure and workflow of the Barrel Device. A peristaltic pump (located at the bottom right) draws wine samples from the barrel, while a servo-controlled three-way valve (center right) directs the fluid toward the measurement area. During this process, integrated sensors collect real-time data for analysis. All components are coordinated by an ESP32 microcontroller that executes measurement logic and communicates with the central Hub. The right side of
Figure 4 outlines the Hub Device’s role in coordinating measurement events. Based on the user request received from the server, the Hub forwards commands over the RS-485 bus to the appropriate Barrel Device. After the Barrel Device completes its task of delivering a wine sample and performing local measurements of wine and the environment’s temperature and CO
2 level, the Hub device performs a colorimetric analysis using an RGB color sensor. Once the analysis is completed, the results are transmitted via Wi-Fi to a remote server for visualization and logging. To ensure data reliability, the Hub also stores measurement results locally in case of network interruptions, enabling delayed synchronization when the connection is re-established. This structure supports remote supervision, synchronized multi-device operation, and minimal user intervention.
To ensure that critical measurement data are reliably collected and stored, the wine monitoring system transmits all sensor readings directly to a remote server right after acquisition. The transmission procedure starts after the end of a predefined measurement cycle. At this stage, the device gathers the sensor data into a structured format and prepares an HTTPS (HyperText Transfer Protocol (Secure)) POST request to a specific endpoint. This method allows for continuous monitoring, even when there is limited physical access to the measurement device. Given hardware constraints and the need to maintain responsiveness, HTTPS communication was not implemented. To eliminate the risk related to unencrypted communications, a security layer is implemented at the application level. Each outgoing packet includes an MD5 (Message-Digest Algorithm 5) hash of the data generated using a secure hashing algorithm. This hash acts as a digital fingerprint, enabling the server to authenticate and ensure the integrity of the received data. Upon reception, the server recalculates the hash and compares it to the given version. If the two match, the data are considered valid and stored in the database. If not, the transmission is flagged as invalid and discarded. This verification mechanism ensures that only valid data are processed. It protects against spoofing, data injection, or accidental corruption during transmission. The communication logic has fail-safes for connectivity problems. If the server does not respond or rejects the data, the device retains the measurement in local memory and attempts retransmission in the next measurement cycle. This method, illustrated in
Figure 5, helps prevent data loss during temporary interruptions or unstable network conditions. The system establishes a strong, secure, and resilient communication pipeline through the integration of real-time transmission, data hashing, and server-side validation. These features are essential for long-term wine monitoring applications, where data integrity and availability are as important as measurement accuracy.
An overview of the monitored parameters, their corresponding devices, and the specific sensing methods implemented within the system is provided in
Table 3. This classification highlights the modular distribution of sensing responsibilities between the Barrel Device and the Hub Device, with temperature and gas measurements performed locally at each barrel and colorimetric analysis, including SO
2 determination, centralized within the Hub.
The modular design allows each Barrel Device to operate autonomously and to be added or removed as needed without hardware modification. Each Barrel Device handles specific sensing tasks (e.g., temperature, gas concentration) and communicates via RS-485 with a central Hub, which coordinates colorimetric measurements and data transmission. This architecture enables scalable deployment depending on the number of barrels and production size. A simplified overview of the modular system layout is shown in
Figure 6.
The complete measurement system, showing internal electronic connections and final device housing, is presented in
Figure 7. The left image illustrates the assembly of individual Barrel Devices with control boards, peristaltic pumps, servo valves, and sensor modules during the prototyping phase. The right side shows the final integration of the prototype devices into custom enclosures.
The final deployment of the system in a real winery environment is shown in
Figure 8. For testing, smaller wine barrels were used, each filled with real wine to mimic real production conditions. Two Barrel Devices are connected to these barrels, extracting samples through food-grade tubing and autonomously performing measurements of temperature and gas concentration. The Barrel Devices operate under the supervision of the central Hub Device, which coordinates tasks, performs SO
2 and color measurements, and communicates measurement data to a remote server via Wi-Fi. This setup validates the system’s functionality, robustness, and practical applicability in realistic winery scenarios. The devices communicate through an RS-485 network, ensuring reliable data transmission between Barrel and Hub Devices even under high humidity conditions typical for wine cellars. Environmental and wine temperature parameters are measured using I2C and 1-Wire interfaces, while actuators are driven via digital and PWM signals. The Hub coordinates data processing and communication with the remote server via Wi-Fi.
Table 4 summarizes the sensors, actuators, and communication interfaces implemented in the system.
3.5. ESIA Web User Interface
The wine monitoring system includes a web-based interface, called ESIA (Expert System for Intelligent Agriculture), which enables winemakers to access, review, and manage data remotely. All sensor measurements are transmitted to a remote server after each measurement cycle. The server aggregates the data and presents them through a clear and structured web interface. Users can view historical trends, monitor real-time measurements, and track production stages, including harvest, fermentation, maturation, and bottling.
Figure 9 shows an example of the web interface used for managing wine production steps. Each step is organized by stage and timestamped with detailed metadata such as vessel ID, quantity, and type of intervention. The intuitive layout allows winemakers to oversee the entire process remotely and make informed decisions. To ensure secure communication between measurement devices and the server, the system implements data validation at the application layer. Each data packet includes an MD5 hash used to verify authenticity and ensure data integrity. In case of network loss, the device buffers data and retransmits them in the next cycle. This ensures continuous data logging even in unstable network environments.
4. Experimental Testing
To validate the performance of the proposed modular wine measurement system, a series of controlled experiments were conducted. The main goal was to test the accuracy of the sensors, the speed of the system’s response, and the reliability of communication and data collection in real-world situations. Based on system testing, temperature and CO2 sensors exhibited response times of approximately 2–3 s. The entire titration process for automated SO2 analysis, which included dosing the reagents, mixing them, and detecting the color, took less than 2 min per sample. The experiments were carried out using both synthetic model solutions and in a winery environment using actual wine musts at different fermentation stages.
Initial tests focused on the fluid flow system used for SO
2 sampling. The relationship between pump voltage and flow rate was established by measuring the time required to displace 500 mL and 1000 mL of water at various input voltages.
Table 5 shows that the flow rate increased proportionally with voltage, reaching a maximum of 2.72 mL/s at 24 V. These results provided the necessary calibration for determining the sampling volume and timing when operating the colorimetric SO
2 module.
Further tests evaluated flow control via PWM modulation.
Table 6 presents measured flow rates at duty cycles ranging from 50% to 100% using a constant supply voltage of 12 V. The data confirmed that PWM regulation provides fine-grained control of the flow, ensuring repeatable and precise dosing, an essential requirement for colorimetric SO
2 detection.
To further assess flow consistency and control precision, a basic statistical analysis of the results was performed. The analysis confirmed a strong linear relationship between the pump flow rate and both the supply voltage and the PWM duty cycle. In voltage-controlled operation, the correlation coefficients exceeded r = 0.999, while for PWM control they were above r = 0.97, indicating stable and predictable flow behavior. Moreover, the close agreement between the 500 mL and 1000 mL measurements () demonstrates high repeatability and reliability of the peristaltic pump, confirming its suitability for precise and automated reagent dosing in the SO2 analysis module.
To complement the optical measurements and provide quantitative validation of fermentation dynamics, the concentration of free sulfur dioxide (SO
2) was measured using an automated colorimetric titration system. The system uses a TCS34725 RGB color sensor [
78] to detect changes in solution color and a commercial iodine-based SO
2 reagent designed for oenological analysis, where 1 mL of reagent corresponds to 10 mg/L of free SO
2. In each measurement cycle, a 3.5 mL wine sample is automatically drawn from the barrel to the measurement point, where the SO
2 reagent is incrementally added by an automated dosing unit in steps of 125
L per cycle. After each addition, the system waits a predefined delay period and then performs a color measurement using the TCS34725 sensor. The titration continues until the change in RGB values goes over a set limit, which marks the end of the reaction. Based on the number of additions required to reach the endpoint, the system calculates the corresponding SO
2 concentration. The entire procedure is implemented via a control algorithm optimized for embedded platforms, allowing precise, repeatable, and operator-independent measurements.
Figure 10 provides a visual representation of the automated titration algorithm.
To evaluate the short-term environmental conditions relevant to wine fermentation and storage, temperature and CO
2 concentration were continuously monitored over a one-hour period, with measurements taken approximately every 3 min.
Figure 11 shows the recorded values.
Figure 11a displays the temperature trend, starting at around 24.3 °C and gradually decreasing to approximately 23.5 °C, with slight variations near the end of the interval. Overall the temperature remained relatively stable throughout the measurement period.
Figure 11b shows the CO
2 concentration fluctuating between 724 ppm and 1286 ppm, with a noticeable spike around 13:30, likely indicating reduced air exchange. Descriptive statistics for the measured data, provided in
Table 7 confirm these observations. The temperature ranged from 23.54 °C to 24.32 °C, with a mean value of 23.71 °C and a standard deviation of 0.2 °C, indicating very low variability. The CO
2 concentration ranged from 724 ppm to 1286 ppm, with an average of 827.12 ppm and a standard deviation of 117.21 ppm. These results indicate stable thermal conditions and moderate CO
2 fluctuations within safe operating ranges, confirming suitable environmental control for fermentation monitoring.
The device’s RS-485 communication network was also tested for stability and resilience. Multiple sensor nodes were deployed over distances exceeding 20 m under high humidity conditions typical of winery cellars. Data transmission remained fully reliable, with no packet loss observed during a continuous 72 h monitoring session. All collected data were first stored locally in the memory of the Hub device and subsequently transmitted to the remote server for further processing and storage.
To enable automated endpoint detection during titration, a TCS34725 RGB color sensor was used to monitor the visual color change that occurs when the SO
2 reagent is added to wine samples. The sensor operates under fixed lighting conditions and measures light intensity in the red, green, blue, and clear (RGBC) channels. The output includes both directly transmitted and scattered light, which may vary depending on the turbidity and color of the solution. Because wine is an optically complex medium, particularly red wine with high pigment content, scattering and absorption can significantly affect the measured RGB values. To reduce these optical artifacts and isolate changes caused specifically by reagent-induced reactions, the raw RGB signals were normalized against the clear channel (C), allowing the system to focus on reagent-induced color changes.
Figure 12 illustrates the evolution of raw and normalized RGBC readings and standard deviation for both white and red wine samples. In white wine, the signals remained stable with low variability and a clear inflection point at the titration endpoint. In red wine, higher variability was observed due to pigment absorption, but normalization effectively compensated for these effects, enabling reliable endpoint detection. The horizontal axis in all subfigures is labeled as “Sample index,” representing the sequential number of color measurements captured during the titration process. Each index corresponds to one sensor reading.
The experimental results confirmed that the system provides stable and accurate readings across all monitored parameters. The integration of flow control, gas sensing, and digital communication proved effective, supporting the system’s suitability for continuous, modular wine monitoring in practical oenology applications.
Compared with commercial systems such as Hanna Instruments’ HI901W titrator [
54] and Anton Paar’s Lyza 5000 Wine analyzer [
49], the developed system provides significantly lower costs while maintaining the ability to monitor key wine parameters. Thanks to its low-cost design, the system offers an affordable alternative to traditional laboratory equipment, making it particularly suitable for small and medium-sized wineries. The cost structure of the core components, presented in
Table 8, demonstrates that the entire system can be assembled for under 170 EUR using accessible parts. Although it may not achieve the analytical precision of spectroscopy-based instruments, its modularity, real-time data transmission, and remote access capabilities offer significant advantages in flexibility and ease of use.
Table 9 presents a comparison of the costs between selected commercial wine analysis devices and the proposed low-cost system, highlighting its affordability and potential for wider adoption in smaller winery operations.
5. Discussion and Future Work
In this work, a low-cost, modular system named Winnie was designed, implemented, and tested for monitoring key parameters of wine fermentation and aging in a winery environment. The system supports real-time data acquisition and remote access through a web interface and includes dedicated subsystems for measuring wine temperature, ambient temperature, CO2 concentration, SO2 content, and wine color. By combining custom-designed hardware with commercially available components, the system achieves a cost-effective and flexible solution.
One of Winnie’s most significant advantages is its affordability. Compared with high-end laboratory instrumentation, the overall cost is substantially reduced through the use of accessible components, including ESP32 microcontrollers, peristaltic pumps, RGB sensors, and standard gas sensors. Another major strength of the system lies in its modular architecture. Each Barrel Device operates independently and communicates with the central Hub over an RS-485 bus, enabling straightforward scalability. New devices can be added by assigning unique addresses, without requiring extensive hardware or software reconfiguration. The combination of modularity and affordability makes the system particularly attractive for small and medium-sized wineries seeking digitalization without major investments.
Data management represented another key focus during system development. As soon as the measurements are taken, they are sent to a remote server, where they are stored for later viewing and analysis. To overcome the limitations of embedded systems lacking HTTPS support, a lightweight hashing mechanism was implemented to ensure data integrity. This ensures secure communication and reliable data logging, even in the event of connectivity issues or local hardware failures.
The system was successfully validated under realistic winery conditions, including real wine fermentation experiments. The SO2 measurement module showed that a colorimetric method combined with RGB sensing can be used to find the endpoint during iodine-based titration. Although less precise than laboratory methods, this technique provides real-time feedback suitable for process control in small-scale production environments.
As the system continuously collects a wide range of time-series data from different stages of fermentation and aging, it opens possibilities for applying data-driven models, such as deep neural networks, to assist in quality prediction, anomaly detection, or process optimization. However, a major limitation in this domain is the long timescale of wine production, which limits the availability of large, well-labeled datasets. Furthermore, the limited number of failed or undesirable cases reduces the system’s exposure to negative training examples, which are essential for robust model generalization. Future research may address this issue through domain adaptation, synthetic data generation, or transfer learning techniques suited for low-data settings.
Despite its advantages, the system has several limitations that need to be addressed to ensure reliable long-term operation in actual winery conditions. Sensor accuracy and long-term stability can be affected by environmental conditions, gradual sensor degradation, and mechanical wear of pumps and valves. Moreover, although the system enables continuous data collection, it currently lacks intelligent features for automated decision-making or anomaly detection.
Future development efforts will focus on expanding the system’s analytical capabilities. One area of particular interest is the development of non-invasive or low-cost methods for measuring sugar and alcohol concentration during fermentation. Several concepts have been reported in the literature, including image-based refractometry [
62] and buoyancy-based sugar concentration estimation using load cells [
66]. These approaches could potentially be adapted for integration with the existing modular architecture, providing additional insight into fermentation kinetics without increasing system complexity or cost. In addition, the integration of embedded ML models will be explored to support anomaly detection, fermentation progress estimation, and automated operator alerts. These upgrades aim to make the system more intelligent and autonomous, reducing the need for constant supervision while maintaining flexibility and low cost. Real deployment introduces challenges such as total system cost, data reliability, and mechanical maintenance. Each module is inexpensive individually, but scaling to dozens of barrels raises investment and maintenance requirements.
6. Conclusions
The presented modular wine monitoring system, Winnie, provides a practical, scalable, and affordable solution designed to meet the needs of small and medium-sized wineries. By combining low-cost sensors, open-source microcontrollers, and custom software, the system bridges traditional manual methods with advanced laboratory instrumentation. Its modular architecture allows easy customization based on specific monitoring requirements, covering both cellar and wine parameters such as temperature, CO2, SO2, and color, thereby supporting various stages of the wine production process.
Compared with existing systems, Winnie reduces operational expenses and manual labor through automation while maintaining sufficient measurement accuracy for process optimization. Through real-time monitoring, data validation, and remote access via a web interface, winemakers can make timely, informed decisions, ensuring early detection of process deviations and reducing the risk of spoilage or quality loss. The system’s reliability was validated through long-term field testing in cellar environments, confirming stable sensor performance and robust communication under conditions of high humidity and temperature fluctuations.
The system also supports the automation of more complex measurements that typically require laboratory procedures, such as colorimetric titration for SO2 analysis. By integrating a color sensor, automated iodine-based SO2 reagent dosing, and embedded control logic, the system enables repeatable measurements with minimal human intervention. This enhances overall process efficiency and extends monitoring functionality to small-scale production environments. The main limitations include lower precision compared with laboratory-grade instruments and the need for regular maintenance of pumps, valves, and reagents.
In addition to providing real-time measurements, the system lays the foundation for data-centric approaches to winemaking. The continuous acquisition of environmental and chemical parameters generates a valuable dataset that can be leveraged to train neural networks for predictive modeling of fermentation kinetics and wine quality. Nonetheless, due to the inherently slow progression of wine production and the lack of labeled failure cases, the available data are often insufficient for training supervised learning models at scale. Future work will focus on integrating low-cost methods for sugar and alcohol monitoring and applying ML models for predictive fermentation control, despite the challenge of limited labeled data.