Upload
vfood
View
217
Download
0
Embed Size (px)
Citation preview
8/3/2019 Team2_VFood_-_SoftwareModuleandTaskSpecificationReport_-_15.12
http://slidepdf.com/reader/full/team2vfood-softwaremoduleandtaskspecificationreport-1512 1/9
GE401- Innovative Product Design & Development I
Software Module and Task Specification Report
12/15/2011
Team 2
Seydi Af şin ÜnlüEmirhan Akdemir
Cansu Acar Melodi TürkiliOnur Şentüre
Engin İyidoğan
Version: 1.0
8/3/2019 Team2_VFood_-_SoftwareModuleandTaskSpecificationReport_-_15.12
http://slidepdf.com/reader/full/team2vfood-softwaremoduleandtaskspecificationreport-1512 2/9
2
Contents
Introduction .............................................................................................. 3
System Overview ..................................................................................... 3
Software Modules .................................................................................... 4Setup Component .................................................................................. 4
Loop Component ................................................................................... 4
Input Taking Component ...................................................................... 4
Waiting Component for Bowl Check .................................................... 5
Filling Ingredients Component ............................................................. 5
Hardware Interface ................................................................................... 6
Software System Requirements ............................................................... 7
Time Requirements ............................................................................... 7
Step 1: Money Payment ..................................................................... 7
Step 2: Customer Choices for Ingredients .......................................... 7
Step 3: Macaroni and Ingredient Drop ............................................... 7
Space Requirements .............................................................................. 8
Hardware Requirements ........................................................................ 8
References ................................................................................................ 8
8/3/2019 Team2_VFood_-_SoftwareModuleandTaskSpecificationReport_-_15.12
http://slidepdf.com/reader/full/team2vfood-softwaremoduleandtaskspecificationreport-1512 3/9
3
Introduction
In this report, it is aimed to give a better understanding of the software of our product MacQuick
by dividing it into subgroups. The strategies for building the system especially in the efficient
use of limited number of digital I/O pins in our microcontroller board Arduino Uno and some
further strategies that are followed are also explained in the report.
System Overview
Since the system is a vending machine, its software does not have complicated architecture.
Therefore, flowchart diagram is useful, and enough to understand the whole system.
8/3/2019 Team2_VFood_-_SoftwareModuleandTaskSpecificationReport_-_15.12
http://slidepdf.com/reader/full/team2vfood-softwaremoduleandtaskspecificationreport-1512 4/9
4
Software Modules
Setup Component
Classification: Function
Definition: It is the initialization function of Arduino. It runs once, after each power up and
reset. It is used to initializing variables and pin modes.
Responsibilities: It is responsible for setting up the initials at the very beginning of the process.
Constraints: In this void function, we are not assuming anything, and there is no limitation.
Also there are no any time or space constraints.
Uses/Interactions: It sets the pin using the pinMode function of Arduino. Also it uses
LiquidCrystal library to set LCD for initial phase.
Loop Component
Classification: Function
Definition: It is the main function of Arduino, which loops consecutively. It also allows us to
change things according to incoming inputs from the pins that we are going to use.
Responsibilities: It is responsible for looping consecutively and ensures unlimited, infinite
service without any interruption.
Constraints: In this void function, we are not assuming anything, and there is no limitation.
Also there are no any time or space constraints.
Uses/Interactions: It only uses the LiquidCrystal library to send ready message to LCD.
Input Taking Component
Classification: Function
Definition: This function is implemented to take any input and behave according to this input.
First input that the system can receive is the signal coming from bill validator. In this function,
analog bill validator signal is monitoring. When the signal becomes positive, it handles the
ingredient choose procedure until user terminates the process with done button or choose 5
ingredients.
8/3/2019 Team2_VFood_-_SoftwareModuleandTaskSpecificationReport_-_15.12
http://slidepdf.com/reader/full/team2vfood-softwaremoduleandtaskspecificationreport-1512 5/9
5
Responsibilities: It is responsible for taking inputs from the user, processing the input and
generating appropriate actions according to incoming inputs.
Constraints: In this void function, we are assuming that the user chooses 5 ingredient or push
“done” button after giving money somehow. There are no any limitation and time/space
constraints. It takes analog threshold value as an input. It holds the input value coming from
keypad in keypad local variable. Also it uses ing_amount (array) which holds how many and
which ingredients that user wants, ingredient (array), which holds total amount of each
ingredient in stock.
Uses/Interactions: It uses LiquidCrystal library to send messages to LCD. Also it uses general
Arduino functions like digitalRead , delay and analogRead
Waiting Component for Bowl Check
Classification: Function
Definition: This function is implemented to monitor the bowl input, and wait until the time that
the bowl is placed.
Responsibilities: It is responsible for waiting with delay function of Arduino until positive
signal came from the Bowl Check Analog input.
Constraints: In this void function, we are assuming that user is going to put bowl to the bowl
slot when he/she sees the message on the LCD somehow. We are checking the signal with 1000millisecond delay.
Uses/Interactions: It uses the LiquidCrystal library, and the general Arduino functions
analogRead and delay.
Filling Ingredients Component
Classification: Function
Definition: This function is implemented to send necessary signals to motors. It always sendssignal to pasta motor but the other signals to other motors are determined according to values
determined by the inputs that are taken by input taking component.
Responsibilities: It is responsible for sending signals to motors. It
Constraints: In this void function, we are not assuming anything. And also there is no
limitation.
8/3/2019 Team2_VFood_-_SoftwareModuleandTaskSpecificationReport_-_15.12
http://slidepdf.com/reader/full/team2vfood-softwaremoduleandtaskspecificationreport-1512 6/9
6
Uses/Interactions: It uses the LiquidCrystal library, and the general Arduino functions
digitalWrite and delay.
Hardware Interface
We will use Arduino Uno as our microcontroller. As stated in the “Subassembly Specificication
Report”, Arduino Uno is the microcontroller card we will use in our project and it has 14 digital
I/O pins. The software we design and burn into the microcontroller basically checks the outputs
of the presence sensor, keypad and the bill validator for decision making; and sends appropriate
high/low logic commands or serial data to the motor drivers and LCD. So the components that
the microcontroller is connected are listed as follows:
● LCD: Occupies 6 digital I/O pins of the microcontroller. The <LiquidCrystal.h> librarywill be used to write to the LCD.
● Keypad: Since MacQuick has a keypad with 7 buttons; 3bits representation is enough to
implement them. Every button will send 3 bits of serial data and Arduino Uno will
understand which button is pushed.
● 6 x Motor drivers: Each high logic signal makes the stepper motor 1.8 degree of rotation.
So a series of high logic bits is sent from a digital pin of Arduino Uno to make the motor
an appropriate angle of turn.
● Bill validator: Due to the lack of number of digital I/O pins in the microcontroller card,
we had to use two analog input pins for digital purposes. One is for bill validator and the
other is for presence sensor. If the analog input is above 3.5V, the microcontroller will
consider it as a “1”. This technique enables us to increase the pins for digital I/O purposes
even though they are analog input pins.
● Presence sensor: This is also connected to the analog input pin on the microcontroller and
it gives the information that whether an empty bowl is placed in the output slot or not.
To make the hardware interface explanations more precise, the pin connections between Arduino
Uno and the components listed above are given below. Note that the letter “D” stands for
“digital” and “A” stands for analog.
8/3/2019 Team2_VFood_-_SoftwareModuleandTaskSpecificationReport_-_15.12
http://slidepdf.com/reader/full/team2vfood-softwaremoduleandtaskspecificationreport-1512 7/9
7
LCD occupies D12, D11, D5, D4, D3, and D2
Keypad occupies D6
Motor driver 1: D7
Motor driver 2: D8
Motor driver 3: D9
Motor driver 4: D10
Motor driver 5: D1
Motor driver 6: D13
Bill validator: A0
Presence Sensor: A1
Software System Requirements
Time Requirements
MacQuick is a vending machine to vend a bowl of cold macaroni with chosen ingredients in it.
Since it is a vending machine, its serving time must be as short as possible. The vending process
has 3 steps.
Step 1: Money Payment
This step consists of the process of the customer pays the money for the macaroni. Initially, the
bill validator waits for a customer to come and pay. After the money is paid, step 1 comes to an
end. After the money is received as input it takes 2.5 second to count the money and send the
“money is received” signal to the Arduino Uno.
Step 2: Customer Choices for Ingredients
After the money is received, user chooses which ingredients s/he wants in the macaroni viakeypad. The user can add 5 ingredients at maximum. The chosen ingredients are stored in the
memory of Arduino. So this process does not take extra time after the user does the ingredient
choices.
Step 3: Macaroni and Ingredient Drop
8/3/2019 Team2_VFood_-_SoftwareModuleandTaskSpecificationReport_-_15.12
http://slidepdf.com/reader/full/team2vfood-softwaremoduleandtaskspecificationreport-1512 8/9
8
Step 3 is the step where the macaroni and the ingredients are dropped into the bowl respectively.
This is the step that determines the vending time because during this process the customer waits.
Since, MacQuick aims to deliver the macaroni as soon as possible, this preparation process must
be designed wisely to minimize the time of preparation and delivering the macaroni. Engineers
of VFood determined the time of preparation of the macaroni with ingredients 20 seconds at
maximum. In the preparation process, the macaroni will be dropped firstly. Then the ingredients
will follow respectively, one by one. Therefore, if the user wants less number of ingredients, the
preparation process will last even shorter.
Space Requirements
Space requirements are as follows: Flash memory: 34KB, SRAM 2KB, EEPROM: 1KB
Hardware Requirements
Our microcontroller has an operating voltage 5V. So an input voltage has to be applied to keep
our machine going. ±1V is also acceptable. However, when the applied input voltage goes to
lower values, Arduino Uno does not operate and the data in SRAM is deleted. Since the
ingredient amount is kept in SRAM a persistent voltage supply is needed.
In the software design of the product, a number of digital I/O pins are needed. Pin assignments
are stated under “Hardware Interfaces” topic. 15 digital I/O pins are needed for our application
however there is 14. Arduino Uno has also 6 analog input pins, which we do not use. So we used
these analog input pins as digital I/O pins.
References
1. “Arduino Uno”. arduino.cc. http://www.arduino.cc/en/Main/ArduinoBoardUno
2. “Liquit Crystal Libary” ardiuno.cc http://www.arduino.cc/en/Reference/LiquidCrystal
3. “Arduino Libraries” arduino.cc http://arduino.cc/en/Reference/Libraries
8/3/2019 Team2_VFood_-_SoftwareModuleandTaskSpecificationReport_-_15.12
http://slidepdf.com/reader/full/team2vfood-softwaremoduleandtaskspecificationreport-1512 9/9
9
4. “Back UPS-Pro”. apc.com.
http://www.apc.com/resource/include/techspec_index.cfm?base_sku=BR700G&tab=mod
els