Challenge

Week - 4

  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 of 100s.

  • Then rinsing happens for next 20s & dryer runs for 50s

After all the processes have completed turn on the finished LED


Solution:

Control Logic of a Washing machine using Stateflow:

System will get activated only when power supply is available:

Here for Power supply and Water supply control two Slider switches are used. Also LED’s are used to indicate the different stages of process and warning.

If the Water supply is not available, the washing process will not be started and this is indicated by WaterOFF LED.

Once the water supply is available the washing process will start and moved to Soaking stage of 200 sec.

After 200sec of Soaking, Washing will start for 100sec.

Rinsing will start after Washing and this will happen for 20sec.

Drying cycle will be carried out for 50 sec after Soaking.

Once all the processes are completed, Finished LED be ON.

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.


Solution:

Simulink Chart for Gear shift logic:

Here Slider block is used to change the Speed

0 < Speed <= 15: Gear position - 1

15 < Speed <= 25: Gear position - 2

25 < Speed <= 40: Gear position - 3

40 < Speed <= 60: Gear position - 4

Speed >61: Gear position - 5

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.