- Size: 528.4 KB
- Uploaded: 2019-03-14 12:51:18
- Status: Successfully converted
e-PG Pathshala Subject: Computer Science Paper: Embedded System Module: Embedded System Design – Case Study-Part I Module No: CS/ES/39 Quadrant 1 – e-text In this lecture, the design and the basic concepts of an automatic chocolate vending machine will be discussed in detail. Then the design and basic concepts of a Smart Card system are also explained. 1. Case Study I: Automatic Chocolate Vending Machine (ACVM) An ACVM contains a Coin insertion slot and Keypad (on the top of the machine) to insert the coin according to the possible denomination like 2, 5 rupees. Then after the coin is inserted, the system directs each coin to the particular port like port 2 and port 5 (coin sorter). It also contains an LCD unit on the top of the machine to display menus, text entered into the ACVM and pictograms, welcome, thank and other messages. Graphic interactions are also available on this machine. The displays in the ACVM also show the current time and date. The delivery slot in the ACVM is used to collect the chocolate and coins (if refunded). The internet connection port is provided so that the owner can know the status of the ACVM sales from a remote location. The block diagram of an ACVM is shown in Figure 1 given below. Figure 1. Block Diagram of ACVM. 1.1 ACVM Specifications 1.1.1 ACVM Hardware The heart of an ACVM is a Microcontroller or ASIP (Application Specific Instruction Set Processor). A RAM is used for storing temporary variables and the stack, and a ROM for application codes, and the RTOS codes for scheduling the tasks. It also has flash memory for storing user preferences, contact data, user address, a user date of birth, user identification code and answers to frequently asked questions (FAQs). Timer and Interrupt controller are also needed to control the process of ACVM. It has a TCP/IP port (Internet broadband connection) to the ACVM for remote control and for providing the system status reports to the owner. It also has an ACVM specific hardware and a power supply. 1.1.2 ACVM Software Software is required to handle the following: Read input from keypad, display text/graphics, control coins reader, and control delivery port (to deliver the chocolate). In addition to these, we also need the TCP/IP stack communication for remote control, and an RTOS (say, MUCOS), to run the ACVM software. 1.2 ACVM Requirements The purpose of ACVM is to build a system from which children can automatically purchase the chocolates, and the payment is by inserting the coins to the appropriate denomination coin-slot. 1.2.1 Inputs Coin slot to insert the coins of different denominations and the keypad to enter the user commands. 1.2.2 Signals, events and Notifications An interrupt is generated at each port after the coin is received in the coin slot. Each port interrupt starts an Interrupt Service Routine (ISR), which increases value of amount collected by corresponding rupees (1, 2, 5 or 10). A notification is generated for each selection in the menu. 1.2.3 Outputs The display is used to show the GUIs, time and date, advertisements, welcome and thanks messages. Chocolate and signal (IPC) to the system that subtracts the cost from the value of amount collected. 1.2.4 Functions of the system A child (user) sends commands to the ACVM using a GUI (graphic user interface). GUI consists of the LCD and keypad units. At first, the child inserts the coins ( Task_Collect through Port_Collect) for the cost of chocolate and the machine delivers the chocolate in the delivery slot. If the coins are not inserted as per the cost of chocolate for a reasonable amount of time, then all coins are refunded (Task_Refund through Port_Refund). If the inserted coins amount is more than the cost of chocolate, the excess amount is refunded along with chocolate (Task_ExcessRefund through Port_ExcessRefund). If the chocolate is of different rupees, then the port is assigned to each rupee, and then the interrupt is sent to the corresponding port (Task_ReadPorts through Port_Read). After that chocolate is delivered through the delivery slot (Task_Deliver through Port_Deliver). The coins for the chocolates purchased collect inside the machine in a collector channel (Task_Collect), so that owner can get the money, again through appropriate commands using the GUI (Task_Display). USB wireless modem enables communication through Internet to the ACVM system owner. 1.2.5 Design metrics The design of the system is measured in terms of four design metrics and are explained as follows ● Power Dissipation: Maximum (tolerance) amount of heat it can generate while working as required by mechanical units, display units and computer system. ● Performance: Based on assumption, one chocolate will be delivered in two minutes and 256 chocolates before next filling of chocolates into the machine.