Washing Machine using Finite State Automata
Introduction :
INTRODUCTION A finite-state machine (FSM) or finite-state automaton (plural: automata), or simply a state machine, is a mathematical model of computation used to design both computer programs and sequential logic circuits. There are two types: Mealy machine & Moore machine. Mealy machine is a finite state machine whose output values are determined both by its current state and current inputs. This is a deterministic finite state transducer: for each state and input, at most one transition is possible. Moore machine, is a finite state machine whose output values are determined solely by its current state. In this paper, Mealy State Machine is used to implement the control system of washing machine. The washing machine control system generates all the control signals required for the operation of washing machine and is designed using Verilog HDL. The digital design is implemented on Spartan 6 FPGA. Use of FPGAs facilitates the reduction in development cycle.
Figure 1: System flow chart of Washing Machine Controller
The FSM has 6 states as shown in figure 1. State transitions take place according to the timing control signals generated by the timer block and inputs given to a particular state. The processing in the next state depends on outputs produced in the previous state. Different wash times are selected by using the 3 different mode switches.
Figure 2 shows the State diagram of Washing Machine Control System which is based on Mealy Machine. It has following states: IDLE, READY, SOAK, WASH, RINSE, SPIN. Initially the FSM is in the idle state. Once the coin is inserted, the FSM will go to the READY state. Once in ready state, any of the 3 modes for washing can be selected. The selected mode decides the timing allocated to each state. If no mode is selected, it will remain in the READY state itself. In case the process is cancelled now, the coin is returned as the washing process has not yet started and the FSM returns to the IDLE state. But once the washing process
Working
Once the washing process starts, the state transitions take place according to the control signals generated by the Timer unit.
The Timer unit generates the control signals once the timers corresponding to the states elapse. The control signal to activate the water intake is generated during both the SOAK and RINSE states, as both the operations require fresh intake of water. The FSM transits from state READY to SPIN through the states - SOAK, WASH, RINSE, in an order. Once the last state i.e., SPIN is completed, the FSM transits back to IDLE state to take orders for the new wash cycle. If in between the washing process, the LID is opened to add or remove cloths or detergent, the washing process is paused for safety reason.
Comments
Post a Comment