automated cafeteria system for efficient food serving

48
I Automated Cafeteria System for Efficient Food Serving A Project Submitted By Under the Supervision of MR. MD. SIDDAT BIN NESAR Lecturer Department of Electrical and Electronic Engineering Port City International University Department of Electrical and Electronic Engineering August, 2019 Port City International University MD. FEROUZ PATOWARY ANAYET ULLAH MD. SAYEED SORWARDEE MD. RASHEDUL ALAM MD. NAZMUL HOSSAIN AMIT GHOSH ID: EEE 01005779 ID: EEE 01005844 ID: EEE 01005806 ID: EEE 01005826 ID: EEE 00505273 ID: EEE 00905721

Upload: [email protected]

Post on 05-Sep-2019

0 views

Category:

Engineering


0 download

DESCRIPTION

The restaurant is now gaining more importance in terms of automation. The usual procedure used for food ordering in restaurants is a manual process. It involves the waiters noting down the menu from customers, transferring the orders to the kitchen, serving the menu and finally preparing bills. This process even though looks simple, is prone to human errors while note making and delays involved. So the customers end-up with unsatisfactory service. Considering this fact and with an aim to improve efficiency and reduce errors in conventional food ordering system, new technology is introduced to automate the process. The ordering process is made simple through which the customer can order the food item from the table itself. It consists of Mobile App and LCD display to order the food item and to display the ordered food item to the customer respectively. The ordered food item will be transferred to the kitchen using the Bluetooth Module. The serving process consists of food serving conveyer belt which is used to serve the foods to the customer depending upon their order. The conveyer belt uses arduino microcontroller for programming. The cost of the ordered food item will get added up and the total bill amount will be shown to the customer and it will be sent to the billing counter. Website will also be created for the restaurant.

TRANSCRIPT

Page 1: Automated Cafeteria System for Efficient Food Serving

I

Automated Cafeteria System for Efficient Food Serving

A Project Submitted

By

Under the Supervision of

MR. MD. SIDDAT BIN NESAR Lecturer

Department of Electrical and Electronic Engineering

Port City International University

Department of

Electrical and Electronic Engineering

August, 2019

Port City International University

MD. FEROUZ PATOWARY

ANAYET ULLAH

MD. SAYEED SORWARDEE

MD. RASHEDUL ALAM

MD. NAZMUL HOSSAIN

AMIT GHOSH

ID: EEE 01005779

ID: EEE 01005844

ID: EEE 01005806

ID: EEE 01005826

ID: EEE 00505273

ID: EEE 00905721

Page 2: Automated Cafeteria System for Efficient Food Serving

II

Automated Cafeteria System for Efficient Food Serving

A project submitted to the Electrical and Electronic Engineering Department of the Engineering Faculty,

Port City International University in partial fulfillment of the requirements for the degree of Bachelor

of Science in Electrical and Electronic Engineering.

MD. FEROUZ PATOWARY

ANAYET ULLAH

MD. SAYEED SORWARDEE

MD. RASHEDUL ALAM

MD. NAZMUL HOSSAIN

AMIT GHOSH

ID: EEE 01005779

ID: EEE 01005844

ID: EEE 01005806

ID: EEE 01005826

ID: EEE 00505273

ID: EEE 00905721

Department of

Electrical and Electronic Engineering

August, 2019

Port City International University

Page 3: Automated Cafeteria System for Efficient Food Serving

III

DECLARATION

This is to certify that this thesis “Automated Cafeteria System for Efficient Food Serving” is my original

work. No part of this work has been submitted elsewhere partially or fully for the award of any other degree

or diploma. Any material reproduced in this project has been properly acknowledged.

Students’ names & Signatures

MD.FEROUZ PATOWARY

ANAYET ULLAH

MD.SAYEED SOWARDEE

MD. RASHEDUL ALAM

MD. NAZMUL HOSSAIN

AMIT GHOSH

Page 4: Automated Cafeteria System for Efficient Food Serving

4

Page 5: Automated Cafeteria System for Efficient Food Serving

IV

APPROVAL

The Project titled “Automated Cafeteria System for Efficient Food Serving” has been submitted to the

following respected members of the Board of Examiners of the department of Electrical and Electronic

Engineering in partial fulfillment of the requirements for the degree of Bachelor of Electrical and

Electronic Engineering on August, 2019 by the following student and has been accepted as satisfactory.

MD. FEROUZ PATOWARY

ANAYET ULLAH

MD. SAYEED SORWARDEE

MD. RASHEDUL ALAM

MD. NAZMUL HOSSAIN

AMIT GHOSH

ID: EEE 01005779

ID: EEE 01005844

ID: EEE 01005806

ID: EEE 01005826

ID: EEE 00505273

ID: EEE 00905721

Supervisor

MR. MD. SIDDAT BIN NESAR Lecturer

Department of EEE

Port City International University

Page 6: Automated Cafeteria System for Efficient Food Serving

V

ACKNOWLEDGMENT

First and foremost, we would like to express our special thanks to our supervisor MR. MD. SIDDAT BIN

NESAR, Lecturer, Department of Electrical and Electronic Engineering, Port City International

University for giving our enormous support, motivation and invaluable advices regarding this project. He

has been my idol and role model in the last couple of months and we are grateful to Almighty Allah for

giving our the opportunity to learn under such a great supervisor.

Secondly, we would like to express our special thanks to all the faculty members of Department of

Electrical and Electronic Engineering, Port City International University for giving our comments and

invaluable advice for further extension of this project.

We would like to thank my family and friends, without whose patience and support we would never have

reached our goal.

MD. FEROUZ PATOWARY

ANAYET ULLAH

MD. SAYEED SORWARDEE

MD. RASHEDUL ALAM

MD. NAZMUL HOSSAIN

AMIT GHOSH

Page 7: Automated Cafeteria System for Efficient Food Serving

VI

TABLE OF CONTENTS

ABSTRACT 1

CHAPTER 1: INTRODUCTION Page 2-3

1.1 Introduction 3

1.2 Objectives 3

1.3 System Discussion 4

1.3.1 Ordering System 4

1.3.2 Serving Process 4

1.3.3 Restaurant Website and Android App 4

1.4 Results and Discussion 5

1.4.1 Ordering Process 5

1.4.2 Serving Process 6

1.5 Applications of the project 6

1.6 Limitations 6

CHAPTER 2 : LITERATURE REVIEW Page 7-9

Literature Review 7-9

CHAPTER 3 :

THEORETICAL OVERVIEW

Page 10-20

3.1 List Of Electrical Components 10

3.1.1. Arduino pro Mini 10-11

3.1.2. Bluetooth Module 12-13

3.1.3. LCD 13-15

3.1.4. Servo Motor 15-16

3.1.5. Motion Sensor 17-18

3.1.6. Obstacle sensor 18-19

3.1.7. Push Button 20

3.1.8 Power Supply 20

Page 8: Automated Cafeteria System for Efficient Food Serving

VII

CHAPTER 4: BLOCK DIAGRAM Page 21-22

4.1 Block Diagram 21

4.2 Flow Chart 22

4.3 Schematic diagram 23

4.2.1 Circuit Operation 23

4.2.2 Working Principle 24

4.2.3 Circuit Application 24

CHAPTER 5:

DESIGN AND IMPLEMENTATION

Page 25-26

5.1 Body design: 25

5.2 Software Description 26

5.3 Hardware 26

CHAPTER 6:

FUTURE WORK AND CONCLUSION

Page 27-28

6.1 Applications 27

6.2 Advantages 27

6.3 Benefit 27

6.4 Disadvantages 28

6.5 Future Enhancements 28

6.6 Conclusion 28

REFERENCES 29

APPENDIX 30-33

Page 9: Automated Cafeteria System for Efficient Food Serving

VIII

List of Figures

Figure No Figure Name

Page

Figure 1.1: Smart restaurant using Conveyer 3

Figure 3.1: Arduino pro Mini and Arduino Pro Mini Pin Diagram 10

Figure 3.2: Bluetooth Module and Bluetooth Module Pinout 12

Figure 3.3: LCD and Pinout 14

Figure 3.4: Servo motor and Servo Motor Pinout 16

Figure 3.5: Pulse Width Modulation 16

Figure 3.6: Motion sensor 17

Figure 3.7: Obstacle Sensor and Pinout 19

Figure 3.8: Push Button 20

Figure 3.9: Power Supply 20

Figure 4.1: Block diagram of project 21

Figure 4.2 Flowchart of working process. 22

Figure 4.3: Circuit diagram of the prototype model 23

Figure 5.1: Front Side View 25

Figure 5.2: Back Side view 25

Figure 5.3: Full Circuit View 25

Page 10: Automated Cafeteria System for Efficient Food Serving

IX

List of Tables

Table No Table Name

Page

Table 3.1: Arduino Pro Mini Technical Specification 11

Table 3.2: Arduino Pro Mini Technical Specification 11

Table 3.3: Bluetooth module Pin Configuration 13

Table 3.4: LCD module Pin Configuration 15

Table 3.5: Motion Sensor Pin Configuration 17

Table 3.6: Obstacle Sensor Pin Configuration 19

Page 11: Automated Cafeteria System for Efficient Food Serving

1| P a g e

ABSTRACT

The restaurant is now gaining more importance in terms of automation. The usual procedure used

for food ordering in restaurants is a manual process. It involves the waiters noting down the menu

from customers, transferring the orders to the kitchen, serving the menu and finally preparing bills.

This process even though looks simple, is prone to human errors while note making and delays

involved. So the customers end-up with unsatisfactory service. Considering this fact and with an

aim to improve efficiency and reduce errors in conventional food ordering system, new technology

is introduced to automate the process. The ordering process is made simple through which the

customer can order the food item from the table itself. It consists of Mobile App and LCD display

to order the food item and to display the ordered food item to the customer respectively. The

ordered food item will be transferred to the kitchen using the Bluetooth Module. The serving

process consists of food serving conveyer belt which is used to serve the foods to the customer

depending upon their order. The conveyer belt uses arduino microcontroller for programming. The

cost of the ordered food item will get added up and the total bill amount will be shown to the

customer and it will be sent to the billing counter. Website will also be created for the restaurant.

Page 12: Automated Cafeteria System for Efficient Food Serving

2| P a g e

CHAPTER 1

INTRODUCTION

1.1 Introduction

Restaurant is a place where people come, sit and eat meals that are cooked and served by the chef

and the waiters respectively. In traditional restaurant system, orders are taken by a waiter and they

bring the food when it is ready. After eating the food, customers will pay the bill. This system relies

on large numbers of manpower to handle customer reservation, inquiry about them, ordering food,

placing order on table, reminding dishes of customer. Currently, there are a lot of ways of serving

the customers. For instance, waiter serving system, robot serving system, self-carrying system (fast

food), pen-and-paper self-ordering system, etc. These systems are made in order to get attraction

from customers and to reduce the need of hiring more employees in their workplace. When there is

a conveyer belt that can carry food, it will strictly reduce the need of hiring more employees.

Therefore, there is propos system. The proposed system reduces the man power and makes the

whole process in the restaurant to be done automatically starting from welcoming the customer to

payment of bill. The display system consists of three main blocks. First block deals with ordering

process through which the customer can order the food item without the need of the mobile app.

The customer table is provided with the app and LCD display using which the customer can type

the item code and can see the ordered food item along with cost respectively. The second block is to

serve the ordered food to the customer. It is done by using the food serving conveyer belt. It will

modify the real time problem of time delay and delivering of incorrect food item. It consists of the

dc gear motor which moves according to the sensor output. The conveyer belt consists of proximity

sensor to count the wheel rotation and IR sensor for obstacle detection. The third block is for

payment of bill amount. The cost of the ordered food item will be displayed to the customer at the

time of ordering itself and if the customer finished ordering, the total amount of the ordered food

item will be calculated and the entire bill amount will be displayed to the customer. The other

technique in this paper includes the common display of available food item with their code so that

the customer can be aware of the menu. There will be a helping technique available at each

customer table which is used by the customer to order the food item. In this technique the

instruction for the entire process will be played at the time of ordering the food item. This system

replaces the conventional method in restaurant and it reduces the human need and makes the

Page 13: Automated Cafeteria System for Efficient Food Serving

3| P a g e

process simple and efficient. This system is also meant for the attraction of the customer .By seeing

this technology the amount of customer will be increased and so the profit will be increased. The

main objective of this paper is

To order the food item without the need of the server

To serve the ordered food item to the customer automatically without any human need

To calculate the bill amount and to display the amount to the customer

Figure 1.1: Smart restaurant using Conveyer Belt

1.2 Objectives

We have chosen this topic to modern technology system of restaurant By using conveyer belt.

Build a smart cafeteria.

Reduce mistake made by waiters.

Increase customer comfortability.

Serve to specific table.

Efficient and smart serving.

Reduce labour into a minimum needed.

Reduce cost to pay the employee.

Encourage of restaurateur to use modern technology system.

Engineer job opportunity.

Page 14: Automated Cafeteria System for Efficient Food Serving

4| P a g e

1.3 System Discussion

In this section we will discuss about system process. There is some process.

1.3.1 Ordering System

The proposed system consists of mobile app, arduino, LCD display, Bluetooth Module for ordering

the food item. Mobile app and LCD display are placed in the customers table. Each food item will

be given a code; the customer can type the code of the food item using the app. The quantity of the

food item can be incremented and decremented using 1 or 2. The name of the food item, quantity,

and cost of the food item will be displayed in the LCD display placed in the table. The name of the

food item will be transmitted to the kitchen using Bluetooth Module and it will be displayed in the

kitchen LCD. The availability of the food item along with the code and cost will be displayed in

the common LCD display placed in the restaurant. When the customers occupy the table the

instruction will be played, so that the customer can order the food item according to the

instruction.

1.3.2 Serving Process

This system uses Conveyer belt to serve the food to the customer. The conveyer includes IR sensor.

There will be a display and mobile app on the customers table. Customer will be able to set up

menu by the mobile app and order shown on the kitchen monitor. Accordingly, to prepare the food

to serve. The prepared food will be placed on the conveyer belt and belt will reach the table. This

is serving process.

1.3.3 Restaurant Website and Android App

Webpage has been created for the restaurant for ordering the food item from their home place and

then it will be delivered to the customer. The webpage contains the details of restaurant, menu,

cost of the item and the ordering site. The ordering site contains the input box where customer

needs to enter the details of ordering. Mobile Android application is developed for the restaurant

and it will be provided to the customer so that they can easily order the food item.

Page 15: Automated Cafeteria System for Efficient Food Serving

5| P a g e

1.4 Results and Discussion

This chapter provides the necessary information for Result and Discussion. In this section we will

discuss about system process. There is some process.

1.4.1 Ordering Process

Instruction for Ordering

When the customer occupies their table the LCD will show greetings to the customer and it will tell

to press 5 to read the instruction.

So, the customer has to press 5 if they want to read the instruction if the customer is familiar with

the instruction then they can move to the next step.

The instruction is as follows:

• Press start to start ordering.

• Type the item code of the food that they wish to order by seeing the menu list menu

displayed on the common LCD.

• Press 1 or 2 to increment and decrement the quantity.

Once the ordering is finished press submit to print the total amount. The common LCD display will

be present at the restaurant to display the food item that are present in the kitchen .The LCD display

will contain the details of item code, name of the food item and its cost.

Ordering Method

The item code, name of the food item and cost of it will be displayed in the common LCD kept at

the restaurant. By seeing that, the customer needs to type the item code by using the apps keypad

for eg., if they type ‘1’ using the keypad then ‘idly’ will be displayed on the LCD. Then the

quantity is given by means of + and – button. If + is pressed the quantity will be increase and if – is

pressed ,the quantity will be decrease. The cost of each ordered food will be simultaneously printed

on the LCD display. Once the first item has been ordered then the customer can precede the same

step for the next item. The customer can order any number of items at the time. This type of food

ordering will replace the conventional method of using pen and paper. It provides accurate means of

ordering system where there will be no error of changing the item and the customer no need to wait

for the server. The customer will also be aware of the cost of item while ordering the item.

Page 16: Automated Cafeteria System for Efficient Food Serving

6| P a g e

1.4.2 Serving Process

When the conveyer is called it will be moved in a programmed path. For each rotation of the IR

sensor gets incremented, it will stay in the kitchen and get the order and then it will have delivered

to the ordered customer. When the obstacle is detected in its path, it will stop if the obstacle object.

1.5 Applications of the project

We are going to implement our system in restaurants to ease the serving and management system

of the restaurant and also give a technical touch which atomize the working of restaurant.

With slight modification in this project, this system can be widely used at different public places

like at canteens, hospitals, public transport, home, theatres etc.

1.6 Limitations

Status and feedback of order is not obtained.

Limited distance.

System may not work properly if tablet/Smartphone suffer a defect

Also may become a drawback if end users are not able to use the tablet/Smart phone devices.

Page 17: Automated Cafeteria System for Efficient Food Serving

7| P a g e

CHAPTER 2

LITERATURE REVIEW

AUTONOMOUS ROBOT SYSTEM RESTAURNT [10]

There are some basic requirements in creating an autonomous mobile robot: openness, abstraction

and modularity. These requirements are crucial so that a new function of robot can be constructed

from small changes of hardware and software design. Line following based on Infrared (IR)

photoelectric sensor is the basic knowledge to construct an autonomous mobile robot. It is an

intelligent system to ensure that the robot moves according to the line, in which if it moves out of

the line, the position corrective feedback will send data to the microcontroller. In order to perform a

good line following robot, the principle of IR sensor should be followed. The robot build has to

detect the line in the shortest time.

Thus, the IR sensor has to produce the best output so that the information can be sent to the

microcontroller, and gives faster reaction. In order to improve system reliability and accuracy, the

received reflected light will convert into output signal voltage, which directly affected by the

distance between the reflector and the sensor. There is a threshold voltage, where the distance of IR

sensor and reflector is optimum. The output received from IR sensor will pass through a comparator

in order to compare the voltage and send data to microcontroller. The sensor installation mode will

also affect the performance of sensor. Basically, the distance between the IR set sensor and the black

line should be more than 5mm. Also, the IR sensor will be fixed perpendicular to the reflector.

SMART RESTAURANT: SURVEY ON CUSTOMER DEMAND AND SALSE,

FORECASTING. [13]

Demand forecasting is one of the important inputs for a successful restaurant yield and revenue

management system. Sales forecasting is crucial for an independent restaurant and for restaurant

chains as well. In this chapter a comprehensive literature review and classification of restaurant sales

and consumer demand techniques are presented. Sales prediction is very complex due to the impact

of internal and external environment. However, a reliable sales forecasting methodology can

improve the quality of business strategy. A range of methodologies and models for forecasting are

given in the literature. These techniques are categorized here into seven categories, also including

hybrid models. The methodology for different kinds of analytical methods is briefly described, the

Page 18: Automated Cafeteria System for Efficient Food Serving

8| P a g e

advantages and drawbacks are discussed, and relevant set of papers is selected. Conclusions and

comments are also made on future research directions.

AUTOMATION IN RESTAURANTS: ORDERING TO ROBOTS IN RESTAURANT

VIA SMART ORDERING SYSTEM [14]

Automation is everywhere; in one of our last paper we proposed a serving robot in restaurant to

automate the restaurants. In that paper we discussed some issues in existing serving robots in China

and Japan, and ordering to a robot is one from that issues. This paper is focusing on introducing

ordering system along with robotic waiter in restaurants in India. It is a web based application that a

customer can open on their smart phone. This system will help restaurants and hotels to increase

their star rating and reduce the human error at the time of taking orders. Already hotels are doing

new experiments to get notice by customers. For that they are registering in online applications also.

Our application is basically for the robotic restaurants to automate them.

INTELLIGENT RESTAURANT SYSTEM SMARTMENU. [15]

Digital technology is transforming business in many sectors, including restaurant systems and

service processes. Customers may recognize the replacement of paper-based menus with digital ones

as a first step of this process. Intelligent restaurant systems are an interesting application area for

merging and extension of cognitive capabilities with both intra-cognitive and inter-cognitive

communication. An intelligent restaurant system Smart menu, developed by Centria and Delitaz

Ltd., is an example of innovation which is based on merging and extending of cognitive capabilities.

These kinds of systems may change the everyday life in restaurants in the future. The system covers

the whole order process of a restaurant including the applications of the customer, the waiter, the

kitchen and the cashier. The first pilot systems were recently tested in several restaurants in Finland.

Piloting included also questionnaires and interviews analyzed by usability experts. In the future,

Smart menu may be extended to include also service robots in the system. The first demonstrations

of using service robot in a restaurant environment were already carried out.

DIGITAL ORDERING SYSTEM FOR RESTAURANT USING ANDROID. [10]

Nowadays web services technology is widely used to integrate heterogeneous systems and develop

new applications. Here an application of integration of hotel management systems by web services

technology is presented. Digital Hotel Management integrates lots of systems of hotel industry such

Page 19: Automated Cafeteria System for Efficient Food Serving

9| P a g e

as Ordering System Kitchen Order Ticket (KOT), Billing System, Customer Relationship

Management system (CRM) together. This integration solution can add or expand hotel software

system in any size of hotel chains environment. This system increases quality and speed of service.

This system also increases attraction of place for large range of customers. Implementing this

system gives a cost-efficient opportunity to give your customers a personalized service experience

where they are in control choosing what they want, when they want it – from dining to ordering to

payment and feedback. We are implementing this system using android application for Tablet PC’s.

The front end will be developed using JAVA Android and the backend will work on MySQL

database.

SMART AUTOMATED RESTAURANT. [13]

Smart Automated Restaurant provides an efficient and user friendly system. This system will solve

key problems faced by restaurants today through the use of technologies such as Mobile and Web

applications, Android applications and cloud computing. Restaurants have much inefficiency due to

human limitations that can be resolved through automation. This Smart Automated Restaurant

accomplishes this by providing two interfaces for the two types of users in restaurants; an Android

mobile application for customers and a web application for restaurant staff members. The Android

mobile application allows customers to have a seamless dining experience with features such as

finding available parking spaces easier through Internet-connected infrared proximity sensors in the

parking lot. Also finding available tables at the restaurant gets easier through the use of sensors.

Ordering dishes through an interactive menu and being able to pay the bill from their Android

phones are some of the other features. The web application provides staff members benefits such as

collecting data and statistics on the restaurants performance in real time and automating the order

placement system for waiters and cooks.

Page 20: Automated Cafeteria System for Efficient Food Serving

10| P a g e

CHAPTER 3

THEORETICAL OVERVIEW

We describe their theatrical overview of the project. For conveyer system, a DC gear motor device

is used control conveyer belt. This will command to conveyer so that it can do the required task like

moving forward, reverse, and stop. For obstacle system, we used obstacle and motion sensor to

detect any object and Arduino to process the data.

For automatic door opener system, we used motion sensor to detect object and open the door. For

Bluetooth app system, we used smartphone as a transmitter and Bluetooth module as a receiver. By

receiving customer data, Arduino process the data and shown it customer display and kitchen

monitor.

3.1 List of Electrical Component

In this chapter we will discuss various types of equipments. Which we used to build our project, and

these equipments are useful for various projects in our daily life.

3.1.1 Arduino pro Mini:

Figure 3.1: Arduino pro Mini and Arduino Pro Mini Pin Diagram

Arduino pro Mini board is one of application boards. Since it is an application board it does not have

in-built programmer. USB port and other connectors are also removed. Because once it is placed in

an application programmer and connectors are basically useless.

Arduino pro Mini is of two types they are differentiated based on CONTROLLER working voltage.

One is +3.3V and another is +5V. Choose the appropriate board based on application.

Page 21: Automated Cafeteria System for Efficient Food Serving

11| P a g e

Arduino pro Mini Pin Configuration

Table 3.1: Arduino Pro Mini Pin Configuration

PIN GROUP PIN NAME DESCRIPTION

POWER SOURCE VCC, GND and RAW

VCC - Connected to +5V or +3.3V

GND – Connected to GROUND

RAW – Connected to Unregulated

power supply 5+V to +12V

COMMUNICATION

INTERFACE

UART Interface (RXD, TXD)

SPI Interface (MOSI, MISO, SCK, SS )

TWI Interface(SDA, SCL)

UART (Universal Asynchronous

Receiver Transmitter) Interface can be

used to program PRO MINI

SPI (Serial Peripheral Interface)

Interface ban be used to program PRO

MINI

TWI (Two Wire Interface) Interface can

be used to connect peripherals.

INPUT OUTPUT PINS

PD0 to PD7 (8 pins of PORTD)

PB0 to PB5 (6 pins of PORTB)

PC0 to PC6 (7 pins of PORTC)

ADC6 and ADC7(2 additional pins)

Although these 23 pins have many

functions they can be considered as data

I/O pins.

ANALOG to DIGITAL

CONVERTER ADC0, ADC1, ADC2,…ADC7

These channels can be used to input

Analog signals. There are of 10 bit

resolution.

PWM OC0A,OC0B,OC1A,OC1B,OC2A,OC2B

These six channels can provide PWM

(Pulse Width Modulation) outputs. They

are of 8 bit resolution.

RESET RESET Resets the controller.

EXTERNAL

INTERRUPTS T0 and T1

These two pins are specially designed

hardware interrupts.

ANALOG

COMPARATOR AIN0 and AIN1

These two pins are connected to internal

comparator.

Arduino pro Mini Technical Specifications

Table 3.2: Arduino Pro Mini Technical Specification

Microcontroller Atmega328p – 8 BIT AVR controller

Operating Voltage 5V and 3.3V

Raw Voltage input 5V to 12V

Maximum current through each I/O pin 40mA

Maximum total current drawn from chip 200mA

Flash Memory 32KBytes

EEPROM 1KByte

Internal RAM 2Kbytes

Clock Frequency 3.3V --- 8Mhz

5V --- 16Mhz

Operating Temperature -40ºC to +105ºC

Page 22: Automated Cafeteria System for Efficient Food Serving

12| P a g e

3.1.2 Bluetooth Module

Brief Description on Bluetooth module

The HC-05 is a very cool module which can add two-way (full-duplex) wireless functionality to your

projects. You can use this module to communicate between two microcontrollers like Arduino or

communicate with any device with Bluetooth functionality like a Phone or Laptop. There are many

android applications that are already available which makes this process a lot easier. The module

communicates with the help of USART at 9600 baud rate hence it is easy to interface with any

microcontroller that supports USART. We can also configure the default values of the module by

using the command mode. So if you looking for a Wireless module that could transfer data from your

computer or mobile phone to microcontroller or vice versa then this module might be the right choice

for you. However do not expect this module to transfer multimedia like photos or songs; you might

have to look into the CSR8645 module for that.

Figure 3.2: Bluetooth Module and Bluetooth Module Pinout

Technical Specifications

Serial Bluetooth module for Arduino and other microcontrollers

Operating Voltage: 4V to 6V (Typically +5V)

Operating Current: 30mA

Range: <100m

Works with Serial communication (USART) and TTL compatible

Follows IEEE 802.15.1 standardized protocol

Uses Frequency-Hopping Spread spectrum (FHSS)

Can operate in Master, Slave or Master/Slave mode

Page 23: Automated Cafeteria System for Efficient Food Serving

13| P a g e

Can be easily interfaced with Laptop or Mobile phones with Bluetooth

Supported baud rate: 9600,19200,38400,57600,115200,230400,460800.

Pin Configuration

Table 3.3: Bluetooth module Pin Configuration

Pin Name Description

Enable / Key This pin is used to toggle between Data Mode (set low) and AT command mode

(set high). By default it is in Data mode

Vcc Powers the module. Connect to +5V Supply voltage

Ground Ground pin of module, connect to system ground.

TX – Transmitter Transmits Serial Data. Everything received via Bluetooth will be given out by this

pin as serial data.

RX – Receiver Receive Serial Data. Every serial data given to this pin will be broadcasted via

Bluetooth

State The state pin is connected to on board LED, it can be used as a feedback to check if

Bluetooth is working properly.

LED

Indicates the status of Module

Blink once in 2 sec: Module has entered Command Mode

Repeated Blinking: Waiting for connection in Data Mode

Blink twice in 1 sec: Connection successful in Data Mode

Button Used to control the Key/Enable pin to toggle between Data and command Mode

3.1.3 LCD

Brief Description on LCD modules

LCD modules are very commonly used in most embedded projects, the reason being its cheap price,

availability and programmer friendly. Most of us would have come across these displays in our day to

day life, either at PCO’s or calculators. The appearance and the pinouts have already been visualized

above now let us get a bit technical.

16×2 LCD is named so because; it has 16 Columns and 2 Rows. There are a lot of combinations

available like, 8×1, 8×2, 10×2, 16×1, etc. but the most used one is the 16×2 LCD. So, it will have

Page 24: Automated Cafeteria System for Efficient Food Serving

14| P a g e

(16×2=32) 32 characters in total and each character will be made of 5×8 Pixel Dots. A Single

character with all its Pixels is shown in the below picture.

Now, we know that each character has (5×8=40) 40 Pixels and for 32 Characters we will have

(32×40) 1280 Pixels. Further, the LCD should also be instructed about the Position of the Pixels.

Hence it will be a hectic task to handle everything with the help of MCU, hence an Interface IC like

HD44780 is used, which is mounted on the backside of the LCD Module itself. The function of this

IC is to get the Commands and Data from the MCU and process them to display meaningful

information onto our LCD Screen. You can learn how to interface an LCD using the above

mentioned links. If you are an advanced programmer and would like to create your own library for

interfacing your Microcontroller with this LCD module then you have to understand the HD44780 IC

is working and commands which can be found its datasheet.

Figure 3.3: LCD and Pinout

Features of 16×2 LCD module

Operating Voltage is 4.7V to 5.3V

Current consumption is 1mA without backlight

Alphanumeric LCD display module, meaning can display alphabets and numbers

Consists of two rows and each row can print 16 characters.

Each character is build by a 5×8 pixel box

Can work on both 8-bit and 4-bit mode

It can also display any custom generated characters

Available in Green and Blue Backlight

Page 25: Automated Cafeteria System for Efficient Food Serving

15| P a g e

Pin Configuration

Table 3.4: LCD module Pin Configuration

Pin No: Pin Name: Description

1 Vss (Ground) Ground pin connected to system ground

2 Vdd (+5 Volt) Powers the LCD with +5V (4.7V – 5.3V)

3 VE (Contrast V) Decides the contrast level of display. Grounded to get maximum

contrast.

4 Register Select Connected to Microcontroller to shit between command/data register

5 Read/Write Used to read or write data. Normally grounded to write data to LCD

6 Enable Connected to Microcontroller Pin and toggled between 1 and 0 for

data acknowledgement

7 Data Pin 0

Data pins 0 to 7 forms a 8-bit data line. They can be connected to

Microcontroller to send 8-bit data.

These LCD’s can also operate on 4-bit mode in such case Data pin

4,5,6 and 7 will be left free.

8 Data Pin 1

9 Data Pin 2

10 Data Pin 3

11 Data Pin 4

12 Data Pin 5

13 Data Pin 6

14 Data Pin 7

15 LED Positive Backlight LED pin positive terminal

16 LED Negative Backlight LED pin negative terminal

3.1.4 Servo Motor

A servo motor is an electrical device which can push or rotate an object with great precision. If you

want to rotate and object at some specific angles or distance, then you use servo motor. It is just

made up of simple motor which run through. If motor is used is DC powered then it is called DC

servo motor, and if it is AC powered motor then it is called AC servo motor. We can get a very high

torque servo motor in a small and light weight packages. Doe to these features they are being used in

many applications like toy car, RC helicopters and planes, Robotics, Machine etc.

Controlling Servo Motor: Servo motor is controlled by PWM (Pulse with Modulation) which is

provided by the control wires. There is a minimum pulse, a maximum pulse and a repetition rate.

Servo motor can turn 90 degree from either direction form its neutral position. The servo motor

expects to see a pulse every 20 milliseconds ( ms ) and the length of the pulse will determine how far

the motor turns.

Page 26: Automated Cafeteria System for Efficient Food Serving

16| P a g e

Figure 3.4: Servo motor and Servo Motor Pinout

For example, a 1.5ms pulse will make the motor turn to the 90° position, such as if pulse is shorter

than 1.5ms shaft moves to 0° and if it is longer than 1.5ms than it will turn the servo to 180°. Servo

motor works on PWM (Pulse width modulation) principle, means its angle of rotation is controlled by

the duration of applied pulse to its Control PIN. Basically servo motor is made up of DC motor which

is controlled by a variable resistor (potentiometer) and some gears. High speed force of DC motor is

converted into torque by Gears. We know that WORK= FORCE X DISTANCE, in DC motor Force

is less and distance (speed) is high and in Servo, force is High and distance is less. Potentiometer is

connected to the output shaft of the Servo, to calculate the angle and stop the DC motor on required

angle.

Figure 3.5: Pulse Width Modulation

All servo motors work directly with your +5V supply rails but we have to be careful on the amount

of current the motor would consume, if you are planning to use more than two servo motors a proper

servo shield should be designed.

Page 27: Automated Cafeteria System for Efficient Food Serving

17| P a g e

3.1.5 Motion Sensor

Brief Description on Motion Sensor

The PIR sensor stands for Passive Infrared sensor. It is a low cost sensor which can detect the

presence of Human beings or animals. This sensor has three output pins Vcc, Output and Ground as

shown in the pin diagram above. Since the output pin is 3.3V TTL logic it can be used with any

platforms like Arduino, Raspberry, PIC, ARM, 8051 etc..

The module can be powered from voltage 4.5V to 20V but, typically 5V is used. Once the module is

powered allow the module to calibrate itself for few minutes, 2 minutes is a well settled time. Then

observe the output on the output pin. Before we analyse the output we need to know that there are

two operating modes in this sensor such as Repeatable (H) and Non- Repeatable (L) and mode. The

Repeatable mode is the default mode.

The output of the sensor can be set by shorting any two pins on the left of the module as shown

below. You can also notice two orange colour potentiometers that can be used to set the sensitivity

and time which will be explained further below.

Figure 3.6: Motion sensor

Pin Configuration

Table 3.5: Motion Sensor Pin Configuration

Pin

Number Pin Name Description

1 Vcc Input voltage is +5V for typical applications. Can range from 4.5V- 12V

2 High/Low

Ouput (Dout)

Digital pulse high (3.3V) when triggered (motion detected) digital

low(0V) when idle(no motion detected

3 Ground Connected to ground of circuit

Page 28: Automated Cafeteria System for Efficient Food Serving

18| P a g e

PIR Sensor Features

Wide range on input voltage varying from 4.V to 12V (+5V recommended)

Output voltage is High/Low (3.3V TTL)

Can distinguish between object movement and human movement

Has to operating modes - Repeatable(H) and Non- Repeatable(H)

Cover distance of about 120° and 7 meters

Low power consumption of 65mA

Operating temperature from -20° to +80° Celsius.

3.1.6 Obstacle Sensor

Brief about Obstacle Sensor

The Obstacle sensor module consists mainly of the IR Transmitter and Receiver, Opamp, Variable

Resistor (Trimmer pot), output LED in brief.

IR LED Transmitter

IR LED emits light, in the range of Infrared frequency. IR light is invisible to us as its wavelength

(700nm – 1mm) is much higher than the visible light range. IR LEDs have light emitting angle of

approx. 20-60 degree and range of approx. few centimeters to several feets, it depends upon the type

of IR transmitter and the manufacturer. Some transmitters have the range in kilometers. IR LED

white or transparent in colour, so it can give out amount of maximum light.

Photodiode Receiver

Photodiode acts as the IR receiver as its conducts when light falls on it. Photodiode is a

semiconductor which has a P-N junction, operated in Reverse Bias, means it start conducting the

current in reverse direction when Light falls on it, and the amount of current flow is proportional to

the amount of Light. This property makes it useful for IR detection. Photodiode looks like a LED,

with a black colour coating on its outer side, Black colour absorbs the highest amount of light.

Page 29: Automated Cafeteria System for Efficient Food Serving

19| P a g e

LM358 Opamp

LM358 is an Operational Amplifier (Op-Amp) is used as voltage comparator in the IR sensor. the

comparator will compare the threshold voltage set using the preset (pin2) and the photodiode’s series

resistor voltage (pin3).

Photodiode’s series resistor voltage drop > Threshold voltage = Opamp output is High

Photodiode’s series resistor voltage drop < Threshold voltage = Opamp output is Low

When Opamp's output is high the LED at the Opamp output terminal turns ON (Indicating the

detection of Object).

Variable Resistor

The variable resistor used here is a preset. It is used to calibrate the distance range at which object

should be detected.

Figure 3.7: Obostacle Sensor and Pinout

Pin Configuration

Table 3.6: Obstacle Sensor Pin Configuration

Pin Name Description

VCC Power Supply Input

GND Power Supply Ground

OUT Active High Output

Page 30: Automated Cafeteria System for Efficient Food Serving

20| P a g e

3.1.7 Push Button

Brief about Push Button

A push-button (also spelled pushbutton) or simply button is a simple switch mechanism for

controlling some aspect of a machine or a process. Buttons are typically made out of hard material,

usually plastic or metal.

Figure 3.8: Push Button

An electric switch is a device that interrupts the electron flow in a circuit. Switches are primarily

binary devices: either fully on or off and light switches have a simple design. When the switch is

turned off, the circuit breaks and the power flow is interrupted. Circuits consist of a source of

power and load.

3.1.8 Power Supply

Brief about Power Supply

The step-down converters are used for converting the high voltage into low voltage. The

converter with output voltage less than the input voltage is called as a step-down converter, and

the converter with output voltage greater than the input voltage is called as step-up converter.

There are step-up and step-down transformers which are used to step up or step down the

voltage levels. 230V AC is converted into 12V AC using a step-down transformer.

Figure 3.9 Power Supply

Page 31: Automated Cafeteria System for Efficient Food Serving

21| P a g e

CHAPTER 4

BLOCK DIAGRAM

4.1 Block Diagram

Power supply is given to the power at microcontroller and DC gear motor. Microcontroller Control

Servo motor and Kitchen Computer. The obstacle sensor used here and shares the signal with the

microcontroller. Main Focus of the Project is Conveyer Belt, and it is rotated by DC gear motors.

There will be two slots in the conveyer belt, one slot will be served on the adjacent food and the

other will be kept in the West Plate. There will be kitchen and table connections with the conveyer

belt. There will be a display and mobile app on the table, the customer will order submit through the

Bluetooth apps. The Bluetooth app offers all types of menu lists and food prices and submissions

will show up in the kitchen monitor and it will be cooked. Bluetooth modules have been used to

accomplish this process, which is related to the App and Kitchen monitor. According to the table,

the conveyer belt will serve it on the indented table. After the meal the customers will place plates

in the West slot and press the button, the conveyor belt will bake and take it to the kitchen. Fig. 4.1

denoted the block diagram of this project

Figure 4.1: Block diagram of project

Page 32: Automated Cafeteria System for Efficient Food Serving

22| P a g e

4.2 Flow Chart

Fig: 4.2 represent the flow chart diagram of the process. Data can be send from the Mobile App or

Android APP. Customer select items from app menu. Next step is ordering, there is two section one

is check Bill and estimating time and Pay bill, another one is check on display. Food select and

sended from kitchen. Arduino process the data and check data. If any more order select YES and

start processing again and if select NO return waste and show on the display YES or NO. If NO

return again and if YES return waste and process End.

Figure 4.2 Flowchart of working process.

Page 33: Automated Cafeteria System for Efficient Food Serving

23| P a g e

4.3 Schematic diagram

This chapter provides the necessary information for simulated circuit design and its functional

output. Hardware implementation with input sensors defines the mechanism of this chapter. To

make the project more efficient, different values are taken as a short survey and a comparison is

shown to find the defect.

Figure 4.3: Circuit diagram of the prototype model

4.3.1 Circuit Operation

Arduino Pro Mini is the brain of this project. One Arduino are used in the project for

controlling purpose. Here used a power supply, which converts the AC current. Servo motor used

for open the door process complete by motion sensor. Used a Bluetooth module for data transmitting

and receving. Have a mobile App for sharing which customer choose food menu. A DC gear motor

used for conveyer. Obstacle sensor used for detect object. Arduino process the data, four data pin

(D5-D8) connected with the LCD data pin (D4-D7). LCD screen is programmed with the Arduino

code to show the output. To active the device VDD pin has connected to the supply voltage and VSS

pin has connected to the ground.

Page 34: Automated Cafeteria System for Efficient Food Serving

24| P a g e

4.3.2 Working Principle

This is a full circuit diagram of the working project. There are no wire is required to send data.

The connecting wire is use for power supply. One Arduino are used in the project for

controlling purpose. For data is transmitting and receiving used a Bluetooth module it connects

Arduion, mobile App and share data, Arduino decode the data and shown into the LCD display. The

LCD screen is connected as an output device for notification.

4.3.3 Circuit Application

Conveying system

Bottle filling system

Products shifting

Packaging system

Page 35: Automated Cafeteria System for Efficient Food Serving

25| P a g e

CHAPTER 5

DESIGN AND IMPLEMENTATION

5.1 Body design

This is the part which we used to design the Cafeteria. We also used PVC board,

Aluminum sheet to make the device with a good shape.

Figure 5.1: Front Side View Figure 5.2: Back Side view

B

Figure 5.3: Full Circuit View

Page 36: Automated Cafeteria System for Efficient Food Serving

26| P a g e

5.2 Software Description

Smart Restaurants is an affordable App solution for both restaurants and takeaways to have a unique

App to promote their business, advertise the food which they provide and allow customers to easily

order from.

At Smart Restaurants we have developed a range of Apps to work on both iPhone and Android so

that restaurants and takeaways can have an App to allow customers to download onto their smart

phone. Once they have downloaded the App they can then view the menu, add various food and

drink items to a basket and then easily place an order. This order is then sent through to the

restaurant or takeaway and will either be received through the printer we can provide or through the

Smart Ordering App, where the order can be viewed on either a smart phone or a tablet.

For the software development, the Visual Studio (VB) 6.0 software is used to design the Graphical

User Interfacing (GUI) of the project. Microsoft® Visual Studio® 6.0 is a powerful developer tools

suite for Windows and Web applications. The VB software is used to display the menu order from

customer at the computer screen. Another software was used is C language. The C language is used

to write a source codes for this microcontroller which is then will be compiled. When the program

can be successfully run no error in the source code, then the microcontroller will be programmed.

5.3 Hardware

Touch-screen device

Card swipe device

Any general purpose Desktop

Page 37: Automated Cafeteria System for Efficient Food Serving

27| P a g e

CHAPTER 6

FUTURE WORK AND CONCLUSION We know every system has some advantage or disadvantage. So our project will also have

very good practical advantage and some limitations which we called it disadvantages.

6.1 Applications

Hospitals and public places

Institutions and office

At Home

At airports

In factories

In restaurants

6.2 Advantages

Make the ordering process easier.

Efficient customer and order management.

Monitoring expenses incurred in real time.

Better customer service.

Restaurant need to hired more waiters to maintain their reputation

Service and restaurant is slow

Restaurant need to pay their employee every month

Basic wage of employee increases in country recent

6.3 Benefits

Improved restaurant standard service

Guarantee of customer comfortability

Make customers more interested.

Reduce number of payment for employee.

Gain Profit.

Restaurant become famous when use technology modern system.

Page 38: Automated Cafeteria System for Efficient Food Serving

28| P a g e

6.4 Disadvantages

Expensive

More Space Required

Potential Job Losses

Initial Investment Costs

Hiring Skilled Staff

6.5 Future Enhancement

Through this project, we worked on how fast food and how much food can be

served without disturbance.

In this project we used the Bluetooth communication system. It is managed by an

Android app.

Here we use arduino, Bluetooth module, LCD, sensor.

We hope that at a very low cost in the smart cafe, we can serve food in less time.

6.6 Conclusion

Thus, if this system is implemented then the customer can easily order the food item without the

need of the server and without any error. It is recommended that use of touch screen instead of the

Mobile App and LCD screen. It can also include a module which provide greetings to the customer

such as showing welcome and thank you to the customer and using any money payment method to

pay the bill amount to respective account of the owner.

Integrating features of all the hardware components used have been developed in it. Presence of

every module has been reasoned out and placed carefully, thus contributing to the best working of

the unit. Secondly, using highly advanced device with the help of growing technology, the project

has been successfully implemented. Smart restaurant is developed in order to provide easy

interaction between customers through wireless technology. Thus the project has been successfully

designed and tested. Similarly, the system can also be implemented with Graphical LCD for

displaying the menu as we have used android phone. However the system becomes more bulky and

delicate to handle because each table is going to consist of such module for ordering.

Page 39: Automated Cafeteria System for Efficient Food Serving

29| P a g e

REFERENCES

Jun Zheng and Abbas Jamalipour, “Introduction to Wireless Sensor Networks”, Book: Wireless

Sensor Networks: A Networking Perspective, Wiley-IEEE Press, 2009.

Vijay Garg “Wireless Communication and Networking” 1st Edition Imprint:Morgan Kaufmann

Print Book ISBN :9780123735805

Thirumurugan J, Kartheeswaran G, Vinoth M, Vishwanathan M. Line Following Robot for Library

Inventory Management System;2015. Coimbatore, India: Sri Ramakrishna Institute of Technology.

IEEE. p. 1-3.

Juhana Jauhiainen ,Sakari Pieska, , Antti Auno , Markus Liuska , Antti Auno Intelligent Restaurant

System Smart- menu CogInfoCom 2013, 4th IEEE Conference on Cognitive Info communications,

December , 2013 , Budapest, Hungary.

Bajestani SEM & Vosoughinia A. Technical Report of Building a Line Follower Robot. 2015

International Conference on Electronics and Information Engineering (ICEIE 2010); 2015. p. V1-1

– V1-5.

Website: www.businessinsider.com, June-July 2019

A book named “Robot Restaurant Redux” written by Hunter.S.Thompson.

A book named “Robotics:A Refence guide to the new technology” written by Joseph A.Angelo Jr.

Ashutosh Bhargave, Niranjan Jadhav, Apurva Joshi, Prachi Oke, Prof. Mr. S. R Lahane,Department

of Computer Engineering, GES’s RHSCOE, International Journal of Scientific and Research

Publications, Volume 3, Issue 4, April 2013

Website: www.ijareeie.com Vol. 6, Issue 3, June-July 2019

Arduino Pro Mini pinout datasheet [Online] Available:

https://www.engineersgarage.com/electronic-components/arduino-pro-mini-pinout/

LCD working principal, Image, Pinout [Online] Available: https://www.elprocus.com/ever-

wondered-lcdworks/

Dhanashree Mirgal1, Pranjali Parab2, Amey Puro3, Bhawana Dakhare4, B.E Student1, 2, 3,

Assistant Professor4, Department of Information Technology, Bharati Vidyapeeth College of

Engineering, Mumbai, India.2018

A.Lasek,N.Cercone,J.Saunders Department of Electrical Engineering and Computer Science,

Lassonde School of Engineering, York University, Toronto, ON, Canada Fuseforward Solutions

Group, Vancouver, BC, Canada Available online 17 June 2016

International Journal of Converging Technologies & Management, Volume 4, Issue 1, 2018

1Neelima Mishra,2Dinesh Goyal,3Ashish Dutt Sharma

Juhana Jauhiainen at Centria University of Applied Sciences, Cognitive Infocommunications

(CogInfoCom), 2013 IEEE 4th International Conference on Cite this publication Sakari Pieskä at

Centria University of Applied Sciences, Ylivieska, Finland

Page 40: Automated Cafeteria System for Efficient Food Serving

30| P a g e

APPENDIX

INSTRUCTION CODE FOR PROGECT

sbit LCD_RS at RB3_bit;

sbit LCD_EN at RB2_bit;

sbit LCD_D4 at RB4_bit;

sbit LCD_D5 at RB5_bit;

sbit LCD_D6 at RB6_bit;

sbit LCD_D7 at RB7_bit;

sbit LCD_RS_Direction at TRISB3_bit;

sbit LCD_EN_Direction at TRISB2_bit;

sbit LCD_D4_Direction at TRISB4_bit;

sbit LCD_D5_Direction at TRISB5_bit;

sbit LCD_D6_Direction at TRISB6_bit;

sbit LCD_D7_Direction at TRISB7_bit;

#define servo RE0_bit

#define motorA RE1_bit

#define motorB RE2_bit

#define butt1 RD0_bit

#define butt2 RD1_bit

#define butt3 RD2_bit

#define butt4 RD3_bit

#define irSensor1 RD4_bit

#define irSensor2 RD5_bit

#define irSensor3 RD6_bit

#define irSensor4 RD7_bit

short checkpoint = 0;

const char txt1[] = "Welcome to Automated";

const char txt2[] = "Smart Cafeteria";

const char txt3[] = "Order Accepted";

const char txt4[] = "Wait for order";

const char txt5[] = "For return waste";

const char txt6[] = "press the button";

const char txt7[] = "For wait for";

const char txt8[] = "next order";

char txt[17];

void select_lcd(short n){

if(n == 1){

TRISB0_bit = 1;

TRISB1_bit = 0;

delay_ms(1);

lcd_init();

Lcd_Cmd(_LCD_CURSOR_OFF);

Page 41: Automated Cafeteria System for Efficient Food Serving

31| P a g e

}

else{

TRISB0_bit = 0;

TRISB1_bit = 1;

delay_ms(1);

lcd_init();

Lcd_Cmd(_LCD_CURSOR_OFF);

}

}

void servoRotate0(){

unsigned int i;

for(i=0;i<50;i++){

servo = 1;

Delay_us(800);

servo = 0;

Delay_us(19200);

}

}

void servoRotate90() {

unsigned int i;

for(i=0;i<50;i++){

servo = 1;

Delay_us(1500);

servo = 0;

Delay_us(18500);

}

}

void motorOff(){

motorA = 0;

motorB = 0;

}

void motorClock(){

motorA = 1;

motorB = 0;

}

void motorAntiClock(){

motorA = 0;

motorB = 1;

}

void strConstCopy(char *dest, const char *source) {

while(*source)

*dest++ = *source++;

*dest = 0;

}

void defaultLcd(){

select_lcd(1);

strConstCopy(txt, txt1);

lcd_out(1,1, txt);

strConstCopy(txt, txt2);

Page 42: Automated Cafeteria System for Efficient Food Serving

32| P a g e

lcd_out(2,1, txt);

select_lcd(2);

strConstCopy(txt, txt1);

lcd_out(1,1, txt);

strConstCopy(txt, txt2);

lcd_out(2,1, txt);

}

void main() {

ADCON1 = 7;

CMCON = 7;

TRISD = 0xff;

TRISE = 0x00;

motorOff();

servoRotate0();

defaultLcd();

delay_ms(1000);

while(1){

if(irSensor1 == 0){

servoRotate90();

delay_ms(5000);

servoRotate0();

}

if(butt1 == 1 && checkpoint == 0){

checkpoint = 1;

motorClock();

select_lcd(1);

Lcd_Cmd(_LCD_CLEAR);

strConstCopy(txt, txt3);

lcd_out(2,1, txt);

select_lcd(2);

Lcd_Cmd(_LCD_CLEAR);

strConstCopy(txt, txt4);

lcd_out(2,1, txt);

delay_ms(300);

}

if(irSensor2 == 0 && checkpoint == 1){

checkpoint = 2;

motorOff();

select_lcd(1);

Lcd_Cmd(_LCD_CLEAR);

strConstCopy(txt, txt5);

lcd_out(1,1, txt);

strConstCopy(txt, txt6);

lcd_out(2,1, txt);

delay_ms(300);

}

Page 43: Automated Cafeteria System for Efficient Food Serving

33| P a g e

if(butt2 == 1 && checkpoint == 2){

checkpoint = 3;

motorAntiClock();

delay_ms(300);

}

if(irSensor3 == 0 && checkpoint == 3){

checkpoint = 4;

motorOff();

delay_ms(300);

}

if(butt3 == 1 && checkpoint == 4){

checkpoint = 5;

motorClock();

select_lcd(2);

Lcd_Cmd(_LCD_CLEAR);

strConstCopy(txt, txt3);

lcd_out(2,1, txt);

select_lcd(1);

Lcd_Cmd(_LCD_CLEAR);

strConstCopy(txt, txt4);

lcd_out(2,1, txt);

delay_ms(300);

}

if(irSensor4 == 0 && checkpoint == 5){

checkpoint = 6;

motorOff();

delay_ms(300);

}

if(butt4 == 1 && checkpoint == 6){

checkpoint = 7;

select_lcd(1);

Lcd_Cmd(_LCD_CLEAR);

strConstCopy(txt, txt7);

lcd_out(1,1, txt);

strConstCopy(txt, txt8);

lcd_out(2,1, txt);

select_lcd(2);

Lcd_Cmd(_LCD_CLEAR);

strConstCopy(txt, txt7);

lcd_out(1,1, txt);

strConstCopy(txt, txt8);

lcd_out(2,1, txt);

delay_ms(300);

}

if(irSensor3 == 0 && checkpoint == 7){

checkpoint = 8;

motorAntiClock();

defaultLcd();

Page 44: Automated Cafeteria System for Efficient Food Serving

34| P a g e

delay_ms(300);

}

if(irSensor3 == 1 && checkpoint == 8){

checkpoint = 0;

motorOff();

}

}

}

Page 45: Automated Cafeteria System for Efficient Food Serving

35| P a g e

Page 46: Automated Cafeteria System for Efficient Food Serving

36| P a g e

Page 47: Automated Cafeteria System for Efficient Food Serving

37| P a g e

Page 48: Automated Cafeteria System for Efficient Food Serving

38| P a g e