Week - 4
Aim:
1. 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 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 ARange(kmph) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
Give speed input while the simmulation is running & display the gear number.
PROCEDURE:
WORKING PRINCIPLE OF WASHING MACHINE:
A washing machine by spinning at 800 to 1600 rpm helps soap and dirt with it to leave the surface of the cloth via centrifugal force and into outlet pipes hence utilizing 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 heating.The valve opens again and the dirty water drains out of the drums.Tehe 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 costumers need to select soak from a panel.Soak- This function is available with wash timer, in 42 min of washing 27 min is soak & 15 min machine will wash the clothes.
WASHING:
During the wash cycle,a large plastic agitator(green) turns around, moving your clothes through the water.When the wash is finished, the pump drains the water from the outer drum.
RINSING:
The dirty, soap water is drained, then the washing machine is refilled and your clothes are "rewashed" in clean water.
Spin: All the water is drained completely, then your clothes are spin very fast and excess water is removed thanks to centrifugal force.
DRYER:
They work by pushing warm dry air through your wet washing to extract moisture,then cooling the now humid air in a heat exchanger to condense the moisture which is collected in a tank or pumped down the drain.T(now dry) air is reheated and the cycle repeats.
1) STSTE-FLOW:
Systematic solution of a problem is possible with sequential, unambigous and realizable finite process step set. This set is called "algorithm" and it is one of the most important part of the programming languages. In this study, it is represented how 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 saop and water to add, direction of spin, and so on.The machine rebalances washing load to ensure correct spining.Else,it reduces spinning speed if an imbalance is detected. Even distribution of washing load reduces spinning noice.

This 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 sequence. The system are observed for for sometime then it is checked and the process is completed by green light as displayed.
GEAR SHIFT MECHANISM:
The transmission operating mechanism:
To effect a gear change, selecting first gear,foe example the driver depressed the clutch, disengaging the input shaft.Using the shift liver, the driver selects the first gear,and the linkage moves the shift fork to connect the 1st to 2nd locking collar with first gear,locking it to the output shaft.Now when the clutch is released, engaging the input shaft,the output shaft turns because 1st gear is locked to the output shaft by the locking collar.
Before we go into the simulink for the transmission box simulation we need to follow the below conditions for the setup.
Speed Range(kmph) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
And by doing so we do that in a coaded pattern in the state flow chart which we get to see below:
These are the folloeing block setup did we need for this setup.
1. State flow chart.
2. Slider.
3. Constant.
4. Display.
5. Lamps.
And the output is just similar as it is.
0 to 15 1st gear

16 to 25 2nd Gear

26 to 40 3rd Gear

40 to 60 4th Gear

Above 61 5th Gear

And that's hoe we did the Gear shift logic in the simulink. As we can see the lamp is lit according to the gear it shows and the gear is at the current running according to the speed we selected from slider.