Abstract

Washing machines (WMs) are common household appliances that help to save time and effort used in brushing and washing clothes. It is a common practice to use manually operated WMs, and based on their uses, WMs are classified into top and front open cloth washing machines, which operate based on an automatic control mechanism. In this paper, we present the design and simulation of an Arduino fuzzy logic-based WM control system, with an emphasis on improvement in its operating algorithm. Simulations were performed to determine the optimal time the WM takes to wash clothes, the maximum number of clothes the WM can wash per time, the acceptable dirtiness level of cloths, and the type of clothes that the machine can wash. The number of clothes to be washed, the degree of dirtiness, and the type of clothes govern the fuzzy logic control process adopted by the WM. The output voltage of the WM varies as the degree of dirtiness of the water varies from 0 to 1.95 V for very dirty water output from washed clothes and varies from 4 to 4.89 V for low-contaminated water. Another constraint considered was the load current, which increased as the number of clothes increased. The WM’s operation time is determined by the amount of voltage and load current used during its operation. As a result, the control of the WM is dependent on the dirtiness level of the clothes and the amount of load.

1. Introduction

One of the frequently used machines in the household is the washing machine (WM) [1]. A WM is a device used for cleaning and washing clothes/textiles that are dirty. Washing machines (WMs) can be classified into various categories depending on their mode of operation and loading characteristics. Depending on the operating characteristics, WMs are classified into two: manual and automatic washing machines (AWMs). This may be either semi or fully automatic depending on the loading conditions (top-loading or front-loading WMs). WMs that employ fuzzy control automatically calculate the effect of numerous variables and select the optimal wash settings, despite the fact that WMs do not always use fuzzy logic and their wash durations are typically not well controlled. Performance, productivity, simplicity, and low cost are some of the advantages of this device [2]. Fuzzy logic is a concept that is utilized by computers to make decisions that are similar to human behavior. It helps to make production more convenient and to boost industry productivity. These machines help to save time and effort used in washing clothes. Washing by hand involves soaking, beating, scrubbing, and rinsing dirty textiles. Manual washing consumes resources, labor, time, water, and detergent, and is most times costly depending on the number of clothes in consideration. Most WMs have been found to operate at low speeds, and although they do not measure the water level with a sensor, they must measure the level of inclination by weight. Furthermore, some WMs do not have temperature sensors to detect overheating of the system, and wash times are manually set by hand by either using personal trial or error experience [3, 4].

Fuzzy logic controllers have many practical advantages over other controllers, not only because of their simplicity, effectively, and flexibility, but also because they can handle problems with imprecise and incomplete data to give the desired output with very accurate and precise results corresponding to a wide range of operating conditions expressed in terms of linguistic functions. As there are many types of fuzzy logic controllers, the most commonly used fuzzy inference system is the so-called Mamdani method given by its inventor, Professor Ebrahim Mamdani. The Mamdani fuzzy inference system comprises four steps: Fuzzification of the input variables, rule evaluation with aggregation of the rule outputs, and finally defuzzification [1, 3]. Fuzzy logic systems help computers make decisions that resemble human behavior. These systems have been used in many industries to increase productivity and make production more convenient. Fuzzy logic controllers are easier to implement than conventional controllers, such as PID controllers, where it is difficult to decide the constant value of P, I, and D in order to obtain the anticipated result. Fuzzy logic controllers are applied to the control of the induction motor commonly used in washing machines, especially the single-phase induction motor. The speed of an induction motor is affected by a change in the given load. In addition, the speed control performance of the washing machine is also influenced by the effects of mechanical and electrical subsystems [4]. Fuzzy variables are processed using a system called a fuzzy inference system (FIS). FIS involves fuzzification, fuzzy inference, and defuzzification. The fuzzy system, which is represented in terms of neural networks, utilizes the learning capability of the neural networks to improve the system’s performance. Fuzzy logic is also used in process control, modeling, estimation, identification, diagnostics, stock market prediction, agriculture, and military science [5].

The rest of the paper is organized as follows: a review of related research is presented in Section 2. Section 3 presents the operational method used in solving the problem, including the fuzzy logic controller design, simulation, and implementation. Section 4 presents the results of the simulations and discussion. In Section 5, the paper is concluded.

In recent times, fuzzy logic controllers (FLCs) have gained much application in WMs. In Reference [2], the authors proposed a model of a household WM using the concept of fuzzy logic (FL) implemented with MATLAB’s fuzzy logic toolbox. Their results show a high sensitivity to dirty clothes 8.73 (degrees of dirt). Similarly, in Reference [3], the authors designed and simulated an FLC system WM using MATLAB’s FL toolbox.

In Reference [4], the authors presented the design of a fuzzy logic-based smart washing machine (SWM). The authors discussed the design of fuzzy logic concepts for the development of the SWM. Also, the mechanical timer drawbacks for the effective timing of WMs were discussed.

Authors in [5] proposed an FLC having five inputs to give an accurate wash, rinse, and spin time for WM. Other input conditions were also considered, and the results were simulated using MATLAB’s FL toolbox.

Authors in [6], proposed a neural network-based fuzzy controller which uses the Levenberg–Marquardt (L–M) algorithm for the backpropagation (BP) network. MATLAB software was used to simulate the neuro-fuzzy controller in the WM control system.

Patil et al. [7] presented a WM with an advanced washer control feature. This WM was used in the home for washing clothes and consists of a neuro-fuzzy and fuzzy technique that enables the system to make its own decisions.

In contrast with previous studies, this study presents a new Arduino fuzzy logic-based AWM control system algorithm with a reduced number of rules to solve the problem of the time it takes the WM to wash the different types of clothes, the dirtiness of clothes, and several clothes. The Arduino fuzzy logic-based AWM control system design was achieved using Proteus software. The control program of the WM was developed by using an IDE with the developed program loaded onto the Arduino kit. Simulations were performed on the control circuit of the FL-based AWM by using the interlocked Proteus 8 Professional and Arduino 1.6 software.

3. Materials and Methods

3.1. Operational Process of a Washing Machine

A WM is an appliance that operates based on the rotational movement of a drum that turns clockwise and counter clockwise in order to mix clothes with water and detergent and to dry them by rotation using a centrifugal force () The can be calculated as a function of the spinning internal parameters given by equation (1):where

Thus, equation (1) can be expressed as a function of the rotational speed given in equation (2):where ω is the angular velocity, m is the mass turning around with the drum, is the normal component of acceleration, Vt is the tangential velocity, and R is the radius of the drum.

3.1.1. Washing Machine Model Development

The mode of operation in modeling the WM consists of three cycles of operation, namely: wash, spin, and rinse. These cycles have different power consumption abilities. A smart timer was used in the WM to indicate the time consumed by each cycle of operation and state the type of clothes the individual wants to wash. Even when the running time (Tn) is less than the required set time (Tmax), the WM will turn ON, and when the required time and running time become equal, the dryer of the WM will turn OFF as represented in equation (3) [810].where S_wm (n): n time interval status of washing machine [0 = OFF; 1 = ON, T_n: washing machine running time (minutes), washing machine required running time (minutes).

Therefore, the power consumption of the WM can be calculated using equation (4).where D_wm (n): demand response signal for the washing machine in the time interval (0 = OFF; 1 = ON).

(1) WM Design Process. The WM design was implemented and simulated in MATLAB using MATLAB’s FLC Simulink software. The Arduino Uno microcontroller was programmed using C++ (which the program is coded). A similar programming procedure for Arduino programming was discussed in Reference [11]. The software program allows the system to control output systems such as motors, washing time, and temperature regulation, while the hardware using the developed program is used for quality control and to detect the level of water using a potentiometer (level sensor). The program was written considering the following steps as shown in the flowchart in Figure 1, with the following procedures. These are start: beginning point, initialization: initialize starting values, condition: the type of cloth, temperature value, and water level, statement: washing time, motor run and valve opening, and end: termination of the program, where linen, wool, terylene, cotton, and silk are the types of materials of clothes to be washed, which represent the types of loads. The symbols for the types of clothes are represented by Linen (L), Wool (W), Terylene (T), Cotton (C), and Silk (S). The flowchart presented in Figure 1 has checking, selection, action, and wash drying stages. The stages are explained as follows:(i)Checking stageIn this stage, the operating time of the AWM control is checked. In addition, this stage gives the status of operation of the WM, whether the cloth is added to the WM or not, is the water added into the machine or not, is detergent available in the machine or not, and finally checks the temperature of the machine in addition to whether the door of the WM is closed or open for it to operate effectively. Therefore, this stage can be said to control the whole action of the WM.(ii)Selection stageThis stage is the selection stage of cloth types (load type). There are five clothes types considered in this paper. These are linen (L), woolen (W), terylene (T), cotton (C), and silk (S).(iii)Action stageIn this stage, the actions necessary for the effective washing process are performed. The actions include opening the water valve, closing the door, opening the fan motor, and adding detergent.(iv)Washing and drying stageDrying the washed clothes is the final stage of the washing process of the WM. All the above stages are mandatory for the healthy work of the washing machine. At this stage, the cleanliness of the clothes is determined.

3.2. Fuzzy Logic Controller Design, Simulation, and Implementation

The fuzzy controller of the WM has linguistic inputs which are types of clothes, number of clothes, degree, and type of dirt. This control mechanism determines the wash, spin, and rinse time of the WM [12]. Fuzzy logic control follows the IF-THEN rule. For these rules, this paper approaches fuzzy sets and fuzzy operators as the subjects and verbs of fuzzy logic. The procedure of operation using the proposed fuzzy logic approach is shown in Figure 2.

However, in order to say anything useful, we need to complete sentences. Conditional statements are employed in this approach if the rules are the things that make fuzzy logic useful, that is, they allow us to complete sentences. The structure of a single IF-THEN rule is given by equation (5).where A and B are linguistic terms of a fuzzy set; x is the membership function input; “x is A” is called the antecedent and describes a condition; and “y is B,” which is called the consequence, which determines the conclusion. The proposed IF-THEN rule algorithm incorporated and implemented in this work to derive the set of outputs is shown in Figure 3.

The proposed FLC inference engine is designed using 9 rules for wash time (WT), 9 rules for the rinse period (RP), and 4 rules for the Spin Period (SP). The FL output ranges for the WT are very short, short, medium, very long, long, and none, while the linguistic input (LI) for the degree of dirt is small, medium, large, and none. The other set of LI for the type of dirt is not_greasy, medium, greasy, and none, as shown in Figure 3, while a screenshot of the input-output interface is shown in Figure 4.

There are different types of membership functions (MF) used in FLC for WMs. These are triangular MF, trapezoidal MF, Gaussian MF, etc. In this paper, the membership function used is triangular MF. The washing time is calculated by using the centroid method [11].

3.2.1. Defuzzification Techniques

The fuzzification procedure yields an output contingent upon the established rule base and inference engine. This procedure creates an output from the precise values existing in the input in the fuzzified form. Usually, the fuzzification process includes a combination of two or more fuzzy sets functional as inputs and defined over the universe of discourse. The procedure of changing the fuzzy rule base output to a concluding crisp value, appropriate to be useful for applications for which a system is intended, is called “defuzzification.” The defuzzification method cannot be chosen methodically contingent upon the applications. It depends on the need for the application [13].

(1) Centroid method. The best aware and commonly used technique for defuzzification is the “centroid method” also called as “center of gravity” or “center of area” method. It clips the area into smaller regions and then the union operation is performed to get the final output. It is given by the expression in equation (6).

Here, represents the number of elements in the sample, i.e., are the elements and are their corresponding membership functions.

(2) Bisector method. The bisector method or bisector of area method splits the area into two sections with the same area. It may or may not overlap with the centroid line of the given area.

(3) Middle of maxima (MOM) method. The simplest method of defuzzification is to take the crisp value with the highest degree of membership function. The mean of maxima is the arithmetic average of mean values of all intervals contained in the fuzzy set including zero-length intervals. The equation of the defuzzified value is given by equation (7).where  = height of the fuzzy set and  = cardinality of the fuzzy set M.

3.2.2. Maximum Number of Fuzzy Rules

The maximum number of fuzzy rules is calculated based on the number of inputs and the different fuzzy sets contained in those inputs. Therefore, this is achieved by multiplying the number of fuzzy sets of all the inputs. We have a system with two inputs, and each of these inputs contains three fuzzy sets. Therefore, the maximum number of fuzzy rules is = 3 × 3 = 9. The general rule for calculating the maximum number of rules is given by equation (8). The FL input-output flow of the system design is shown in Figure 5.

3.2.3. Membership Functions

The membership functions and a variety of fuzzy signals are used to fuzzify the signals. The output parameter is also fuzzified into linguistic variables and the input parameters are fuzzified into corresponding fuzzy signals with typical linguistic variables. Triangular and trapezoidal membership functions are two types of membership functions that are dependent on the variables’ properties. The input and output membership functions are illustrated in Figure 6.

These membership functions for the degree of dirt and type of dirt are shown in Figures 7 and 8, respectively. In Figure 7, it is seen that the degree of dirt is detected to be small in the initial stage when the clothes are put into the WM but increases gradually until it gets too large. The same occurrence is observed in Figure 8 for the type of dirt.

The rules have been defined precisely; hence, they are not crisp but fuzzy values. The two input parameters after being read from the sensors are fuzzy fed as per the MF of the respective variables. These, in addition to the MF curve, are utilized to come to a solution (using some criteria). Finally, the crisp value of the wash time is obtained as an answer. The values of the input-output flow of the system are derived in advance through the process of Fuzzification. The MF is used to map the crisp input to the fuzzy inputs. This is illustrated in Figure 9.

The load sensor senses the input values and using the proposed model, the inputs are fuzzy fields and then by using simple IF-ELSE rules and other simple fuzzy set operations, the output fuzzy function is obtained using the fuzzy rules to determine the wash time. The results shown in Figure 9 illustrate the way the machine will respond to different conditions.

For example, if the value for the type of dirt and maximum load is equivalent to 100, the model WT output is equivalent to 30 min, which is quite convincing and appropriate with respect to the comparison made with other works. Instead of the conventional method, which requires human intervention to determine the wash time for different types of clothes. The proposed system presents the ability to operate in a totally automatic manner by determining the decision making process of the WM.

4. Results

Simulation results were obtained for WT, type of load (i.e., type of cloth: linen, cotton, woolen, terylene, and silk), and the temperature in degrees centigrade and degrees Fahrenheit to indicate safe working condition of the WM. When the temperature is hot, the buzzer gives an alarm and the speed of the fan motor increases so as to cool the main motor of the control system motor. The liquid crystal display (LCD) displays the temperature, type of load, and level of the current or voltage according to the IDE program used. Therefore, we present six results with six scenarios. Proteus software was used to design the overall FL-based WM. The overall circuit diagram of the system design is presented in Figure 10.

Scenario 1. When the simulation was started as shown in Figure 3, the temperature sensor senses the temperature, the transparency sensor senses the saturation of the water (level of transparency of water to the cloth), and the voltage sensor measures the voltage before and during the washing process. When the temperature is greater than the standard set value in the developed program, the main motor and the fan motor rotate at high speed. The fan motor is used to ventilate the main motor to prevent overheating.

Scenario 2. When a load is added to the washing machine and the selector switch selects a linen cloth, the LCD displays the type of load that was added, indicating whether the temperature is safe or not, and also the level of current and voltage. In addition to this, the WT is also displayed. The 2nd result obtained from the LCD is as follows:(i)Type of load = linen; washing time in minutes = 8.50; F = 104°f; C = 40°c; status: temperature is safe.

Scenario 3. When a load is added to the washing machine and the selector switch selects a woolen cloth, the LCD displays the type of load that was added, indicating whether the temperature is safe or not and also the level of current and voltage. The 3rd result obtained shown by the LCD is as follows:(i)Type of load = woolen; washing time in minutes = 7.30; F = 104°f; C = 40°c; status: temperature is safe.

Scenario 4. When a load is added to the washing machine and the selector switch selects a cloth made of terylene, the LCD displays the type of load that was added, indicating whether the temperature is safe or not and also the level of current and voltage. The 4th result obtained shown by the LCD is as follows:(i)Type of load = terylene; washing time in minutes = 9.00; F = 104°f; C = 40°c; status: temperature is safe.

Scenario 5. When a load is added to the washing machine and the selector switch selects a cloth made of cotton, the LCD displays the type of load that was added, indicating whether the temperature is safe or not, and also the level of current and voltage. The 5th result obtained shown by the LCD is as follows:(i)Type of load = cotton; washing time in minutes = 7.00; F = 104°f; C = 40°c; status: temperature is safe.

Scenario 6. When a load is added to the washing machine and the selector switch selects a cloth made of silk, the LCD displays the type of load that was added, indicating whether the temperature is safe or not and also the level of current and voltage. The 6th result obtained shown by the LCD is as follows:(i)Type of load = silk; washing time in minutes = 9.26; F = 104°f; C = 40°c; status: temperature is safe.

4.1. Performance Evaluation

In Figure 11, the output in terms of the inputs of the whole system is presented. The figure shows the interaction between the input and output, thus showing how the two input values affect the output. Furthermore, the results from this figure help us to improve the fuzzy rules if some performance characteristics are not suitable enough to give the desired results.

The results show that with inputs of 13.6 (degree of dirt) and 5.2 (type of dirt) for both LIs a maximum output of 9.26 mins WT was achieved, while when the inputs are 100, an output of 50 mins is achieved, as shown in Figure 11. The lowest WT achieved was 7 mins for load type cotton, while the maximum WT was 9.26 mins for silk. The output voltage of the WM was observed to vary as the degree of dirtiness of the water varies from 0 to 1.95 V for low contaminated water output from washed clothes and also from 4 to 4.89 V for very dirty water.

4.2. Result Comparison with Existing Works

This section presents a comparison of the proposed fuzzy logic control algorithm with related research papers. In this research work, the WT is reduced by a maximum of 9.26 minutes as compared with other studies in [2, 1215] with a fewer number of rules. Also, other factors like a number of rules, WT, MF, and LI and outputs (LO) are compared with other research papers as presented in Table 1.

5. Conclusions

This paper presents the design and simulation of a fuzzy logic controller (FLC) for the effective operation of washing machines (WMs). In addition, an improved algorithm was developed to reduce the wash time (WT) required by the WM to wash different types of cloths which include linen, cotton, woolen, terylene, or silk. Instead of the conventional methods employed in the operation of WMs that requires human intervention to decide the wash time for different cloths, an AWM was presented in this paper to improve on the existing systems. Taking into account the dirt of the clothes and the load on the machine depending on the washing time, the fuzzy logic control algorithm was able to determine the WT automatically. The WMs sensors continually monitor the varying conditions inside the machine and accordingly adjust operations to give the best wash results. The result of the FL-based WM depends on the type of cloth and type of dirt. The results show a reduced maximum of 9.26 minutes for WT using two LI. Therefore, the proposed WM algorithm offers a greater advantage in terms of performance, productivity, simplicity, and less cost.

Data Availability

The data used or analysed during the current study are not publicly available but are available from the corresponding author on reasonable request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Authors’ Contributions

Conceptualization was done by A. O. Salau and H. Takele; methodology was done by A. O. Salau and H. Takele; software was designed by H. Takele; validation was done by A. O. Salau and H. Takele; formal analysis was done by A. O. Salau; investigation was done by A. O. Salau; resources were gathered by H. Takele; data curation was done by Haymanot Takele.; H. Takele wrote the original draft; A. O. Salau reviewed the article; visualization was done by A. O. Salau and H. Takele; supervision was done by A. O. Salau; project administration was done by A. O. Salau and H. Takele. All authors have read and agreed to the published version of the manuscript.