1. Introduction
The removal of moisture from foods through hot-air drying constitutes one of the most widely employed technologies at the industrial and agro-industrial levels for the preservation of perishable products, due to its relative operational simplicity, low implementation cost, and ability to significantly extend shelf life by reducing water activity. This process is particularly attractive in the food industry, where microbiological stability, the reduction in postharvest losses, and the preservation of sensory and nutritional attributes are critical factors for the competitiveness and sustainability of production systems [
1]. The kinetics of moisture removal are highly dependent on the type of food, thermal conditions, and the mechanisms of heat and mass transfer, which has motivated the development of advanced monitoring and modeling techniques for the drying process [
2].
Continuous monitoring of moisture loss during the dehydration process has proven to be an effective tool for more accurately describing drying dynamics and improving the prediction of material behavior, particularly when advanced sensing methods are combined with neural network-based models capable of capturing complex nonlinear relationships [
3]. Studies focused on products such as carrot have shown that optimizing hot-air drying conditions has a direct impact on both the dehydration rate and process efficiency, as well as on the final quality of the product, highlighting the need for control and optimization strategies that simultaneously consider multiple process objectives [
4].
Hot-air convective drying is intrinsically a highly energy-intensive process, accounting for a significant fraction of the total energy consumption in food processing plants, which depends on both the type of product and the operational conditions of the process. This challenge is compounded by the physical complexity of drying, characterized by the simultaneous occurrence of heat and mass transfer phenomena, internal thermal gradients, moisture diffusion, material shrinkage, and structural changes in the food matrix, which collectively render drying a strongly nonlinear, coupled, and time-dependent dynamic system [
5]. These nonlinearities have motivated the use of advanced models based on artificial intelligence and machine learning to describe and predict the physicochemical behavior of products during dehydration, particularly in assisted convective processes where thermal and process variables exhibit a high degree of interaction [
6]. Neural network-based control approaches have further demonstrated their ability to anticipate quality changes in dehydrated foods, such as color variations and structural properties, reinforcing the relevance of intelligent techniques for the analysis and control of nonlinear drying processes [
7].
Carrot (
Daucus carota L.), widely used both for direct consumption and for industrial food formulations, presents several challenges during the drying process due to the complex structure of plant tissues and their high initial moisture content. The heterogeneous cellular structure, anisotropic transport properties, and the presence of thermally sensitive bioactive compounds such as carotenoids, vitamins, and reducing sugars can significantly influence moisture diffusion, drying kinetics, and final product quality. Experimental studies have demonstrated that structural modifications of carrot tissue during drying can alter mass transfer mechanisms and affect the preservation of quality attributes, highlighting the importance of controlling thermal conditions during dehydration processes [
8]. During drying, inadequate regulation of air temperature may lead to thermal degradation, non-enzymatic browning, loss of rehydration capacity, and deterioration of texture, as well as an unnecessary increase in energy consumption, which has motivated the adoption of intelligent models for predicting moisture diffusivity and specific energy consumption in convective drying processes [
9].
Intelligent management of drying temperature has therefore become a key factor in simultaneously improving final product quality and process thermal performance. Recent studies have shown that intelligent modeling approaches, such as artificial neural networks (ANNs) and adaptive neuro-fuzzy inference systems (ANFIS), can accurately predict critical drying parameters including effective moisture diffusivity and specific energy consumption during convective hot-air drying processes. These models provide valuable insight into the influence of temperature on heat and mass transfer mechanisms, enabling better control of drying conditions [
10].
Drying systems have traditionally been regulated using conventional control strategies. Although these methods are widely adopted due to their simplicity and ease of implementation, they exhibit significant limitations when applied to complex and nonlinear processes such as convective food drying, whose kinetics and thermal behavior depend on multiple coupled variables [
11]. In particular, linear controllers require simplified system models and show reduced performance in the presence of external disturbances, load variations, changes in drying kinetics, and time-varying thermal dynamics throughout the process, which has encouraged the use of advanced models for the description and prediction of drying processes [
12,
13].
Artificial intelligence (AI) techniques have emerged as promising tools for the modeling, prediction, and control of nonlinear engineering processes, particularly in energy-optimized drying systems where multiple thermal and mass transfer variables interact simultaneously. In recent years, the integration of AI algorithms with Internet of Things (IoT) technologies has enabled the development of intelligent drying platforms capable of real-time monitoring, continuous data acquisition, and adaptive process optimization. These intelligent systems facilitate more precise regulation of operating conditions, contributing to improved process stability. Recent studies on IoT-integrated smart drying technologies have demonstrated the potential of these approaches to enhance the performance of drying systems applied to postharvest agricultural products [
14]. Among these techniques, artificial neural networks have demonstrated a remarkable ability to approximate complex nonlinear functions, learn implicit relationships between input and output variables, and adapt to dynamic systems without requiring an explicit mathematical formulation of the underlying physical process, as reported in the prediction of drying kinetics and physicochemical properties of food products. These characteristics make neural networks well-suited for the control of highly coupled thermal processes, such as hot-air drying [
15,
16].
The development of cyber–physical systems (CPSs) has enabled an increasingly tight integration between the physical and digital domains, combining sensors, actuators, intelligent control algorithms, and real-time communication capabilities for the monitoring and control of thermal and energy-related processes. In this context, the Internet of Things (IoT) plays a fundamental role by enabling device connectivity, remote access to process data, and visualization through cloud-based platforms, thereby facilitating continuous supervision and data-driven decision-making [
17]. The convergence of CPSs, IoT, and artificial intelligence has given rise to a new generation of intelligent systems capable of autonomously monitoring, modeling, and optimizing industrial processes through predictive techniques for estimating thermal and moisture-related variables in complex systems [
18,
19].
In recent years, several studies have explored the application of artificial intelligence-based techniques to food drying processes, including the use of fuzzy logic, hybrid neuro-fuzzy models, artificial neural networks, and evolutionary algorithms for exergy assessment, multi-objective optimization, and drying kinetics modeling across different thermal systems [
20,
21]. However, most of these approaches rely on high-computational-capacity hardware, such as industrial computers or a local server, which limits their scalability, increases implementation costs, and hinders their adoption in small- and medium-scale agro-industrial applications.
The implementation of neural controllers directly on low-cost microcontrollers remains an emerging research area. Executing neural networks on resource-constrained hardware imposes strict limitations in terms of memory, processing speed, and energy consumption, requiring careful design of both the neural model and the system architecture. Moreover, few studies simultaneously evaluate drying kinetics, energy consumption, and thermal efficiency under an embedded neural control scheme, particularly within IoT-enabled cyber-physical architecture, despite recent advances in accelerated moisture diffusion modeling using trained neural networks [
22].
In this context, the present study proposes the development and evaluation of an IoT-enabled hot-air drying cyber-physical system, in which an intelligent temperature controller based on artificial neural networks is implemented directly on a low-cost Arduino Mega 2560 microcontroller, following recent neural modeling approaches applied to drying kinetics and product quality assessment [
23]. The system integrates environmental and process sensors for the measurement of temperature, relative humidity, air velocity, and mass loss, providing a multivariable representation of the dynamic state of the drying process, consistent with strategies adopted in energy and exergy analyses of batch drying systems [
24]. Remote communication is established through an ESP8266 module, enabling real-time monitoring via IoT platforms and facilitating subsequent data analysis, in accordance with modern supervisory and multivariate forecasting schemes in continuous industrial drying systems [
25].
The neural controller, implemented using the Neurona library for Arduino, adjusts the thermal power of the heating system according to the instantaneous drying conditions, ensuring thermal stability, adaptive response to load variations, and energy-efficient operation. This approach is consistent with recent studies based on artificial neural networks and neuro-fuzzy models applied to the control and prediction of critical variables in complex thermal processes [
26,
27,
28]. Unlike conventional strategies, neural inference is executed entirely at the microcontroller level, allowing the system to operate autonomously even in the absence of network connectivity, thereby enhancing its applicability in real agro-industrial environments where robust and low-computational-cost solutions are required.
The experimental study was conducted through the dehydration of carrots, aiming to analyze the drying kinetics, moisture removal rate, energy consumption, and thermal efficiency of the system under intelligent control. This methodology follows approaches similar to those employed in modeling dehydration kinetics using neural network-based techniques [
29]. Evaluating the controller performance under different operating loads enables validation of its robustness and scalability, as well as the identification of the optimal trade-off between drying time and process efficiency.
Despite the significant advances reported in the literature regarding the use of artificial neural networks for modeling drying processes, most existing studies have primarily focused on predictive applications, such as estimating drying kinetics, effective moisture diffusivity, product quality parameters, or energy consumption under predefined operating conditions [
6,
10,
12,
18]. In many cases, these models are trained and executed on high-performance computational platforms, including desktop computers, industrial controllers, or cloud-based processing environments. Although these approaches have demonstrated strong capability in describing process behavior, their direct implementation as embedded control strategies within real drying systems remains limited, particularly when low-cost hardware platforms with restricted computational resources are considered. This situation reveals a gap between the theoretical development of advanced artificial intelligence-based models and their practical implementation in scalable and economically accessible agro-industrial dehydration systems.
In this context, the present work addresses this limitation through the implementation of a temperature control algorithm based on artificial neural networks directly embedded in an Arduino Mega 2560 microcontroller. Unlike conventional approaches that rely on external computational resources to execute artificial intelligence models, the proposed system performs neural inference locally while operating under strict constraints of processing capacity and energy consumption. This embedded architecture requires careful optimization of both the neural model design and its computational implementation to ensure stable and efficient real-time operation within the thermal control loop of the drying system. In this way, the feasibility of integrating intelligent control strategies into low-cost embedded platforms capable of effectively regulating the thermal conditions governing the drying process is demonstrated.
Furthermore, the developed system is integrated within an Internet of Things (IoT) enabled cyber–physical architecture, enabling continuous monitoring of critical process variables, including temperature, relative humidity, air velocity, and mass loss during dehydration. This integration facilitates real-time analysis of drying kinetics, energy consumption, and thermal efficiency under intelligent control conditions. Overall, the proposed approach contributes to the advancement of more intelligent and energy-efficient drying technologies by demonstrating that embedded implementation of artificial neural networks can be effectively used to optimize the dehydration process in real systems, providing a technologically viable solution for agro-industrial applications.
The main contribution of the proposed system does not lie solely in the embedded execution of the artificial neural network, but rather in the formulation of a multivariable control strategy specifically designed to interact directly with the transient thermodynamic behavior of the drying process. Whereas in previous implementations neural models are generally employed primarily for offline prediction, process supervision, or external data processing, the controller developed in this study simultaneously integrates information related to the drying process variables in order to generate the control action in real time. This architecture enables the ANN to continuously adapt the supplied thermal power according to the instantaneous evolution of moisture removal and internal diffusion resistance. As a result, the system not only demonstrates the feasibility of executing neural inference, but also establishes a direct relationship between the embedded control strategy and the improvements achieved in drying kinetics. In this sense, the novelty of the present work lies in experimentally validating that an embedded ANN can operate as an active multivariable control mechanism directly linked to the heat and mass transfer phenomena governing convective food dehydration.
2. Materials and Methods
This study follows a structured experimental workflow that integrates the design and implementation of an IoT-enabled convective drying system with the preparation and characterization of carrot samples, the real-time temperature regulation through an embedded artificial neural network controller, and the subsequent evaluation of drying kinetics and energy performance under different operating conditions.
The experiments were conducted in a controlled laboratory environment at the National Technological Institute of Mexico in Celaya, Guanajuato, during the period from January 2025 to January 2026, encompassing system development, ANN training, and repeated experimental trials. A hot-air convective drying system integrated into IoT-enabled cyber-physical architecture was employed for the experimental evaluation. Fresh carrots were used as the plant material, selected under homogeneous commercial conditions and characterized by high initial moisture content, making them a representative product for the analysis of thermal dehydration processes and the investigation of nonlinear drying kinetics.
The experimental system was designed to operate under an intelligent control scheme, in which temperature regulation is performed by an artificial neural network embedded in a low-cost microcontroller, following previously reported approaches for the modeling and prediction of critical variables in agricultural and industrial drying processes using artificial neural networks [
30]. This configuration enabled continuous acquisition and real-time processing of thermal and process-related variables, as well as remote monitoring of the drying operation, with the aim of simultaneously evaluating moisture removal kinetics and the thermal performance of the system under different loading conditions [
31].
2.1. Technical Specifications and Operational Features of the Convective Drying System
The dehydration process was conducted using a hot-air drying system consisting of a cylindrical drying chamber with a length of 0.35 m and an internal diameter of 0.30 m, designed to maintain stable thermal conditions and ensure uniform product distribution during operation, as detailed in
Figure 1. The drying chamber was arranged in a horizontal configuration, promoting homogeneous exposure to the hot airflow generated by a centrifugal fan with a maximum power rating of 200 W, delivering an average air velocity of 1.6 m/s measured inside the chamber. This configuration has been reported as effective in enhancing convective heat transfer and minimizing temperature and moisture gradients in forced-convection drying processes, enabling operation within a temperature range of 55 °C to 85 °C [
32].
Thermal energy was supplied by an electric heating element coupled to a forced ventilation system responsible for driving the heated air through the drying chamber. The heating power was dynamically regulated via a pulse-width modulation (PWM) signal generated by an embedded artificial neural network–based controller at a frequency of approximately 490 Hz, with a control update interval of 1 min, allowing precise and adaptive temperature control throughout the drying process. This control strategy is consistent with intelligent drying approaches aimed at reducing energy consumption and improving energy efficiency in agro-industrial drying systems [
33]. The reference variable used for control corresponded to the temperature of the circulating air inside the chamber, providing a direct representation of the actual thermal environment to which the samples were exposed during dehydration. This system configuration is suitable for the simultaneous evaluation of moisture removal kinetics and the thermal performance of the dryer under different operating conditions.
The convective drying system developed in this study was designed to maintain precise, real-time control of critical dehydration process variables, including the air temperature within the chamber, relative humidity, airflow velocity, and product mass loss. Homogeneous exposure to the hot air minimizes temperature and moisture gradients, promoting uniform drying kinetics [
34]. The distributed instrumentation and sensor integration enable the implementation of an embedded artificial neural network controller on a low-cost microcontroller Arduino Mega 2560 (Arduino AG, Turin, Italy) which dynamically adjusts the dryer’s operational parameters to optimize drying efficiency and reduce process time [
35]. Additionally, IoT connectivity facilitates multivariable data acquisition, providing real-time information for modeling drying kinetics and evaluating intelligent control strategies within the cyber-physical system [
36]. This integration enables continuous monitoring and synchronized data processing of the drying variables, as illustrated in
Figure 1.
2.2. Characterization of Samples and Thermal Conditions of the Drying Process
For the development of the experimental trials, fresh carrots were used, selected based on size uniformity and external physical condition in order to ensure comparable initial conditions among samples, as recommended in recent studies on drying kinetics and thermo-energetic modeling of agricultural products [
37]. Prior to the dehydration process, the plant material was washed with potable water to remove surface impurities, mechanically peeled, and then sliced into discs with a controlled thickness of 6 ± 0.3 mm. The resulting slices exhibited an average major diameter of 3.8 cm and a minor diameter of 2.3 cm, dimensions commonly adopted to ensure representative heat and mass transfer during convective drying of root vegetables.
Before each experimental run, the samples were weighed and uniformly distributed inside the drying chamber in a single-layer configuration along the longitudinal axis, avoiding overlap and ensuring uniform spacing between slices to promote homogeneous exposure to the hot air flow and minimize local thermal gradients. The experiments were conducted under three different product load conditions (2 kg, 4 kg, and 6 kg) to analyze the influence of sample mass on drying behavior and moisture removal kinetics. Each experimental condition was performed in triplicate to ensure reproducibility and consistency of the results. All trials were conducted under constant operating conditions, using an average drying air temperature of 76 °C and an air velocity of 1.6 m/s. These parameters were selected based on values reported as suitable for convective drying processes and intelligent drying systems incorporating advanced monitoring and control strategies [
38].
2.3. Implementation of a Cyber-Physical Platform for Intelligent Control of Carrot Drying
The cyber–physical system was designed to enable continuous, real-time monitoring of the key thermodynamic and process variables involved in convective hot-air dehydration through the integration of high-precision distributed electronic instrumentation. The surface temperature of the product was measured using an MLX90614 infrared sensor (Melexis NV, Bruges, Belgium), featuring a wide measurement range from −70 °C to 380 °C and an accuracy of ±0.5 °C within the operational range, allowing non-contact and reliable temperature acquisition under dynamic drying conditions. The air temperature inside the drying chamber was monitored using digital AM2302 sensors (Aosong Electronics Co., Ltd., Guangzhou, China), with a measurement range of −40 °C to 80 °C and an accuracy of ±0.5 °C, ensuring stable and noise-resistant acquisition of the internal thermal environment. The relative humidity of the drying air was measured using an SHT35 digital transducer (Sensirion AG, Stäfa, Switzerland), providing a full-scale measurement range of 0–100% RH with a high accuracy of ±1.5% RH, enabling precise characterization of the hygrothermal conditions governing moisture removal.
Airflow velocity was determined using a WS68 anemometer (Fine Offset Electronics Co., Ltd., Shenzhen, China), operating within a range of 0–30 m/s with an accuracy of ±0.3 m/s, which ensures reliable quantification of the convective transport conditions inside the chamber. The mass variation in the product during drying was measured using load cells interfaced with an HX711 analog-to-digital converter (Avia Semiconductor Company, Xiamen, China), which provides 24-bit resolution and high sensitivity for detecting small weight changes, enabling accurate monitoring of moisture loss dynamics. All sensing elements were integrated into the data acquisition system to ensure synchronized, low-noise, and high-resolution measurement of process variables, following instrumentation strategies commonly adopted in IoT-enabled drying systems for enhanced monitoring accuracy and process reliability [
39].
All sensor signals were conditioned and digitized using an Arduino Mega 2560 platform, selected for its processing capability, operational stability, and compatibility with multivariable data acquisition applications. This configuration minimized electrical interference and ensured the reliability of the recorded data, which were subsequently used for thermal efficiency analysis and dynamic performance evaluation of the drying process. In addition, the system incorporated an ESP8266 communication module to establish connectivity with the Arduino IoT Cloud platform. Data transmission between the embedded system and the cloud infrastructure was performed using the MQTT (Message Queuing Telemetry Transport) protocol over TCP/IP, enabling reliable, low-latency, and efficient real-time communication for remote monitoring and data visualization of the drying process variables [
40].
The control strategy was implemented directly on the Arduino Mega platform, taking advantage of its capability to execute embedded intelligent control algorithms. Thermal regulation was achieved using an artificial neural network-based controller programmed in C++ through the Neurona library within the Arduino IDE, specifically designed for deploying neural models on resource-constrained microcontrollers. This architecture enabled the simultaneous monitoring of temperature, relative humidity, airflow velocity, and product mass loss, allowing dynamic adjustment of the dryer operating conditions according to the instantaneous state of the process, in line with intelligent control strategies applied to complex thermal systems [
41]. As a result, the system exhibited adaptive responses to variations in critical process variables, contributing to a reduction in drying time, minimization of residual moisture zones, and improvement in specific energy consumption per kilogram of processed product.
During the experimental phase, the heating and ventilation systems were activated under controlled conditions, and hygrometric, aerodynamic, and mass-related variables were continuously recorded throughout each trial. The drying process was maintained until the samples reached a final moisture content equal to or below 10% on a wet basis, as verified by the IoT-enabled data acquisition system, while the embedded neural controller ensured thermal stability throughout the operation, following experimental protocols comparable to those employed in instrumented intelligent dryers [
42]. Upon completion of each drying cycle and after cooling the drying chamber, the final product mass and specific energy consumption were determined in accordance with previously established experimental procedures for agro-food products with similar characteristics, as illustrated in
Figure 2.
2.4. Design and Implementation of the Embedded Artificial Neural Network Control for the Drying Process
The intelligent control strategy of the drying system is based on the implementation of an embedded artificial neural network (ANN) deployed on an Arduino Mega 2560 microcontroller, using the Neurona library within the Arduino IDE development environment. The implemented neural network corresponds to a feedforward multilayer perceptron, selected for its ability to approximate complex nonlinear relationships and for its suitability for real-time execution under the computational constraints inherent to low-cost embedded systems [
43,
44].
The architecture of the artificial neural network was defined considering both the multivariable nature of the convective drying process and the computational constraints associated with the embedded implementation of the controller. In particular, a 4–6–1 topology was adopted, in which the input layer consists of four neurons representing the fundamental physical variables that describe the dynamic state of the process. These variables were selected due to their direct influence on the mechanisms governing convective drying kinetics, allowing the neural model to capture the nonlinear relationships between operating conditions and the evolution of the dehydration process. This configuration represents an appropriate balance between generalization capability, numerical stability, and computational efficiency, ensuring robust performance during the continuous operation of the drying system, as illustrated in
Figure 3 [
45].
In addition, the selected ANN configuration was defined considering the trade-off between prediction capability and computational feasibility for embedded implementation. Preliminary tests with alternative hidden-layer sizes showed that architectures with fewer neurons were unable to adequately represent the nonlinear interactions among the drying variables, whereas more complex configurations increased memory consumption and processing time without providing significant improvements in control performance. Therefore, the adopted 4–6–1 topology was considered the most suitable structure for achieving stable thermal regulation, low computational burden, and reliable real-time execution on the Arduino Mega 2560 platform.
2.4.1. Preprocessing and Normalization of Process Variables
Prior to neural processing, the signals acquired by the distributed instrumentation system are subjected to a normalization procedure, scaling the data to the operational range of the Neurona library, typically between 0 and 1. This preprocessing step is essential to improve numerical stability, reduce the likelihood of activation function saturation, and ensure consistent algorithmic behavior given the resolution and arithmetic precision limitations of microcontroller-based platforms [
46]. In the hidden layer, a hyperbolic tangent (tanh) activation function was employed due to its ability to provide smooth nonlinear transformations and improved numerical stability when the input variables are normalized. The output layer used a sigmoid activation function, which generates a bounded continuous output suitable for mapping the neural network response into a normalized control signal that is subsequently scaled to the PWM actuation range.
Additionally, normalization homogenizes the scale of the input variables, preventing artificial dominance among physical parameters and promoting efficient information propagation throughout the neural network [
47]. In this study, all input variables were normalized using a consistent min–max scaling approach to a common range of [0, 1], in accordance with the operational requirements of the Neurona library for embedded implementation. This normalization was uniformly applied to all input variables, including drying air temperature, relative humidity, airflow velocity, and product mass loss. The use of a common normalization range ensures that no single variable dominates the learning process due to differences in magnitude, while also improving numerical stability and convergence behavior during training and inference.
2.4.2. Experimental Dataset Construction and Neural Network Model Training
The input dataset used for training was constructed from experimental drying trials performed under three initial loading conditions. Process variables were recorded at a sampling interval of one minute, resulting in approximately 264, 396, and 486 temporal observations for the respective drying experiments. In total, the dataset consisted of 1146 time-series samples, where each sample corresponds to a vector containing the four input variables used by the neural network. Consequently, the complete dataset includes 4584 individual measurements, corresponding to the combination of the four variables recorded throughout the moisture removal experiments. This multivariable dataset provided a comprehensive representation of the dynamic behavior of the convective drying process and served as the basis for training the neural controller.
To improve the robustness of the neural controller and reduce the risk of overfitting, the experimental dataset was partitioned into training, validation, and testing subsets corresponding to 70%, 15%, and 15% of the total dataset, respectively. This data partitioning strategy enabled the optimization of synaptic weights during the learning stage while independently assessing the stability and consistency of the neural control response under different operating conditions of the convective drying process.
The training of the artificial neural network was performed externally (offline) using experimental data obtained from preliminary drying trials conducted under different operating conditions. These experiments were designed to capture representative variations in the key process variables, including drying air temperature inside the chamber, system relative humidity, airflow velocity, and product mass loss during dehydration. The resulting dataset provided a multivariable representation of the dynamic behavior of the convective drying system, enabling the neural model to learn the nonlinear relationships between operating conditions and the thermal response of the process. The training procedure was carried out outside the embedded system in order to avoid additional computational loads on the control platform, which is inherently constrained in terms of processing capacity and memory. During this stage, supervised learning techniques were applied to iteratively adjust the synaptic weights and bias terms of the neural network, obtaining the target control signal derived from the experimental data [
45,
47].
During the training phase, the main hyperparameters of the neural model were selected to ensure numerical stability, proper convergence of the learning process, and efficient implementation on the embedded platform. These hyperparameters included the learning rate, network architecture, activation functions, and the normalization strategy of the input variables. A learning rate of 0.01 was adopted, which provided an appropriate balance between convergence speed and training stability during the optimization process based on backpropagation.
In order to improve reproducibility and ensure the representativeness of the training process, the temporal observations corresponding to each experimental condition were randomly shuffled prior to dataset partitioning, thereby avoiding sequential bias associated with the natural evolution of the drying process. The optimization procedure was carried out over 500 training epochs, since this number allowed stable convergence of the synaptic weights and bias terms without generating significant increases in processing time or evidence of overfitting. During this stage, the validation subset was continuously monitored to verify the stability of the control response and the generalization capability of the model under different loading conditions. The final selected parameters corresponded to the configuration of synaptic weights, bias terms, and activation coefficients that produced the most stable and consistent control response during validation. This procedure ensured that the embedded neural controller maintained adequate generalization capability while preserving low computational complexity for real-time implementation.
Once the performance of the model was verified through validation of its stability under different operating scenarios, the optimized neural network parameters were directly incorporated into the microcontroller code as fixed constants. This approach enabled real-time neural inference to be executed locally on the Arduino Mega 2560 microcontroller without requiring online learning or continuous retraining of the model. By eliminating the need for training procedures during system operation, the embedded controller significantly reduces memory consumption and computational load while maintaining reliable performance in the thermal regulation of the dryer. Consequently, this strategy ensures stable, deterministic, and reproducible operation of the neural controller during prolonged operating periods and continuous drying cycles, which is essential for its practical implementation in agro-industrial dehydration systems based on embedded platforms [
48].
2.4.3. Selection and Definition of Input Variables
The input layer of the neural network is composed of four physical variables acquired in real time from the drying process: drying air temperature, internal relative humidity, airflow velocity, and instantaneous product mass loss. These variables collectively provide a comprehensive description of the thermodynamic and mass transfer state of the system, supplying sufficient information to characterize process dynamics while avoiding redundancy [
49]. The input neurons do not perform internal computations; instead, they function as distribution nodes that transmit the normalized values to the hidden layer through weighted connections defined by the model parameters.
2.4.4. Configuration and Function of the Hidden Layer
The hidden layer of the neural network consists of six neurons, experimentally selected to adequately capture the nonlinear dynamics of convective drying without significantly increasing the computational load of the embedded system [
47]. This layer concentrates the core processing of the neural model. Each hidden neuron computes a linear combination of the weighted inputs, followed by the application of a nonlinear activation function [
49].
This mechanism enables the modeling of implicit physical phenomena within the drying process. The first hidden neuron captures the nonlinear interaction between drying air temperature and the internal relative humidity of the chamber, variables that determine the vapor pressure gradient responsible for surface evaporation. Experimentally, it was observed that temperature increments up to approximately 76 °C produce progressive reductions in relative humidity; however, this relationship does not exhibit linear behavior throughout the process. During the initial stage, intense evaporation maintains high relative humidity levels; in intermediate stages, small thermal increments lead to significant humidity reductions; whereas in the final stage, the thermal effect becomes attenuated. In this context, this neuron is predominantly activated when an effective thermal gradient exists, indicating favorable conditions for simultaneous heat and mass transfer.
The second hidden neuron identifies hygrothermal saturation conditions of the drying air, particularly under high loading scenarios (4–6 kg), where relative humidity remains elevated for prolonged periods despite temperature increases. This behavior reflects a limitation in the air’s capacity to absorb additional moisture, thereby reducing process efficiency. This neuron functions as a detector of proximity to psychrometric saturation, allowing the controller to avoid unnecessary increases in thermal power when mass transfer is restricted by adverse hygrometric conditions.
The third hidden neuron models the coupled relationship between airflow velocity and the product mass loss rate, associated with the convective mass transfer coefficient. Experimental trials demonstrated that at velocities close to 1.6 m/s, higher dehydration rates are achieved during the initial hours of the process; however, further increases in velocity do not yield proportional improvements, indicating operation near a convective optimum regime. This neuron is activated when airflow effectively contributes to moisture removal and attenuates its response as the system approaches an aerodynamic efficiency limit.
The fourth hidden neuron dynamically differentiates the characteristic phases of convective drying: the constant-rate period, dominated by surface evaporation, and the falling-rate period, governed by internal moisture diffusion. Experimentally, mass loss is high during the initial hours and progressively decreases even under constant temperature conditions. This neuron enables the controller to recognize the transient state of the process and adjust the thermal strategy according to the dominant drying stage, contributing to more precise and context-aware regulation.
The fifth hidden neuron integrates temperature, relative humidity, and mass loss information to implicitly estimate the instantaneous thermal efficiency of the system. Under conditions of high temperature combined with low moisture removal rates, its activation decreases, indicating inefficient energy utilization. Conversely, when thermal increments effectively translate into moisture removal, its response increases. This neuron contributes to process energy optimization, aligning with intelligent drying strategies aimed at minimizing energy consumption without compromising performance.
The sixth hidden neuron detects critical combinations associated with overheating risk or non-uniform drying, characterized by high temperature, low relative humidity, and reduced mass loss, which are typical of the final drying stages. Under these conditions, the product contains low residual moisture, and the continued application of high thermal power may induce surface hardening or undesirable internal gradients. This neuron operates as a preventive mechanism within the neural architecture, indirectly modulating the control signal to soften thermal action and preserve product quality.
These relationships are not explicitly defined through physical equations; instead, they are inferred during the training stage and subsequently embedded in the microcontroller through fixed parameter values [
43]. The neural network was implemented using the Neurona library within the Arduino IDE development environment, which is specifically designed to execute neural models on microcontrollers with limited computational resources. Due to memory constraints, processing capacity, and operational stability considerations of the Arduino Mega 2560 microcontroller, a maximum of six neurons was established in the hidden layer to ensure efficient real-time execution of the neural inference algorithm. This configuration enables an adequate representation of the drying process dynamics while maintaining stable controller performance during the continuous operation of the dryer.
It is important to note that the functional descriptions assigned to each hidden neuron do not imply that individual neurons explicitly identify, detect, or estimate specific physical phenomena. Instead, these interpretations correspond to an analytical representation of the nonlinear relationships encoded within the network after training. The neural model operates as a distributed system in which the synaptic weights and bias terms collectively learn to approximate the complex interactions between the input variables, including temperature, relative humidity, airflow velocity, and mass loss. Consequently, the observed behaviors of the hidden layer arise from the learned nonlinear mapping rather than from explicit physical or cognitive mechanisms embedded in individual neurons.
2.4.5. Output Layer and Generation of the Thermal Control Signal
The output layer consists of a single neuron responsible for generating the continuous control signal applied to the thermal system. This neuron receives the activated outputs from the hidden layer and produces a normalized scalar value representing the optimal actuation level [
45]. For each neuron, the linear combination of its inputs is computed according to Equation (1).
where
denote the input variables of the process, which collectively characterize the thermo-hygrometric and transport conditions inside the drying chamber. The parameters
correspond to the synaptic weights that quantify the relative influence and contribution of each input variable
on neuron
, thereby defining the strength of the interconnection within the network architecture. The term
represents the bias associated with neuron
, acting as an adjustable offset that shifts the activation threshold and enhances the model’s flexibility by preventing structural constraints such as forcing the mapping through the origin. The variable
denotes the resulting weighted summation at neuron
, which constitutes the linear intermediate representation of the input space prior to the application of the nonlinear activation function [
46]. The neuron output is obtained through a nonlinear activation function, according to Equation (2).
where
corresponds to a sigmoid or hyperbolic tangent function, introducing nonlinearity to capture complex thermo-physical interactions inherent to convective drying. In the adopted 4–6–1 architecture, the hidden layer generates intermediate nonlinear representations of the system state [
47]. The output neuron performs a second weighted combination, calculated by Equation (3).
where
denote the activations of the hidden layer,
are the output-layer weights,
is the output bias and
represents the normalized control signal. The synaptic weights and bias terms were obtained through supervised offline training and subsequently embedded as fixed parameters in the microcontroller programmed using the Arduino IDE, enabling real-time inference without online retraining [
48]. Finally, the normalized output is scaled to the actuator operating range (0–255) to generate the pulse-width modulation (PWM) signal, as described by Equation (4).
The PWM based actuation ensures smooth and stable thermal regulation of the drying air, closing the control loop in real time and enabling adaptive energy-efficient operation [
50]. In this way, the neural controller acts directly on the thermal regulation loop, providing a control strategy capable of responding to the simultaneous variations in the hygrothermal and mass transfer variables present during the dehydration process.
2.4.6. Application of the Control Signal and Closed-Loop Operation
During dryer operation, process variables are acquired in real time and introduced as inputs to the embedded neural network, with neural inference executed synchronously with sensor data acquisition. The output generated by the model is subsequently scaled to the physical range of the thermal actuator and applied directly to the heating system, thereby closing the control loop in real time [
48].
This approach enables dynamic adaptation of the process temperature in response to simultaneous variations in hygrothermal conditions, aerodynamic parameters, and product state, without relying on explicit mathematical models of the drying process. As a result, enhanced thermal stability, improved adaptability to changes in product moisture content, and efficient operation under multiple loading conditions are achieved. All data acquisition, neural processing, and control signal generation tasks are executed locally on the microcontroller, ensuring low latency, high operational robustness, and feasibility for implementation in agro-industrial environments with multiple operational variables [
43,
49], as illustrated in
Figure 4.
2.5. IoT Implementation Using the ESP8266 Module in the Dehydration Process
To enable remote supervision, systematic data storage, and real-time visualization of drying process variables, an IoT connectivity architecture based on the ESP8266 Wi-Fi module was implemented and integrated into the cyber–physical drying system as a communication interface. The ESP8266 was selected due to its low cost, low power consumption, integrated processing capability, and native compatibility with the Arduino IoT Cloud environment, making it a widely adopted solution for embedded monitoring and control applications in intelligent drying systems [
36,
39,
42]. Within the Internet of Things (IoT) paradigm, such systems integrate distributed sensing devices, embedded processing nodes, and wireless communication technologies to acquire process data, perform local processing, and transmit information to cloud-based platforms for storage, analysis, and remote supervision. In this study, the interconnection between the physical drying system and digital services establishes a cyber–physical environment that enables continuous data transmission and real-time monitoring and analysis of key process variables.
The ESP8266 module was configured to establish wireless communication between the Arduino Mega 2560 board, responsible for data acquisition and execution of the embedded neural controller, and the Arduino IoT Cloud platform, which manages data visualization and storage. Communication between the microcontroller and the connectivity module was achieved through an asynchronous serial interface, ensuring reliable transmission of sensed data without interfering with the real-time execution of the artificial neural network-based control algorithm, as reported in distributed IoT-enabled cyber-physical drying systems [
37,
39].
In addition to the communication established between the microcontroller and the ESP8266 module via an asynchronous serial interface (UART), different communication protocols were employed for sensor integration depending on their operational characteristics. Digital sensors such as the SHT35 and MLX90614 were interfaced using the I2C (Inter-Integrated Circuit) protocol, enabling reliable multi-device communication over a shared bus. The AM2302 sensor operates using a single-wire digital communication protocol for temperature and humidity acquisition. For mass measurement, the HX711 module was used, which employs a dedicated two-wire synchronous serial interface (clock and data) optimized for load cell signal acquisition. The airflow measurement system (WS68 anemometer) provides output signals compatible with digital or analog input channels of the microcontroller. This multi-protocol integration ensures efficient, synchronized, and low-latency data acquisition within the cyber–physical system without compromising the real-time execution of the embedded neural control algorithm.
Once connected to the local wireless network, the ESP8266 enabled continuous transmission of the process variables. This architecture allowed real-time monitoring of the dehydration process through the cloud platform, where instantaneous values and temporal evolution of critical variables were visualized, facilitating the analysis of the system’s dynamic behavior under different operating conditions [
36,
42].
Additionally, the Arduino IoT Cloud platform was employed as an automatic data storage system, enabling the generation of structured historical records for subsequent offline analysis. These datasets were used for drying kinetics modeling, thermal efficiency evaluation, and energy performance assessment, in accordance with recent intelligent drying approaches that integrate energy analysis and data-driven modeling techniques [
37,
51,
52]. The implementation of continuous data logging reduced manual intervention, minimized acquisition errors, and ensured data integrity during long-duration experimental trials.
The integration of the ESP8266 module within the cyber-physical system enabled remote access to the drying system for real-time monitoring through the Arduino IoT Cloud platform, allowing supervision of experimental runs without the need for constant physical presence in the laboratory. This capability is limited to data visualization and telemetry, while control actions are executed locally by the embedded neural controller, ensuring stable and low-latency operation. This approach enhances operational flexibility and aligns with the principles of Industry 4.0 and smart agro-industrial processing, where connectivity, digitalization, and process traceability are key elements for optimization and decision-making [
36,
39,
52].
Finally, the combined application of distributed instrumentation, embedded intelligent control, wireless communication, and cloud-based data analysis operates in an integrated manner within the proposed system. In this architecture, process data are continuously transmitted and stored in the Arduino IoT Cloud platform, which functions as a cloud-based storage system for real-time monitoring and historical data recording. This approach eliminates the need for local storage (e.g., SD cards) and supports system scalability, facilitates multivariable data-driven analysis, and provides a robust framework for evaluating advanced intelligent control strategies in convective drying processes under real operating conditions, consistent with recent studies on IoT-assisted drying and advanced modeling using artificial neural networks, as illustrated in
Figure 5 [
37,
53,
54].
2.6. Evaluation of the Total Energy Required in the Drying Process
During the experimental trials, the drying process of carrot samples was continuously monitored in the dryer with the aim of quantifying the energy demand of the system. Throughout the process, key variables such as the evolution of product mass and the thermal conditions of the system were recorded, enabling the estimation of fundamental parameters, including the energy required for moisture removal, the energy flux transferred from the hot air to the carrot samples, the dehydration rate, and the overall energy efficiency. These indicators constitute essential metrics for assessing the thermal performance of the proposed system [
55,
56].
The total heat required for the removal of moisture from the product (
, kJ) was determined by considering the energy contributions associated with heating the water contained within the carrot matrix and its subsequent vaporization. In this context, HT is expressed as the sum of the sensible heat required to raise the temperature of the carrot samples (
) the energy associated with the preheating of water (
), and the latent heat corresponding to the liquid–vapor phase change (
). This energy model enables a more accurate characterization of the heat transfer mechanisms involved in the drying process [
57], as described in Equation (5).
The term associated with the sensible heating of the vegetal material (
) quantifies the energy required to increase the temperature of the carrot from its initial condition to the thermal level established for the drying process, in accordance with the formulation described in Equation (6) [
58].
In this formulation, (kg) denotes the initial mass of the carrot samples, (kJ/kg°C) represents their specific heat capacity, (°C) corresponds to the surface temperature of the product measured using the MLX90614 infrared sensor, and (°C) denotes the average temperature inside the drying chamber, monitored through the AM2302 sensors.
The sensible heat of the water (
) corresponds to the energy associated with the preheating of the water prior to the phase change. This energy contribution is calculated as a function of the mass of water present (
, kg), the specific heat capacity of water (
, kJ/kg°C), and the temperature difference involved [
57], as expressed in Equation (7).
The latent heat contribution (
) represents the energy demand associated with the phase transition of water from liquid to vapor during the carrot drying process. This term accounts for the evaporation of the moisture contained within the product matrix and is quantified using Equation (8), where
(kg) denotes the mass of evaporated water and
(kJ/kg) corresponds to the energy effectively consumed during the liquid–vapor phase change of water [
58].
The thermal energy transferred from the air stream to the carrot samples (
, kJ) was determined based on the thermophysical properties of the air and the operating conditions of the drying process, as described in Equation (9) [
59]. In this formulation,
(kg/m
3) represents the air density,
(kJ/kg·°C) its specific heat capacity, and
and
(°C) correspond to the inlet and outlet air temperatures of the system, respectively.
The effective air volume processed by the drying system,
(m
3), was estimated from the mean velocity of the convective air stream
(m/s), measured using a WS68 air velocity transducer, the cross-sectional area of the flow channel
(m
2), and the effective operating time of the process
(s) [
60,
61]. This relationship, based on the volumetric balance of the convective flow, is expressed in Equation (10).
The moisture content of the product (
, % water content) was quantified using Equation (11). In this expression,
(kg) corresponds to the final dry-basis mass of the product. The estimation of this parameter enabled the characterization of moisture removal kinetics during the dehydration process [
62].
The drying rate (
, kg/h) was determined as the ratio between the total mass of water removed (
, kg) and the effective drying time (
, h), as expressed in Equation (12). This parameter exhibited a progressive decline as the product moisture content approached the final dehydration condition, a behavior characteristic of the falling-rate period in convective drying processes. Experimental data acquired through load cells integrated with an HX711 module corroborated this trend, thereby validating the capability of the IoT-enabled cyber-physical system to stably regulate the drying process dynamics [
63].
The thermal efficiency of the system (
, %) was estimated as the ratio between the energy required for the evaporation of moisture from the carrot samples (
, kJ) and the thermal energy transferred by the air stream during the drying process (
, kJ), according to Equation (13). This parameter quantifies the fraction of supplied energy effectively utilized for the evaporation phenomenon and represents an overall indicator of the dryer’s energy performance; higher
values denote more efficient utilization of the energy input. Real-time monitoring of operational variables including air temperature, product surface temperature, convective airflow velocity, and product mass variation enabled the assessment of the system’s thermal performance under different operating conditions [
63,
64].
The root mean square error of temperature (RMSE, °C) was determined in order to quantify the average deviation between the reference temperature generated by the neural controller and the actual temperature measured inside the drying chamber throughout the dehydration process. This parameter provides an overall indicator of the thermal tracking capability of the embedded control system, since it considers the cumulative effect of instantaneous temperature deviations over the entire drying period [
6,
15,
31]. Low RMSE values indicate a higher degree of thermal regulation accuracy and a greater ability of the controller to compensate for disturbances associated with evaporative cooling, product loading conditions, and internal heat and mass transfer limitations. The RMSE was calculated according to Equation (14).
In this formulation, represents the total number of temperature samples acquired during the drying process, (°C) corresponds to the reference temperature generated by the neural controller at sampling instant (), and (°C) represents the temperature inside the drying chamber.
The mean absolute error of temperature (MAE, °C) was incorporated as a complementary parameter to characterize the thermal behavior of the system during the drying process. Unlike other indicators based on quadratic terms, MAE provides a more representative measure of the operational stability of the system under different loading conditions. This indicator is particularly useful for evaluating the uniformity of the controller thermal response and the consistency of temperature regulation inside the dryer throughout the entire dehydration process [
43,
54]. The MAE was calculated according to Equation (15).
4. Conclusions
The present study technically and scientifically validated the integration of IoT-based cyber–physical architecture with an artificial neural network (ANN)-based temperature controller in a convective dryer for carrot dehydration. Unlike previous research primarily focused on predictive modeling of drying kinetics using intelligent control approaches [
10,
13,
15], this work implemented an embedded neural control scheme operating in real time, experimentally demonstrating its direct impact on thermal efficiency and process stability. The results confirmed that intelligent thermal regulation, supported by distributed sensing and continuous data acquisition, significantly enhances operational stability and energy utilization under different initial loading conditions [
15,
47,
53].
The multilayer feedforward perceptron controller exhibited a strong adaptive capability in response to the nonlinear and dynamic behavior inherent to convective drying processes [
22,
24,
46]. Continuous modulation of the supplied thermal power enabled the anticipation of variations associated with moisture content and internal mass transfer resistance, thereby reducing thermal oscillations and minimizing energy losses. This adaptive performance represents a clear advancement over conventional control strategies and is consistent with recent studies applying artificial intelligence for energy optimization in drying systems [
20,
24]. However, unlike those studies, the present research experimentally validates the integrated operation of neural control within a fully functional IoT architecture.
The implemented instrumentation constituted a fundamental pillar for system validation. Simultaneous monitoring of drying air temperature (AM2302), product surface temperature (MLX90614), relative humidity (SHT35), mass loss through load cells coupled with the HX711 module, and air velocity (WS68) enabled comprehensive characterization of heat and mass transfer phenomena. Cloud-based data transmission via the ESP8266 module ensured multivariable synchronization, in line with recent developments in IoT-based dehydration systems [
36,
39,
69]. This integration not only enabled accurate calculation of thermal efficiency but also established a robust framework for real-time thermodynamic and energy analysis.
The thermal and hygrometric behavior inside the drying chamber confirmed system stability under neural control. Temperature remained within the optimal operating range, while relative humidity progressively decreased as drying advanced, indicating an adequate vapor pressure gradient for efficient moisture removal. This stable behavior ensured consistent operating conditions during the falling-rate period, where internal moisture diffusion resistance becomes dominant [
22,
46].
Furthermore, the analysis of different initial product masses demonstrated a direct relationship between loading capacity and thermal efficiency. Higher loads promoted improved energy utilization by allocating a larger fraction of the supplied energy to latent heat of vaporization, thereby reducing the relative impact of structural thermal losses. This finding is consistent with energy and exergy assessments reported in the literature [
20,
24,
69].
Additionally, the comparative energy analysis under different control strategies demonstrated that the artificial neural network-based controller significantly improves the thermo-energetic performance of the drying process. The adaptive modulation of the thermal input enabled a more efficient use of supplied energy, particularly by reducing unnecessary thermal oscillations and aligning the energy delivery with the dynamic drying kinetics. In contrast to conventional ON–OFF and fuzzy control approaches, the neural controller exhibited superior capability to handle the nonlinear behavior of moisture removal, resulting in substantial reductions in both drying time and energy consumption across all evaluated loading conditions. These findings highlight the effectiveness of intelligent control not only for enhancing process stability but also for achieving a more rational and optimized energy utilization in convective drying systems.
From a practical perspective, the proposed embedded control strategy based on artificial neural networks demonstrates strong potential for industrial applicability in agro-industrial drying systems. The integration of low-cost microcontrollers, distributed sensing, and IoT connectivity provides a cost-effective architecture for intelligent thermal regulation, enabling real-time monitoring and adaptive control of the process without requiring high-performance computational platforms. This architecture facilitates the implementation of intelligent drying technologies, contributing to the digital transformation of conventional thermal processing systems.
The proposed system also demonstrated adequate tolerance to practical disturbances commonly encountered in thermal drying processes, including electrical noise associated with PWM, transient variations in ambient conditions, and fluctuations in evaporative demand during the different stages of dehydration. The use of calibrated digital sensors, together with synchronized variable acquisition and local processing of the control signal, reduced susceptibility to noise and improved the consistency of the system thermal response. Furthermore, although the system was evaluated under laboratory conditions, its modular architecture based on distributed sensing, IoT connectivity, and programmable control provides a flexible basis for future adaptation to larger-scale drying systems with more complex thermal and aerodynamic behavior.
Despite the favorable results obtained, certain limitations of the proposed system should be acknowledged. The embedded implementation of neural inference imposes inherent constraints in terms of processing capacity and memory availability, which limits the complexity of neural architectures that can be executed in real time. Furthermore, although the controller exhibited stable performance under the evaluated experimental conditions, additional studies are required to assess its generalization capability when applied to other agricultural products with different thermophysical properties.
In this context, future research could explore the integration of more advanced intelligent control frameworks, including explainable artificial intelligence (XAI) techniques and hybrid control strategies that combine neural networks with controllers based on physical models or fuzzy logic. Such developments could enhance the interpretability and robustness of intelligent drying systems, contributing to the advancement of cyber–physical thermal processing technologies.
From a methodological perspective, the combination of energy balance analysis, distributed sensing, adaptive control, and IoT infrastructure represents an integrated and replicable framework for the development of intelligent dryers aligned with Industry 4.0 principles [
10,
13]. The significance of this study lies in moving beyond isolated predictive modeling to demonstrate the practical implementation of a fully functional cyber–physical system with quantifiable improvements in energy efficiency and operational stability [
15,
47,
53].
Overall, the results demonstrate that integrating artificial intelligence, multivariable monitoring, and cloud connectivity not only optimizes the thermal performance of convective dryers but also enhances system reliability, automation, and scalability. This work provides solid experimental evidence supporting the transition toward more energy-efficient, sustainable, and digitally integrated drying technologies, contributing to the advancement of intelligent drying systems based on adaptive control and real-time energy analysis.
Although the proposed system was validated at laboratory scale, the selected operating conditions were sufficient to reproduce representative variations in thermal inertia, evaporative demand, and moisture transport resistance associated with increasing product loads. The evaluation performed under 2 kg, 4 kg, and 6 kg loading conditions allowed the controller to be tested under progressively more demanding thermal scenarios, providing an initial basis for future scale-up studies. Nevertheless, the direct extrapolation of the present results to industrial systems should be carried out with caution due to the greater complexity associated with airflow distribution, thermal gradients, and product heterogeneity at larger scales.