Week - 4
AIM:
L. Implement control logic of a "washing machine" using Stateflow as per given sequence
if the power supply is available, the system gets activated.
If the Water supply is not available, stop the process & indicate through LED
Soaking time should be 200s followed by Washing time of 100s.
Then rinsing happens for next 20s & dryer runs for 50s
After all the processes have completed turn on the finished LED
2. Make a Simulink chart for the "Gear shift" logic as per below conditions:
Speed Range(kmph) Gear
0 to lb
16 to 25
26 to 40
41 to 60
4
Above 61
Give speed input while the simulation is running & display the gear number.
PROCEDURE
WORKING PRINCIPLE OF A WASHING MACHINE:
A Washing machine by spinning at 800-1600 rpm helps soap and dirt with it to leave the surface of
the cloth via centrifugal force and into outlet pipes hence utlizing centrifugation to both clean and partially dry
the clothes loaded in it. Thus the processes are electrically controlled, such as the drum, valves, pump, motor and
neatng. ne valve opens again and the airty water drains out of the drums. The pump works to help get rid of the
water. The valve lets clean water in again into the drums. The four process are:
soaking:
it is used to dip clothes in detergent water to remove dirt from the clothes. in this function customer need to
select soak from a panel. Soak- This function is available with ash timer, In 42 min of washing 27 min is soak and 15
min machine will wash the clothes.
1) STATE- FLOW
ystematic soluton of a problem is possibie with sequential, unambiguous and realizable finite process
step set. Ihis set is called 'algorithm and it is one of the most important part of the programming anguages. in this
study, it is represented hovw to learn algorithm by using simulink stateflow, In flow diagram-based algorithm learning.

CONTROL LOGIC OF A WASHING MACHINE:
It checks for the extent of dirt and grease, the amount of soap and water to add, direction of spin, and
o on. The machine rebalances washing load to ensure correct spinning. Else, it roduces spinning speed il an
mbalance is detected. Even distribution of washing load reduces spinning noise.

The two inputs are given for the power and water supply. Once the inputs are given outputs are displayed by the
flow chart as per the given sequence. The system are observed for sometime then it is checked and the process is
completed by green light as displayed.

2) GEAR SHIFT LOGIC:
A gear shift mechanism for a manual transmission includes a shaft axially movable for
selecting shift planes and rotatable for engaging the gears defining the shift planes. Ihe shat is held in a
reference shift plane by two helical springs.

RESULTS:
Thus the control logic of a washing machine using stateflow is processed as per the given sequence and LED
lights are turns to the green colour and the system is completed,
2) A simulink model is created for the gear shift logic and using slider gain the values are obtained.