Computer Thesis

Download as pdf or txt
Download as pdf or txt
You are on page 1of 59

WOLLO UNIVERSITY

KOMBOLCHA INSTITUTE OF TECHNOLOGY

DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING

Title of the project: - Automatic Fuzzy Logic Based Washing Machine

Submitted by:
NAHOM TENSUE ……………………… 0816/07
EZANA TSEGAYE ………………………0412/06
BILAL ESHETU …………………………3210/06

Advisors
Mr. Melaku M. & Mr. Tewodros T.

June, 2019 G.C


DECLARATION

We, the undersigned, declare that this project is our original work, on Automatic Fuzzy Logic
Washing Machine. This project work has not been presented for a project in this or any other
universities and all sources of materials that will be used for the project work will be fully
acknowledged.

Name of the student Signature Date

NAHOM TENSUE

EZANA TSEGAYE

BILAL ESHETU

Date of Submission: June 21th of 2019

This thesis has been submitted for examination with our approval as a university advisor.

Thesis Advisor Signature

Thesis Advisor Signature

i Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


ACKNOWLEDGEMENT

It was challenging to start and accomplish this project but with the help of our almighty God we
did it. For the first and for the most we are delighted when we are saying the word “thank you” for
our father God. We would like to express our gratitude and sincere thanks to our respected advisor
instructors Melaku M. and Tewodros A. for them professional guidance, advice, motivation,
endurance and encouragements during them supervision period. The present work would have
never been possible without them vital supports and valuable assistance.
Also we want to thank Wollo University, especially school of electrical & computer engineering
for teaching us and for creating different learning opportunities from freshman year up to now.

ii Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


ABSTRACT

Since a wide variety of problems can be addressed through Embedded System projects we have
chosen the work entitled “Automatic Fuzzy Logic Washing Machine” for our final project. This
work seeks to solve problem faced by laundry shops, hotels and more over household was
procedures.
Our paper deals with the control operation of washing machine by using fuzzy logic control and
Arduino. This control is with respect to the degree of dirt, amount of load and the type of load,
since the wash time is based on the amount of clothes to wash, the type of load and the degree of
dirt in clothes. Manual washing processes and techniques are somehow tiresome, tedious,
inefficient and resource uneconomical. Hence, in this project we have analyzed, designed and
discussed the efficiency, time manageable, resource economical washing machine using Fuzzy
logic.
The automatic washing machines that uses Arduino as their processing device and fuzzy logic as
their logical controller, it is very essential to recognize the use and relationship between these two
structures to have the best outcome of the automatic fuzzy Logic designed Washing machine.
The final output of our work solves the conventional which the human interruption to decide upon
what should be the wash time for different cloths, the type and amount of load and degree of
dirtiness. This work proves the designed algorithm and analysis used in the methodology meets
the automation of washing machine using the concept of embedded systems.

iii Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C
Table of Contents
DECLARATION ............................................................................................................................. i

ACKNOWLEDGEMENT .............................................................................................................. ii

ABSTRACT ................................................................................................................................... iii

LIST OF FIGURES ....................................................................................................................... vi

LIST OF ABBREVIATIONS ...................................................................................................... viii

CHAPTER ONE ............................................................................................................................. 1

INTRODUCTION .......................................................................................................................... 1

1.1 Background ........................................................................................................................... 1

1.2 Statement of the problem ...................................................................................................... 2

1.3 Objectives of the Thesis ........................................................................................................ 3

1.3.1 General objective ............................................................................................................ 3

1.3.2 Specific objective ........................................................................................................... 3

1.4 Scope of the project ............................................................................................................... 3

1.4.1 Limitations ...................................................................................................................... 3

1.5 Significance of the study ....................................................................................................... 4

CHAPTER TWO ............................................................................................................................ 5

LITERATURE REVIEW ............................................................................................................... 5

CHAPTER THREE ........................................................................................................................ 8

SYSTEM DESIGN ......................................................................................................................... 8

3.1 Methodology ......................................................................................................................... 8

3.2 Generalized block diagram of the system ............................................................................. 9

3.3 Flow chart of the system ..................................................................................................... 12

3.4 Over all circuit diagram....................................................................................................... 13

3.5 Material Requirements for this thesis.................................................................................. 14

iv Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


3.5.1 Hardware components .................................................................................................. 14

3.5.2 Software components ................................................................................................... 24

3.6 Fuzzy logic controller design .............................................................................................. 29

3.6.1 Details about the Problem............................................................................................. 30

CHAPTER FOUR ......................................................................................................................... 36

RESULT AND DISCUSSION ..................................................................................................... 36

4.1 Result................................................................................................................................... 36

4.2 Discussion ........................................................................................................................... 41

CHAPTER FIVE .......................................................................................................................... 42

CONCLUSION AND RECOMMENDATION ............................................................................ 42

5.1 Conclusion........................................................................................................................... 42

5.2 Recommendation ................................................................................................................. 42

5.3 Future work ......................................................................................................................... 42

REFERENCES ............................................................................................................................. 43

APPENDIX I ................................................................................................................................ 44

APPENDIX II ............................................................................................................................... 44

v Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


LIST OF FIGURES

Figure 3.1 Block diagram of washing machine .............................................................................. 9


Figure 3.2 Flow chart of the washing machine ............................................................................. 12
Figure 3.3 Over all circuit diagram ............................................................................................... 13
Figure 3.4 LM35 Temperatures sensor ......................................................................................... 15
Figure 3.5 level sensor ................................................................................................................. 16
Figure 3.6 Buzzer ......................................................................................................................... 17
Figure 3.7 Keypad ......................................................................................................................... 17
Figure 3.8 L298 Motor controller pinout ...................................................................................... 18
Figure 3.9 Potentiometer ............................................................................................................... 20
Figure 3.10 Fan motor................................................................................................................... 20
Figure 3.11 main motor................................................................................................................. 21
Figure 3.12 LCD Display.............................................................................................................. 22
Figure 3.13 light emitting diode.................................................................................................... 22
Figure 3.14 block diagram of power supply ................................................................................. 23
Figure 3.15 power supply circuit diagram .................................................................................... 23
Figure 3.16 Relay circuit............................................................................................................... 24
Figure 3.17 Arduino Mega 1280 ................................................................................................... 25
Figure 3.18 Arduino IDE ............................................................................................................. 27
Figure 3.19 MATLAB .................................................................................................................. 28
Figure 3.20 Proteus 8 Starting Window ........................................................................................ 29
Figure 3.21 Fuzzy logic block diagram ........................................................................................ 31
Figure 3.22 membership function for degree of dirtiness ............................................................. 33
Figure 3.23 membership function for type of dirtiness................................................................. 33
Figure 3.24 function for output variable wash time ..................................................................... 34
Figure 3.25 membership function for wash time .......................................................................... 35
Figure 3.26 3D function for output surface viewer....................................................................... 35
Figure 4.1 welcome page .............................................................................................................. 36
Figure 4.2 types of clothes ............................................................................................................ 37
Figure 4.3 checking water pipe ..................................................................................................... 37

vi Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Figure 4.4 washing time for cotton ............................................................................................... 38
Figure 4.5 Removing water after washing the cloth ..................................................................... 38
Figure 4 6 checking the dirtiness .................................................................................................. 39
Figure 4.7 Clean the dirtiness ....................................................................................................... 39
Figure 4.8 drying clothes .............................................................................................................. 40
Figure 4.9 washing time for Nylon ............................................................................................... 40
Figure 4.10 washing time for woolen ........................................................................................... 40
Figure 4.11 washing time for tereline ........................................................................................... 40
Figure 4.12 washing time Lenin ................................................................................................... 41

LIST OF TABLE

Table 3 1 L-298 motor controller................................................................................................................ 19

vii Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C
LIST OF ABBREVIATIONS

AC Alternative Current

DC Direct Current

RPM Revolutions Per Minute

TTL Transistor Transistor Logic

IC Integrated Circuit

VCC Positive Supply Voltage

LCD Liquid Crystal Display

I/O Input, Output

LED Light Emitting Diode

ASIC Application Specific Integrated Circuit

VHDL Very High Integrate Circuit Hardware Description Language

VLSI Very Large Scale Integrated

PID Proportional Integral and Differential

FIS Fuzzy Interface System

LD Ladder Diagram

PLC Programmable Logic Controller

FIS Fuzzy Interface System

viii Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C
CHAPTER ONE

INTRODUCTION

1.1 Background

A washing machine is a machine to wash laundry, such as clothing and sheets. Washing Machines
incorporate a tub with heating element and something to rotate or scrub the clothes in the drum.
Once the water and detergent are added, mechanical action begin to soak and agitate the clothes.
Washing machines are mainly of three types, namely, semi- automatic, automatic and washer. In
semi-automatic machines the controls are not fully automatic and manual intervention is required.
In fully automatic machines, no manual intervention is required during the washing process. In
these machines programs have to be selected and set by the user prior to the start of wash cycle.
Sensors sense the wash load and decide the program ideal for washing the clothes, water level,
time required to wash, number of rinses and spins, type of fabric, etc. which can be implemented
by Fuzzy logic control in order to improve the wash performance in washing machines. Fuzzy
logic washing machines offer the advantages of performance, productivity, simplicity,
productivity, and less cost. Sensors continually monitor varying conditions inside the machine
and accordingly adjust operations for the best wash results. Typically, fuzzy logic controls the
washing process, water intake, water temperature, wash time, rinse performance, and spin speed.
This optimizes the life span of the washing machine. More sophisticated machines weigh the load
advice on the required amount of detergent, assess cloth material type and water hardness, and
check whether the detergent is in powder or liquid form. Some machines even learn from past
experience, memorizing programs and adjusting them. The fuzzy logic checks for the extent of
dirt and grease using special sensors, the amount of soap and water to add, direction of spin, and
so on. The machine rebalances washing load to ensure correct spinning. Else, it reduces spinning
speed if an imbalance is detected. Even distribution of washing load reduces spinning noise. The
number of cycles specifies the number of preset programs available on the machine.
In the past project, a user had to select the type of wash in a washing machine manually; the amount
of water and the duration of the wash cycle had to be keyed in before the washing process began.
Today, automatic washing machine employ what is known as fuzzy logic to automate is process.
Fuzzy logic is a mathematical system that is capable of analyzing analog input values and
converting them into logical variables.

1 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Fuzzy logic is an important development in washing machines as it helps save water. Machines
that employ fuzzy control are able to calculate the effort of a number of variable and decide the
right setting for the wash. The variable that fuzzy control evaluates in a washing machine include
the weight of the clothes in the machine, the type of dirt, water and electricity required for an
optimal wash. So the basic elements of fuzzy logic; fuzzy inputs, outputs, rules and defuzzification.
Input and output variables of fuzzy system are determined and their values i.e. very high, high,
medium, short etc. are being selected. Afterwards, rules are being developed and by using those
rules input and output relationship is developed.
Organization of the project, the first section is introduction over all background of the system.
Includes Background, statement of the problem, objectives, scope of the project, limitation and
significance of the study of the washing machine using fuzzy logic. Second section related
literature review. The third section will tell us about Construction details and material requirement
for the system design. Those materials are temperature sensor, water level sensor, keypad, Arduino
mega kit, relay, control circuit, and fuzzy logic controller. and explain about overall system design
i.e. block diagram, circuit diagram and flow chart, software tools like MATLAB, IDE, Protues.
The fourth section is simulating the results and discussion the washing machine in details how the
machine will work. The fifth section conclusion and recommendation about all the project the will
recommend to other student to do butter work. Finally, reference, appendix and abbreviation is
reported.

1.2 Statement of the problem


The traditional way washing cloth either by using manual force or by the standard washing
machines is very inefficient and less effective which have many problems and issues that must be
considered of having and changing to a better, well designed and automated washing machines.
The previous machines are manual, labor spent, more time requirement, costly and constructed
from huge hardware components; which consists of the basic problems listed as:

 Washing by hand involves soaking, beating, scrubbing and rinsing dirty textiles.
 Water for laundry would be hand carried, and heated on a fire for washing.
 Operated by low speed
 The current machine has no level sensor to detect water amount
 Operation of I/O devices observation cannot be done thoroughly

2 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


1.3 Objectives of the Thesis

1.3.1 General objective

The main objective of this project is to fully automate the manual washing system by designing
an algorithm using fuzzy logic in order to consider the best and optimum washing procedures.

1.3.2 Specific objective


The specific objectives of this project is stated below: To

 Design a washing machine simulator by using Arduino microcontroller system


 Determine the dirtiness by using fuzzy logic algorithm
 Applying control system using sensors and other devices
 To demonstrate the processes running in the system built
To understand fuzzy logic controller and its function on an automatic washing machine

1.4 Scope of the project

This project mainly describes the washing time for a specific cloth using fuzzy logic, controlling
of overheating using fan motor and water level detector for the washing. The project is designed
for improving the problems detected on the existing system and to moderate the culture of washing
habit. Due to the expansion of new automatic washing machine in our society this is the main
concern for those areas the project will get great significance to ensure the availability of meal all
the time. This system mainly describes the washing time for a specific cloth using fuzzy logic,
controlling of overheating using fan motor and water level detector for the washing. Further
automated systems are not included in this project like, detergent required for the cloth, automatic
water adding to the machine.

1.4.1 Limitations

 The detergent needs to be added manually to the tub.


 Type of close doesn’t detect by this washing machine, its controlled by the person
manually.
 All components are hard to find; it is somewhat difficult to implement the hardware.
 The water needs to be add manually to the tub.

3 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


1.5 Significance of the study
This project studies about controlling of washing machine using fuzzy logic controller. Fuzzy
logic enables us to know the required time for the certain cloth. In addition to this overheating and
water levels are controlled using the processor. Those levels are controlled using the following
significance.

 It would provide high benefit for society’s time saving


 Labor cost for the operators are reduced i.e. because of human intervention with the
machine is negligible.
 Performance of the machine is improved
 Productivity and simplicity highly increased
 We can hold the safety of the cloth.
 Risk due to overheating is removed.
 To obtain a wash time for different type of dirt and different degree of dirt
 decrease labor cost
 varying condition inside the machine easily monitored

4 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


CHAPTER TWO

LITERATURE REVIEW
Fuzzy Logic; 1965 the concept of fuzzy logic was first conceived by Professor Lotfi A. Zadeh
University of California, Berkeley. Father of fuzzy set theory and fuzzy logic. Knowledge
representation and nature language processing are handled in the epistemic facet of fuzzy theory.
Linguistic variables and their dependencies in the form of fuzzy if-then rules are described in the
relation facet [1].
Madhav Mehta, Rownaz Haque 2013 ‘Portable washing machine’ this washing machine that can be
used for traveling whether the laundry facilities are available or not. The coding has been done for
an integrated circuit(IC) by ASIC approach using VHDL. It is a single tub wash cum dry Portable
Automatic Washing Machine. it is an automatic handy machine that washes as well as dries our
clothes in an easy manner. The machine can be carried to different places, like a suitcase and is
especially for people who travel a lot and do not get laundry facilities everywhere. Currently a
washing machine that follows an ASIC (Application Specific Integrated Circuit) approach and is
also portable in nature is not available in market extensively. It is modeled from the system level
to the transistor level. Embedded System or VLSI Design, all lead to only one solution that is an
ASIC. the cloth. Cotton, Woolen, Denim and Mixed (different fabrics washed together) are type
of clothes that can be put in the washing machine. These are the few modes that are commonly
used in day to day life. If spin is enabled by the user, then the drain valve opens and the water
drains out enabling the spin cycle [2]. In This project the type of dirt hasn’t determined and also
Sensing the amount of dirt hasn’t available the cloth and then taking the appropriate action, also
the type of dirt, whether an oil bond is there, grease or muddy cloth.
Menaka Kural1, H. Prasanna Kumar Journals: International Journal of Software & Hardware Research in
Engineering ISSN-2347-4890 Volume 6 Issue 9 September, 2018 ‘Automatic washing machine using plc’
Automation plays an increasingly important role in the world economy. A washing machine is an
automatic machine, controlled by motor and different hardware equipment, whose operation is
sequenced and automated without human interference and is designed to wash laundry, such as
clothing, towels and sheets. The term is mostly applied only to machine that use water as primary
cleaning solution. Washing entails immersing, dipping, rubbing and scrubbing in water, usually
accompanied by soap, detergent or bleach.

5 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


The washing machine may simply agitate the cloths in water while switched on; automatic
machine may fill, empty, wash and spin in an automatic complex cycle. The washing time of the
washer comprises 2 cycles: wash and rinse cycle. During the wash cycle, water is added until a
high level sensor is triggered on. Then, the water pump is shut off and the agitator is activated for
10 min. After 10 min timer has expired, the dirty water is drained out through a valve that is
activated as soon as the agitator stops. The valve is stopped when the low level sensor is triggered
low. Then, the rinse cycle starts. The rinse cycle when the low level sensor is triggered low (end
of wash cycle). The cycle starts by adding water into tub until the high level sensor is triggered.
As soon as high level sensor is triggered, the water pump is shut off and the agitator is activated
for 10 min. after 10 min clock will expire, then agitator is stopped and water is drained out. The
valve continuous to drain the water until the low level sensor is triggered low [3]. The mostly used
languages in designing a PLC program are Ladder Diagram, PLC is miniature computers that
control the automated systems to run the everything around us. It controls the equipment according
to preprogrammed set of instructions. PLC is an electronic device; in past it is pronounced as
“Sequence Controller”. So the limitation of this project is the dirtiness doesn’t check. And also the
water remover is not working.
Pranali Khatake- “Design of Gears in Semi-Automatic Dish Washing Machine” (2016): This paper
Discuss about design of gears in semi-automatic dish washing machine. Why semi-automatic dish
washing machines are more popular in India as compared to fully automatic dish washing machine,
Automatic dishwasher uses large amount of water, time and is costly. And because of all these
reasons, the usage of automatic dishwasher in our country is very less. Use of semi-automatic
dishwasher, they can reduce time as well as efforts of human also. The result Indicate that in India
semi-automatic dish washing machines are used than fully automatic dish washing machine as it
is cheap, preferably gears are used in these semi-automatic dish washing machine with belt drive
for better life and high efficiency. Paper focused on design of gears used in semi-automatic dish
washing machine [4].
Seyed Reza Hashemi1 2011, Ata Jahangir Moshayedi 1,2 2004 ‘Smart Washing Machine’ A washing
machine is tested on the test bench and the data acquisition system which is designed in this article
is applied. After making sure that all SRWMA’s sensors including the voltmeter, wattmeter, Amp-
meter, tachometer, flow meter and thermometer are calibrated for measuring the rated voltage,
electrical power, current, motor speed, water consumption and temperature, respectively, from the

6 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


washing machine, this equipment is used. At the same time, two flow-meter sensors are also used
to measure the flow rates of both hot and cold water inlet, therefore, water consumption of the
washing machine. When the washing machine is tested, the signal’s information of the washing
machine is transferred to laptop through conditioning circuit and other hardware system and
processed by SRWMA software. When the washing machine is tested at 800r/min, and the cotton
cloth load is 5 kg (as the used washing machine is 5kg) [5].
Ankur Agarwal, Ankur Mishra, Mukesha Dixit department of computer science and engineering,
international journal of computer application (0975-8887) Volume 151-No.8, October 2016”design of an
improved fuzzy logic based control system for washing machine” fuzzy logic best applied in filed where
a great amount of uncertainty or fuzziness exist. So in building an expert system by applying fuzzy
interface rules is a very suitable choice. In a fuzzy interface system, fuzzy set theory is applied to
map input (or attribute) to output. The fuzzification process involves transforming crisp values
into various grades of membership for linguistic terms of fuzzy set. Membership functions are
used to associate a grade of to each and every linguistic variable. The fuzzy logic control for
washing machine. It has 2 input named ’type of dirt’ and ‘degree of dirt’ the output was in the
form of wash time with interface engine that 9 rules for the fuzzy logic controller [6].
Sudha Hatagar, S.V.Halase, department of physics, international journal of scientific research engineering
and technology (IJSRET), ISSN 2278 – 0882 Volume 4 issue 1,january 2015 “three input and one output
fuzzy logic control of washing machine” . This paper aims at presenting the ideal of controlling the
washing time using logic control. The paper describes the procedure that can be used to get suitable
washing time for different type of cloths, the process is based entirely on the principle of taking
non – precise inputs from sensor, subjecting them to fuzzy arithmetic and obtaining a crisp value
of the washing time, it is quite clear that from the paper itself that this method can be used in
practice to further automate the washing machines [7].

7 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


CHAPTER THREE

SYSTEM DESIGN

3.1 Methodology
First, the dirt in water is sensed by optical sensor after 5 rotations which give the output voltage
in the range of 0-5 volts. For high level of contamination of water, the voltage range is 0 to 2 volts
and for low level of contamination the range is 4-5 volts approximately. Secondly with respect to
load, the supply current drew increases as the load on the washing machine increases. By sensing
the amount of current and optical sensor output voltage, the wash time is determined. So the
control is done for both cases i.e. based on dirt level and amount of load. For lightly loaded
and less dirt requires less wash time. For heavily loaded and more dirt condition wash time is
more. The wash time is varied in order to control the type of load. By giving these signals (current
and voltage) as input to Arduino we determine the required amount of wash time for which the
machine is operated. Thus, Fuzzy logic controlled washing machine controller gives a correct
wash time even though a precise model of input and output relationship is not given. In addition
to this the system contains over heating controller using temperature sensor and level sensor to
detect amount of water present.
A design methodology for fuzzy logic- based control systems. The methodology employs
hardware/ software code sign techniques according to an ‘a priori’ partition of the tasks assigned
to the selected components. Experimental results from an actual control application validate the
efficiency of this methodology. The capability of fuzzy controllers to describe with simple rules
the linguistically expressed experience and knowledge of a human expert and to achieve that
without the need of a mathematical model of the plant under control, have motivated a great
increase in the number of control applications using fuzzy logic-based inference techniques.

 Design the general skeleton of the system.

 Constructing the circuit on the simulation software.

 Select the required component for the system based on the result.

8 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Block Diagram

The following block diagram contains four inputs and six outputs. The inputs to the
Arduino microcontrollers are:
 Keypad for the purpose of selecting the input clothes.
 Temperature sensor
 Water Level sensor
 Fuzzy logic controller
The outputs of the Arduino microcontrollers are:
 LCD display
 Fan motor
 Main motor (single phase induction)
 Buzzer
 LED
 Water pipe

Motor
3.2 Generalized block diagram of the system

KEYPAD
Water
remover
LM35

Arduino Mega LED


Water Level Microcontroller
sensor LCD

Buzzer
Fuzzy logic
Controller
Fan
motor

Figure 3.1 Block diagram of washing machine

9 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Principe of the operation
The tools for developing software and hardware for microcontroller-based systems include editors,
assemblers, compilers, debuggers, simulators, emulators, and device programmers. A typical
development cycle starts with writing the application program using a text editor. The program is
then translated into an executable code with the help of an assembler or compiler. If the program
has several modules, a linker is used to combine them into a single application. Any syntax errors
are detected by the assembler or compiler and must be corrected before the executable code can
be generated. Next, a simulator is used to test the application program without the target hardware.
Simulators are helpful in checking the correctness of an algorithm or a program with limited or no
input-outputs, and most errors can be removed during simulation. Once the program seems to be
working and the programmer is happy with it, the executable code is loaded to the target
microcontroller chip using a device programmer, and the system logic is tested.

Some common software development tools are:


 Text editors
 Assemblers/compilers
 Simulators
 High-level language simulators
 Integrated development environments (IDEs)
C program
The program for the Arduino consists of three sections:
 Initialization section
 Set up section
 Loop section

Initialization section:
In the initialization section, we initialize different variables required for the project as Start motor,
forward, reverse, voltage, current, nylon, cotton, Tereline, woolen, Lenin and fuzzy1.
In this, start motor, forward and reverse are used to rotate the motor. The start motor, forward and
reverse represents neutral, line1 and line2 respectively. Voltage and current are the outputs from
the transparency sensor and load sensor, whereas nylon, cotton, Tereline, woolen, Lenin, fuzzy1
are the inputs through the selector switch.

10 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Setup Section:
In this all the variables are defined as inputs and outputs as required. This we can see in the setup
section in our program. The start motor, forward, reverse, nylon, cotton, Tereline, woolen, Lenin,
LCD display, fan motor and fuzzy1 given to digital pins. Voltage, level, temperature and current
are taken as analog pins.
Loop Section:
The Selecting of the pin can be done by the if-else ladder. By selecting different case, different
wash time is set. The revolutions can be done by the programming given in this which needs the
Command like digital write. The command digital Write (stator motor, HIGH) makes the pin
HIGH which makes the neutral circuit of motor closed according to circuit. Later the commands
digital Write (forward, HIGH), digital Write (reverse, LOW) makes one of the line pin HIGH and
other LOW. This makes the line1 circuit closed and line2 circuit open. Some delay is given for
some time by the pre-defined function delay (). Then the motor rotates in to motion for some delay
given in function. Then the commands digital Write (forward, LOW), digital Write (reverse,
HIGH) makes one of the line pin HIGH and other LOW. This makes the line2 circuit closed and
line1 circuit open. Again some delay is given through delay (). Then the motor rotates in fro,
motion for some delay. Fuzzy is the function which is user defined. This represents the working
of fuzzy logic. This wash time is based on different dirt and load values. This is given in the
program for the function.
The types of clothes are below: -
If C=1, then Cotton will wash
If N=1, then Nylon will wash
If W=1, then Woolen will wash
If T=1, then Tereline will wash
If L=1, then Lenin will wash

11 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


3.3 Flow chart of the system

Start

initialization

Water level <8 yes Off main water Top


Liters motor up

yes
No

yes On fan
Temp>80oC
No motor

No
yes

No No No No No No
IS c=1 IS n=1 IS w=1 IS t=1 IS l=1

yes yes yes yes yes


No No No No No
Wash time Wash time Wash time Wash time Wash time
10 sec 20 sec 16 sec 14 sec 18 sec
yes yes yes yes yes

yes IS
Dirtiness
present
Determine dirtiness
yes
No
Calculate dirtiness Drying 8 sec

Wash time No
end
Figure 3.2 Flow chart of the washing machine

12 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


First the washing machine checks the water level is optimum. Then The Machine displays to select
the type of cloth, we select the cloth type, then it will wash the cloth for some minute, during
washing time there will be temperature increase so the system passes to check the temperature. If
the temperature is above 80oc the system will open the fan motor. when washing is finished the
buzzer make sound alert. Then we remove the water, after removing the water the dirtiness is
checked. If the cloth is not clean the system wash again if not the system stop washing. Then we
the pass cloths to draying section, the machine stop working process.

3.4 Over all circuit diagram


In the following diagram there are keypad used for selecting the type of cloth. Each button
represents specific cloth type. It is impossible to select two or more clothes simultaneously. This
is due to the manual set time is based on specific type of cloth not genera

Figure 3.3 Over all circuit diagram

13 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


3.5 Material Requirements for this thesis
Our thesis mainly consists of hardware part and software part. The hardware part constitutes the
basic model of washing machine along with the control circuitry. The software part consists of
the Arduino programming which is interfaced with the hardware part through Arduino Mega.
 Hardware components
 Temperature sensor
 Water level sensor
 DC motor
 Buzzer
 Fan motor
 Potentiometer
 Keypad
 Relay circuit
 LCD
 L-298 (motor controller)
 LED
 Software components
 Arduino IDE
 Proteus 8 professional
 MATLAB

3.5.1 Hardware components

Temperature sensor

When the washing machine operates for long time almost all components become heated. This
will cause electric shock, unbalance power, reduction machine life span and component losses due
to overheat. In addition to this, the washing machine has the dryer that operates with electric stove
like equipment. As the heat of the components increase, the temperature of the system become
above the required. This situation forces the temperature sensor to send signal to the
microcontroller and the processor recommends the fan motor to run according to the input.
LM35 is a basic temperature sensor that can be used for experimental purpose. It gives the readings
in centigrade (degree Celsius) since its output voltage is linearly proportional to temperature.

14 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


It uses the fact that as temperature increases, the voltage across diode increases at known rate
(actually the drop across base-emitter junction of transistor). Its disadvantage is its sluggish
response.

LM35 has the following main features;

 Calibrated Directly in Celsius (Centigrade)


 Linear + 10-mV/° C Scale Factor
 0.5 ° C Ensured Accuracy (at 25° C)
 Rated for Full −55° C to 150° C Range
 Suitable for Remote Applications
 Low-Cost Due to Wafer-Level Trimming
 Operates from 4 V to 30 V

Figure 3.4 LM35 Temperatures sensor

As shown in the figure above the sensor has three terminals.

i. Input source; it ranges from 2.7V to 5V


ii. Ground
iii. Output; analogue voltage output ranges from 201mV to 20v

The code will be written in C code. Before we can get a Celsius reading of the temperature, the
analog output voltage must first be read. This will be the raw value divided by 1024 times 5000.
It is divided by 1024 because a span of 1024 occupies 5V. We get the ratio of the raw value to the
full span of 1024 and then multiply it by 5000 to get the millivolt value. Since the output pin can
give out a maximum of 5 volts (1024), 1024 represents the possible range it can give out.

15 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


The raw voltage over this 1024 (value) therefore represents the ratio of how much power the output
pin is outputting against this full range. Once we have this ratio, we then multiply it by 5000 to
give the millivolt value. This is because there are 5000 millivolts in 5 volts.
Once this analog voltage in millivolts is calculated, we then can find the temperature in Fahrenheit
by the equation: ((Celsius * 9)/5 + 32).

Water Level sensor

Level sensor is used in our thesis to detect the amount of water present in the machine tank.
If the water level varies the resistance also varies. By using this variation, the processor will
recommend the output parameters. For Example, when the water level is below the required, the
main motor stops working. Else if the water level is optimum the motor continues its operation.
Fluid levels can also be measured using electronic techniques. These include resistive, capacitive,
optical, sonic and gravity. Resistive is the simplest technique and is reliable when using a
consistent liquid with a relatively small variation of resistance. With this approach, electronics
can more easily deal with the replication of individual sensors to provide level information and
limits.

Figure 3.5 level sensor


Here, a sensor-array probe uses the liquid level as part of the circuit path. The height location of
the sensor points Correspond to the desired levels to detect, and the contacts are made or coated
with a material that won’t corrode, oxidize or react with the liquid in the tank. The sensor points
can be inserted directly into the tank.

16 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


In our project the water sensor is using by push button because we didn’t found the water level
sensor. The pushbutton is a component that connects two points in a circuit when you press it. The
example turns on an LED when you press the button.

Buzzer

A buzzer is basically a tiny speaker that you can connect directly to an Arduino. It is an effect
where certain crystal will change shape when you apply electricity to them. By applying an
electric signal at the right frequently, the crystal can make sound.

Figure 3.6 Buzzer

Keypad

In our thesis we use Keypad, because keypad is an equipment used in this project where we need
to send different commands to perform the types of clothes. It is low cost equipment and easily
available in the market. And also it is the most common equipment with a very high customer
demand in the market. Keypad is most widely used input device to provide input from the outside
world to the microcontroller. The keypad makes an application more users interactive. The article
of interfacing keypad with atmega328 can be referred for detailed description of the methodology
used here. This article explains the interfacing of a 4x3 keypad with ATmega328 and displaying
the output on a LCD. Keypad is most widely used input device to provide input from the outside
world to the microcontroller. The concept of interfacing a keypad with the ATmega328 is similar
to interfacing it with any other microcontroller.

Figure 3.7 Keypad

17 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


L298 Motor controller

L-298 is a dual full bridge driver that has a capability to bear high voltage as well as high current.
It receives basics TTL levels and is able to operate the different loads such as Dc motors, stepper
motors, relays etc. L-298 has two enable input to control any device by enabling or disabling it.
So by connecting an L298 bridge IC to an Arduino, we can control a DC motor.
DC motor is the most common type of motor. Dc motors normally have just two leads, one positive
and one negative. If we connect these two leads directly to a battery, the motor will rotate. If we
switch the leads, opposite direction.

Figure 3.8 L298 Motor controller pinout

18 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


L298 Pins Description
Pin Name Pin Functions
OUT 1 Stepper motor A+ or DC motor 1(+)
OUT 2 Stepper motor A- or DC motor 1(-)
12V jumper Enables power to on board 5v regulator
12V Voltage supply
GND Ground (0V)
5V Voltage supply
ENA DC motor 1 enable
IN 1 Input from Arduino
IN 2 Input from Arduino
IN 3 Input from Arduino
IN 4 Input from Arduino
ENB DC motor 2 Enable
OUT 3 Stepper motor B+ or DC motor 2(+)
OUT 4 Stepper motor B- or DC motor 2(-)
Table 3 1 L-298 motor controller

Potentiometer

The potentiometer is an electric circuit in which the resistance can be changed manually by the
sliding contacts. The voltage Vs is applied A cross the two points of the wire A and B. C is the
variable contact point between A and B its position can be changed by the sliding contact.
In our thesis we used potentiometer as dirtiness detector. In the real word we are using fuzzy logic
controller as dirtiness detector, because it is difficult to communicate MATLAB and Arduino on
simulation so we replaced the fuzzy logic controller with potentiometer and we do the fuzzy logic
controller in separate simulator using in MATLAB. The working principles of the fuzzy controller
will be discussed latter on this chapter.

19 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Resistance
element
Sliding contact

Figure 3.9 Potentiometer

Fan motor

The purpose of fan motor (DC fan) is used to check the temperature, when the temperature Grater
than 80 degrees, the fan motor will rotate in the right direction to control the heat water. The fan
motor work in this paper to condenser from overheating. Its job is to cool the superheated
refrigerant that move through the condenser coils of our AC unit, which help to cool the machine.
The fans operate under a predictable set of laws concerning speed, power and pressure. The fan
motors is a DC fan motor.

Figure 3.10 Fan motor

20 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Main Motor (Servo motor)

In our thesis the DC motor we use to wash the dirtiness as well as to drying the cloth. In this project
DC motor are received from Arduino mega then the motor is rotate to both directions by the help
of dual full bridge driver (Motor controller). A DC motor is any of a class of electrical machines
that converts direct current electrical power into mechanical power. The most common types Relay
on the forces produced by magnetic fields. The servo motor is specialized for high-response, high-
precision positioning. As a motor capable of accurate rotation angle and speed control, it can be
used for a variety of equipment. A rotation detector (encoder) is mounted on the motor and feeds
the rotation position/speed of the motor shaft back to the driver.
Nearly all types of DC motors have some internal mechanism, either electromechanical or
electronic to periodically change the direction of current flow in part of the motor. Most types
produce rotary motion a linear motor directly produces force and motion in a straight line. DC
motors were the first type widely used, since they could be powered from existing direct current
lighting power distribution systems. A DC motor's speed can be controlled over a wide range,
using either a variable supply voltage or by changing the strength of current in its field windings.
Small DC motors are used in tools, toys, and appliances.

Figure 3.11 main motor

LCD

A Liquid Cristal display: are commonly used to display data in devices and interface LCD with an Arduino
to provide a user interface. Is a flat-panel display or other electronically modulated optical
device that uses the light-modulating properties of liquid crystals. Liquid crystals do not emit light
directly, instead using a backlight or reflector to produce images in color or monochrome. LCDs
are available to display arbitrary images (as in a general-purpose computer display) or fixed images
with low information content, which can be displayed or hidden, such as preset words, digits,
and seven-segment displays, as in a digital clock.

21 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


They use the same basic technology, except that arbitrary images are made up of a large number
of small pixels, while other displays have larger elements.

Figure 3.12 LCD Display

LED

A light emitting diode: is a two-lead semiconductor light source. It is a p–n junction diode that
emits light when activated. When a suitable current is applied to the leads, electrons are able to
recombine with electron holes within the device, releasing energy in the form of photons. This
effect is called electroluminescence, and the color of the light (corresponding to the energy of the
photon) is determined by the energy band gap of the semiconductor. LEDs are typically small (less
than 1 mm2) and integrated optical components may be used to shape the radiation pattern. In our
thesis the led works to show the light, when the motor is rotate also the led well be ON red color.

Figure 3.13 light emitting diode


LEDs have many advantages over incandescent light sources, including lower energy
consumption, longer lifetime, improved physical robustness, smaller size, and faster switching.
Light-emitting diodes are used in applications as diverse as aviation lighting, automotive
headlamps, advertising, general lighting, traffic signals, camera flashes, lighted wallpaper and
medical devices. They are also significantly more energy efficient and, arguably, have fewer
environmental concerns linked to their disposal

Unlike a laser, the color of light emitted from an LED is neither coherent nor monochromatic,
but the spectrum is narrow with respect to human vision, and for most purposes the light from a
simple diode element can be regarded as functionally monochromatic.

22 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Power supply

This is used to supply the other sections with the needed voltages. Any power supply consists of
the following main parts:
Transformer: - is used to transform the 220VAC to other levels of voltages.
Rectification: - this part is to convert the AC voltage to a DC one. We have two methods for
rectification:
Half wave-rectification: the output voltage appears only during positive cycles of the input signal.
Full wave –rectification: a rectified output voltage occurs during both the positive and negative
cycles of the input signal.

The Filter: used to eliminate the fluctuations in the output of the full wave rectifier “eliminate the
noise” so that a constant DC voltage is produced. This filter is just a large capacitor used to
minimize the ripple in the output.
Regulator: this is used to provide a desired DC-voltage.

Transformer Rectification Filter Regulator

Figure 3.14 block diagram of power supply

Figure 3.15 power supply circuit diagram

23 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Relay circuit

A relay is an electrical switch that uses an electromagnet to move the switch from the off to on
position instead of a person moving the switch. It takes a relatively small amount of power to turn
on a relay but the relay can control something that draws much more power. The contacts at the
top are normally open (i.e. not connected). When current is passed through the coil it creates a
magnetic field that pulls the switch closed (i.e. connects the top contacts). Usually a spring will
pull the switch open again once the power is removed from the coil.
When the relay gets energized the 230V A.C. gets connected to the respective terminal of the
motor. programming is done in such a way that the neutral terminal of the motor should always be
connected to the neutral of the supply. The other two terminals are connected according to the
program whenever forward or reverse direction rotation of the motor is needed.

Figure 3.16 Relay circuit

3.5.2 Software components

The software part of our thesis consists of programming done in Arduino and interfacing it with
the hardware setup. In this section we will see about the overall software and design of the washing
machine control using microcontroller.

Arduino Mega
Arduino is an open-source hardware and software company, project and user community that
designs and manufactures single-board microcontrollers and microcontroller kits for building
digital devices and interactive objects that can sense and control both physically and digitally.
Arduino board designs use a variety of microprocessors and controllers. The boards are equipped
with sets of digital and analog input/output (I/O) pins that may be interfaced to various expansion
boards or breadboards (shields) and other circuits.

24 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


The boards feature serial communications interfaces, including Universal Serial Bus (USB) on
some models, which are also used for loading programs from personal computers. The
microcontrollers are typically programmed using a dialect of features from the programming
languages C and C++.
In addition to using traditional compiler tool chains, the Arduino project provides an integrated
development environment (IDE) based on the Processing language project. Arduino is an open-
source electronics platform based on easy-to-use hardware and software. Arduino boards are able
to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an
output - activating a motor, turning on an LED, publishing something online.

You can tell your board what to do by sending a set of instructions to the microcontroller on the
board. To do so you use the Arduino programming language (based on Wiring), and the Arduino
Software (IDE), based on Processing [8].

Why Arduino Mega?


Thanks to its simple and accessible user experience, Arduino has been used in thousands of
different projects and applications. The Arduino software is easy-to-use for beginners, yet flexible
Programming language used in Arduino is just a simplified version of C++ that can easily replace
thousands of wires with words.
All of the electrical signals that the Arduino works with are either analog or Digital. It is extremely
important to understand the difference between these two types of signal and how to manipulate
the information these signals represent.

Figure 3.17 Arduino Mega 1280

25 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


The Arduino Mega 1280: is a microcontroller board based on the ATmega2560. It has 54
digital input/output pins (of which 15 can be used as PWM outputs), 16 analog inputs, 4 UARTs
(hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP
header, and a reset button. It contains everything needed to support the microcontroller; simply
connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get
started.

Arduino IDE

The Arduino integrated development environment (IDE) is a cross-platform application


(for Windows, mac OS, Linux) that is written in the programming language Java. It is used to write
and upload programs to Arduino board.

The source code for the IDE is released under the GNU General Public License, version 2. The
Arduino IDE supports the languages C and C++ using special rules of code structuring. The
Arduino IDE supplies a software library from the Wiring project, which provides many common
input and output procedures.

User-written code only requires two basic functions, for starting the sketch and the main program
loop, that are compiled and linked with a program stub main () into an executable cyclic
executive program with the GNU toolchain, also included with the IDE distribution. The Arduino
IDE employs the program argued to convert the executable code into a text file in hexadecimal
encoding that is loaded into the Arduino board by a loader program in the board's firmware [9].

26 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Figure 3.18 Arduino IDE

MATLAB

MATLAB (matrix laboratory) is a multi-paradigm numerical computing environment and


proprietary programming language developed by Math Works. MATLAB allows matrix
manipulation, plotting of functions and data, implementation of algorithms, creation of user
interfaces, and interfacing C, C++, C#, Java, Fortran and Python [11].
Although MATLAB is intended primarily for numerical computing, an optional toolbox uses the
MuPAD symbolic engine, allowing access to symbolic computing abilities. An additional package,
Simulink, adds graphical multi-domain simulation and model-based design for dynamic and
embedded system.
So, in our thesis we use MATLAB to control the fuzzy logic of the dirtiness and, also to checking
the type of dirtiness and degree of dirtiness.

27 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Figure 3.19 MATLAB

Proteus 8 professional:

Proteus Professional design combines the ISIS (schematic capture) and ARES PCB layout
programs to provide a powerful, integrated and easy to use tools suite for education and
professional PCB design. As professional PCB design software with integrated shape based auto
router, it provides features such as fully featured schematic capture, highly configurable design
rules, interactive spice circuit simulator, extensive support for power planes, industry standard
CADCAM and OD++ output and integrated 3D viewer We use ISIS for simulating Intel response,
it has many variety modeling libraries, and its powerful concentrates in MCUs and MPUs
modeling, and most PIC's families, also it has a debugger, registers contents viewer and many
other features.

28 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Proteus 8 EDA

Proteus v8 is software for microprocessor simulation, schematic capture, and printed circuit
board (PCB) design. It is developed by Lab enter Electronics system components: [12]

 Schematic Capture - a tool for entering designs.


 PROSPICE Mixed mode SPICE simulation industry standard SPICE3F5 simulator
combined with a digital simulator.
 ARES PCB Layout - PCB design system with automatic component placer, rip up and
retry auto-router and interactive design rule checking.
 VSM - Virtual System modeling lets co-simulate embedded software for popular
microcontrollers alongside hardware design.
 System Benefits Integrated package with common user interface and fully context
sensitive help.

Figure 3.20 Proteus 8 Starting Window

3.6 Fuzzy logic controller design


When one uses a washing machine, the person generally select the length of wash time based on
the amount of clothes he/she wish to wash and the type and degree of dirt clothes have. To
automate this process, we use sensors to detect these parameters (i.e. degree and type of dirt). The
wash time is then determined from this data.
Unfortunately, there is no easy way to formulate a precise mathematical relationship between
volume of clothes and dirt and the length of wash time required. Consequently, this problem has
remained unsolved until very recently. Conventionally, people simply set wash times by hand and
from personal trial and error experience.

29 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Washing machines were not as automatic as they could be. The sensor system provides external
input signals into the machine from which decisions can be made. It is the controller's
responsibility to make the decisions and to signal the outside world by some form of output.
Because the input/output relationship is not clear, the design of a washing machine controller has
not in the past lent itself to traditional methods of control design.

3.6.1 Details about the Problem


The problem in this project has been simplified by using only two variables. The two inputs are:
1. Degree of dirt
2. Type of dirt

The fuzzy controller takes two inputs, processes the information and outputs a wash time. How to
get these two inputs can be left to the sensors (optical, electrical or any type).
The working of the sensors is not a matter of concern in this paper. We assume that we have these
inputs at our hand. Anyway the two stated points need a bit of introduction which follows. The
degree of dirt is determined by the transparency of the wash water. The dirtier the clothes, less
transparent the water being analyzed by the sensors is. On the other hand, type of dirt is determined
by the time of saturation, the time it takes to reach saturation. Saturation is a point, at which there
is no more appreciable change in the color of the water. Degree of dirt determines how much dirty
a cloth is. Whereas type of dirt determines the quality of dirt; greasy cloths, for example, take
longer for water transparency to reach transparency because grease is less soluble in water than
other forms of dirt. Thus a fairly straight forward sensor system can provide us the necessary input
for our fuzzy controller.
Components of fuzzy logic: it has four main components like:
1.Fuzzification - converters input to set of certainties according to membership function.
2. Fuzzy Rule-Base - Set of IF-THEN rules used to decide outcome Designer dependent
different conclusions can be drawn from same data.
3. Interface mechanism -Two Step process,
Determine which rules from the if-then rules apply
Determine which conclusion reached based on rules
4. De-Fuzzification - converters output of interface mechanism in to a quantitative number.

30 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Linguistic input Output

Degree of Fuzzification
dirtiness

Types of Washing
Fuzzy arithmetic &
dirtiness applying criterion Time

DeFuzzification

Figure 3.21 Fuzzy logic block diagram

Fuzzy logic is a form of many-valued logic or probabilistic logic; it deals with reasoning that is
approximate rather than fixed and exact. Compared to traditional binary sets (where variables may
take on true or false values) fuzzy logic variables may have a truth value that ranges in degree
between 0 and 1. Fuzzy logic has been extended to handle the concept of partial truth, where the
truth value may range between completely true and completely false. Furthermore, when linguistic
variables are used, these degrees may be managed by specific functions.

It allows for approximate values and inferences as well as incomplete or ambiguous data (fuzzy
data) as opposed to only relying on crisp data (binary yes/no choices). Fuzzy set theory defines
fuzzy operators on fuzzy sets. The problem in applying this is that the appropriate fuzzy operator
may not be known. For this reason, fuzzy logic usually uses IF-THEN rules or constructs that are
equivalent, such as fuzzy associative matrices.

Details about the set applied: Before the details of the fuzzy controller are dealt with, the range
of possible values for the input and output variables are determined. These (in language of fuzzy
set theory) are the membership functions used to map the real world measurement values to the
fuzzy values, so that the operations can be applied on them. Values of the input variables degree
of dirt and type of dirt are normalized range (1 to 100) over the domain of optical sensor.

31 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


The decision which the fuzzy controller makes is derived from the rules which are stored in the
database. These are stored in a set of rules. Basically, the rules are if-then statements that are
intuitive and easy to understand, since they are nothing but common English statements. Rules
used in this project are derived from common sense, data taken from typical home use, and
experimentation in a controlled environment.

The set of rules used here to drive the output by using FIS variables are:

1. If (degree of dirtiness is Very Short) and (type of dirtiness is Non greasy) then (washing
time is Very Short)
2. If (degree of dirtiness is Very Short) and (type of dirtiness is Medium) then (washing time
is Very Short)
3. If (degree of dirtiness is Very Short) and (type of dirtiness is Dirt) then (washing time is
Medium)
4. If (degree of dirtiness is Very Short) and (type of dirtiness is Very Dirt) then (washing
time is Medium)
5. If (degree of dirtiness is Short) and (type of dirtiness is Non greasy) then (washing time is
Very Short)
6. If (degree of dirtiness is Short) and (type of dirtiness is Medium) then (washing time is
Short)
7. If (degree of dirtiness is Short) and (type of dirtiness is Dirt) then (washing time is
Medium)
8. If (degree of dirtiness is Short) and (type of dirtiness is Very Dirt) then (washing time is
Medium)
9. If (degree of dirtiness is Medium) and (type of dirtiness is Medium) then (washing time is
Short)
10. If (degree of dirtiness is Medium) and (type of dirtiness is Medium) then (washing time is
Medium)
11. If (degree of dirtiness is Medium) and (type of dirtiness is Very Dirt) then (washing time
is Long)
12. If (degree of dirtiness is Long) and (type of dirtiness is Dirt) then (washing time is
Medium)

32 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


13. If (degree of dirtiness is Long) and (type of dirtiness is Dirt) then (washing time is Long)
14. If (degree of dirtiness is Long) and (type of dirtiness is Very Dirt) then (washing time is
Very Long)

These membership functions are show below graphically:

(Grade of memberships)

Figure 3.22 membership function for degree of dirtiness


(Grade of memberships)

Figure 3.23 membership function for type of dirtiness

33 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


The rules too have been defined in imprecise sense and hence they are not crisp but fuzzy values.
The two input parameters after being read from the sensors are fuzzified as per the membership
function of the respective variables. These in additions with the membership function curve are
utilized to come to a solution (using some criteria). At last the crisp value of the wash time is
obtained as an answer.

(Grade of memberships)

Figure 3.24 function for output variable wash time


The sensors sense the input values and using the above model the inputs are fuzzy field and then
by using simple if-else rules and other simple fuzzy set operations the output fuzzy function is
obtained and using the criteria the output value for wash time is obtained. The results (the above
plot) shows the way the machine will response in different conditions. For example, if we take
type of dirt value both to be 100 and maximum load in equivalent of 100 the wash time which the
model output is equivalent to 30mins which is quite convincing and appropriate.

Instead of the conventional method which requires the human interruption to decide upon
what should be the wash time for different cloths. This situation analysis ability has been
incorporated in the machine which makes the machine much more automatic and represents
the decision taking power of the new arrangement.

34 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


(Grade of memberships)

Figure 3.25 membership function for wash time

(Grade of memberships)

Figure 3.26 3D function for output surface viewer

35 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


CHAPTER FOUR

RESULT AND DISCUSSION

4.1 Result
We have followed many steps and methods to accomplish our thesis and to fulfill its objectives.
The functionality of our thesis cannot be tested practically by demonstration because of the
unavailability of equipment and other problems. So we are forced only to test the control system
of our design by using Arduino microcontroller and by substituting some criteria with other that
available inside the protues8 EDA professional software as shown in the figure below.

Figure 4.1 welcome page

36 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Conditions

Step 1.
This system has five different types of clothes to washing, so first will select the type of cloth then
we check the water level sensor if the water level is very low or less than 8 liters the machine will
be stopes, therefore LCD will show you message, and the keypad is only works 1up to 5 key to
select the closes, if you press incorrect key, the LCD displays will show you to enter the valid key.

Figure 4.2 types of clothes

Figure 4.3 checking water pipe

37 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Step 2. Let us assume you chose cotton cloth then the system checks the water level, if the water
is full the cloth will be washed, also checks the temperature, If the temperature is high or greater
than 80oc, the fan will rotate forward to cooling the heat.

Figure 4.4 washing time for cotton

Figure 4.5 Removing water after washing the cloth

38 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Step 3. After washing the cloth, the water will be removed to outside, and the system check
dirtiness if the cloth is not clean, we add water to tub after adding the water, it determines the
dirtiness for some minute to clean the cloth.

Figure 4 6 checking the dirtiness

Figure 4.7 Clean the dirtiness

39 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Step 4. When the dirtiness is not present the cloth will be drying for 8 second.

Figure 4.8 drying clothes

Figure 4.9 washing time for Nylon

Figure 4.10 washing time for woolen

Figure 4.11 washing time for tereline

40 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


Figure 4.12 washing time Lenin

4.2 Discussion

According to the simulation result the control system performs the required operations like saving
time, identifying degree of dirtiness, controlling the processes according to the time sequence
needed. So the project can make our washing method more moderate.

When the operation started message displays on the LCD “input the cloth type” when the washer
input the cloth type directly the microcontroller processes the data and if it corrects input the
microcontroller send’s command and messages to the motor and screen in a very high speed, then
the motor moves forward and reverse direction to wash the cloth. If the cloth type is determined
before fixed washing is set then the driver moves the motor for the fixed time and stop’s operation,
manual way of washing is also supported. After washing the cloth, the water will be removed to
outside, and the system check dirtiness if the cloth is not clean, we add water to tub after adding
the water, it determines the dirtiness for some minute to clean the cloth, So when the dirtiness is
not present the cloth will be drying automatically.

41 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


CHAPTER FIVE

CONCLUSION AND RECOMMENDATION

5.1 Conclusion
By the use of fuzzy logic control along with manual control options using a selector dial we have
been able to obtain a wash time for different type of load and different degree of dirt. The
conventional method required the human interruption to decide upon what should be the wash time
for different cloths. In other words, this situation analysis ability has been incorporated in the
machine which makes the machine much more automatic and represents the decision taking power
of the new arrangement. Though the analysis in this thesis has been very basic, but this clearly
depicts the advantage of adding the fuzzy logic controller in the conventional washing machine.

5.2 Recommendation
 A more fully automatic washing machine is straightforward to design using fuzzy Logic
technology.
 the design process can be extended without undue complications to other control variables
such as water level and spin speed.

5.3 Future work

 For future work the system can also be linked with smart phone and it gives as information
when the washing time is completed. Even if we are not with the washing machine, this is
more compatible.
 Future functionalities will include energy consumption prognosis before starting the
program, and electricity tariff induced delayed start of the machines.
 Integration into home local (wireless) networks will allow monitoring energy demand via
different clients like computers or smart phones.

42 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


REFERENCES

[1] L.A. Zadeh, Fuzzy Sets, Information and Control, 338–353, (1965)

[2] Madhav Mehta, Rownaz Haque 2013 ‘Portable washing machine’

[3] Menaka Kural1, H. Prasanna Kumar Journals: International Journal of Software & Hardware
Research in Engineering ISSN-2347-4890 Volume 6 Issue 9 September, 2018 ‘Automatic
washing machine using plc’

[4] Pranali Khatake- “Design of Gears in Semi-Automatic Dish Washing Machine” (2016):

[5] Seyed Reza Hashemi1 2011, Ata Jahangir Moshayedi 1,2 2004 ‘Smart Washing Machine’

[6] Ankur Agarwal, Ankur Mishra, Mukesha Dixit department of computer science and
engineering, international journal of computer application (0975-8887) Volume 151-No.8,
October 2016”design of an improved fuzzy logic based control system for washing machine”

[7] Sudha Hatagar, S.V.Halase, department of physics, international journal of scientific research
engineering and technology (IJSRET), ISSN 2278 – 0882 Volume 4 issue 1,january 2015 “three
input and one output fuzzy logic control of washing machine”

[8] www.Arduino mega description.net

[9] www.arduinoIDE.net

[10] www.mathwork.com

[11] www.Proteus 8 professional.com

43 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


APPENDIX I
This code is written in MATLAB to checking the dirtiness using fuzzy logic.
clc
a = xlsread('fuzzylogic.xlsx')
f = readfis('untitled.fis')
for i=1:6
a(i,3)=evalfis([a(i,1) a(i,2)],f)
end
xlswrite('fuzzylogic',a)

APPENDIX II

This code is written in IDE to run the system in Arduino microcontroller.

Main program

#include <LiquidCrystal.h>

LiquidCrystal lcd (12,11,5,4,3,2);

const int numRows = 4; // number of rows in the keypad

const int numCols = 3; // number of columns

const int debounceTime = 20; // number of milliseconds for switch to be stable

// keymap defines the character returned when the corresponding key is pressed

const char keymap[numRows][numCols] = {

{'1', '2', '3'},

{'4', '5', '6'},

{'7', '8', '9'},

{'*', '0', '#'}

};

int forward_m=13;

int dirty_s=A0;

int reverse_m=A1;

int control=A2;

44 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


float adread;

int qut=A10;

int hlf=A9;

int ful=A8;

int q;

int h;

int f;

int v=100;

int m;

const int rowPins[numRows] = {7, 6, 1, 0}; // Rows 0 through 3

const int colPins[numCols] = {8, 9, 10}; // Columns 0 through 2

void setup () {

pinMode (forward_m, OUTPUT);

pinMode (reverse_m, OUTPUT);

pinMode (control, OUTPUT);

pinMode (A4, INPUT);

pinMode (23, OUTPUT);

pinMode (24, OUTPUT);

pinMode (22, OUTPUT);

pinMode (25, OUTPUT);

pinMode (26, OUTPUT);

pinMode (27, INPUT);

pinMode (qut, INPUT);

pinMode (hlf, INPUT);

pinMode (ful, INPUT);

45 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


lcd. begin (32,2); lcd. Set Cursor (0,0); lcd.print ("Wellcome To Student Laundery "); lcd. set
Cursor (0,1);lcd.print("Please wait..."); delay(500);

for (int row = 0; row < numRows; row++)

pinMode(rowPins[row], INPUT); // Set row pins as input

digitalWrite(rowPins[row],HIGH); // turn on Pull-ups

for (int column = 0; column < numCols; column++)

pinMode(colPins[column],OUTPUT); // Set column pins as outputs

// for writing

digitalWrite(colPins[column],HIGH); // Make all columns inactive

}lcd.clear();lcd.setCursor(0,0);lcd.print("PRESS 1-COTTON,2-NYLON,3-
WOOLEN");lcd.setCursor(6,1);lcd.print("4-TERELINE,5-LENIN");

void loop() {

temp();relatetemp();

// put your main code here, to run repeatedly:

char key = getKey();

if( key != 0) { // if the character is not 0 then

// it's a valid key press

lcd.clear();

lcd.setCursor(0,0);

lcd.print(key);

if(key=='1')

46 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


temp();relatetemp();level();relatelevel();lcd.clear();

lcd.print(" COTTON"); lcd.setCursor(30,0);lcd.print(adread); lcd.print(" C");


lcd.setCursor(0,1);lcd.print("Washing time 10sec");

digitalWrite(forward_m,HIGH); digitalWrite(24,HIGH); digitalWrite(23,LOW);

digitalWrite(reverse_m,LOW);

delay(500); lcd.clear();temp();relatetemp(); lcd.print(" COTTON");


lcd.setCursor(30,0);lcd.print(adread); lcd.print(" C"); lcd.setCursor(0,1);lcd.print("Washing time
9sec");

delay(500);lcd.clear();temp();relatetemp(); lcd.print(" COTTON");


lcd.setCursor(30,0);lcd.print(adread); lcd.print(" C"); lcd.setCursor(0,1);lcd.print("Washing time
8sec");

delay(500);lcd.clear();temp();relatetemp(); lcd.print(" COTTON");


lcd.setCursor(30,0);lcd.print(adread); lcd.print(" C"); lcd.setCursor(0,1);lcd.print("Washing time
7sec");

delay(500);lcd.clear();temp();relatetemp(); lcd.print(" COTTON");


lcd.setCursor(30,0);lcd.print(adread); lcd.print(" C"); lcd.setCursor(0,1);lcd.print("Washing time
6sec");

delay(500);lcd.clear();temp();relatetemp(); lcd.print(" COTTON");


lcd.setCursor(30,0);lcd.print(adread); lcd.print(" C"); lcd.setCursor(0,1);lcd.print("Washing time
5sec");

digitalWrite(forward_m,LOW);

digitalWrite(reverse_m,HIGH);

delay(500); lcd.clear();temp();relatetemp(); lcd.print(" COTTON");


lcd.setCursor(30,0);lcd.print(adread); lcd.print(" C"); lcd.setCursor(0,1);lcd.print("Washing time
4sec");

delay(500);lcd.clear();temp(); relatetemp();lcd.print(" COTTON");


lcd.setCursor(30,0);lcd.print(adread); lcd.print(" C"); lcd.setCursor(0,1);lcd.print("Washing time
3sec");

delay(500);lcd.clear();temp(); relatetemp();lcd.print(" COTTON");


lcd.setCursor(30,0);lcd.print(adread); lcd.print(" C"); lcd.setCursor(0,1);lcd.print("Washing time
2sec");

47 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


delay(500);lcd.clear();temp(); relatetemp();lcd.print(" COTTON");
lcd.setCursor(30,0);lcd.print(adread); lcd.print(" C"); lcd.setCursor(0,1);lcd.print("Washing time
1sec");

delay(500);

digitalWrite(reverse_m,LOW);water_remove();digitalWrite(23,HIGH);digitalWrite(24,LOW);

fuzzy();

delay(500);digitalWrite(23,LOW);digitalWrite(24,HIGH);

lcd.clear();

lcd.setCursor(0,0);

lcd.print("drying for 8 sec...");drying();digitalWrite(24,LOW);

temp();relatetemp();

lcd.clear();

lcd.setCursor(0,1);

lcd.print("THANK U"); delay(1000); lcd.clear();lcd.setCursor(0,0);lcd.print("PRESS 1-


COTTON,2-NYLON,3-WOOLEN");lcd.setCursor(6,1);lcd.print("4-TERELINE,5-LENIN");

int dirtyness_senor()

float value1=analogRead(dirty_s);

value1=(value1*5)/1023;

int value2=(int)value1;

return value2;

void fuzzy()

48 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


while(1){lcd.clear();digitalWrite(24,HIGH);level();relatelevel();lcd.clear();digitalWrite(23,
LOW);lcd.print("checking dertyness... ");delay(800);

dirtyness_senor();

int x=dirtyness_senor();

if(x==4)

lcd.setCursor(0,1);

lcd.print("VERY DIRT ");delay(500);

else if(x==3)

lcd.setCursor(0,1);

lcd.print("DIRT ");delay(500);

else if(x==2)

lcd.setCursor(0,1);

lcd.print("MEDUIM DERTNESS ");delay(500);

else if(x==1)

lcd.setCursor(0,1);

lcd.print(" Non greasy ");delay(500);

49 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C


else

lcd.clear();

lcd.setCursor(0,1);

lcd.print("NOW IT IS CLEAN");delay(300);

break;

lcd.clear();lcd.setCursor(0,1);

lcd.print("CLEANING, Please wait for ");

lcd.print(x);lcd.print("sec");//delay(500);

digitalWrite(forward_m,HIGH);digitalWrite(23,LOW);digitalWrite(24,HIGH);

digitalWrite(reverse_m,LOW);

for(int i=0; i<x; i++)

delay(1000);

digitalWrite(forward_m,LOW);

digitalWrite(reverse_m,HIGH);

for(int i=0; i<x; i++)

delay(1000);

digitalWrite(reverse_m,LOW);water_remove();{digitalWrite(24,LOW);digitalWrite(23,HIGH); }}}

50 Automatic Fuzzy Logic Based Washing Machine June, 2019 G.C

You might also like