Académique Documents
Professionnel Documents
Culture Documents
School of Engineering
Fulfillment of the requirements for the award of degree in Mechatronic Engineering of Dedan
1
Acknowledgement
We acknowledge with utmost gratitude, the guidance and counsel of the project supervisor Mr.
Benson Kilonzo. His input throughout the whole project schedule was excessively appreciated.
We pay special gratitude to Mr. Peterson Nyaga and Mr. kibe the lab technologists who were
very instrumental in guiding us in the fabrication process.
i
DECLARATION
This project report is our original work, excluding the parts which have been acknowledged to
the owners of the ideas. It is to the best of our knowledge that the following idea has not been
previously submitted to Dedan Kimathi University of Technology.
SUPERVISORS’ DECLARATION
This project report has been submitted to the Department of Mechatronics Engineering, Dedan
Kimathi University of Technology, with my approval as the supervisor:
Mr. Benson Kilonzo Signature: ................................... Date: .......................
ii
ABSTRACT
The modern customer is very keen on the hygiene of every item he or she purchases in the
market. The customers who buy drinks from vendors are keen on how the drinks are served.
Many people have learnt the benefits that come with taking blended flavors of drinks/beverages
thus making sellers mix flavors in order to remain competitive in the market. Although many
have moved from manual to semi-automatic drink dispensers, it is necessary to acknowledge the
efforts put by many designers in an attempt to come up with an automatic drink mixer and
dispenser.
The automatic beverage system consists of three buffer tanks mounted on a wooden stand, 12v
power supply, Arduino mega microcontroller, keypad, an LCD, three pumps, piping system,
flow sensors and inductive float level sensors. The user selects the preferred beverage via the
keypad and visual feedback is provided by the LCD. The microcontroller will send and receive
control signals to and from peripheral devices via the Input/output pins. These signals will
perform motor control in order to achieve effective mixing and delivery operation.
The automatic beverage system will allow waiters or bartenders to place and fill orders without
directly measuring and pouring the liquids. The machine helps with liquid and cost control by
dispensing precise amounts of the liquids.
The outcome at the end of the design period will be a working prototype.
iii
TABLE OF CONTENTS
Contents
Acknowledgement ................................................................................................................................ i
DECLARATION .................................................................................................................................ii
ABSTRACT........................................................................................................................................iii
1. Introduction ...................................................................................................................................... 1
1.1 Background Information ................................................................................................................ 1
1.2 Problem statement.......................................................................................................................... 2
1.3 JUSTIFICATION .......................................................................................................................... 2
1.4 OBJECTIVES ................................................................................................................................ 2
1.4.1 Specific objectives .................................................................................................................. 2
2. LITERATURE REVIEW ................................................................................................................ 4
2.1 The Beverage Dispenser ................................................................................................................ 4
2.2 Juice dispensing system ................................................................................................................. 6
2.3 Automatic Drink Dispenser ......................................................................................................... 10
2.4 THEORETICAL REVIEW ......................................................................................................... 10
2.4.1 Arduino Mega 2560 .............................................................................................................. 10
2.4.2 LEVEL SENSOR.................................................................................................................. 12
3. METHODOLOGY ........................................................................................................................ 14
3.1 System overview .......................................................................................................................... 14
3.2 Design approach .......................................................................................................................... 14
3.3 Design specifics ........................................................................................................................... 15
3.3.1 Power supply ......................................................................................................................... 15
3.3.2 Dispensing unit ..................................................................................................................... 15
3.3.3 Storage unit ........................................................................................................................... 15
3.3.4 User interface ........................................................................................................................ 15
3.4 OPERATION ............................................................................................................................... 16
3.5 DESIGN DETAILS ..................................................................................................................... 16
3.5.1 Mechanical structure ............................................................................................................. 16
3.6 Electrical Circuitry....................................................................................................................... 18
3.6.1 Power Supply ........................................................................................................................ 18
iv
3.6.1 Microcontroller ..................................................................................................................... 19
3.7Blockdiagram ................................................................................................................................ 22
3.8 Flowchart ..................................................................................................................................... 23
4. RESULTS ..................................................................................................................................... 24
5. DISCUSSION ................................................................................................................................ 24
5.1 Constraints and Alternatives ........................................................................................................ 24
6. CONCLUSION .............................................................................................................................. 25
7. RECOMMENDATION ................................................................................................................. 25
8. FINAL BUDGET OF THE PROJECT.......................................................................................... 25
9. WORK SCHEDULE ..................................................................................................................... 27
10. REFERENCES ............................................................................................................................ 28
APPENDIX 1 – SOURCE CODE ..................................................................................................... 28
v
vi
1. Introduction
1.1 Background Information
Beverages form integral parts of our culture. They can be defined as any drink intended for
human consumption except water. It is believed that beverages date back in ancient world and
has evolved to the many varieties in the world today.
In the 17th century many drinks were introduce around Europe. Gin was invented in Holland
early in the century, Rum was first distilled in the Caribbean, and champagne was invented in
England in the late 17th century. There were also new non-alcoholic drinks available in 17th
century England. Coffee was discovered in Ethiopia and it entered Europe in the 16th century
through Italy. Tea was discovered by the Chinese in the earliest days of their civilization but it
only reached Europe in the 17th century. Cocoa was also first drunk in England in the late 17th
century. Chocolate comes from Central America. [2]
In the late 19th century there were great improvements in public health. The industrial revolution
meant the mass production of drinks. For centuries ordinary people brewed their own beer and
made their own soft drinks like lemonade and cordials. In the 19th and 20th centuries they all
became mass produced. Meanwhile Marvin Stone invented paper drinking straws in 1888. The
screw bottle top was patented in 1889. Many new drinks were invented in the 19th century and
early 20th century. [3]
In today’s world leading restaurants are seeking ways to improve customer service in the
globally increasing competition. They are always looking for the best way to serve customers in
hygienic and satisfactory manner. Restaurants are looking for ways to reduce operational cost,
increase efficiency and offer fast and reliable services to their customers and one way to achieve
this is to reduce human labor cost, human error in mixing, contamination during handling and
reduce the time taken to serve an individual customer. The existing beverage dispensing units are
only tailored to dispense a single type of beverage at a time say coffee, water, lemon juice,
orange juice and many others, most of which are done by vending machines . However, majority
of people in the world prefer taking wide variety of beverage in one single mixture the so called
cocktail in proportions and recipes of their choice, which the food and beverage industry has
always overlooked.
1
The approach in this project is that the automatic beverage system will be able to serve different
cocktails as per customer’s requirement. It is based on microprocessor programming and
ON/OFF control via flow sensors. The scope of the project is limited to three drinks.
1.3 JUSTIFICATION
In most restaurants, the personnel is responsible for filling orders of not only the customers at the
restaurant, but also those seated elsewhere in the restaurant. There are times when the premises is
very busy, the only current solution is to hire more staff to assist in making cocktails. No
commercially available product exists to automatically mix and dispense drinks. However,
products do exist to automatically mix drinks, such as the Computerized Liquor Control System
(CLCS) by Easy bar. The CLCS looks similar to a soda gun and mixes correctly proportional
drinks at the touch of a button. However, unlike the Automatic Beverage Dispenser it only
mixes the drinks but it does not dispense without the personnel’s involvement. The automatic
beverage dispenser would allow the waiters to input the ordered drink and serve it without
having to mix and pour the required liquids. This system also assists in liquid control by
dispensing the precise amounts and portions of the liquids.
1.4 OBJECTIVES
The aim of this project is to design, fabricate and test a working prototype of the automatic
beverage system.
The prototype is to expedite the mixing and serving of drinks at restaurants and bars.
2
3. To develop a program to run the microcontroller
3
2. LITERATURE REVIEW
It is important to acknowledge the existence of beverage systems in the market today. Although
they work perfectly, earlier systems were limited to domestic use due to their simple design. The
researchers will use other articles of available dispensers to guide them come up with a design of
an Automated Beverage System.
4
Figure 2.1.1
The design has an actuator below the valve and supported on the actuator. A pathway lumen
extends to direct the beverage to the receptacle. The beverage pathway lumen provides a directed
how of beverage that can essentially eliminate splashing into the dispensing body or cabinet, thus
reducing clean-up effort and the possibility of unsanitary conditions in the dispenser. This
assures that the beverage is fresh each time the actuator is operated. The actuator body can be
assembled just below the container to assure accurate and easy alignment of the actuator with the
valve arrangement and avoid misalignment caused by opening and closing the door during
replacement of the beverage container
The actuator body can be a two piece member arranged around the beverage pathway for easy
assembly, disassembly and cleaning. The pathway can be defined by a removable tube extending
from the valve through the body and the vent openings define enlarged retaining regions that
have a cross section larger than the lumen through the body so that the tube cannot accidentally
fall through the body into a user receptacle.
5
Figure 2.1.2
The problem with this dispenser is the cleaning process. It is obvious that time will be wasted
when serving two different drinks because it will require cleaning every time a drink is served
[7]. Another problem is where a drink flows through gravity. This may consume a lot of time
when the level of the drink in the tank is less. This means that serving the last cup will take
longer time than the first cup when the level is high due to the pressure head
6
gravity feed at a substantially constant flow rate in combination with an actuation mechanism
mounted in the door of the refrigerator [7].
7
Figure 2.2.1
8
The vented spout assembly includes a valve assembly collar connectable to a discharge opening
in the container, a vent tube extending from a location in the collar to a location in the container
spaced from the discharge opening, the vent tube defining a vent passage there through. The
collar has a discharge wall with a liquid discharge port there through [7].
Figure 2.2.2
A rotary valve element is mounted for rotation in the discharge wall between OPEN and
CLOSED positions. The rotary valve has a liquid discharge conduit and a vent conduit there
through align able with the discharge port and the vent passage, respectively, when in the OPEN
position of the valve element, a spout extends from the liquid discharge conduit of the rotary
valve element and an actuation lever extends from the rotary valve element for engagement with
the actuation mechanism mounted in the door.
The problem with this design is that it serves only one type of drink and an additional type would
require refrigeration. It is also expensive as the dispenser is attached to the refrigerator meaning
that you cannot buy the dispenser on its own. The problem of the pressure head also features in
these designs as the flow of the beverage depends on the level of the juice in the container.
9
2.3 Automatic Drink Dispenser
Lawrence D. McIntosh invented an automatic drink dispenser for filling cups with liquid when
placed in receiving position on a support platform and including a solenoid controlled valve for
dispensing liquid into said cups [6]. It comprises at least one contact member positioned to make
contact with the liquid dispensed into said cup in said receiving position when the liquid reaches
a predetermined level therein and means electrically interconnecting said contact member and
said solenoid control valve for controlling said valve to stop the flow of liquid when the liquid
reaches a predetermined level in the cup [6].
Figure 2.3
10
(hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP
header, and a reset button. It contains everything needed to support the microcontroller.
Features
Microcontroller ATmega2560
Operating Voltage 5V
SRAM 8 KB
EEPROM 4 KB
Length 101.52 mm
Width 53.3 mm
Weight 37 g
11
Figure 2.4.1[8]
12
Figure 2.4.3[10]
13
3. METHODOLOGY
The automatic beverage system is to deliver single drinks as well as cocktails.
1. The buffer tanks were placed at the bottom eliminating liquid flow to the dispenser
nozzle by gravity. Only by pumping will the liquid attain the pressure to reach the nozzle.
This eliminates the need to use solenoid valves to regulate flow.
2. A user interface consisting of an LCD and keypad were integrated. This allows the user
to interact with the machine while providing visual feedback.
14
3. The system dispenses a fixed amount (250ml) of liquids based on our programming.
ON/OFF control is provided by the microcontroller via its digital outputs. The digital outputs are
connected to the motor drive.
The inputs from the level sensors via digital inputs of the microcontroller tells the user when any
of the buffer tanks is empty.
The dispenser system is an important part in the design of the ABD. Although the control system
does most of the work, the dispenser system moves the liquids from the containers to the glass. It
is important that pumps have a consistent flow rate to accurately dispense the liquids.
15
3.4 OPERATION
The operator plugs in the machine to the power source and switches on. If any of the buffer tanks
is empty then a message as to which tank is empty is displayed. If no message is displayed, then
the operator keys in the recipe he wants. The following are the recipes;
1. A=KEY 1
2. B=KEY2
3. C=KEY3
4. A+B=KEY 4
5. A+C=KEY5
6. B+C=KEY6
7. A+B+C=KEY7
The keyboard serves as an input device to the microcontroller and therefore it knows which
pumps to put on and the running time via the flow sensor.
After that cycle the program resets and the operator can chose another operation.
The ABV structure consists of start and stop switches, dispensing area, buffer tank area, LCD
and keypad. The structure shall house all the other components and circuitry. The automatic
beverage system is to be fabricated as shown;
16
Figure3.5.1.1
17
Figure 3.5.1.2
18
.
Figure 3.6.1
3.6.1 Microcontroller
The Arduino mega microcontroller was interfaced with the other electronic components as
shown;
Input devices;
19
The input devices are keypad and level sensors
Output devices;
Figure 3.6.2.1
20
Figure 3.6.1.2
We chose atmega2560 microcontroller as it provided the following features that are crucial to our
project;
2. 4KB EEPROM
3. 8KB RAM
6. 4 serial UARTS
7. 16 ADC channels
The large number of I/O pins it possesses is most crucial to our project due to the large number
of input and output components to interface.
Resistors R5, R6, R7 are used to limit current drawn from the output pins of the microcontroller.
21
Diodes D1, D2, D3 are freewheeling diodes and helps eliminate the back EMF produced by the
pumps. A fly back diode (sometimes called a snubber diode, commutating diode, freewheeling
diode, suppressor diode, suppression diode, clamp diode or catch diode) is a diode used to
eliminate fly back, which is the sudden voltage spike seen across an inductive load when its
supply current is suddenly reduced or interrupted.
The inductive level sensors are shown as active switches. They are connected through resistors
R1, R2, R3 to the analog input pins.
3.7Blockdiagram
22
3.8 Flowchart
23
4. RESULTS
Upon completion of this project;
2. The dispenser was able to dispense single beverages, or cocktails, which was either a
`mixture of two or three drinks.
5. DISCUSSION
The ABD had three main goals that were tested and proved during the final demonstration:
The interface had to be easily navigable, the pumps had to dispense single beverages and cocktails,
and the pumps had to be accurate to within 10%. After extensive testing and calibrating of each of
the three pumps, the ABD successfully accomplished its goals. On average, the pumps dispensed
accurate amounts with a 10% tolerance. The acceptance testing was proven by the successful
demonstration to Mr Kilonzo. The specifics of the acceptance testing include measuring the
dispensed liquid for each pump in different amounts multiple times. Using a 500ml beaker, each
pump was tested and calibrated until it was accurate and precise. Simple software changes were
made to dispense the amount as required. After these calibrations, the ABD successfully met its
acceptance testing.
24
6. CONCLUSION
Variety is the name of the game when it comes to pleasing today’s consumers. Soon consumers
might also have that kind of choice when it comes to beverages in quick-service restaurants.
The new dispensers will take up about the same amount of space as the standard eight-valve
dispenser used by many restaurants today.
The prototype will take advantage of micro-dispensing technology, allowing it to make use of tiny
amounts of highly concentrated flavoring. As opposed to the bag -in-box dispensers popular today,
which can be difficult to change and sometimes leak, changing out beverages in the new unit will
be like changing a printer cartridge. It will make it easier to launch new beverages. There will be
also storage and environmental benefits to the new technology. The small size of the flavoring
cartridges will decrease shelf space needed for inventory and packaging waste will be significantly
reduced. There will be benefits on the end-user side, as well.
Customers can choose their beverages—among more than 100 varieties—via a touch screen located
on the front of the machine.
Operators will like the fact that research shows that greater variety of beverages leads to better sales
of beverages—a high-margin item for quick-service restaurants.
7. RECOMMENDATION
Further improvements can be done on the project so that it can dispense liquids by price quantity
ratio. By the incorporation of other sensors and more time and resources being dedicated to the
project, this can be achieved.
The mechanical structure of the dispenser should be made of light material e.g. stainless steel
while other parts could be made of plastic for it to be compact and light weight.
25
ITEM QUANTITY Unit Price PRICE
Arduino Mega 1 3000 3000
Pumps 3 1500 4500
Transformer 1 1000 1000
Flexible Pvc pipes 3 Metres 300 300
Screws assorted
Breadboards 1 200 200
Bonding Adhesives 1 200 200
CAPACITOR 3 50 400
POLAR
Numeric keypad 1 200 200
NAILS assorted
WOOD FRAME provided
TRANSISTORS 3 25 75
SWITCH 1 50 50
BUTTONS
RELAY 2 50 100
26
9. WORK SCHEDULE
ACTIVITY/MONTH MAY JUNE JULY AUG SEP OCT NOV DEC
S
PROJECT
PROPOSAL
LITERATURE
REVIEW
PRESENTATION
MECHANICAL
DESIGN
CIRCUIT DESIGN
COMPONENT
SELECTION
COMPONENT
ACQUSITION
PROGRAMMING
FABRICATION
TESTING &
DEBUGGING
27
10. REFERENCES
[1] Patent US6708741 - Beverage dispenser. (n.d.). Retrieved July 14, 2016, from
http://www.google.com/patents/US6708741
[2] Emmins, Colin. Soft Drinks: Their Origins and History. Shire, 1991.
[3] Patent US4930666 - Juice dispensing system for a refrigerator door. (n.d.). Retrieved
[4] Patent US6708741 - Beverage dispenser. (n.d.). Retrieved July 14, 2016, from
http://www.google.com/patents/US6708741
[6] Patent US3916963 - Automatic drink dispenser. (n.d.). Retrieved July 14, 2016, from
http://www.google.com/patents/US3916963
[7] Tamime, A. (2008). Cleaning-in-place dairy, food and beverage operations (3rd ed.).
Oxford, UK: Blackwell Pub.
#include <LiquidCrystal.h>
char keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
28
{'*','0','#'}
};
byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {8, 7, 6}; //connect to the column pinouts of the keypad
LiquidCrystal lcd(30,31,32,33,34,35);
void setup(){
Serial.begin(9600);
lcd.begin(16, 2);
pinMode(pump, OUTPUT);
void loop() {
/**********************TANK ONE******************************/
lcd.clear();
29
lcd.print("EMPTY TANK:");
if (analogRead(level1)<20)
lcd.setCursor(1,1);
lcd.print(" 1 ");
//delay(10000);
/**********************TANK TWO******************************/
if (analogRead(level2)<20)
lcd.setCursor(6,1);
lcd.print("2 ");
//delay(10000);
/**********************TANK THREE******************************/
if (analogRead(level3)<20)
lcd.setCursor(9,1);
30
lcd.print("3 ");
//delay(10000);
if(analogRead(level1)>20){
if(analogRead(level2)>20){
if(analogRead(level3)>20){
lcd.setCursor(0,1);
lcd.print(" NONE");
if(key != NO_KEY){
lcd.clear();
//lcd.print(key);
Serial.println(key);
switch(key){
lcd.clear();
case '1':
lcd.print("you selected");
lcd.setCursor(0,1);
lcd.print("drink 1");
31
digitalWrite(25, HIGH);
delay(7500);
digitalWrite(25, LOW);
break;
case '2' :
lcd.print("you selected");
lcd.setCursor(0,1);
lcd.print("drink 2");
digitalWrite(26, HIGH);
delay(7500);
digitalWrite(26, LOW);
break;
case '3' :
lcd.print("you selected");
lcd.setCursor(0,1);
lcd.print("drink 3");
digitalWrite(27,HIGH);
delay(7500);
digitalWrite(27, LOW);
break;
32
case '4' :
lcd.print("you selected");
lcd.setCursor(0,1);
lcd.print("drink 4");
digitalWrite(25,HIGH);
delay(3750);
digitalWrite(25, LOW);
digitalWrite(26,HIGH);
delay(3750);
digitalWrite(26, LOW);
break;
case '5' :
lcd.print("you selected");
lcd.setCursor(0,1);
lcd.print("drink 5");
digitalWrite(25,HIGH);
delay(3750);
digitalWrite(25, LOW);
digitalWrite(27,HIGH);
delay(3750);
digitalWrite(27, LOW);
break;
33
case '6' :
lcd.print("you selected");
lcd.setCursor(0,1);
lcd.print("drink 6");
digitalWrite(26,HIGH);
delay(3750);
digitalWrite(26, LOW);
digitalWrite(27,HIGH);
delay(3750);
digitalWrite(27, LOW);
break;
case '7' :
lcd.print("you selected");
lcd.setCursor(0,1);
lcd.print("drink 7");
digitalWrite(25,HIGH);
delay(2500);
digitalWrite(25, LOW);
digitalWrite(26,HIGH);
delay(2500);
digitalWrite(26, LOW);
34
digitalWrite(27,HIGH);
delay(2500);
digitalWrite(27, LOW);
break;
delay(100);
35