Week - 4
WEEK-4- CHALLENGE
AIM:
- To implement control logic of a “WASHING MACHINE” using state flow for the given sequence.
- To make a Simulink chart for the “GEAR SHIFT” logic for the given conditions.
OBJECTIVE:
- To implement a control logic of a washing machine using state flow as per given sequence.
- If the power supply is available, the system gets activated
- If the water supply is not available, stop the process and indicate through LED.
- Soaking time should be 200secs followed by washing time of 100secs.
- Then rinsing happens for the next 20secs and dryer runs for 50secs.
- After, all the processes have completed turn on the finished LED.
- 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.
DESCRIPTION
- To implement a control logic of a “Washing machine” using state flow for the given sequence.
Given criteria
- If the power supply is available, the system gets activated
- If the water supply is not available, stop the process and indicate through LED.
- Soaking time should be 200secs followed by washing time of 100secs.
- Then rinsing happens for the next 20secs and dryer runs for 50secs.
- After, all the processes have completed turn on the finished LED.
MODEL:

STATE FLOW:

SYMBOL PANE:

Input data:
Power and water are given as input data.
Output data:
D, R, S, W and E are given as output data.
Blocks used:
- Slider Switch
- Constant
- Chart
- Display
- Lamp
Blocks used inside chart:
States are used in chart.
EXPLANATION:
- Power and switch inputs were controlled by the switch block. These two inputs were directed to the chart block.
- State blocks were used inside charts to create a state flow according to the given criteria.
- The power input is getting as input in the chart and directed to the power state from there, if Power==1 then the power supply is on and it is directed to the water block or if power==0 when power supply is turn off it directed to the junction.
- Next state is water and from that if water==1(water supply is on) it moves to the next stage or if water==0(water supply is turned off ) then it is directed to the junction.
- Next to water is soaking state, entry is given as 0, while exit is LED is made to glow which is connected to this state.
- After 200 sec, it is directed to the washing state, and after 20 sec, to drying state and after 50 sec, it is ended to end state.
CONDITION 1:

(If the power supply is on the system gets activated)
CONDITION 2:

(If the water supply is not available indicate through the LED)
- Condition 1 denotes the if the power supply is on, the system gets activated. Green LED glowing shows the system gets activated.
- Condition 2 denotes the if the water supply is not available indicate through the LED and its glowing red color.
- After all the process completed turn on the finished LED.
RESULT:
The control logic of given washing machine using the state flow has been made and given criteria has to be done.
- 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.
MODEL:

CHART:

SYMBOLS PANE:

Speed is input function and G1, G2, G3, and G4 are outputs.
Blocks used:
- Slider
- Constant
- Chart
- Display
- Lamp
Blocks used in chart:
- State
EXPLANATION:
- Using the Simulink library browser slider block the inputs are varying by the user during the and it is connected to the constant block.
- This varying input values were given to the chart from the constant blocks.
- State blocks were used inside the chart to get a conditioned state flow.
- First the input values are generated to the Gearshift block, from there according to the condition, gear>0 it proceeds to the next if not like gear==0 it ends the flow to a junction.
- If gear>0 it moves to the gear1 state and when the input value crosses 15, it moves to the next state. Like if gear>15 it moves to the next state or it will be back to the first state.
- If gear>15 it moves to the gear2 state and if gear>25 it moves to the gear3 state.
- If gear>40 it moves to the gear4 state and if gear>60 it moves to the gear5 state. And a lamp is connected with each gear output. While exiting the state the lamb goes off.
- A display block is connected with each gear output to get the value of 0 or 1, which denotes whether the gear is in active state and according to this lamp glows on and off.
- Stop time is given as inf as simulation goes on until the user pauses or ends the simulation.
1st Gear:
As speed input is below 15 the first gear will be activated.

2nd Gear:
The speed input is above 15, it shifts to the second gear and the lamp for 2nd gear is on and 1st gear lamp goes off.

3rd Gear:
The speed increases more than 25, it shifts to 3rd gear.

4th Gear
The speed increases more than 40, it shifts to 4th gear.

5th Gear
The speed increases more than 60, it shifts to the 5th Gear.

RESULT:
The simulink chart of given GEAR SHIFT logic condition was sucessfully done and displayed the respect gear numbers and speed range was sucessfully done.
CONCLUSION:
A control logic of a washing machine using state flow for the given sequence is implemented and also the Simulink chart for the gear shift logic for the given conditions are successfully simulated.