Abstract
Fruits and vegetables ripen at certain times of the year and must be ripe for consumption. However, in the short-term ripening period, some of the fresh vegetables and fruits that are more than the consumable amount deteriorate before they can be consumed. Picking up fruits and vegetables when they are ripe and drying the surplus for later use is the most common storage method. In recent years, where technology has developed rapidly, instead of drying in the sun, solutions are produced in which the drying processes are managed automatically by using the drying kinematics of the products. The most recent techniques manage the drying process by measuring the weight of the wet and dried products during heating. Also, different types of ovens such as microwave ovens are tried to increase the efficiency of the drying process. These are rather complex solutions. In this study, a smart system that manages the drying process in real-time by using the humidity in the environment instead of weight together with the drying kinematics of the product is designed. So the complexity of the system is simplified. Also, the total duration of the drying process is exactly estimated by using the moisture content in the environment and the drying model of the product. In the study, firstly, data on the drying stage were collected with the experiments made for each product. These data were processed in a Matlab environment and a drying model with a curve fitting method was developed for each product. The drying models developed in the study were loaded into the processor of the smart oven and the entire drying process was managed in real-time. With the developed system solution, when the process is started, the drying time is estimated according to the amount processed and the type of product, and the drying time of the drying process is estimated by using the moisture content in the environment and the drying model of the product. In this way, pre-drying and post-drying stages can be planned.
Keywords
Introduction
Approximately one-third of fresh fruits and vegetables deteriorate in the production chain since preservation methods are not applied until they come home.
Microorganisms found in fresh vegetables and fruits multiply over time because of the water in the product. The enzymes produced by these proliferating microorganisms cause changes in the chemical composition of the product and cause deterioration and decay in the products.
For fruits and vegetables to be stored for a long time without spoiling, the free water in them must be removed and dried. Drying foods with methods extends their shelf life. Storing fresh fruits and vegetables by drying provides economic benefits by preventing waste. However, Drying is a complex thermal process in which unstable heat and moisture transfer occur at the same time. 1
There are many studies in the literature regarding the drying of fresh vegetables and fruits. Looking at the techniques used, the sun-drying technique, which has been used for the first time, is one of the first known methods. Currently, there are many techniques in which solutions are produced by considering the kinetics of drying. Considering the kinetics of drying processes are developed in which the weight of the dried object and the drying rate is continuously monitored. Making the drying rate at the desired level and optimizing the energy used are areas open to improvement in the drying process.
Microorganisms that cause spoilage and decay in dried foods do not grow and multiply because they cannot find enough water, and the activities of enzymes that cause unwanted changes in the chemical composition of the food are restricted. 2
Drying food is a well-known technique for food preservation. Hot air drying is one of the oldest methods of drying food. Bound water in foods, relative humidity in the environment, airflow rate, and temperature are important components of drying. 3
Different methods are used for drying fruits and vegetables, such as hot air, microwave, vacuum, infrared radiation, freezing, solar energy, heat pump, and electro-spray drying. 4
Traditional drying with solar energy is the most economical method. However, since no parameter related to the drying process can be controlled in this method, it may cause loss of time and quality in drying as a result. 5
In the convective drying method, hot air is applied under atmospheric pressure. With this method, heat and mass transfer occurs between food and air. 6 Tray or tunnel drying systems are used in drying methods based on this heat conduction technique. The food to be dried is placed on a tray and hot air is passed over it. Alternatively, the food to be dried is slid through a tunnel containing hot air. During the process, heat flows from the hot air towards the food because of the temperature difference, which causes evaporation in the food. The water in the food evaporates and mixes with the air and the food is dried in this way. 7
Currently, 85% of the Drying systems use the hot air drying method. Although this method is simple and inexpensive, the product quality is low. Hybrid methods that try to combine microwave vacuum drying with hot air are being used to increase the quality of dry products. 8
Besides these conventional methods, which do not contain any feedback or optimization, there are also experimental drying methods using data on drying kinetics. In these methods, the drying curve or drying speed curve is got by using periodic or real-time mass monitoring or the change of water vapor in the drying oven, and the drying process is directed according to these curves.9–11
Moisture content change graphs can be got in convective drying with hot air using the curve-fitting tool. 12 By the way, the drying stages of products can be modeled to manage the drying process.
Mathematical models of drying processes are used to design new or existing drying systems or even control the drying process. Simulation models and drying properties of dried agricultural materials are needed in the design, construction, and operation of drying systems. Many researchers have developed simulation models for natural and forced convection drying systems.13,14
In the drying time estimation, computer-connected systems that use the weight change of the dried product as a parameter to control the process were developed. 15
This study aims to design an intelligent drying oven for drying fruits and vegetables. This study focuses on two issues different from the existing studies. The first was the use of the Raspberry Pi 3 processor as a smaller solution instead of a computer to improve hot air drying, which is already widely used, with the help of humidity and temperature sensors. Second, as an alternative to hybrid methods involving complex steps in using drying kinematics of products, a method that tries to optimize product quality by using only moisture data in the environment without weight change tracking has been developed.
The estimation of the drying time is important to plan before and after the drying process in a drying facility. Besides, it is necessary to estimate the drying time as accurately as possible to prevent energy losses because of unnecessary system interventions regarding the planning of the energy to be consumed in the process and the control of the drying process.
In the study, the drying kinetics of 10 different fresh vegetables and fruits were examined first. While examining drying kinetics, it was preferred to collect moisture data in the environment, since it is a cost-effective and efficient way.
With the data collected, a drying model was developed for each product.
The drying time was estimated by using these models in the oven with a Raspberry Pi based embedded control circuit developed in the study. Independent of the amount of the product placed in the oven, the moisture level in the environment was monitored and the model used to predict the changing drying time, and the time information that will change according to the amount and humidity of the dried product was presented to the process owners as feedback. In this way, the opportunity has been provided for the drying process to be planned with the previous preparation and next stages.
This article comprises five parts. The aim of the study and related studies are given in the “Introduction” section. How the drying curves are got is explained in the “methodology” section. The drying oven developed in the study is described in the “Experimental setup” section. Examination of the experimental results and evaluation of the pros and cons of the developed system was made in the “Discussion” section. Finally, the results got are given in the “results” section.
Methodology
In this study, a smart method that uses the drying kinetics of foods in the drying process has been developed. While developing the method, it was planned to use the moisture data in the drying environment regarding the drying kinetics. Using these data, drying curves were constructed for each food type. By using these curves during the drying process, the drying process is managed in real-time. In this way, drying can be made at the desired moisture rate and while this ratio is achieved, the total duration of the drying process can be calculated so the operation of the oven and thus the use of energy is optimized.
While developing the most suitable model for the experimental data in food drying, humidity in the environment was used instead of a continuous measurement of the mass of the dried material. Using moisture data has been preferred to provide an easier solution in industrial environments. There are precision sensors on the market that have been developed for the monitoring of humidity in industrial environments.
Data collected from experimental studies are point values. There is no definition of a continuous function between data. In such cases, the data (x1, y1), .., (xn, yn) are taken as point pairs. If a continuous function (f(xj) ≈yj for j = 1, .., N) that can generate these data can be defined, the kinetics of the drying process will be modeled. Getting this function is defined as a curve-fitting problem in the literature. 4 Matlab software tool was used in the curve-fitting problem tried to be got in this study.
f(x) second order drying function:
x: Second order equation function value
p 1: coefficient of x2
p 2: coefficient of x
p 3: constant-coefficient
Roots of the second order function:
When using moisture data in the model, the estimated standard error data is used to track the deviation of the system while operating in the real environment, RMSE (root mean square error). The RMSE is the root mean square of the difference between the prediction and the actual observation, which measures the mean size of the error. Since errors are squared before averaging, a small error becomes larger, and thus the sensitivity to error increases.
Besides, χ2 (chi-square) and R2 (coefficient of determination) values were used to determine the fit between model output and actual data. When the calculated value for R2 is between 0.85 and 1, the model is considered to fit the data. It can be said that the higher the R2 (closer to 1), the more suitable the developed model is for our data. This value is desired to approach 1 in a good curve fitting study. 16
In the ideal case of the model, the approximate values of these data are expected to be close to zero for the chi-square and estimated standard error, and close to one in R2. 17
Data production
The data used for this process were produced by periodic heating and moisture measurements for 10 different fresh vegetables and fruits in an existing heating oven. While the data were measured, the following systematic was followed:
500 g of products for 10 different fresh vegetables and fruits were prepared by chopping them in 5 mm thickness.
The chopped products were heated in a standard oven at a specific temperature for each product.
While the heating continues, moisture in three different parts of the oven was measured with three different moisture sensors.
The same experiment was repeated 20 times for each product.
Model development
The data got in the data collection study conducted with the convective drying method using a standard oven are given in the figures 1-10 based on food.

Second order curve fitting for strawberry.

Second order curve fitting for apple.

Second order curve fitting for pumpkin.

Second order curve fitting for kiwi.

Second order curve fitting for eggplant.

Second order curve fitting for onions.

Second order curve fitting for persimmon.

Second order curve fitting for pear.

Second order curve fitting for carrot.

Second order curve fitting for orange.
The data collected for each food were tried to be produced using the curve fitting technique in a MATLAB environment. While developing the model, χ2 and R2 values were controlled together with RMSE. The developed models are given in Table 1.
Second order root-finding table for products with a drying rate of 5.5%. x1 and x2 are roots that show how long it will take to dry the products. The smaller one of these values shows the estimated drying time.
The results of the curve fitting study performed on the collected data with Matlab software are given in Table 1. In the table, the solutions produced by MATLAB for the target drying level of 5.5% for 10 different experimental products used in the study are presented {(f(x) = p1x2+p2x+p3) = 5.5}. When we want to reach a 5.5% drying level, the smallest of the roots x1 and x2 in the solution set show the estimated drying time. A sample solution is also given in Figure 11. Figures 12–14 shows the sample dryed products

MATLAB solution for strawberry data.

Strawberries before and after drying.

Pear before and after drying.

Carrot before and after drying.

DHT22 temperature and humidity sensor circuit.
Experimental setup
Hardware system design
In this study, Raspberry Pi 3 processor and integrated humidity and temperature sensors were used as hardware in the system solution. In this way, a smaller scale solution was developed instead of solutions using industrial computers that are currently widely used. Raspberry Pi 3 is used to manage the control processes in the smart oven developed within the study. Different solutions using Raspberry Pi 3 are used in different sectors. 18
Raspberry Pi 3 is the most powerful Raspberry Pi model ever. The BCM2837 SoC (system-on-chip), produced by Broadcom, has a 1.2 GHz 64-bit 4-core ARM Cortex-A53 processor on the board. In this way, it offers approximately 10 times more processing power than the first model of Raspberry Pi.
In the designed system temperature control was performed using Raspberry Pi 3 DHT22. As shown in Figure 18. DHT22 temperature and humidity sensor is an advanced sensor with digital output. It is one of the high-performance models of the DHT series. It is an operating voltage of 3.3–5 V DC. Measuring range: Humidity: 0/100% RH.
In the designed system, SSR is used for switching. They are stable, long-lasting, modern electronic switches. It is a safe and easy-to-use solution, especially for controlling power lines with high voltage and high current values.
SSR is connected in series on the electrical line to be controlled. It opens or closes the electric current flow on the line according to the value given from the control input. It is also used to attenuate the supply signal (e.g. mains line) to a certain extent. Sample SSR circuit is given in figure 16.

SSR internal structure.
The Control input method differs in SSR models. 19 SSRs have models that can be switched on with direct current input (DC) and alternating current input (AC). When the input values fall below the turnoff voltage specified in the technical specifications, they close the current transition. Table 2 show sample Specifications for SSRs with input DC and output AC.
Specifications for SSRs with input DC output AC.
In the study, a control circuit based on PWM principles was used in the developed system. Microcontroller based asynchronous motor voltage/frequency speed control circuits is available in the literature for similar ventilation system needs. 20
In electronics, many modern microcontrollers (MCUs) integrate PWM controllers exposed to external pins as peripheral devices under firmware control through internal programming interfaces.
The main advantage of PWM is that power loss in the switching devices is very low. When a switch is off there is practically no current, and when it is on and power is being transferred to the load, there is almost no voltage drop across the switch. Power loss, being the product of voltage and current, is thus in both cases close to zero. PWM also works well with digital controls, which, because of their on/off nature, can easily set the needed duty cycle as shown in Figure 17.

PWM parameters.

Raspberry Pi 3 and temperature control circuit.
The term duty cycle describes the proportion of “on” time to the regular interval or “period” of time; a low duty cycle corresponds to low power because the power is off for most of the time. The duty cycle is expressed in percent,
In the PWM signal, it is checked how much the pulses are at +5 V level and how much at 0 V level in a period. In the PWM signal, the duration of a pulse at +5 V level is the pulse width, the percentage of this pulse width to a period is called Duty Cycle. If the output is +5 V continuously over a period, Duty Cycle is 100%, if the pulse width is 0V continuously over a period, then Duty Cycle is 0%.
Duty Cycle is got by multiplying the pulse width by 100 and dividing it by the period. According to the pulse width in the PWM signal, we get a value between 0 and 5 V from the output as if we were receiving an analog signal. However, when we measure this signal, which looks like an analog, when we connect it to the oscilloscope, we see it is a digital signal. We can adjust the brightness of a LED with a PWM signal; we can do DC motor speed control via a MOSFET. We can drive a servomotor with a PWM signal; adjust the brightness of a lamp. In this thesis, we use PWM to ensure that the heating resistor keeps the oven at a constant temperature of 80°C.
Software system design: Temperature control program
Raspberry Pi 3 was used to manage the control processes in the smart oven developed within the study. While many alternative languages can be used while programming the Raspberry Pi, the Python language was preferred in this study.
Python is useful in applications in different industries such as Web development, GUI, automation, and machine learning. 21 Python language is preferred in coding, especially because of its large ready-made libraries.
An example code for the codes developed in the study is shared below.
####### We are waiting for the oven’s temperature setdeger = 65 humidity1, temperature1 = Adafruit_ DHT.read _retry (model, sensor1) while temperature1 < setdeger : # oven set heat value and temperature1 is not None humidity1, temperature1 = Adafruit_ DHT.read _retry (model, sensor1) temperature1 = round (temperature1,2) GPIO.output (18, GPIO.HIGH) if temperature1! = ytemp : ytemp = temperature1 print temperature1 sleep (2) print “Drying Oven TEMPERATURE reached the desired level …”
Monitoring moisture: Humidity change monitoring circuit
Humidity change is monitored by using Raspberry Pi 3 DHT22 as shown in figure 19. The humidity change in the oven is monitored by taking the average of the measurements made by 3 DHT22 sensors placed at different points in the drying oven.

Moisture change monitoring circuit.
Physical structure of the oven
The oven to be used in the drying process is specially designed as shown in figure 20. To use the heat effectively, it is made of a 3 mm galvanized sheet in two layers inside the sandwich structure. It is heated with a 1000-watt resistance. There is a fan in the oven for air circulation at a speed of 1 m/s. It has a chimney for the humid air to be thrown out of the system.

The physical structure of the designed oven.
Discussion
In this study, a smart oven to be used for drying fresh vegetables and fruits was designed and developed. The drying kinematics of fresh vegetables and fruits were formulated with Matlab in the study. These formulas are loaded into the Raspberry pi based control system used for control of the oven. When the system starts up, it heats and dries the fresh vegetables and fruits up to the target moisture value under this drying kinetics and automatically ends the drying process when the desired moisture level is achieved. For this purpose, a second degree drying function was defined for 10 different fresh vegetables and fruits and successfully tested.
Since the smart system developed within the study works with the principle of controlling the humidity in the environment together with the drying kinematics of the product, it has been a more effective and simplified solution compared to current systems operating with the principle of measuring the weight of the product.
While managing the drying process during the operation of the oven, using the drying kinematics of the products by modeling can provide the potential to increase productivity for the enterprises as it allows the drying time to be estimated and to be planned in the pre and post drying processes.
Where the developed system is not used at full capacity, new solution approaches will be needed. Where the full capacity is not used, the first time estimates of the drying time may mislead depending on the location of the sensor in the oven, in the humidity’s measurement in the environment and the measurement result compared with the developed models. For such cases, optimization will be needed in the interior design of the furnace and the positions of the sensors.
For designing different capacity furnaces there will be another challenging problem to be solved which is the optimization of the positions of the humidity sensors.
Conclusion
In this study, a smart oven to be used for drying fresh vegetables and fruits was designed and developed. The developed system, the drying process can be performed at the desired moisture level, and thus products with different flavors and different storage times can be obtained.
The developed smart system manages the drying process in real-time by using the humidity in the environment instead of weight together with the drying kinematics of the product is designed. So the complexity of the system is simplified. In addition to this, the system estimates the required duration to complete the drying process according to the input status of the products and gives feedback to the process owners. The model improves itself and can automatically control the process until the desired moisture is achieved. Since the duration of the drying process can be determined, the process owners can easily plan the before and after activities of the drying process.
In this process, the energy loss is also minimized by preventing the unnecessary opening and closing of the drying stages to measure the weight of the products. Finally, since the desired moisture level can be defined, unnecessary heating is prevented and thus energy is used optimally.
The capacity of the system developed in the project is limited. When systems with different capacities are desired to be developed or when uses other than full capacity in the existing system, a new problem arises that needs to be solved. This problem is the most appropriate positioning of the moisture sensors to be used in the oven. If the positioning is not optimal, the time estimates may be incorrect when the furnace first starts up. Also, deviations in drying rates may occur. As the next step, new studies can be made on furnace design and sensor positioning optimization.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
