1. Introduction
The table olive sector represents a key sector of the Italian agri-food industry, considering that for 2021 it was estimated that consumption per inhabitant would be about 2.1 kg, which was fulfilled thanks to an average annual import of 70–100 thousand tons, mainly from Spain and Greece, while exports rarely exceed 30,000 t [
1]. In Italy, where the average production is about 62,000 t (estimate for the 2022/23 crop year [
1]), or 2% of world table olive production, the sector is currently dominated by small producers and shows interesting growth potential, although it needs development strategies, innovation, and investment. The production of quality table olives that are intact and free of defects in appearance, flavors, and aromas and meet consumer expectations requires the adoption of special measures aimed at limiting the side effects associated with fermentation processes that take place during the processing and storage phases [
2]. Olives are not edible at the time of harvest due to the high content of oleuropein, a glycosidic secoiridoid that gives them a bitter taste; therefore, they must be submitted to a particular type of treatment (i.e., debittering in brine) according to different processing methods aimed at debittering and stabilizing the final product. During the various stages of the debittering process, the drupes may undergo spontaneous fermentation, which is not always desired and is caused mainly by lactic acid bacteria and yeasts [
3,
4]. The main factors that can trigger fermentation processes are changes in the ratio of olives to brine, changes in environmental conditions (e.g., temperature changes and aerobic conditions), and alteration of brine chemical and physical parameters (i.e., pH, acidity, concentration of dissolved salts, and oxygen). Abnormal fermentations, such as putrid, butyric, or propionic-butyric fermentation (commonly called “Zapateria”) [
5], due to altered pH, acidity, and salt concentration values, can result in the formation of molds and blastomycetic films on the surface of brines or the wrinkling, softening, or creation of gas pockets in the olive pulp, thus altering the “flavor” of the final product and significantly decreasing its commercial and nutritional value [
6]. Generally, poor industrial practices are the most common causes of these anomalies that promote the uncontrolled development of undesired fermentation processes [
7]. Therefore, it is necessary to constantly monitor the condition of the brines during the olive processing and storage stages so that the final product is free of abnormal flavors, olfactory defects, or other symptoms of ongoing alterations, thus complying with current trade regulations [
8].
The main chemical and physical parameters monitored in brines (i.e., temperature, pH, free and volatile acidity, residual soda, and salt concentration) during the table olive preservation process are generally estimated by applying quite complex analytical methods that often require well-equipped laboratories and specialized personnel. In recent years, with the enhancement of increasingly reliable sensors, it has been possible to develop electronic devices and systems used, for example, to monitor changes in temperature, pH, and salinity, mainly in aqueous solutions [
9,
10]. To date, however, there are no commercially available automated systems for monitoring the previously mentioned parameters in brine or other important process indicators such as, for example, free acidity, volatile acidity, and residual sodium hydroxide. The main factors that have hindered the development of automated systems for monitoring key brine parameters in the treatment of table olives are the high concentration of dissolved salts and the density/viscosity of the matrix.
Researchers at CREA have designed and implemented a system equipped with digital and sensorized devices for step-by-step batch monitoring of table olive brine, useful for controlling production stages and minimizing variables that induce unwanted changes during storage. The main fermentation parameters (i.e., temperature, pH, salinity, free acidity, volatile acidity, and residual sodium hydroxide) of different types of brine (compliant and altered) were analyzed both using the sensorized prototype in an automated manner and the reference methods according to Official protocols [
11], with the aim of testing the operation of the prototype device and verifying the reliability and repeatability of the measurements.
The realized device, which involved the multidisciplinary synergy between the chemical, microbiological, sensory, and mechatronic-production sectors, will be able to verify the effects of this innovation on the final product in terms of quality, wholesomeness, and, above all, economic and environmental sustainability. In fact, continuous and automated monitoring of brines results in a reduced need for specialized personnel, savings of laboratory materials (e.g., chemical reagents) conventionally used for periodic control of process parameters in storage containers, and, at the same time, allows for the avoidance of the deterioration of the final product, conferring the possibility of timely intervention with small corrections of the chemical–physical parameters of brines, according to legislative standards [
8].
2. Materials and Methods
2.1. Prototypal Device Overview
The designed analysis system consists of a main case (600 × 400 × 250 mm) housing a pH meter, a conductivity meter, and a volatile organic gas sensor that measure the main chemical–physical parameters of the brine. This is drawn by peristaltic pumps and sent into 3 beakers, where the various measurements take place. The device consists of a second case (300 × 230 × 90 mm) housing a Personal Computer (with Celeron CPU, 4 GB RAM, 10 GB hard disk, and touch screen monitor) equipped with software written in Visual Basic and developed internally for the control and management of operation and for data acquisition and storage (
Figure 1).
The main case accommodates all the mechatronic components required for the movement of the analysis module: the microcontrollers, sensors, pumps with their tubes, and containers with the chemical reagents used for potentiometric titrations (0.1 N sodium hydroxide and 0.2 N hydrochloric acid) and the maintenance liquids for the pH-meter probe (3 N potassium chloride solution) and the conductivity meter (Standard Buffer Solution 12.88 mS/cm) (
Figure 2).
The power supply for the mechatronic components, PC, and monitor is 12 V cc, while that for the digital microcontrollers is 5 V cc. The general power supply for the device is by means of a 240 V ac switching power source. The three peristaltic pumps (related to brine, NaOH, and HCl) have 42 Stepper Motor tubes, allowing 0–160 mL/min flow rate.
The brine to be analyzed and the distilled water used for washing the pumps and beakers are taken from external containers by bidirectional peristaltic pumps. The case has a large radiator on the back for thermal control; the unit is able to maintain the temperature of the analysis cell at a desired value, set in the 15–30 °C range, heating or cooling as needed. There is also an additional heating system for the third beaker, capable of bringing its temperature up to and above 50 °C in order to carry out the analysis of volatile organic compounds.
External to the main case is a DS18B20 sensor that constantly measures the temperature of the external environment.
The analysis module consists of three 50 mL beakers fixed above a thermostat plate using two Peltier cells. The beakers are attached to a self-propelled motorized basket that moves along 2 vertical rails with a range of 150 mm. A second motor allows the basket to rotate 165° so that it can empty the liquid contents into a collection tray placed underneath the block. The beakers are filled using two-way bidirectional peristaltic pumps, and the established filling level required for the measurements is controlled via electronic level sensors.
The first beaker houses the pH meter (pH Circuit V4.0, Atlas Scientific, Long Island City, NY, USA) and is used for potentiometric titrations to determine free and combined acidity in solution. It is powered by peristaltic pumps with a resolution of µL or less in order to take the stoichiometric amount of sample, and it also has a mechanical stirrer to agitate the solution during the analysis.
The second beaker supports the conductivity meter (DFRobot Gravity DFR0300-H: analog electrical conductivity sensor/meter K = 10) and is intended for the determination of brine salinity. The measuring range is up to 100 mS/cm.
The third beaker is intended for volatile acidity analysis using a screen-printed metal oxide semiconductor thick-film gas sensor (TGS2620, Figaro Group, Mino, Osaka, Japan), which is characterized by high selectivity and sensitivity to volatile organic vapors, including acetic acid. The beaker has an additional heater to help release the vapors once the brine is drawn.
At the end of the analysis, all beakers and pumps are washed with distilled water from the outer container. The pH and EC sensors are immersed in their specific storage solutions in beakers 1 and 2, while the gas sensor (located above beaker 3) is kept in free air.
The 3 microcontrollers (Arduino MCUs) installed in the device have the function of interfacing the hardware with the control system without interacting with each other. The first one (Arduino Uno) controls the 10 pumps, the 2 basket motors with the 4 position sensors, the 3 level sensors, and the agitator. The second one (Arduino Uno) controls the 6 temperature sensors (outdoor environment, indoor environment, outdoor cooler, indoor cooler, beaker cell 1, beaker cell 3), the two Peltier cells, the resistive heater of beaker 3, and the two fan heaters. The third (Arduino Mega 2560) handles the power supply to the sensors and houses the control software for the conductivity meter. The software for the three MCUs is written in C++ and is developed internally.
The three MCUs and the pH meter communicate via RS232 serial (converted to USB) with the PC, which supervises the processes and maintains the log of operations as well as the results of the analyses. The bidirectional communication protocol between MCU and PC is proprietary, specific to this implementation, and can be summarized as follows: <startmarker><command><parameter 1, parameter 2, … parameter n> from PC to MCU; <startmarker><actor><data 1, data 2, … data n> from MCU to PC. The MCUs cyclically send status information, and the PC cyclically sends a keep-alive message; if this information is not received, all processes stop for obvious security reasons.
2.2. Experimental Methods of Analysis and Prototype Control System
The analysis procedure is a robotic reproduction of the operations that would be performed by a human operator on the brines, namely: determination of free acidity and combined acidity in beaker 1, determination of salt concentration in beaker 2, and determination of volatile acidity in beaker 3. The software supervises activities of the analysis hardware module to which it is connected, then provides for sending commands to the three connected Arduino modules and recording all the activities performed; it also provides for the survey of electrical conductivity values, volatile acidity, and the inherent calculation of lactic acid and residual sodium hydroxide by measuring pH values.
At startup, the software loads the functional parameters and provides for opening the serial ports (converted to USB) of the three MCUs and the pH sensor. If it detects a connection error, it provides a report. From this moment on (if the connection is active with all modules), the system can go into operation. Two modes of operation are available: automatic and manual. In automatic mode (set by default), an analysis session can be run, as shown in
Figure 3.
Manual mode, which can be activated by the individual communication modules, is required for maintenance and allows all operations to be performed on the various modules, including pump movements and drives. A series of steps must be taken before each analysis: checking the preset temperature, checking the status of the sensors, retrieving holding liquids, pre-charging the various pumps with brine, and washing the beakers.
The determination of free acidity involves taking 15 mL of brine that is titrated drop by drop with a 0.1 N NaOH solution in beaker 1, under mechanical agitation, and measuring the pH to a value of 8.1. When the titration is finished, beaker 1 is emptied and washed with distilled water to carry out the next analysis.
The determination of combined acidity is an indirect measure of the residual soda present in the brine in contact with the olives. The analysis is performed in beaker 1 by potentiometric titration of 15 mL of sample with 0.2 N HCl, measuring the pH until a value of 2.6 is reached.
Measurements of the electrical conductivity of brine and the amount of volatile organic gas are made in beakers 2 and 3, respectively, by taking 25 mL of brine and waiting a few minutes for the sensors to read.
The PC, contained in the accessory box, enables the control and management of the execution of the various applications of the analysis module. In particular, it allows you to configure the hardware, set the functional parameters of the individual modules, i.e., the calibration coefficients of the stepper pumps, so that they can take the exact amount of sample or reagent, and manage the settings of the individual operations contained in the “macros.” At the end of each analysis, the values obtained from the titrations or sensor readings can be displayed on the monitor.
Algorithms for calculating lactic acid and residual sodium hydroxide are based on the titration technique: the pH value of the sample is read at the beginning, and reagent is then added while checking the pH value of the solution. When that value reaches the predetermined threshold, the addition of reagent is stopped, and the calculation is performed with the values of initial pH, final pH, and volume of reagent added. For the electrical conductivity value, a direct sensor measurement is made that gives the reading in milliSiemens. Finally, for the volatile acetic acid value, the sensor measures the ratio between the electrical resistance altered by the gas passage and the same in free air (Rs/R0): the gas-induced change in conductivity on the metal oxide semiconductor layer is proportional to the gas concentration.
Each sensor can be manually turned on, off, or calibrated via a control panel. In addition, the general control panel allows manual execution of each operation, including: moving the trolley, turning on or off the stirrer in beaker 1, calibrating the 3 stepper pumps (brine, NaOH, and HCl), filling or emptying the beakers with distilled water, pH-meter buffer, conductivity-meter buffer, and brine in beakers 2 and 3. It is also possible to arrest the process via the “emergency stop” command.
When a complete cycle of analysis is finished, the results acquired are automatically recorded and archived so that they can be consulted and give the possibility of timely intervention with brine correction. The values obtained are stored in a text file, such as the example shown in
Table 1.
2.3. Reference Methods for Brines Analysis
The analysis of the chemical and physical parameters of the preserving liquids (brines) of table olives was carried out according to the protocols reported in the Official Journal [
11], in order to compare the results obtained from the automated analysis of the prototype.
The pH value is the main indicator of the progress of the fermentation process in brine, and its determination was carried out by means of a bench-top pH meter (Orion Star A111, CARLO ERBA Reagents S.r.l., Cornaredo, Milan, Italy) with built-in Automatic Temperature Compensation (ATC) probe.
Determination of free acidity, i.e., free organic acids in solution due to lactic fermentation, was carried out by acid-base titration using the indicator method (phenolphthalein), according to the Official protocol of analysis for canned vegetables [
11].
Combined acidity refers to the amount of organic acids salified as a result of soda ash action; therefore, it can be determined to estimate the percentage of residual soda ash when a certain equilibrium has been established between olives and brine. The analysis of this parameter was performed by potentiometric titration of the brine with a hydrochloric acid solution, as described by Cappello and Poiana [
12].
Determination of volatile acidity is important for detecting possible anomalies and defects since, in cases of abnormal trends in the fermentation process, there is an increase in the volatile fraction. In table olive brines, the main component of the volatile acidity fraction is acetic acid. It was determined by steam distillation of the brine and subsequent titration of the distillate using the indicator method [
12].
Finally, the determination of salt concentration was carried out by argentometric titration (Mohr’s Method) according to the Official protocol for the determination of chlorides [
12].
2.4. Statistical Elaboration
All statistical analyses described below were carried out on the mean of three replicates of the parameters for each brine. First, a one-way analysis of variance (ANOVA) was performed on the whole dataset to assess differences between the brines, followed by the post hoc Tukey test. The relationship among the reference data and instrumental evaluation was performed with Past software (v. 4.02).
In addition, considering the twelve brines separately, two Principal Component Analyses (PCA) were performed on the average data of pH, lactic acid, acetic acid, residual sodium hydroxide, and salinity ([NaCl]) to visualize any potential discrimination among the brines.
4. Discussion
The trends of the chemical and physical parameters in the various brines analyzed mirror those of previous studies conducted on compliant and altered brines analyzed during both spontaneous and controlled fermentation processes [
13,
14,
15].
Regarding volatile acidity, the TGS2620 sensor, in which the gas-induced conductivity change on the metal oxide semiconductor layer is proportional to the gas concentration, is highly selective and sensitive toward each individual volatile organic gas (sensitivity 0.3–0.5), including acetic acid [
16]. The lower linearity between the data obtained from the reference method and those evaluated by the instrument can be explained by the fact that some brines, i.e., the regular ones, had an acetic acid concentration lower than the instrument’s detection limit (LOD) of 0.1 g/l, falling outside the instrument’s calibration line with acetic acid. In addition, determination by vapor flow and subsequent titration does not discriminate volatile organic acid vapors in relation to chemical nature; therefore, ethanol and propionic acid, which together with lactic and acetic acids are the metabolic products most commonly found in brines, are also detected in the total computation [
17]. Acetic acid and ethanol in brines are produced by heterolactic fermentation of lactobacilli, especially under conditions of environmental stress (such as, for example, oxygen deficiency, nutrient limitation, salt concentration, and low pH levels). In addition, ethanol in brine is mainly produced by the alcoholic fermentation of yeasts and is present in high amounts due to its high miscibility with water [
18]. Also present in lower concentrations is ethyl acetate, a product of the esterification of acetic acid in the aqueous phase with ethanol.
Brines altered by abnormal fermentations showed an increase in volatile acidity content and a relative decrease in lactic acid concentration, with a characteristic volatile acidity/free acidity ratio higher than 1 compared with regular samples, in agreement with the study of Montaño et al. [
19]. In particular, brines altered by propionic and butyric fermentations are characterized by a high content of carboxylic acids, while putrid and moldy brines have a higher content of alcohols [
20]. In the present work, all altered brines were found to have volatile acidity values higher than or equal to 0.2 g/l acetic acid, falling within the instrument calibration straight line for acetic acid. Therefore, by setting this value as a threshold, it is possible to monitor when or if brine undergoes undesirable alterations.
PCAs representing the distribution of different brines in relation to their chemical and physical characteristics show that the real discriminating factor in assessing brine compliance is acetic acid. Therefore, implementing chemometric processing in the device software can make the system even more complete and efficient in discriminating compliant brines from altered ones, as well as ensuring accurate and repeatable evaluation of product quality parameters.
The sensorized system developed in this study allows for constant monitoring of brine quality parameters during table olive processing, especially during the storage stages, giving operators the ability to promptly correct the matrices, as is done in the milk processing and dairy product manufacturing industries [
21] or in IoT-based aquaculture systems [
22]. This allows for the production of high-quality goods while promoting environmental, energy, and economic sustainability. In addition, automation of the process ensures the sensory quality of the product. Overall, in the food processing industry, plant innovation with environmentally friendly technology leads to reducing energy consumption and environmental impact, as well as processing time and ensuring product safety [
23]. Moreover, food quality is strongly influenced by environmental conditions, especially during storage, in terms of nutrient preservation. Monitoring these parameters in real-time using sensors and IoT technologies in supply chains can help optimize the quality and nutritional value of products, reducing waste and losses [
24].
However, the proposed system presents some benefits and limitations related to monitoring operations. Among the main advantages are definitely the analysis accuracy and high reproducibility, the low system costs, and the ability to analyze multiple storage containers by connecting several tubes at the same time. To a limited extent, however, analyses are carried out in batches rather than continuously by taking small volumes of brine. A further disadvantage is that the brine must be homogenized, perhaps allowing the fluid to be recirculated. Furthermore, it must be taken into consideration that the mechatronic components used to develop the prototype are already available on the market at a relatively affordable cost. As far as scalability is concerned, the implementation of the device on an industrial scale is easily achievable as the sensors are housed in a self-contained external unit and are able to take brine directly from the storage containers.