noodles vending machine - bachelor thesis

76
Faculty of Engineering and Material Science Mechatronics Department Instant Noodles Vending Machine Bachelor Thesis Author: Eng. Ahmed Sabek Mohammed Mahrous Supervised By: Dr. Hisham El-Sherif Submission Date: June 4,2012

Upload: ahmed-sabek

Post on 14-May-2015

5.818 views

Category:

Education


19 download

TRANSCRIPT

Page 1: Noodles Vending Machine - Bachelor Thesis

Faculty of Engineering and Material Science

Mechatronics Department

Instant Noodles Vending Machine

Bachelor Thesis

Author: Eng. Ahmed Sabek Mohammed Mahrous

Supervised By: Dr. Hisham El-Sherif

Submission Date: June 4,2012

Page 2: Noodles Vending Machine - Bachelor Thesis

This is to certify that:(i) The thesis comprises only my original work toward the Bachelor Degree.(ii) Due acknowledgment has been made in the text to all other material used.

Ahmed SabekJune 4, 2012

Page 3: Noodles Vending Machine - Bachelor Thesis

Contents

List of Figures vi

List of Tables vii

Acknowledgment viii

Abstract ix

Nomenclature xi

1 Introduction 11.1 Cold and Frozen Vending Machines: . . . . . . . . . . . . . . . . . . . . 21.2 Bulk Vending Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Coffee or Tea Vending Machines . . . . . . . . . . . . . . . . . . . . . . 41.4 Office Supplies Vending Machines . . . . . . . . . . . . . . . . . . . . . 51.5 Drink and Snack Vending Machine . . . . . . . . . . . . . . . . . . . . . 61.6 Entertainment Vending Machine . . . . . . . . . . . . . . . . . . . . . . 71.7 Change Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 Proposed Mechanical Design 92.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1.1 Theory of Operation . . . . . . . . . . . . . . . . . . . . . . . . 92.1.2 Technical Features . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.2 3D Proposal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.1 Upper Tray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2.2 Middle Tray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.2.3 Lower Tray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.2.4 Cup Stacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.2.5 Machine Door . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.2.6 Machine Outer Casings . . . . . . . . . . . . . . . . . . . . . . . 16

2.2.6.1 Top and Bottom both with same dimensions . . . . . . 16

i

Page 4: Noodles Vending Machine - Bachelor Thesis

CONTENTS ii

2.2.6.2 Left and Right both with same dimensions . . . . . . . 162.2.6.3 Back Part . . . . . . . . . . . . . . . . . . . . . . . . 17

2.2.7 Hot Water Injection Mechanism . . . . . . . . . . . . . . . . . . 172.2.8 Fork Dispenser Mechanism . . . . . . . . . . . . . . . . . . . . 182.2.9 Rotating Arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.2.10 Forks Output Box . . . . . . . . . . . . . . . . . . . . . . . . . . 202.2.11 Water Tank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.2.12 Boiler Casing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

2.3 Water Flow System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.4 Materials Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

2.4.1 Comparison of Materials . . . . . . . . . . . . . . . . . . . . . . 242.4.2 Outer Casings and Trays . . . . . . . . . . . . . . . . . . . . . . 252.4.3 Hot Water Injection Mechanism . . . . . . . . . . . . . . . . . . 252.4.4 Boiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.4.5 Water Tank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.4.6 Cup Stacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262.4.7 Arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

3 Sequence of Operation and Microcontroller 273.1 Sequence of Operation: . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.1.2 Sequence of Operation Diagram . . . . . . . . . . . . . . . . . . 29

3.2 Micro-controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323.2.2 Types of Micro-controllers in Market . . . . . . . . . . . . . . . 32

3.2.2.1 PIC micro-controller . . . . . . . . . . . . . . . . . . . 323.2.2.1.1 The PIC32 architecture Pros . . . . . . . . . 323.2.2.1.2 The PIC32 architecture Cons . . . . . . . . . 32

3.2.2.2 PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.2.2.2.1 Definition . . . . . . . . . . . . . . . . . . . 333.2.2.2.2 Advantages of the PLC . . . . . . . . . . . . 33

3.2.2.2.2.1 Simplified changes . . . . . . . . . . 333.2.2.2.2.2 Material and Space Requirements . . 333.2.2.2.2.3 Duplication of Programs . . . . . . . 333.2.2.2.2.4 Comment and Documentation Possi-

bilities . . . . . . . . . . . . . . . . . 343.2.2.2.2.5 Saving time . . . . . . . . . . . . . . 34

3.2.2.2.3 Disadvantages of a PLC . . . . . . . . . . . . 34

Page 5: Noodles Vending Machine - Bachelor Thesis

CONTENTS iii

3.2.2.3 Arduino Mega 2560 . . . . . . . . . . . . . . . . . . . 343.2.2.3.1 Software . . . . . . . . . . . . . . . . . . . . 353.2.2.3.2 Why Arduino? . . . . . . . . . . . . . . . . 35

3.3 Motors Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363.3.1 DC Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3.3.1.1 DC Motor pros . . . . . . . . . . . . . . . . . . . . . . 363.3.1.2 DC Motor cons . . . . . . . . . . . . . . . . . . . . . 37

3.3.2 Stepper Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . 373.3.2.1 Stepper Motor Pros . . . . . . . . . . . . . . . . . . . 373.3.2.2 Stepper Motor Cons . . . . . . . . . . . . . . . . . . . 37

3.3.3 Servo Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383.3.3.1 Servo Pros . . . . . . . . . . . . . . . . . . . . . . . . 383.3.3.2 Servo Cons . . . . . . . . . . . . . . . . . . . . . . . . 38

4 Mechanical And Electrical Implementation 394.1 Mechanical Implementation Process . . . . . . . . . . . . . . . . . . . . 39

4.1.1 Machine Chassis . . . . . . . . . . . . . . . . . . . . . . . . . . 394.1.2 Trays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.1.3 Arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424.1.4 Cup Stacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.1.5 Fork Dispenser . . . . . . . . . . . . . . . . . . . . . . . . . . . 444.1.6 Machine Door . . . . . . . . . . . . . . . . . . . . . . . . . . . 454.1.7 Forks Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464.1.8 Outer Casings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474.1.9 Water Injection System . . . . . . . . . . . . . . . . . . . . . . . 484.1.10 List of Bolts, Nuts and Washers . . . . . . . . . . . . . . . . . . 49

4.2 Electrical Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 494.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494.2.2 Electrical Components . . . . . . . . . . . . . . . . . . . . . . . 49

4.2.2.1 Motors . . . . . . . . . . . . . . . . . . . . . . . . . . 494.2.2.1.1 One Digital Metal Gear Servo . . . . . . . . 494.2.2.1.2 One Mini Servo Motor . . . . . . . . . . . . 504.2.2.1.3 One DC Motor with Encoder and Gear . . . 50

4.2.2.2 Fifteen Relays . . . . . . . . . . . . . . . . . . . . . . 504.2.2.3 Arduino Mega2560 (micro-controller) . . . . . . . . . 504.2.2.4 Six Push Buttons . . . . . . . . . . . . . . . . . . . . 514.2.2.5 One Power Supply . . . . . . . . . . . . . . . . . . . 514.2.2.6 Five Proximity Sensors . . . . . . . . . . . . . . . . . 51

Page 6: Noodles Vending Machine - Bachelor Thesis

CONTENTS iv

4.2.2.7 Heat Sensor (1SEN11301P) . . . . . . . . . . . . . . . 514.2.2.8 One 220 VAC Solenoid valve . . . . . . . . . . . . . . 514.2.2.9 One Character LCD Module 40 Char. x 2 Lines (4002A)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514.2.3 Stages of electrical manufacturing: . . . . . . . . . . . . . . . . . 52

4.2.3.1 Electrical Simulation Using Proteus . . . . . . . . . . . 524.2.3.2 List of Arduino Connections . . . . . . . . . . . . . . 544.2.3.3 Experimental Implementation On Wooden Board . . . 554.2.3.4 PCB Wiring on ARES . . . . . . . . . . . . . . . . . 564.2.3.5 Implemented The real PCB Board Used . . . . . . . . 57

4.2.4 The Face Plan of The Implemented PCB . . . . . . . . . . . . . 594.2.4.1 Relays . . . . . . . . . . . . . . . . . . . . . . . . . . 594.2.4.2 Connectors . . . . . . . . . . . . . . . . . . . . . . . . 60

5 Conclusion And Future Recommendations 625.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625.2 Future Recommendation . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Bibliography 62

Page 7: Noodles Vending Machine - Bachelor Thesis

List of Figures

1.1 Cold & Frozen Vending Machine . . . . . . . . . . . . . . . . . . . . . . 21.2 Bulk Vending Machines and Stands . . . . . . . . . . . . . . . . . . . . 31.3 Coffee or Tea Vending Machine . . . . . . . . . . . . . . . . . . . . . . 41.4 Office Supplies Vending Machines . . . . . . . . . . . . . . . . . . . . . 51.5 Drink and Snacks Vending Machine . . . . . . . . . . . . . . . . . . . . 61.6 Entertainment Vending Machine . . . . . . . . . . . . . . . . . . . . . . 71.7 Change Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.1 Isometric 3D View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2 3D Design using Solidworks . . . . . . . . . . . . . . . . . . . . . . . . 102.3 Upper tray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.4 Middle Tray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.5 Lower Tray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.6 Cup Stacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.7 Machine Door . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.8 Top / Bottom Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.9 Left / Right casing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.10 Back casing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.11 Hot Water Injection Mechanism . . . . . . . . . . . . . . . . . . . . . . 172.12 Fork Dispenser Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . 182.13 Rotating arm design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.14 Forks Output Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.15 Water Tank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.16 Boiler casing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.17 Diagram illustrating the optimal water flow system . . . . . . . . . . . . 23

3.1 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.2 Sequence of operation diagram part 1 . . . . . . . . . . . . . . . . . . . 293.3 Sequence of operation diagram part 2 . . . . . . . . . . . . . . . . . . . 303.4 Sequence of operation diagram part 3 . . . . . . . . . . . . . . . . . . . 31

v

Page 8: Noodles Vending Machine - Bachelor Thesis

LIST OF FIGURES vi

3.5 Arduino IDE screen shot . . . . . . . . . . . . . . . . . . . . . . . . . . 35

4.1 Chassis with Trays Fixed . . . . . . . . . . . . . . . . . . . . . . . . . . 404.2 Finished trays after being fitted to the chassis . . . . . . . . . . . . . . . 414.3 Finished Arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424.4 Finished cup stacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.5 Fork dispenser mounted on the lower tray . . . . . . . . . . . . . . . . . 444.6 Finished machine door . . . . . . . . . . . . . . . . . . . . . . . . . . . 454.7 Final shape of the forks box . . . . . . . . . . . . . . . . . . . . . . . . . 464.8 Final shape of one lateral side . . . . . . . . . . . . . . . . . . . . . . . 474.9 Final shape of the Scotch Yoke . . . . . . . . . . . . . . . . . . . . . . . 484.10 Electronic circuit drawn using Proteus . . . . . . . . . . . . . . . . . . . 534.11 Experimental Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554.12 PCB Wiring on ARES . . . . . . . . . . . . . . . . . . . . . . . . . . . 564.13 Subemerging the board . . . . . . . . . . . . . . . . . . . . . . . . . . . 574.14 Final shape of the PCB . . . . . . . . . . . . . . . . . . . . . . . . . . . 584.15 Face plan of the implemented PCB . . . . . . . . . . . . . . . . . . . . . 59

Page 9: Noodles Vending Machine - Bachelor Thesis

List of Tables

2.1 A Variety of Metals Properties . . . . . . . . . . . . . . . . . . . . . . . 25

3.1 Arduino Mega 2560 Specifications . . . . . . . . . . . . . . . . . . . . . 34

4.1 List of Bolts, Nuts and Washers . . . . . . . . . . . . . . . . . . . . . . . 494.2 Digital Metal Gear Servo Specifications . . . . . . . . . . . . . . . . . . 494.3 Mini Servo Motor Specifications . . . . . . . . . . . . . . . . . . . . . . 504.4 DC Motor Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . 504.5 Arduino connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

vii

Page 10: Noodles Vending Machine - Bachelor Thesis

Acknowledgment

This project would not have been possible without the support of many people. I wish toexpress my gratitude to my supervisor, Prof. Dr. Hisham El-Sherif, Head of Industrial Au-tomation Department who was abundantly helpful and offered invaluable assistance, sup-port and guidance. Special thanks also to all my team mates and group members;MoustafaEmad El-Din, Omar Afify,Mohammed AbdelAlim and Sherif Khaled for sharing the lit-erature and invaluable assistance. Not forgetting to express gratitude to my best friendswho have always been there; Moustafa Meleigy and Pakinam Ahmed. I would also liketo convey thanks to the Ministry and Faculty for providing the educational means andlaboratory facilities. I wish to express my love and gratitude to my beloved family; fortheir understanding & endless love, through the duration of the project.

viii

Page 11: Noodles Vending Machine - Bachelor Thesis

Abstract

Many of us enjoy eating noodles, considering it cheap, healthy, and delicious fast food.Our project idea came from this simple fact, our project aimed to help people enjoy eatingnoodles easily, quickly and in a wider scale. The first stage was brainstorming, visualizingthe idea, forecasting all our needs in the project, and researching how other vending ma-chines work Once the general outline was set, a deeper research was held; a comparisonbetween all available alterative that can be used in the project was held and we decidedwhich specific components are to be used. A sequence operation was then introducedto arrange our priorities and set the guidelines in the coding and electric implementationMechanical, Electrical and Software Control implementation went all along in parallel.The control system and electrical work were integrated together and tested on simulationprograms and on board many times to insure accuracy and precision. Mechanical Imple-mentation was also integrated with components and wires for the facility of rebuildingand maintenance. It was also simulated a lot of times on Solid works®. Finally camethe stage of integrating all components together and testing them for the machine to beready to use , A study of wiring systems and electricity input output system was then held. Then errors and problems were handled and the machine was ready to use. The machinefunctions well, however future work research is being done on increasing the number offlavors, decreasing serving time, decreasing the size of the machine and more securitysystems

ix

Page 12: Noodles Vending Machine - Bachelor Thesis

List of Abbreviations

AVR Alf and Vegard’s Risc

cm Centimeters

CPU Central Processing Unit

DC Direct Current

DVD Digital Versatile Disc

EEPROM Electrically Erasable Programmable Read-Only Memory

I/O Input/Output

IDE Integrated Development Environment

KB Kilo Bytes

Kg Kilograms

LCD Liquid Crystal Display

MHz Mega Hertz

MIG Metal Inert Gas

mm Millimeters

PCB Printed Circuit Board

PIC Peripheral Interface Controller

PLC Programmable Logic Controller

PWM Pulse Width Modulation

RAM Random access memory

x

Page 13: Noodles Vending Machine - Bachelor Thesis

LIST OF TABLES xi

SRAM Static Random-Access Memory

USB Universal Serial Bus

Page 14: Noodles Vending Machine - Bachelor Thesis

Chapter 1

Introduction

As people continue to seek for convenience, more and more technologies are invented.One of these technologies is the vending machine. Vending machines come in differenttypes as they are made for different purposes. Vending Machines are rarely found inthe market of Egypt and its industry hasn’t been made yet in addition to the increasingconsumption of instant noodles within different ages of people made the idea of designing& implementing an instant noodles vending machine; the availability of investing in a newvirgin field with the knowhow of mechatronics can help in making this project a successfuland a practical realistic one. Before starting with details of the proposed project, we willfirst talk about some facts and history about variety of vending machines.

1

Page 15: Noodles Vending Machine - Bachelor Thesis

CHAPTER 1. INTRODUCTION 2

1.1 Cold and Frozen Vending Machines:

This type is for ice cream, pies and other frozen foods. Typically, its features includetriple pane heated glass that eliminates condensation or frost. There is also an adjustableself-defrosting cycles for a fast cool down and recovery. This machine is a great advantageespecially to those who crave for desserts. Like most vending machines, they can acceptboth coins and bills.

Figure 1.1: Cold & Frozen Vending Machine

Page 16: Noodles Vending Machine - Bachelor Thesis

CHAPTER 1. INTRODUCTION 3

1.2 Bulk Vending Machines

These machines come in variety of sizes and styles and they are entirely mechanical. Op-eration is done by placing coins and turning a knob or pulling a lever. They can vendcandies, chocolates and gum balls. Bulk vending machines are usually found in depart-ment stores and malls where they can attract children and passersby.

Figure 1.2: Bulk Vending Machines and Stands

Page 17: Noodles Vending Machine - Bachelor Thesis

CHAPTER 1. INTRODUCTION 4

1.3 Coffee or Tea Vending Machines

This vending machine has a state-of-the-art brewing system and precise ingredient controlto satisfy every customer’s preference. In addition, it has instant or fresh brew configura-tions to dispense a broad menu of specialty 7 coffees and teas. With this vending machine,customers can drink their favorite coffee in just one touch.

Figure 1.3: Coffee or Tea Vending Machine

Page 18: Noodles Vending Machine - Bachelor Thesis

CHAPTER 1. INTRODUCTION 5

1.4 Office Supplies Vending Machines

If one forgets to bring a pen or pencil in a very important appointment, there’s no need topanic. These office supplies vending machines can be found in public libraries, campuses,airports, and other locations where office workers and students are likely to go. Theydisplay stamps, pens, pencils, paper, USB flash drives and other important office andschool supplies. These machines are easy to load and dispense but the items are usually alittle more expensive than those in bookstores and convenience stores.

Figure 1.4: Office Supplies Vending Machines

Page 19: Noodles Vending Machine - Bachelor Thesis

CHAPTER 1. INTRODUCTION 6

1.5 Drink and Snack Vending Machine

Snacks and beverage vending machines are among the most common vending machines.They are usually found in schools, offices, hospitals, airports and gasoline stations. Thiscombo machine features adjustable 8 trays allowing configuration for the top selling prod-ucts. People can buy varieties of snacks and drinks, from Potato Chips, to cookies andcandy. The soda drink side of the machine vends both cans and bottles. Most of thesemachines can accept both coins and bills.

Figure 1.5: Drink and Snacks Vending Machine

Page 20: Noodles Vending Machine - Bachelor Thesis

CHAPTER 1. INTRODUCTION 7

1.6 Entertainment Vending Machine

Customers don’t need to buy DVDs to watch their favorite movies because the entertain-ment vending machines are found in most fast food chains, restaurants, near entrance ofdepartment stores and convenience stores. These machines typically hold more than 500DVDs. They become popular because they offer quick and cheaper entertainment. Thisself-service machine is combined with interactive touch screen, a robotic disk array sys-tem and a web-linked electronic communications. The customer pays with a credit ordebit card and returns the DVD on the next day. Additional charges are applied if DVDsare not returned on their due dates.

Figure 1.6: Entertainment Vending Machine

Page 21: Noodles Vending Machine - Bachelor Thesis

CHAPTER 1. INTRODUCTION 8

1.7 Change Machines

These machines are usually found in laundry shops, restaurants and department stores.Although most of these machines provide bill-to-coin change, some of them accept creditcards or do bill-to-bill change. Operating the machine is quiet simple. You just need toinsert your bill and make the necessary selections as possible; then your change is alreadyright there in front of you. Some machines just dispense quarters and are easier to operate.

Figure 1.7: Change Machines

Page 22: Noodles Vending Machine - Bachelor Thesis

Chapter 2

Proposed Mechanical Design

2.1 Introduction

2.1.1 Theory of Operation

Instant Noodles Vending Machine which offers both a “Take & Leave” or “Cook” optionfor different flavors, with supplying an external fork to the consumer in a few seconds.

2.1.2 Technical Features

• Vertical channel storage and delivery for fast restocking.

• Circular Product channel for saving space.

• Up to 4 choices of food and can be made with the ability of adding 2 more optionsin the future if needed.

• 6 internal channels for storing and merging with user choices.

• High heat recovery boiler.

• Automatic fork dispenser.

• Water flow control system.

• Hot water injection System.

• Rotating arm for delivery of cup to stages then to user.

• Push Buttons and LCD interface for user.

• Products availability monitoring.

• Fast Cup delivery in few seconds.

9

Page 23: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 10

2.2 3D Proposal

The designs of all of the parts of the proposed mechanical design is implemented usingSolidworks software and all the dimensions are measured in cm.

Figure 2.1: Isometric 3D View

Figure 2.2: 3D Design using Solidworks

Page 24: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 11

2.2.1 Upper Tray

Figure 2.3: Upper tray

Page 25: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 12

Upper Tray is a 60x60 square tray with a thickness of 1.5 mm. It is considered the maintray of operation as it combines most of the components and mechanisms.

Dimensions on the Figure 2.2 illustrate the following:

• Cups Opening with a diameter of 11 cm for Cups orientation.

• Steel Bars Opening with a diameter of 8mm for four bars.

• Cup Dispenser Opening with a diameter of 4 cm for Cups release & hold.

• Water Injection Opening with a diameter of 2 cm for Cup Injection.

2.2.2 Middle Tray

Figure 2.4: Middle Tray

The middle tray is a 60 cm x 60 cm square tray with 1.5 mm thickness on which the servomotor attached to the rotating arm and allows the arm with the cup inside to move bystages (Cup dispensing into the arm, Water Injection & Cup delivery).

Page 26: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 13

2.2.3 Lower Tray

Figure 2.5: Lower Tray

The Lower tray is a 60 cm x 60 cm square tray with 1.5 mm thickness which holds the forkdispenser mechanism which dispenses an external fork for the user at the Fork window.

Page 27: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 14

2.2.4 Cup Stacks

Figure 2.6: Cup Stacks

The Cups Stack can hold inside up to 8 noodles cups and it consists of Steel Bars andCircular Ring:

• Steel Bars with a diameter of 8 mm and a Length of 91 cm.

• Circular ring with four holes of diameter 8mm to carry the bars.

Page 28: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 15

2.2.5 Machine Door

Figure 2.7: Machine Door

Machine Door (Thickness 1.5 mm) contains openings for “LCD”, “Push Buttons”, “CupWindow” and “Fork Window” as well as a transparent plastic window.The dimensions of the openings is shown in figure 2.6

Page 29: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 16

2.2.6 Machine Outer Casings

2.2.6.1 Top and Bottom both with same dimensions

Figure 2.8: Top / Bottom Design

2.2.6.2 Left and Right both with same dimensions

Figure 2.9: Left / Right casing

Page 30: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 17

2.2.6.3 Back Part

Figure 2.10: Back casing

2.2.7 Hot Water Injection Mechanism

It is basically a Scotch Yoke mechanism which converts the rotational motion of a servomotor into linear motion. This part is responsible for puncturing a hole in the nodulescup; throw the Scotch Yoke mechanism, and then injecting hot water - from the boiler -inside the cup in order for the nodules inside to be cooked.

(a) Side view (b) Top View

Figure 2.11: Hot Water Injection Mechanism

Page 31: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 18

2.2.8 Fork Dispenser Mechanism

Fork Dispenser Mechanism which holds a spring that rotates via DC Motor translatingone fork in each rotation in the Fork Dispenser Box. The spring has a diameter of 25 mmand a 50 cm length with a cross sectional diameter of 1 mm. .

Figure 2.12: Fork Dispenser Mechanism

Page 32: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 19

2.2.9 Rotating Arm

The Rotating Arm starts the cycle by carrying the cup selected by user and then transfer-ring it to the hot water injection stage which waits a period of time then delivers the cupat the cup window for the user to be ready to have it at once. The Arm is controlled by aservo motor and moves with the help of a moving wheel which carries the weight of theArm and smooths the rotation.

(a) Front view

(b) Top view

Figure 2.13: Rotating arm design

Page 33: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 20

2.2.10 Forks Output Box

Figure 2.14: Forks Output Box

Forks Box used for allowing the user to take the fork dispensed at the end of the transac-tion, the user opens the box door manually and grabs the fork then the door swings backto close.Forks Door is a swing door which is opened manually by the user then closes automati-cally to its rest position.

Page 34: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 21

2.2.11 Water Tank

Water tank holds about 19 liters of water to cover all products in the machine; one cup ofnoodle takes about 125 cm3 of water. Water is pumped from the tank to the boiler thento the hot water injection mechanism and finally to the noodles cup. Water tank is to berested on the base of the machine next to the pump and below the boiler.

Figure 2.15: Water Tank

Page 35: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 22

2.2.12 Boiler Casing

Boiler has dimensions of 6 cm x 6 cm x 20 cm, which stores hot water up to 90c, theboiler can store a volume of two cups to be filled with hot water. As the density of hotfluids is less than that of cold fluids; hot water is taken from approximately the center ofthe boiler and cold water is injected into boiler at the bottom which comes from the pumpthen the exhaust vapor is get rid of from the top of the boiler. Therefore, the boiler hasfour openings: top opening for exhaust, center for hot water out, bottom for cold waterin and finally the heater opening which the heater fits into at the bottom of the boiler. Alldimensions are shown on figure 2.16

Figure 2.16: Boiler casing

Page 36: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 23

2.3 Water Flow System

1. Water Tank Flow Meter.

2. Water Pump.

3. Check Valve.

4. Boiler.

5. Security temperature sensor.

6. Heater. Temperature sensor.

7. Solenoid Water Valve.

8. To Water Injection mechanism.

9. Exhaust exit.

Figure 2.17: Diagram illustrating the optimal water flow system

Page 37: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 24

Cold Water is sucked by the pump from the water tank and goes through flow meter whichdetects if there is water inside the tank or not, then goes into the boiler to be heated tillreaching a certain set up temperature of approximately 85 degrees by the means of a heaterfixed into the boiler which keeps on heating water till the temperature sensor reaches apredefined temperature then heater stops. Hot water is then now ready and flows to waterinjection mechanism through a solenoid water valve. This design allows for the contin-uous availability of hot water in the boiler as the boiler is designed to have a volume ofthree cups of Noodles and in each transaction pump is automatically started to compensatefor the water left and automatically water is again heated. Security temperature sensor isused for safety that will cut power to the heater incase of overheating and then power willbe restarted again when temperature goes down. In case of overheating pressure increasesand steam will be exhausted through exhaust exit back to the tank. Note: This water flowsystem is the optimal system to be implemented, however there are some componentsthat weren’t implemented in this project but have been set up into consideration for futureexpansion phase which are: flow meter, check valve, security thermostat.

2.4 Materials Selection

2.4.1 Comparison of Materials

This comparison is done about the most common and suitable materials to be used withthe vending machine according to the following:

• Ductility

• Machinability

• Density(Kg/m3)

• Melting Temperature (Celsius)

• Resistance to corrosion

• Price

Page 38: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 25

Property Carbon Steel Iron Aluminum Copper Stainless Steel Plastics

Ductility * ** *** ** *** *

Machinability * ** *** ** *** *

Density(Kg/m3) 7850 7870 2700 8940 8000 *

Melting Temperature (Celsius) 1425 - 1540 1536 660 1084 1510 70-130

Resistance to corrosion ** * *** ** *** ***

Price Moderate Price Cheaper than Steel 7 times more expensive than than Steel Expensively high More expensive than carbon Steel low price

Table 2.1: A Variety of Metals PropertiesRatings are classified as follows : Low * / Moderate ** / High ***

2.4.2 Outer Casings and Trays

For the outer casings and trays, the most suitable material needed had to be of a reason-able price because a large amount of the materials was needed, corrosion resistant as themachine could be placed in the outdoors in conditions that would result in the rusting ofthe machine. So, Carbon Steel was selected as it fits all of the previous criteria.

2.4.3 Hot Water Injection Mechanism

The hot water injections system consists of two parts, the scotch yoke body and the T-shaped member in which the hot water is injected to noodles cup from the boiler. For thebody, a material that was needed had to be light to reduce the torque exerted by the servomotor driving the mechanism.

2.4.4 Boiler

As the boiler had to be subjected to high temperature , up to 100 Celsius, with water insideit so a material with a high melting point and high resistance to corrosion was need ad themost suitable material for job according to table 2.1 was Stainless Steel.

2.4.5 Water Tank

For the water tank, a material was corrosion resistant and as cheap as possible was needed,in addition to that the tank will be placed in room temperature is it was not subjected tohead. So the most suitable option was to use a plastic water tank similar to the one usedin commercial water bottles.

Page 39: Noodles Vending Machine - Bachelor Thesis

CHAPTER 2. PROPOSED MECHANICAL DESIGN 26

2.4.6 Cup Stacks

The Cup stacks was design to be of length 90 cm and outer cross-sectional diameter of 0.8cm so a strong and heavy material was needed in order not to bend and be deformed whenthe cups are guided through them and it also needed to be as cheap as possible because20 bars was manufactured. From table 2.1, it is clear the material that fits the previouscriteria is Iron and that is why it was selected.

2.4.7 Arm

The Arm as mentioned in the design phase had to be of a light weight and can be easilymachinable to meet the required design shape. Therefore according to table 2.1 the Armmaterial has been selected to be Aluminium.

Page 40: Noodles Vending Machine - Bachelor Thesis

Chapter 3

Sequence of Operation andMicrocontroller

3.1 Sequence of Operation:

3.1.1 Introduction

A narrative description of how the building system components shall automatically andoptimally operate. The sequence of operation illustrates the steps of operation of themachine and conditions required for each step to occur. It also includes the function ofsensors, motors, solenoid, pump, and heater.Firstly, the machine checks that the machine is in normal conditions of working (no cupat the serving position, water level in both the tank and the boiler is enough, and there isat least one cup of any flavor present).Secondly, the machine will be in the ready state after the previous checks it will wait forthe user input through the LCD screen which shows the available list of flavors and thepush buttons which are considered as the input sources to the machine from the user.Thirdly, the motor will move according to the flavors position (which is converted toangles on the micro-controller) this motor is attached to an arm which holds the chosenpack and moves to the position where hot water is added if this packed is ordered as acooked pack, or take it directly to the serving position if the pack is ordered as take andleave pack.

27

Page 41: Noodles Vending Machine - Bachelor Thesis

CHAPTER 3. SEQUENCE OF OPERATION AND MICROCONTROLLER 28

Figure 3.1: Block Diagram

Page 42: Noodles Vending Machine - Bachelor Thesis

CHAPTER 3. SEQUENCE OF OPERATION AND MICROCONTROLLER 29

3.1.2 Sequence of Operation Diagram

Figure 3.2: Sequence of operation diagram part 1

Page 43: Noodles Vending Machine - Bachelor Thesis

CHAPTER 3. SEQUENCE OF OPERATION AND MICROCONTROLLER 30

Figure 3.3: Sequence of operation diagram part 2

Page 44: Noodles Vending Machine - Bachelor Thesis

CHAPTER 3. SEQUENCE OF OPERATION AND MICROCONTROLLER 31

Figure 3.4: Sequence of operation diagram part 3

Page 45: Noodles Vending Machine - Bachelor Thesis

CHAPTER 3. SEQUENCE OF OPERATION AND MICROCONTROLLER 32

3.2 Micro-controller

3.2.1 Introduction

A micro-controller is a small computer on a single integrated circuit containing a proces-sor core, memory, and programmable input/output peripherals. Program memory is in theform of RAM (Random access memory). Micro-controllers are designed for embeddedapplications, in contrast to the microprocessors used in personal computers or other gen-eral purpose applications. Micro-controllers are used in automatically controlled productsand devices, such as automobile engine control systems, implantable medical devices,remote controls, office machines, appliances, power tools, toys and other embedded sys-tems. By reducing the size and cost compared to a design that uses a separate micropro-cessor, memory, and input/output devices, micro-controllers make it economical to digi-tally control even more devices and processes. Mixed signal micro-controllers are com-mon, integrating analog components needed to control non-digital electronic systems.[1]

3.2.2 Types of Micro-controllers in Market

3.2.2.1 PIC micro-controller

PIC is a family of modified Harvard architecture micro-controllers made by MicrochipTechnology. The name PIC initially referred to "Peripheral Interface Controller". Pics arepopular with both industrial developers and hobbyists alike due to their low cost, wideavailability, large user base, extensive collection of application notes, availability of lowcost or free development tools, and serial programming (and re-programming with flashmemory) capability.

3.2.2.1.1 The PIC32 architecture Pros

• The highest execution speed

• The large flash memory: 512 k Byte

• One instruction per clock cycle execution

• The first cached processor

• Allows execution from RAM

3.2.2.1.2 The PIC32 architecture Cons

• Possibility of damaging the PIC during code burning is high.

Page 46: Noodles Vending Machine - Bachelor Thesis

CHAPTER 3. SEQUENCE OF OPERATION AND MICROCONTROLLER 33

• Number of input/output pins available is limited.

• The max current the PIC can withstand is relatively low compared to PLC andArduino micro-controllers.

3.2.2.2 PLC

3.2.2.2.1 Definition A programmable logic controller (PLC) or programmable con-troller is a digital computer used for automation of electromechanical processes, such ascontrol of machinery on factory assembly lines. PLCs are used in many industries andmachines. Unlike general-purpose computers, the PLC is designed for multiple inputsand output arrangements, extended temperature ranges, immunity to electrical noise, andresistance to vibration and impact. Programs to control machine operation are typicallystored in battery-backed-up or non-volatile memory. A PLC is an example of a hard realtime system since output results must be produced in response to input conditions withina limited time, otherwise unintended operation will result. Modular PLCs have a chassis(also called a rack) into which are placed modules with different functions. The processorand selection of I/O modules are customized for the particular application. Several rackscan be administered by a single processor, and may have thousands of inputs and outputs.A special high speed serial I/O link is used so that racks can be distributed away from theprocessor, reducing the wiring costs for large plants.

3.2.2.2.2 Advantages of the PLC

3.2.2.2.2.1 Simplified changes When a control is created, it does not work promptsuccessfully. Most of the controls are perfectioned step by step until the desired result isachieved. With a hard-wired control constant changes of the wiring is neccessary. In con-trast, with a PLC simply the program has to be changed. The time required for the changesto make the control work is reduced significantly. Program changes can be implementedeasier.

3.2.2.2.2.2 Material and Space Requirements Connections, the analysis of states,times and counting functions are implemented internally in a PLC and can be used. Soyou can save the material that would be needed for the hard-wired control, e.g. relays andtimers.

3.2.2.2.2.3 Duplication of Programs If you have written a control program, youcan copy and use this as often as you like. In contrast, a hard-wired control would have

Page 47: Noodles Vending Machine - Bachelor Thesis

CHAPTER 3. SEQUENCE OF OPERATION AND MICROCONTROLLER 34

to be operated for each control separately. For reproducing control tasks a PLC is signifi-cantly more favourable.

3.2.2.2.2.4 Comment and Documentation Possibilities When a PLC program iswritten, it makes sense to write helpful comments on each instruction. If it is necessaryto change the program, it is easier to understand an existing program when comments areincluded.

3.2.2.2.2.5 Saving time Less installation work, less cabling, less material expense.The implementation of projects is less time-consuming. It is also possible, for example,to do parallel processing in groups. Thus, program parts can be combined later to a wholeconcept.

3.2.2.2.3 Disadvantages of a PLC the PLC is too expensive for small or less complexsystems. Also, additional equipment and infrastructure such as programming devices,storage, backup devices, etc. are necessary as well as is highly qualified personell tooperate a control via PLC.

3.2.2.3 Arduino Mega 2560

An Arduino board consists of an 8-bit Atmel microcontroller with complementary com-ponents to facilitate programming and incorporation into other circuits. An importantaspect of the Arduino is the standard way that connectors are exposed, allowing the CPUboard to be connected to a variety of interchangeable add-on modules known as shields.A handful of other processors have been used by Arduino compatibles. Most boards in-clude a 5 volt linear regulator and a 16 MHz crystal oscillator (or ceramic resonator insome variants), although some designs such as the LilyPad run at 8 MHz and dispensewith the onboard voltage regulator due to specific form-factor restrictions. An Arduino’smicrocontroller is also pre-programmed with a boot loader that simplifies uploading ofprograms to the on-chip flash memory, compared with other devices that typically needan external programmer. [2]

Arduino Processor Frequency Voltage Flash (KB) EEPROM(KB) SRAM(KB) Digital I/O Pins

Mega2560 ATMega2560 16MHZ 5V 256 4 8 54

With PWM Analoug Input Pins USB Interface Types Other I/O Dimensions Inches Dimensions mm

14 16 8U2/16U2 4 in * 2.1 in 101.6 mm * 53.3 mm

Table 3.1: Arduino Mega 2560 Specifications

Page 48: Noodles Vending Machine - Bachelor Thesis

CHAPTER 3. SEQUENCE OF OPERATION AND MICROCONTROLLER 35

3.2.2.3.1 Software The Arduino IDE is a cross-platform application written in Java,and is derived from the IDE for the Processing programming language and the Wiringproject. It is designed to introduce programming to artists and other newcomers unfa-miliar with software development. It includes a code editor with features such as syntaxhighlighting, brace matching, and automatic indentation, and is also capable of compilingand uploading programs to the board with a single click. There is typically no need toedit files or run programs on a command-line interface. Although building on command-line is possible if required with some third-party tools such as Ino. The Arduino IDEcomes with a C/C++ library called "Wiring" (from the project of the same name), whichmakes many common input/output operations much easier. Arduino programs are writtenin C/C++, although users only need define two functions to make a runnable program:

• setup() – a function run once at the start of a program that can initialize settings

• loop() – a function called repeatedly until the board powers off.

Figure 3.5: Arduino IDE screen shot

3.2.2.3.2 Why Arduino? Arduino simplifies the process of working with microcon-trollers, but it offers some advantage for users over other systems:

• Inexpensive - Arduino boards are relatively inexpensive compared to other micro-controller platforms. The least expensive version of the Arduino module can be

Page 49: Noodles Vending Machine - Bachelor Thesis

CHAPTER 3. SEQUENCE OF OPERATION AND MICROCONTROLLER 36

assembled by hand, and even the pre-assembled Arduino modules cost less than$50

• Cross-platform - The Arduino software runs on Windows, Macintosh OSX, andLinux operating systems. Most microcontroller systems are limited to Windows.

• Simple, clear programming environment - The Arduino programming environmentis easy-to-use for beginners, yet flexible enough for advanced users to take advan-tage of as well. For teachers, it’s conveniently based on the Processing program-ming environment, so students learning to program in that environment will befamiliar with the look and feel of Arduino

• Open source and extensible software- The Arduino software and is published asopen source tools, available for extension by experienced programmers. The lan-guage can be expanded through C++ libraries, and people wanting to understandthe technical details can make the leap from Arduino to theAVR C programminglanguage on which it’s based. Similarly, you can add AVR-C code directly intoyour Arduino programs if you want to.

• Open source and extensible hardware - The Arduino is based on Atmel’s ATMEGA8and ATMEGA168 microcontrollers. The plans for the modules are published undera Creative Commons license, so experienced circuit designers can make their ownversion of the module, extending it and improving it. Even relatively inexperiencedusers can build the breadboard version of the module in order to understand how itworks and save money.

3.3 Motors Survey

3.3.1 DC Motor

Is a simple electric motor which uses electricity and a magnetic field to produce torquethat results in turning of the motor. Simply, a DC Motor requires an electric coil andtwo of opposite polarity magnets in which attraction and repulsion causes rotation of themotor in a certain direction. DC Motors can be found in applications like electric razors,remote control cars and electric car windows. [3]

3.3.1.1 DC Motor pros

• Provide variable speeds

• Low initial cost

Page 50: Noodles Vending Machine - Bachelor Thesis

CHAPTER 3. SEQUENCE OF OPERATION AND MICROCONTROLLER 37

• High reliability

• Simple control of motor speed

3.3.1.2 DC Motor cons

• High maintenance

• Low life-span for high intensity uses

3.3.2 Stepper Motor

Is a special type of synchronous motors that rotates a number of degrees with each electricpulse and can vary depending on the application. Speed of stepper motor is determinedby the time delay between each incremental movement. Typical increments are 0.9 or 1.8degrees, with 400 or 200 increments thus representing a full circle. Stepper Motors canbe found in applications like robotic devices, antenna rotators and computer hard driveswhere devices can be moved and positioned precisely. [4]

3.3.2.1 Stepper Motor Pros

• No maintenance often required

• Low cost solution

• Reliable and mechanically simple

• Stable at standstill

• Not easily demagnetized by excessive current

• High continuous torque

3.3.2.2 Stepper Motor Cons

• Noisy at high speeds

• Ringing, Resonance and poor low speed smoothness

• Uses full current at standstill

• Excessive Iron losses at high speeds

Page 51: Noodles Vending Machine - Bachelor Thesis

CHAPTER 3. SEQUENCE OF OPERATION AND MICROCONTROLLER 38

3.3.3 Servo Motor

A Servo is a small device that has an output shaft. This shaft can be positioned to specificangular positions by sending the servo a coded signal. As long as the coded signal existson the input line, the servo will maintain the angular position of the shaft. As the codedsignal changes, the angular position of the shaft changes. In practice, servos are used inradio controlled airplanes to position control surfaces like the elevators and rudders. Theyare also used in radio controlled cars, puppets, and of course robots.

3.3.3.1 Servo Pros

• Low cost

• No power used at standstill

• Smooth rotation at low speeds

• High peak torque

• High speed attainable

• Flat speed-torque curve

3.3.3.2 Servo Cons

• Brush maintenance

• Poor thermal performance

• Can be demagnetized as a result of excessive current

• Increased installed cost

• Limited top speed

• Limited angle of rotation “Maximum of 180 degrees”

Page 52: Noodles Vending Machine - Bachelor Thesis

Chapter 4

Mechanical And ElectricalImplementation

4.1 Mechanical Implementation Process

4.1.1 Machine Chassis

The chassis is made of steel and acts as the back bone of the whole machine. It consistsof four vertical pilars, which are fixed from the bottom and the top with two 70 cm x70cm square holders. The chassis is implemented with bolts openings along the pillarsand holders, to allow for various components fixing locations like Trays , Boiler andElectrical Boards. It has the dimensions of 2 meters high , 70 cm width and 70 cm depth.This chassis is implemented to maintain the designed internal dimensions.

1. Getting flat patterns of Steel for the vertical pillars, top and base.

2. Drilling the holes for internal fixations between holders and external fixations fortrays and outer casings.

3. Electrostatic Painting for the vertical pillars, top and base.

4. Assembling the chassis as a whole frame, the size of bolts used were 8 mm.

39

Page 53: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 40

Figure 4.1: Chassis with Trays Fixed

Page 54: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 41

4.1.2 Trays

As mentioned in the design category, there are three different trays in design but they allgone through the same implementation process, the difference is in drilling step wheredifferent holes with different dimensions were needed.

1. Cutting flat Steel sheet into a square tray of 60 cm x 60 cm with a thickness of 1.5mm.

2. Drilling the required holes with changing the diameter and speed of cutting.

3. Electrostatic Painting for the three trays.

4. Fixing the trays to the machine with two side holders that are fitted to machinechassis and trays with four 8 mm bolts on each tray.

Figure 4.2: Finished trays after being fitted to the chassis

Page 55: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 42

4.1.3 Arm

The Arm consists of three complementary parts “Vertical part , Horizontal part and CupHolder”. This allows for repositioning availability and ease of maintanence if required.

1. Getting 4 cm x 4 cm “Ready Made” Aluminum tubes with thickness of 1.5 mm andcutting them to the required length.

2. Drilling the tubes for bolts openings and Arm’s Motor fixations.

3. Electrostatic Painting for the three parts.

4. Assembling the three parts using bolts of 6 mm to the vertical & horizontal partsand Cup holder.

5. Fixing the Arm to the Servo Motor with 3 mm & 4 mm Bolts.

Figure 4.3: Finished Arm

Page 56: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 43

4.1.4 Cup Stacks

Cup Stack consists of Hollow Steel Bars and Steel circular Ring.

1. Cutting twenty four steel bars 8 mm diameter with a length of 90 cm as each stackhas four bars and there are six different stacks.

2. Cutting six circular rings from flat steel sheet with an external diameter of 13 cmand internal diameter of 11 cm.

3. Drilling six holes in each ring with diameter of 6 mm.

4. Painting both the bars and rings with Electrostatic coating painting.

5. Threading the bars from upper and lower ends to be fitted with bolts of 6 mmdiameter for vertical fixations on the upper tray, with the ring at the upper end andwith the tray at the lower end.

6. Fixing the rings with threaded 8 mm bolts to be fixed with the top part of the ma-chine.

(a) Vertical bars (b) Rings after being fitted with thevertical bars

Figure 4.4: Finished cup stacks

Page 57: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 44

4.1.5 Fork Dispenser

1. Getting flat sheet of steel and cutting it to the required dimension which is 50 cm x24 cm.

2. Bending the steel sheet 8 cm from both sides 90 degrees.

3. Welding two “L” steel parts to the bended steel sheet.

4. Painting the assembled part.

5. Fixing the fork dispenser with the lower tray by two linear bearings that slidesoutwards & inwards which allows easy packing for forks.

Figure 4.5: Fork dispenser mounted on the lower tray

Page 58: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 45

4.1.6 Machine Door

1. Cutting a flat sheet of steel into the dimensions of 2 m x 70 cm.

2. Introducing the cutted part into the punch and drilling the required openings withchanging the parameters of cutting like diameter, feed rate and speed.

3. Electrostatic Painting to the finished part after drilling.

4. Fixing the transparent plastic window and covering edges with rubber frame.

5. Door lock fixation that has two lock points at the top and bottom of the door.

6. Assembling the door to the machine with three hinges fixed at the right side of themachine chassis.

Figure 4.6: Finished machine door

Page 59: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 46

4.1.7 Forks Box

1. The forks box was manifactured using 4 carbon steel plates, two with initial dimen-sions of 20 cm x 15 cm and the other two with dimensions 15 cm x 15 cm

2. The four plates were joined together by means of MIG welding to form the shapeshawn in figure 4.2

3. A fifth plate, the swinging door, with dimensions 20 cm x 10 cm ,was fixed on theproduct of the previous step by means of two hinges in order to let the door swingfreely.

4. The part was then painted brown using electrostatic painting.

5. Then the box was mounted on the machine door by means of two supporting rodswhich were welded on the inner side of the door. The fixations were done by meansof four 4mm bolts and nuts with the holes drilled manually.

Figure 4.7: Final shape of the forks box

Page 60: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 47

4.1.8 Outer Casings

1. The outer casings are simply made from 5 carbon steel sheets cut to certain dimen-sions, three (two lateral and one back) with dimensions 194 cm x 64 cm and theother two (top and bottom) with dimensions 64 cm x 64 cm.

2. Four holes were drilled manually in the four corners of each sheet.

3. The sheets were painted using electrostatic paint.

4. Then the painted lateral and back casings were fitted on the chassis by means of six6 mm bolts and nuts for each one.

5. The top and bottom casings were fitted on te chassis by means of four 6 mm boltsand nuts for each one.

Figure 4.8: Final shape of one lateral side

Page 61: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 48

4.1.9 Water Injection System

1. First, two aluminium bars, one with dimensions 30 cm x 4 cm x 4 cm and the otherwith dimensions 10 cm x 4 cm x 4cm, were welded together by means of MIGwelding.

2. Then two copper tubes with inner and outer diameters of 0.4 cm and 0.5 cm respec-tively and cut to lengths of 40 cm and 25 cm respectively.

3. The two tubes were welded together using MIG welding technique to form the “T”shape.

4. An Aluminuim slider, with inner and outer dimensions of 0.5 cm and 0.6 cm re-spectively, was fitted horizontally to the output member of the servo motor drivingthe mechanism and then attached to the T-shaped copper part.

5. All of the members of the mechanism was then painted using electrostatic paintingtechniques.

6. Then the T-shaped member was fitted into the vertical slider mentioned in step one.

7. The whole mechanism is finally fixed on the upper tray using four 4 mm bolts andnuts.

Figure 4.9: Final shape of the Scotch Yoke

Page 62: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 49

4.1.10 List of Bolts, Nuts and Washers

2mm 3mm 4mm 6mm 8mmBolts 1 1 20 78 68Nuts - - 20 78 68

Washers - - 40 156 136

Table 4.1: List of Bolts, Nuts and Washers

4.2 Electrical Implementation

4.2.1 Introduction

The Electrical implementation is the part discussing the electrical and control design forthe product starting from the components used their function and how they are controlledto reach the desired output. It also includes the code used for controlling the variousoutputs and the electrical simulations done before manufacturing the real PCB board.

4.2.2 Electrical Components

4.2.2.1 Motors

As mentioned in benefits and drawbacks of each type of motors in the survey done (3.3),three motors were selected according to the points discussed as follows:

4.2.2.1.1 One Digital Metal Gear Servo for rotating the Arm responsible for car-rying the Noodles Cup to different angles that corresponds to a different location. Thismotor has been selected since servo motor is used whenever fast control of angle is re-quired in addition to the ease of controlling the servo motor with the micro controller usedwhich is "Arduino Mega" and the considerable load of the Arm carried by the motor havemade the choice of using this specific motor with the rating of 20 Kg.cm.

Voltage 6 - 7.2 VSpeed 0.16 sec/60 degree (6V), 0.14 sec/60 degree (7.2V)Torque 18 Kg.cm (6V), 20 Kg.cm (7.2V), Stall Torque

Dimension 59.5x29.2x51.3 mmWeight 164g

Table 4.2: Digital Metal Gear Servo Specifications

Page 63: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 50

4.2.2.1.2 One Mini Servo Motor for the water injection mechanism as the operationgoes by rotating 180 degrees counter clockwise then moving back the 180 degrees clock-wise and reaching the initial position. As the water injection mechanism is of a lightweight “Made of Aluminum” so this specific rating of the motor has been agreed upon.

Voltage 4.2 - 6 VSpeed 0.12 sec/60 degree (4.8V), 0.10 sec/60 degree (6V)Torque 12.2 Kg.cm (4.8V), 2.5 Kg.cm (6V)

Dimension 22.8x12.3x29.7 mmWeight 16g

Table 4.3: Mini Servo Motor Specifications

4.2.2.1.3 One DC Motor with Encoder and Gear for the fork dispenser mechanismthat dispenses a fork to the customer being served. This DC Motor is selected on the basisof simple On/Off operation during a certain period of delay time. The Motor shaft is fittedto an extension which carries a Spring filled with forks ready to be served such that eachcomplete rotation translates linearly a fork and dispenses it to the customer.

Voltage 12 VDCOutput Power 1.1 WRated Speed 58 RPMRated Torque 25.4 N.cmRated Current 0.41 A

Gear Ratio 1.6Length 37 mmWeight 160 g

Table 4.4: DC Motor Specifications

4.2.2.2 Fifteen Relays

5 volts relays for outputs 12 volts relays for some input sensors. The relays are used asswitch in which they separate the required voltage for the devices used and the controlsignal voltage of the micro-controller.

4.2.2.3 Arduino Mega2560 (micro-controller)

It’s the brain of the whole machine, as it’s used to control the machine input to out thedesired output, it also handles the different situation that may show up during operation.

Page 64: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 51

4.2.2.4 Six Push Buttons

Used as the input peripheral for the machine.

4.2.2.5 One Power Supply

Supplies voltages of 12V and 5V, and a maximum current of 10A to the circuit.

4.2.2.6 Five Proximity Sensors

Used to detect packs at serving position and to detect existence of every flavor.

4.2.2.7 Heat Sensor (1SEN11301P)

To detect the temperature of the water in the boiler and stick it in the range between 60 Cto 90 C.

4.2.2.8 One 220 VAC Solenoid valve

Used to controlling water flow from the boiler to the water injection mechanism.

4.2.2.9 One Character LCD Module 40 Char. x 2 Lines (4002A)

Used as the interface between the user and the machine

Page 65: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 52

4.2.3 Stages of electrical manufacturing:

4.2.3.1 Electrical Simulation Using Proteus

At the very early stages of the project, an electrical simulation was created including allthe required connections and voltages for the micro-controller model to operate on thesimulation (as the micro controller real model used in this project it’s a shield while onthe simulation it’s just a set of connection pins that needs even the voltage required to turnthe micro-controller on).The electrical simulation also included the relays before the output motors, the relaysbefore the input sensors, motors, sensors, push buttons and the LCD.The main element in the simulation is the micro-controller code, as by uploading the codeto the simulation it should work if the connection pins, voltages and the code are correct.

Page 66: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 53

Figure 4.10: Electronic circuit drawn using Proteus

Page 67: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 54

4.2.3.2 List of Arduino Connections

Pin Number In Arduino Connected to Input/Output Digital/Analogue

Pin # 02 Pin 14 in LCD Output DigitalPin # 03 Pin 13 in LCD Output DigitalPin # 04 Pin 12 in LCD Output DigitalPin # 05 Pin 11 in LCD Output DigitalPin # 10 Pin 06 in LCD Output DigitalPin # 11 Pin 05 in LCD Output DigitalPin # 12 Pin 04 in LCD Output DigitalPin # 13 Pin 15 in LCD Output DigitalPin # 22 Push button 1 Input DigitalPin # 23 Push button 2 Input DigitalPin # 24 Push button 3 Input DigitalPin # 25 Push button 4 Input DigitalPin # 26 Push button 5 Input DigitalPin # 28 Arm Servo Motor Output DigitalPin # 29 Scotch Yoke Servo Output DigitalPin # 30 Temperature Sensor Input AnalogPin # 32 Magnet for flavor 1 Output DigitalPin # 33 Magnet for flavor 2 Output DigitalPin # 34 Magnet for flavor 3 Output DigitalPin # 35 Magnet for flavor 4 Output DigitalPin # 36 Sensor at Serving Position Input DigitalPin # 37 Flavor 1 packs sensor Input DigitalPin # 38 Flavor 2 packs sensor Input DigitalPin # 39 Flavor 3 packs sensor Input DigitalPin # 40 Flavor 4 packs sensor Input DigitalPin # 41 Counter reset button Input DigitalPin # 42 Solenoid Valve Output DigitalPin # 43 Serving Position Error LED Output DigitalPin # 44 Fork LED Output DigitalPin # 45 Fork DC Motor Output DigitalPin # 46 Pump Output DigitalPin # 47 Heater Output DigitalPin # 48 Intermediate Connection Output Digital

Table 4.5: Arduino connections

Page 68: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 55

4.2.3.3 Experimental Implementation On Wooden Board

After the simulation is finished and the motors and outputs are working fine, an experi-mental wooden board was created which include all the real elements of project as a realtesting stage. The wooden board as illustrated contains the power supply, the motors, themicro controller, the LCD and the senors were substituted by push-buttons. The elementswere connected through a bread-board to link between all the elements together.

Figure 4.11: Experimental Circuit

Page 69: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 56

4.2.3.4 PCB Wiring on ARES

After the success of the experimental wooden board test, a PCB wiring simulation wascreated in order to manufacture the PCB main board that shall hold all the componentsand be responsible for all the connectionsThe PCB wiring on ARES was done using models on the library of the project whichresembles the real models used in the project.A manually made connection pins was made that also resembles the Arduino board(micro-controller) in order to directly connect the board on the PCB board insisted ofusing a number of wires.

Figure 4.12: PCB Wiring on ARES

Page 70: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 57

4.2.3.5 Implemented The real PCB Board Used

The PCB board in the beginning is double sided board one side is copper where the tracksare to be designed and the other side is plastic where components are welded.Firstly, the photo paper of the ARES wiring is ironed over the copper part of the PCB inorder to print the tracks over the copper on the PCB.Secondly, the board is submerged in a chemical fluid that removes all the copper from theboard except the one with the tracks printed over.

Figure 4.13: Subemerging the board

Page 71: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 58

Thirdly, the board is manufactured and the tracks are done the same as the simulated oneson the ARES.Finally, the PCB board is to be drilled using 0.8 or 1 mm manual driller in order to putthe components on the board and weld them on the copper plated side.

Figure 4.14: Final shape of the PCB

Page 72: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 59

4.2.4 The Face Plan of The Implemented PCB

The following Face Plan shows how Relays and wires connectors are implemented on thePrinted Circuit Board.

Figure 4.15: Face plan of the implemented PCB

4.2.4.1 Relays

1. Heater Relay

2. Forks DC Motor Relay

3. LED 1 Relay

4. Pack 3 Sensor Relay

5. Magnetic Lock 4 Relay

6. Pack 1 Sensor Relay

7. Magnetic Lock 2 Relay

8. Servo 2 Relay

9. Servo 1 Relay

Page 73: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 60

10. Magnetic Lock 1 Relay

11. Magnetic Lock 2 Relay

12. Serving Position Sensor Relay

13. Pack 2 Sensor Relay

14. Pack 4 Sensor Relay

15. Water Solenoid Valve Relay

16. LED 2 Relay

17. Pump Relay

4.2.4.2 Connectors

Ros1: 220 V AC

Ros2: Temperature Sensor

Ros3: Heater

Ros4: Forks DC Motor

Ros5: LED1

Ros6: Reset Counter

Ros7: Pack 3 Sensor

Ros8: Pack 1 Sensor

Ros9: Magnetic Lock 4

Ros10: Magnetic Lock 3

Ros11: Servo 2

Ros12: 5V DC terminals

Ros13: 12V DC terminals

Ros14: Servo 1

Ros15: Magnetic Lock 1

Page 74: Noodles Vending Machine - Bachelor Thesis

CHAPTER 4. MECHANICAL AND ELECTRICAL IMPLEMENTATION 61

Ros16: Push Button 1

Ros17: Push Button 4

Ros18: Push Button 2

Ros19: Push Button 3

Ros20: Push Button 5

Ros21: Magnetic Lock 3

Ros22: Serving Position Sensor

Ros23: Pack 2 Sensor

Ros24: Pack 4 Sensor

Ros25: Water Solenoid Valve

Ros26: LED 2

Ros27: Pump

Page 75: Noodles Vending Machine - Bachelor Thesis

Chapter 5

Conclusion And FutureRecommendations

5.1 Conclusion

From a lot of types of vending machines, this project aims to introduce a new vend-ing machine that provides up to six flavors of noodles and serves them either cooked orpacked. The machine is a real dimensional one, not a prototype. It has a simple electricalcontrol mechanism that ensures accuracy and functionality of the machine. The machineuses higher technology than other vending machines, cheaper components and developedsystem.

5.2 Future Recommendation

A lot of future work can be done to increase the functionality of this machine, as re-searching decreasing serving time and decreasing the size of the machine itself. Addingnew flavors to the machine is also a proposed addition, as well as introducing a moreuser friendly interaction between user and machine. A lot of research is to be done onways of starting the machine. There are a lot of proposed solutions as reading tokens,banknotes, visa cards, special made cards. Finally, Security and communication systemscan be developed as well. A proposed research is communication between machine andtrader through modems and Internet connections

62

Page 76: Noodles Vending Machine - Bachelor Thesis

Bibliography

[1] http://en.wikipedia.org/wiki/Microcontroller.

[2] http://arduino.cc/it/Main/ArduinoBoardMega2560.

[3] http://www.wisegeek.com/what-is-a-dc motor.htm.

[4] http://whatis.techtarget.com/definition/stepper motor.

63