Friday, 6 February 2015

Group 1--Vending machine design--Blog for first lab day (Feb. 6th, 2015)

This was the first lab day for the Year 2 group project. We are group 1, supervised by Professor Jeremy Smith, and our project is aimed to design a vending machine controller on an Field Programmable Gate Array (FPGA)using ALTERA DE2 board. After discussions, we diceided to use using Alter Hardware Description Language (AHDL) for the programming.

 
Figure 1. Real-life Vending machine

Figure 2. Altera DE2 board

Before the Christmas break, we have been arranged one meeting with our supervisor Professor Jeremy Smith to talk about the general procedure of this project. During this meeting, we were given a general introduction about the basic functions should be required and general inputs and outputs of this vending machine controller, as well as some guidance about it.Then we decided that the vending machine chontroller should have four basic functions: choosing products, enter coins for purchasing, returing the change after purchasing and returing all coins input when cancelling. 

During the first lab day, we have come up with some ideas about the specification of this vending machine, such as the coin types allowed (10p, 20p, 50p, 100p), the number of the products (15) and the variation of the price of products (20p, 50p, 80p, 100p and 170p). After the basic decision on the inputs and outputs was made, we have also considered to assign different components of the DE2 board to realize the inputs and display the outputs. In addition, we also generated the fundamental block diagram including the whole working procedure and all important functional parts of this machine. 



Figure 3. Pins assignment on the DE2 board for all inputs and outputs

Figure 4. The block diagram (1st edition)

In the figure, the functions of main fucntional blocks can be described as:
a.    Product_choice: Choosing products with its price (each time only one).
b.    Coin_input: Counting the number of 4 kinds of coins and genrating the total money received.
c.    Change_calcualtion: calculate the total amount of change or cancel the purchase and return all the money input.
e.    Change_return: return the change using different combination of coins.
f.     Display: product price & number, total money received and number of coins for change.

However, we met some problems like being unfamiliar with FPGA programming and the use of DE2 board. For example, we haven’t solved the problem of processing the number of coins in the whole procedure. In addition, how to return the change in nomral purchase and cancelling situation was another problem that needed further consideration.

No comments:

Post a Comment