What is a vending machine controller and how can we design that?
Nicholas, this lecture will cope with this question.
Several electronic automated systems, such as vending machine dishwashers and robots, to name a few,
are working by going through several tasks or states based on the input, data or settings adjusted
by users.
They usually utilize digital controllers to guide the machine throughout their state's.
It the state machine is a common way to model these controllers.
The control process of all these examples consists of a few states and the controller can only go from
one state to another if it receives the correct inputs and only a set of acceptable state transitions
are possible.
Here we take a simplified controller for a vending machine as an example to describe that this machine
sells candy bars for twenty five cents.
The inputs are nickel and diming and cautery, indicating the type of coin that was deposited, the
circuit controller responses with the outputs, can they underscore out to dispense a candy bar, plus
nickel underscore out or dayme underscore out, asserted when change is due?
The controller has another input named thanks, underscoring this input is asserted when you take your
candy and check, it resets the system ready for the next candy request.
Let's throw the finite state machine.
The controller starts at the state e0 zero, if you put a nickel coin, it goes to the eighty five state.
If you put a dime coin, it goes to the Stenness state.
And if you put a quarter coin, it goes to the state 25 state.
Now let's assume the controller is in city five.
If you put a nickel coin, it goes to Stan.
If you put a dime coin, it goes to S.T. 15, and if we put a quarter coin, it goes to ESTIE 30.
Now, let's assume the controller is in city 10.
If you put a nickel coin, it goes to city 15.
If we put a dime coin, it goes to ESTIE 20, and if we put a quarter coin, it goes to ESTIE 35.
Now, let's assume the controller is in city 15, if you put a nickel coin, it goes to ESTIE 20, if
you put a dime coin, it goes to S.T. 25, and if you put a quarter coin, it goes to E40.
Now, let's assume the controller is in a state 20.
If you put a nickel coin, it goes to a city 25.
If you put a dime coin, it goes to city 30.
And if you put a quarter coin, it goes to ESTIE 45.
Now, let's assume the controller is in a state 25, then the machine gives you a candy and the controller
goes to state a suite waiting for you to take the candy.
Now, if the controller is not 30, then the machine gives you a candy and then they kill and the controller
goes to state as wait, waiting for you to take the candy.
Now, if the controller is in C 35, then the machine gives you a candy and a dime and the controller
goes to a state suite waiting for you to take the candy.
Now, if the controller is in difficulty, then the machine gives you a candy, a nickel and a dime
and the controller goes to state a suerte waiting for you to take the country.
Now, if the controller is in city 45, then the machine gives you a candy and two dimes and the controller
goes to a state, a suite waiting for you to take the candy.
If the controller is in a sweet and you take the candy and you change, the system goes to a state zero
ready for the next purchase.
In addition, the controller uses the system reset to reset the vending machine whenever it is a cost.
How can we describe this, a state machine in the next lecture will implement this FSM, invite the
socialist.
These are our takeaway messages.
The behavior of the most electronic automated system can be described by finite state machines, since
drawing an accurate FSM with all the input and output details is the first step to design a digital
controller for such systems.
Now, the quiz question in our efforts and diagram, which states accept includes.