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

Ans:

The control logic of washing machine is basically to detect the extent of dirt on clothes,the amount of soap & water to be added to remove the dirt detected,direction of spin,time delay between fillingwater,washing,rinsing & soaking. The machine rebalances the washing load to ensure correct spinning. If the load is imbalance the the machine indicates it with an abnormal noise. Finally the whole process ends indicated by an LED.

For implementing control logic of a washing machine Ist we will have to create chart

The two inputs are power supply and water. Once the input is provided the output is indicated by flowchart as replrented below.The output result is shown in display which is connected to an LED.

As required the entire process completes with glowing of finished LED.

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.

Ans: For Gear shift logic simulink chart 1st we will have to create a chart as per given conditions

After entering the input conditions in the chart we will go to the symbol pane and assign input & output date for given variables.

1) At input side 1st we will take a constant connected with an LED and we name the constant as 'KEY'. So when the key=1 the lamp will glow and indicate the power is ON

2)We will add slider gain block to vary the speed as per the given condition

3)The output side has display which will show the gear number as per the given input speed based on the mentioned logic.

Key=1,Speed<40 (As per the condition it shoud be gear 3

Key=1,Speed>60 (As per the condition it should be gear 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.