Week - 4
- 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
Result : To execute this algorithm we have used a toggle switch, constant, state flow chart, displays and lamps.
Toggle switch are used to turn on and off the system. We have attached the toggle switches to the constant so when the power supplies on it will give one as an input and when it is off it is it gives zero as an input. Here we are giving two inputs, one is for power supply and the other one is for water supply.
So when the power supply and the water supply is on it goes into the state flow and based upon the conditions which we had given it completes the process.
And when the power is on. Green LED gets turned on and if the water supply is on. Another green LED gets turned on and when the process is completed, all the three LED gets turned on.
This is how the washing machine is implemented and the module is attached below.
---------------------------------------------------------------------------------------------------------------------------
2. Make a Simulink chart for the “Gear shift” logic as per below conditions:
Speed Range(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 simulation is running & display the gear number.
Result : To execute this algorithm we have used a circular guage, constant, horizontal slider., displays and lamps.
In this we are giving input from the accelerator by sliding it. This data is going into the state flow chart and depending on the condition, the state flow chart is assigning the gear. And it is displayed in the form of lamps. And also the output is going to the display which tells us the gear number.
This is how the gear shift logic is executed.
----------------------------------------------------------------------------------------------------------------------------