I am trying to draw a FSM diagram for a vending machine. The machine accepts nickles,dimes,quarters, half dollars, and dollar bills. There are 4 selections you can choose from. 3 are $1.15 and 1 is $1.50. Change is to be given if the person inserts more than the item is valued at.
FSM inputs
The cash receiver produces a 3-bit encoded value indicating no-coin/nickel/dime/quarter/half-dollar/dollar. The comparator produces a 2-bit encoded signal indicating the result of comparing its input to the "cash box" value.
The item selector produces a 3-bit encoded value representing a selection to be purchased (dispensed).
My question is, will I need to have a state for each dollar value there can be? Right now I am trying it and I have close to 50 states and I am not even at the item selection part of the diagram. Is there a simpler way?