You are on page 1of 57

CHAPTER-1

INTRODUCTION TO PROJECT RETORT

Getting bored on the waiters who made you wait forever just to get your order? All they have
to do after you pressed your orders is to serve whatever food that you want. The food order
and table number are sent to the kitchen directly ones order by customers. This is great idea
& actually there is a company in the UK called Restaurant Innovations that produced an
Automated Ordering System called “I Serve” that does exactly what we have done!!!

What is smart restaurant system?

The advancement of Information and Communication Technology has led to an increasing


number of industries to use electronic media and corresponding application for information
exchange. In the restaurant sector, Modern wireless device such as Personal Digital Assistant
(PDA) has been adopted into restaurant system to replace the conventional way of taking
orders using pen and paper. However, the PDA-based food ordering system has known
limitations such as the requirement of training of attendants, the need of having attendants to
operate, the inefficiency during peak hours and small screen size and the Multitouchable
restaurant Management System has limitations such as touch screens used are of mostly
capacitive type or resistive type which are costly. Hence by introducing an application loaded
in an android Smartphone or tablet containing the menu details these limitations can be
overcome.

Android is a software stack for mobile devices that includes an operating system, middleware
and key applications. Android boasts a healthy array of connectivity options, including Wi-
Fi, Bluetooth, and wireless data over a cellular connection (for example, GPRS, EDGE
(Enhanced Data rates for GSM Evolution), and 3G). Android provides access to a wide range
of useful libraries and tools that can be used to build rich applications. In addition, Android
includes a full set of tools that have been built from the ground up alongside the platform
providing developers with high productivity and deep insight into their applications.

The project mainly aims in designing completely automated menu in restaurants with the
help of Android mobile phone using Bluetooth module and a LCD to provide a user-friendly
environment. There is no need of a person to take the order from the table. The menu will be

1
displayed on LCD display by using keypad we can directly order the menu with the help of
press on the menu.

1.1Block diagram

The advancement of Information and Communication Technology has led to an increasing


number of industries to use electronic media and corresponding application for information
exchange. In the restaurant sector, Modern wireless device such as Personal Digital Assistant
(PDA) has been adopted into restaurant system to replace the conventional way of taking
orders using pen and paper. However, the PDA-based food ordering system has known
limitations such as the requirement of training of attendants, the need of having attendants to
operate, the inefficiency during peak hours and small screen size and the Multitouchable
restaurant Management System has limitations such as touch screens used are of mostly
capacitive type or resistive type which are costly. Hence by introducing an application loaded

2
in an android Smartphone or tablet containing the menu details these limitations can be
overcome.

Android is a software stack for mobile devices that includes an operating system, middleware
and key applications. Android boasts a healthy array of connectivity options, including Wi-
Fi, Bluetooth, and wireless data over a cellular connection (for example, GPRS, EDGE
(Enhanced Data rates for GSM Evolution), and 3G). Android provides access to a wide range
of useful libraries and tools that can be used to build rich applications. In addition, Android
includes a full set of tools that have been built from the ground up alongside the platform
providing developers with high productivity and deep insight into their applications.

The project mainly aims in designing completely automated menu in restaurants with the
help of Android mobile phone using Bluetooth module and a LCD to provide a user-friendly
environment. There is no need of a person to take the order from the table. The menu will be
displayed on LCD display by using keypad we can directly order the menu with the help

of press on the menu.

1.2 Why we need it?

To increase
service
quality of a
restaurant

The total
customer
amount bill
order menu
will display by
at the table
the device at
by itself
table

menu shown
food and
on the device
drink sent by
will send to
conveyer belt
kitchen

Fig.1.2 (a)smart restaurant system

3
1.3 Methodology
Each table in the restaurant will be accompanied with an android tablet or a Smartphone. The
device will be loaded with an android supporting application containing food menu details at
that restaurant.

All the above mentioned digital components such as Smartphone/tablet (containing menu
app), Microcontroller, an another android phone (we used it for enabling hot-spot to tether
the wireless network) and Wi-Fi module are connected wirelessly to create a Wi-Fi
network.Some steps are mentioned here to understand the working of the system easily:

Enable the Wi-Fi on Smartphone/tablet on which you wish visualize the E- menu card.

Turn on the Portable hotspot on another android phone to tether wireless network.

Now switch on the power supply. We will find an initial indication of buzzer and LED.
(The blinking small LED on Wi-Fi module will stop blinking immediately after detecting the
Wi-Fi on Smartphone/tablet.)

Now we can observe the connected devices (Wi-Fi module and Smartphone containing
app) on the phone on which hotspot is enabled.)

As we tap to open the application that we have designed for menu details, we will be asked
to enter the IP address and port number of system.

After entering the valid credentials we will be presented with the screen in that
Smartphone/tablet containing beautifully colored images of the menus

in the restaurant.

Person may tap on the image that he/she want to order. After clicking on, command will
go to microcontroller through Wi-Fi.

The microcontroller is dumped with an embedded C coding containing all the details
regarding menu.

Eventually it will command to the LCD to display the corresponding order on it at the
kitchen section along with buzzer indication.

4
CHAPTER 2

MICRO CONTROLLER

2.1 Micro controller architecture

The Intel 8051 microcontroller is one of the most popular general purpose microcontrollers in
use today. The success of the Intel 8051 spawned a number of clones, which are collectively
referred to as the MCS-51 family of microcontrollers, which includes chips from vendors
such as Atmel, Philips, Infineon, Analogy Devices and Texas Instruments

 A microcontroller can be considered a self-contained system with a processor,


memory and peripherals and can be used as an embedded system.
 The majority of microcontrollers in usetoday are embedded in other machinery, such
as automobiles, telephones, appliances, and peripherals for computer systems.

Fig2.1(a) 8051 MICROCONTROLLER

2.2 HISTORY

8051 Members
 8052 microcontroller − 8052 has all the standard features of the 8051
microcontroller as well as an extra 128 bytes of RAM and an extra timer. It also has
8K bytes of on-chip program ROM instead of 4K bytes.

5
 8031 microcontroller − It is another member of the 8051 family. This chip is often
referred to as a ROM-less 8051, since it has 0K byte of on-chip ROM. You must add
external ROM to it in order to use it, which contains the program to be fetched and
executed. This program can be as large as 64K bytes. But in the process of adding
external ROM to the 8031, it lost 2 ports out of 4 ports. To solve this problem, we
can add an external I/O to the 8031

Comparison between 8051 Family Members

The following table compares the features available in 8051, 8052, and 8031.

Feature 8051 8052 8031

ROM(bytes) 4K 8K 0K

RAM(bytes) 128 256 128

Timers 2 3 2

I/O pins 32 32 32

Serial port 1 1 1

Interrupt 6 8 6
sources

Tabular form 2.2(a)

6
2.3 Basic Features of 8051 Microcontroller
An 8051 microcontroller comes bundled with the following features −

 64K bytes on-chip program memory (ROM)

 128 bytes on-chip data memory (RAM)

 Four register banks

 128 user defined software flags

 8-bit bidirectional data bus

 16-bit unidirectional address bus

 32 general purpose registers each of 8-bit

 16 bit Timers (usually 2, but may have more or less)

 Three internal and two external Interrupts

 Four 8-bit ports,(short model have two 8-bit ports)

 16-bit program counter and data pointer

 8051 may also have a number of special features such as UARTs, ADC, Op-amp, etc.

7
2.4 PIN DIAGRAM OF 8051

Fig.2.4(a) Pin diagram of 8051 micro controller

The Microcontroller 8051 can be configured in such a way that it temporarily terminates or
pause the main program at the occurrence of interrupts. When a subroutine is completed, then
the execution of main program starts. Generally five interrupt sources are there in 8051
Microcontroller. There are 5 vectored interrupts are shown in below

 INTO
 TFO
 INT1
 TF1
 R1/T1

8
Out of these, (INT0) (INT1) are external interrupts that could be negative edge triggered or
low level triggered. When All these interrupts are activated, set the corresponding flags
except for serial interrupt.

The interrupt flags are cleared when the processor branches to the interrupt service routine
(ISR). The external interrupt flags are cleared when the processor branches to the interrupt
service routine, provides the interrupt is a negative edge triggered whereas the timers and
serial port interrupts two of them are external interrupts, two of them are timer interrupts
and one serial port interrupt terminal in general.

Memory

Microcontroller requires a program which is a collection of instructions. This program tells


microcontroller to do specific tasks. These programs require a memory on which these can be
saved and read by Microcontroller to perform specific operations of a particular task. The
memory which is used to store the program of the microcontroller is known as code memory
or Program memory of applications. It is known as ROM memory of microcontroller also
requires a memory to store data or operands temporarily of the micro controller. The data
memory of the 8051 is used to store data temporarily for operation is known RAM memory.
8051 microcontroller has 4K of code memory or program memory,that has 4KB ROM and
also 128 bytes of data memory of RAM.

BUS

Basically Bus is a collection of wires which work as a communication channel or medium for
transfer of Data. These buses consists of 8, 16 or more wires of the microcontroller. Thus,
these can carry 8 bits,16 bits simultaneously. Hire two types of buses that are shown in below

 Address Bus
 Data Bus

Address Bus:

Microcontroller 8051 has a 16 bit address bus for transferring the data. It is used to address
memory locations and to transfer the address from CPU to Memory of the microcontroller. It
has four addressing modes that are

9
 Immediate addressing modes.
 Bank address (or) Register addressing mode.
 Direct Addressing mode.
 Register indirect addressing mode.

Data Bus:

Microcontroller 8051 has 8 bits of the data bus, which is used to carry data of particular
applications.

Oscillator

Generally, we know that the microcontroller is a device, therefore it requires clock pulses for
its operation of microcontroller applications. For this purpose, microcontroller 8051 has an
on-chip oscillator which works as a clock source for Central Processing Unit of the
microcontroller. The output pulses of oscillator are stable. Therefore, it enables synchronized
work of all parts of the 8051 Microcontroller.

Input/ Output Port

Normally microcontroller is used in embedded systems to control the operation of machines


in the microcontroller. Therefore, to connect it to other machines, devices or peripherals we
require I/O interfacing ports in the microcontroller interface. For this purpose
microcontroller 8051has 4 input, output ports to connect it to the other peripherals

Timers/Counters

8051 microcontroller has two 16 bit timers and counters. These counters are again divided
into a 8 bit register. The timers are used for measurement of intervals to determine the pulse
width of pulses.

2.5 Applications of 8051 Microcontroller

Some of the applications of 8051 is mainly used in daily life & industrial applications also
some of that applications are shown below

10
 Light sensing and controlling devices
 Fire detections and safety devices
 Automobile applications
 Defense applications

Some industrial applications of micro controller and its applications

 Industrial instrumentation devices


 Process control devices

Some of 8051 microcontroller devices are used in measurement applications

 Voltmeter applications
 Measuring and revolving objects
 Current meter objects
 Hand held metering system

11
CHAPTER 3

COMPONENTS USED
In this chapter we are going to study about the various component used in this Project.

Various components used in the Project are:

• LCD
• Power supply and ground connection
• LEDs
• Reset
• Key pad

3.1 LCD MODULE


To display interactive messages we are using LCD Module. We examine an intelligent LCD
display of two lines, 16 characters per line that is interfaced to the controllers. The protocol
(handshaking) for the display is as shown. Whereas D0 to D7th bit is the Data lines, RS, RW
and EN pins are the control pins and remaining pins are +5V, -5V and GND to provide
supply. Where RS is the Register Select, R is the Read Write and EN is the Enable pin.

Fig 3.1(a) 2x16 Line Alphanumeric LCD Display

The display contains two internal byte-wide registers, one for commands (RS=0) and
the second for characters to be displayed (RS=1). It also contains a user-programmed RAM
area (the character RAM) that can be programmed to generate any desired character that can
be formed using a dot matrix.

12
To distinguish between these two data areas, the hex command byte 80 will be used
to signify that the display RAM address 00h will be chosen.Port1 is used to furnish the
command or data type, and ports 3.2 to3.4 furnish register select and read/write levels.

The display takes varying amounts of time to accomplish the functions as listed. LCD bit 7 is
monitored for logic high (busy) to ensure the display is overwritten.

Liquid Crystal Display also called as LCD is very helpful in providing user interface as well
as for debugging purpose. The most common type of LCD controller isHITACHI 44780
which provides a simple interface between the controller & an LCD. These LCD's are very
simple to interface with the controller as well as are cost effective.
The most commonly used ALPHANUMERICdisplays are 1x16(Single Line & 16 haracters),
2x16(Double Line & 16 character per line) &4x20(four lines & Twentycharacters per line).
The LCD requires 3 control lines (RS, R/W & EN) & 8 (or 4) data lines. The number on data
lines depends on the mode of operation. If operated in 8-bit mode then 8 data lines + 3
control lines i.e. total 11 lines are required. And if operated in 4-bit mode then 4 data lines +
3 control lines i.e. 7 lines are required. How do we decide which mode to use? It’s simple if
you have sufficient data lines you can go for 8 bit mode & if there is a time constrain i.e.
display should be faster then we have to use 8-bit mode because basically 4-bit mode takes
twice as more time as compared to 8-bit mode.

When RS is low (0), the data is to be treated as a command. When RS is high (1), the
data being sent is considered as text data which should be displayed on the screen.
When R/W is low (0), the information on the data bus is being written to the LCD. When
RW is high (1), the program is effectively reading from the LCD. Most of the times there is
no need to read from the LCD so this line can directly be connected to Gnd thus saving one
controller line.
The ENABLE pin is used to latch the data present on the data pins. A HIGH - LOW signal is
required to latch the data. The LCD interprets and executes our command at the instant the
EN line is brought low. If you never bring EN low, your instruction will never be executed.

13
3Pin Symbol Function

1 Vss Ground

Supply
2 Vdd
Voltage

Contrast
3 Vo
Setting

Register
4 RS
Select

Read/Write
5 R/W
Select

Chip
6 En Enable
Signal

7- DB0-
Data Lines
14 DB7

Gnd for
15 A/Vee the
backlight

Vcc for
16 K
backlight

Table 2. Function of LCD pins

COMMANDS USED IN LCD

14
3.12 LCD CIRCUIT

Fig 3.12(a) - LCD pin connection

The display is serial LCD module with an integral touch screen.

Basic instructions: Solder I/O terminals

• Only Use soldering iron without leakage.

• Soldering condition to I/O terminals Temperature at tip of the iron: 280±10


Soldering time: 3~4 sec. Type of solder: Eutectic solder (containing
colophony-flux)Please do not use flux because it may soak into LCD
Module or contaminate It is preferable to peel off protective film on
display surface after soldering I/O terminals is finished.

15
• Remove connector or cable when you remove connector or cable soldered
to I/O terminals, please confirm that solder is fully melted. If you remove
by force, electrodes at I/O terminals maybe damaged (or stripped off).It is
recommended to use solder suction machine.

Fig. 3.12(b)-LCD interfacing

16
3.2 POWER SUPPLY & GROUND CONNECTION

Fig 3.3(a) - POWER & GND connection

LPC2148 operates on 3.3 v supply. Therefore LM1117 IC is used.

In LPC2148 there are 6 Pins of ground and 6 Pins of Power.

Pin no 7, 23, 43, 49, 51, 63 are connected to 3.3 v supply.

Pin no 6, 18, 25, 42, 50, 59 are connected to Ground.

3.3 LEDs

An electroluminescent IR LED is a product which requires care in use. IR LEDs are


fabricated from narrow band heterostructures with energy gap from 0.25 to 0.4 eV. That's
why the bias used to initiate current flow is low compared to the well known visible or NIR
LEDs. Typical forward bias is V~0.1- 1 V only for mid-IR LEDs!

17
Fig 3.3 (a)-Light emitting diode

Be sure not to exceed I*max which is given in each LED specification and do not use test
instrument that contain sources/batteries with voltage greater that Vcw max given in
specification. For LED current restriction and further LED current measurement we
recommend to use resistor (1-5 Ohms) connected in serial to LED. This is important to note
that un-grounded devices (e.g. computers) can give V=1-5 V that is enough to destroy the
LED.
It is highly desirable that the user has I-V meter for small currents (10-100 x10-6 A). We
guarantee the existence of the LED output as long as V-I characteristic shows saturation in
the reverse bias (10-100 x10-6 A).
We recommend activating pulse generator prior connecting LED to generator. On switching
off the procedure is reversed: disconnect LED, switch off pulse generator. Long wires
connecting LED with pulse generator may be the reason for LED failure because of
unexpected voltage surges when switching on and off the LED supply.
Please test all elements and circuits before applying voltage to LED. Remember that ground
(T0-18 or another holder) should be biased positively (if not specially designed). Usually the
negative electrode is made shorter than the positive one.
The expected signal is not very big and it is important to test and eliminate noise in the
detector circuits.
In some cases it is possible to increase pulse duration. Imax in such cases can be
estimated using the following equation: Imax=I* max /20*SQRT(f*t), where f-is the
frequency (Hz), t-is the pulse duration (s), I* max-is the maximum current (A) for t=5 us and
f=500 Hz. The equation gives an order of magnitude and may be used for t< 0.1 ms only.
Pulses with t > 0.15 ms should be considered as adequate to CW operation and Imax and
Vmax should be taken close to CW operation parameters. Please, note that long pulses can

18
increase heat dissipation and the chip temperature. This effect can decreases LED emission
power and can be traced due to the LED resistance decrease during each pulse. CW power
often decreases with time due to heatsink temperature increase.
Micro immersion LEDs are made with chalcogenide glass that has low melting
temperature (50-70oC). That’s why, please, avoid any heater source close to the LED. Even
sunlight concentrated onto the lens can melt glass the lens. That’s why we recommend
vertical position for the LEDs at the initial stage of the research work. We are working now
to increase the glass melting temperature or/and to strengthen its position and shape. Be
patient in adjusting the optical system. It is only experience that allows fast work.

Lifetime Tests:

Room temperature lifetime tests were performed with InGaAs homojunction diodes, un-
encapsulated and encapsulated at current pulses of 2A,
duration 50 µs and repetition rate of 30 Hz.

Lower figure presents data on the long-term


variation of the properties of the uncoated InGaAs
homojunction LED s at high temperatures. The upper
graph shows the times for which the LEDs under study
operated at several ambient temperatures. The samples
operated at currents I = 0, 0.5, 1, 2 A for 150 h at room
temperature, 450 h at T = 130°C, and 800 h at T=180°C. The LEDs were cooled to room
temperature and heated again to T = 130°C eight
times and to 180°C three times.
The lower graph shows the output power as a
function of the working time. As can be seen, the
output power decreased, on average, by 25%
after 1400 h of operation. It is noteworthy that
the operating current strength has no effect on
the degradation of the LEDs. With increasing
operating time, the reverse currents at a bias U =

19
1 V increased from 0.5–1 mA (0 h) to 3–4 mA (1400 h). On “cleaning” the sample surface by
etching in CP-4, the reverse current returned to its initial values, and the output power tended
to regain its initial value: P(1400 h) = (0.85–0.9)P(0 h).
This confirms that LED encapsulation or by protection with window should increase
LED lifetime at elevated temperatures.

3.4 RESET CONNECTION

The reset circuit serves two purposes: it provides a means for the user to manually
reset the devices by simply pressing a button (B1), and it provides a failsafe supervisor
chip (the MCP130T) that will constantly monitor the voltage level on the board and
put the LPC2148 into a reset state if the voltage ever drops below 3.15V. (This is to
avoid any potential damage to the device or peripherals if there is an unforeseen
problem with the power supply.)

Fig 3.4(a)-Reset connection

20
3.4.1 ISP CIRCUIT

There are two common methods of programming theLPC2148. You can use the JTAG port
to deploy your compiled software (which requires a hardware JTAG device), or you can use
ISP(In System Programming) to copy your compiled HEX files to the device using the free
Flash Magic software and a simple USB to RS232/serial adapter

Fig 3.4.1(a) - ISP connection

21
3.4.2 CRYSTAL CONNECTION

Fig 3.4.2 - (a) Crystal connection

While an input signal of 50-5 duty cycle within frequency range from 1 MHz to 50 MHzcan
be used by the LPC2148 if supplied to its input XTAL1 pin, this microcontroller’s onboard
oscillator circuit supports external crystals in the range of 1 MHz to 30 MHz only. If the
onchip PLL system or the boot-loader is used, the input clock frequency is limited to an
exclusive range of 10 MHz to 25 MHz The oscillator output frequency is called FOSC and
the ARM processor clock frequency is referred to as CCLK for purposes of rate equations,
etc. elsewhere in this document. FOSC and CCLK are the same value unless the PLL is
running and connected. The onboard oscillator in the LPC2141/2/4/6/8 can operate in one of
two modes: 1.slave mode 2. Oscillation mode.

In slave mode the input clock signal should be coupled by means of capacitor of 100 pf with
in slave mode the input clock signal should be coupled by means of a capacitor of 100 pf
with amplitude of at least 200 mV rms. The X2 pin in this configuration can be left not
connected. If slave mode is selected, the FOSC signal of 50-50 duty cycle can range from 1
MHz to 50 MHz External components and models used in oscillation mode are a crystal and
the capacitances CX1 and CX2 need to be connected externally in case of fundamental mode
oscillation (the fundamental frequency is represented by L, CL and RS). Capacitance
represents the parallel package capacitance and should not be larger than 7 pF. Parameters

22
FC, CL, RS and CP are supplied by the crystal manufacturer choosing an oscillation mode as
an on-board oscillator mode of operation limits FOSC clock selection to 1 MHz to 30 MHz

3.4.3 MAX232 CONNECTION

Fig 3.4.3(a)MAX232 connection

The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply
TIA/EIA-232-F voltage levels from a single 5-V supply. Each receiver converts
TIA/EIA232-F inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of
1.3 V, a typical hysteresis of 0. -V inputs .Each driver converts
TTL/CMOS input levels into TIA/EIA-232-F levels. Non polarized ceramic capacitors are
acceptable. If polarized tantalum or electrolytic capacitors are used, they should be connected
as shown. In addition to the 1-μF capacitors shown, the MAX202 can operate with 0.1-μF
capacitors.

23
SPECIFICATION:-

• Operates From a Single 5-V Power Supply With 1.0-_F Charge-Pump


Capacitors

• Operates Up To 120 kbit/s

• Two Drivers and Two Receivers

• Low Supply Current 8 mA Typical


Applications
• TIA/EIA-232-F
• Battery-Powered Systems
• Terminals
• Modems
• Computers

GRAPHICAL LCD CIRCUIT

Fig 3.3(f) - GLCD pin connection

24
The display is serial LCD module with an integral touch screen. The GLCD has a
resolution of 128X 64 pixels.

Basic instructions: Solder I/O terminals

• Only Use soldering iron without leakage.

• Soldering condition to I/O terminals Temperature at tip of the iron: 280±10


Soldering time: 3~4 sec. Type of solder: Eutectic solder (containing colophony-
flux)Please do not use flux because it may soak into LCD Module or contaminate It is
preferable to peel off protective film on display surface after soldering I/O terminals
is finished.
• Remove connector or cable when you remove connector or cable soldered to I/O
terminals, please confirm that solder is fully melted. If you remove by force,
electrodes at I/O terminals maybe damaged (or stripped off).It is recommended to use
solder suction machine.

25
3.5 Keypad interfacing

Fig.3.5(a)- Keypad interfacing

The key board here we are interfacing is a matrix keyboard. This key board is designed with a
particular rows and columns. These rows and columns are connected to the microcontroller
through its ports of the micro controller 8051. We normally use 8*8 matrix key board. So
only two ports of 8051 can be easily connected to the rows and columns of the key board.

Whenever a key is pressed, a row and a column gets shorted through that pressed key
and all the other keys are left open. When a key is pressed only a bit in the port goes high.
Which indicates microcontroller that the key is pressed. By this high on the bit key in the
corresponding column is identified.

26
Once we are sure that one of key in the key board is pressed next our aim is to identify
that key. To do this we firstly check for particular row and then we check the corresponding
column the key board.

To check the row of the pressed key in the keyboard, one of the row is made high by
making one of bit in the output port of 8051 high . This is done until the row is found out.
Once we get the row next out job is to find out the column of the pressed key. The column is
detected by contents in the input ports with the help of a counter. The content of the input
port is rotated with carry until the carry bit is set.

The contents of the counter is then compared and displayed in the display. This display
is designed using a seven segment display and a BCD to seven segment decoder IC 7447.

The BCD equivalent number of counter is sent through output part of 8051 displays the
number of pressed key.

Circuit diagram

Fig 3.5(b)- Circuit diagram of Interfacing of 8051

27
Fig 3.5 ©-characteristics of keyboard interfacing

The programming algorithm, program and the circuit diagram is as follows. Here program is
explained with c

Keyboard is organized in a matrix of rows and columns as shown in the figure. The
microcontroller accesses both rows and columns through the port.

28
CHAPTER 4

SOFTWARE USED

We used KEIL microvision software for coding.

We also used Proteus Design software for designing of the Project.

Flash Magic software is used for Loading the HEX file into the
MICROCONTROLLER LPC2148.

KEIL microvision4

4.1 FLASH MAGIC:

Fig 4.1(a) - Keil screenshot

29
Fig 4.1(b) - Flash magic screenshot

4.2 Proteus Design software

Fig 4.2(a) – Proteus Design suite Cover

30
Fig 4.2(b) – Proteus Design window

4.3 Keypad

A keypad is a set of buttons arranged in a block or "pad" which usually bear digits, symbols
and usually a complete set of alphabetical letters. If it mostly contains numbers then it can
also be called a numeric keypad. Here we are using 4 X 4 matrix keypad.

31
Interfacing keypad

Fig. 1 shows how to interface the 4 X 4 matrix keypad to two ports in microcontroller. The
rows are connected to an output port and the columns are connected to an input port.

To detect a pressed key, the microcontroller grounds all rows by providing 0 to the output
latch, and then it reads the columns. If the data read from the columns is D3-D0=1111, no
key has been pressed and the process continues until a key press is detected. However, if one
of the column bits has a zero, this means that a key press has occurred. For example, if D3-
D0=1101, this means that a key in the D1 column has been pressed.

After a key press is detected, the microcontroller will go through the process of identifying
the key. Starting with the top row, the microcontroller grounds it by providing a low to row
D0 only; then it reads the columns.

If the data read is all 1s, no key in that row is activated and the process is moved to the next
row. It grounds the next row, reads the columns, and checks for any zero. This process
continues until the row is identified. After identification of the row in which the key has been
pressed, the next task is to find out which column the pressed key belongs to.

Interfacing keypad with 8051

We now want to scan a keypad in 8051 Development board. In case of 4X4 matrix
Keypad both the ends of switches are connected to the port pin i.e. four rows and four
columns. So in all sixteen switches have been interfaced using just eight lines.

Interfacing 16×2 LCD with 8051 using Keil C is bit complex because there is no powerful
libraries in Keil C. To solve this problem we have developed a LCD library which includes
commonly used features, you just need to include our header file and use it. You can
download the header file at the bottom of this article.

LCD can be interfaced with microcontroller in 4 Bit or 8 Bit mode. These differs in how data
is send to LCD. In 8 bit mode to write a character, 8 bit ASCII data is send through the data
lines D0 – D7 and data strobe is given through E of the LCD. LCD commands which are also
8 bit are written to LCD in similar way.

32
FBut 4 Bit Mode uses only 4 data lines D4 – D7. In this mode 8 bit character ASCII data and
command data are divided into two parts and send sequentially through data lines. The idea
of 4 bit communication is used save pins of microcontroller. 4 bit communication is a bit
slower than 8 bit communication but this speed difference can be neglected since LCDs are
slow speed devices. Thus 4 bit mode data transfer is most commonly used.

Fig 4.3 (a)-Interfacing of LCD with 8051

33
4.4 PROJECT HARDWARE

Fig 4.4 (a)- project output

34
CHAPTER 5

ADVANTAGES ,DISADVANTAGES & APPLICATIONS

5.1 ADVANTAGES

 EASY OF OPERATION
Ease of use is of paramount importance in the hospitality industry! No one can afford to
be spending minutes processing a transaction and that's one of the fundamental
principles that SMART RESTURANT MENU ORDERING SYSTEM was developed
on.

 FLEXIBILITY OF OPERATION

• Point Of Sale allows the user to switch between various operating modes such as
table, bar and take away at the touch of a button, eliminating complex or time
consuming processes.
• Electronic Menu & Ordering System for Restaurants, Conferences,Casino, Hotel
Rooms Electronic Ticketing / Electronic Concierge System for Hotels, Businesses,
Apartments
• Electronic Attendant for Car Rent Desk or other Help Desk

• Large LCD screen with Touch-pad in a sleek, portable, and high-tech design .Simple,
low power, modular, compact hardware.

• Easily navigable menu with different categories of food.

• Onscreen ordering, bill view and payment.

• Unique entertainment features at the tip of finger.

• Interactive games for all age group.

• Easy food selection by attractive visuals.

• Clarity about serving time for the patrons.

• Visualizing the menu with vivid pictures.

• Detailed view of ingredients and calorie intake.

• Ask for the steward on demand.

35
• No need of costly menu reprinting.

• Your own advertising media. Promote your offers & promos on Menu-PAD.

• Convenient, easy and fast payment option.

• High development cost. Yes, touch screen based project development costs will be
very large, although using in many restaurants, motels.
• Using XBEE the range of transmission is small. Limited critearea is converted by
XBEE

5.2 DISADVANTAGES
• Power consumption will be more.

• Unemployment increases as this reduces the staff workers.

• Mal-functioning of touch screen and LCD.

• Illiterate people will be unable to access the program.

• Dine and dash will be a huge issue because there is no human intervention.

5.3 LIMITATIONS

• Power consumption will be more.

• Unemployment increases as this reduces the staff workers.

• Mal-functioning of touch screen and LCD.

• Illiterate people will be unable to access the program.

• Dine and dash will be a huge issue because there is no human intervention.

5.4 APPLICATIONS

• It is specially designed for restaurant menu purpose to make it interactive.

• It can be also implement in offices at reception for all customer to access


the company details.
• It can be also use at railway stations, in buses or at public places for
convenience of people to make their work easy and fast.
• It can be also interface with smart card machines printers, spy cams
(security purpose).

36
• It can be used at any place where there is queue formed by public E.g.
hospitals, clinic shopping centre etc.
• It can also be used as the guide for directing locations in malls or in tourist
places with different feedback options.

37
CHAPTER 6
PROGRAMMING

6.1 CODE WRITTEN IN KEIL

#include<reg51.h>

#include<stdio.h>

#define lcd-data P2

sbit lcd_rs = P2^0;

sbit lcd_en = P2^1;

sbit idl = P1^0;

sbit wada = P1^1;

sbit puri = P1^2;

sbit dosa = P1^3;

sbit enter = P1^4;

unsigned int read_i,read_i1;

unsigned int read_ia,read_i1a;

unsigned int i,w,p,d;

unsigned int cost;

unsigned char chr,rcg;

unsigned char pastnumber[11];

unsigned convert(unsigned int);

unsigned convert1(unsigned int);

void delay(unsigned int t)

unsigned int i,j;

38
for(i=0;i<t;i++)

for(j=0;j<300;j++);

void lcdcmd(unsigned char value) // LCD COMMAND

lcd_data=value&(0xf0); //send msb 4 bits

lcd_rs=0; //select command register

lcd_en=1; //enable the lcd to execute command

delay(3);

lcd_en=0;

lcd_data=((value<<4)&(0xf0)); //send lsb 4 bits

lcd_rs=0; //select command register

lcd_en=1; //enable the lcd to execute command

delay(3);

lcd_en=0;

void lcd_init(void)

lcdcmd(0x02);

lcdcmd(0x02);

lcdcmd(0x28); //intialise the lcd in 4 bit mode*/

lcdcmd(0x28); //intialise the lcd in 4 bit mode*/

lcdcmd(0x0e); //cursor blinking

lcdcmd(0x06); //move the cursor to right side

39
lcdcmd(0x01); //clear the lcd

void lcddata(unsigned char value)

lcd_data=value&(0xf0); //send msb 4 bits

lcd_rs=1; //select data register

lcd_en=1; //enable the lcd to execute data

delay(3);

lcd_en=0;

lcd_data=((value<<4)&(0xf0)); //send lsb 4 bits

lcd_rs=1; //select data register

lcd_en=1; //enable the lcd to execute data

delay(3);

lcd_en=0;

delay(3);

void msgdisplay(unsigned char b[]) // send string to lcd

unsigned char s,count=0;

for(s=0;b[s]!='\0';s++)

count++;

if(s==16)

lcdcmd(0xc0);

if(s==32)

40
lcdcmd(1);

count=0;

lcddata(b[s]);

void serinit()

{ /*

TMOD=0x20;

TH1=0xFD; //9600

SCON=0x50;

TR1=1;*/

SCON=0x50;

TMOD=0x20;

TH1=-3;

TR1=1;

unsigned char receive()

unsigned char rx;

while(RI == 0);

rx=SBUF;

RI=0;

return rx;

void tx(unsigned char *tx)

41
{

//unsigned char v;

for(;*tx != '\0';tx++)

SBUF=*tx;

while(TI == 0);

TI=0;

// v= receive();

//delay(2);

void tx2(unsigned char *tx)

//unsigned char v;

for(;*tx != '\0';tx++)

SBUF=*tx;

while(TI == 0);

TI=0;

// v= receive();

//delay(2);

void tx1(unsigned char tx)

42
///unsigned char v;

SBUF=tx;

while(TI == 0);

TI=0;

//v= receive();

//delay(2);

/////////////////////////////////////

void sie()

//ET0 = 0;

ES = 1; /* allow serial interrupts */

EA = 1;

void sid()

//ET0 = 1;

ES = 0; /* allow serial interrupts */

EA = 0;

void okcheck()

do{

rcg=receive();

} while(rcg!='K');

43
}

void lcdbasic()

lcdcmd(0x80);

msgdisplay("Select Your Food");

lcdcmd(0xc0);

msgdisplay("IdLI - RS: 20/-");

delay(800);

lcdcmd(0xc0);

msgdisplay("WADA - RS: 20/-");

delay(800);

lcdcmd(0xc0);

msgdisplay("PURI - RS: 25/-");

delay(800);

lcdcmd(0xc0);

msgdisplay("DOSA - RS: 25/-");

delay(800);

void main()

unsigned char rtr=0;

unsigned int count=0;

P2=0xff;

idl=1;

wada=1;

44
puri=1;

dosa=1;

enter=1;

i = 0;

w = 0;

p = 0;

d = 0;

cost = 0;

serinit();

lcd_init();

msgdisplay("Smart Restaurant");

delay(1000);

lcdcmd(1);

sie();

while(1)

lcdbasic();

while(1)

if(idl == 0)

i = i+1;

45
lcdcmd(1);

msgdisplay("IDLI added to order");

delay(500);

lcdcmd(1);

lcdbasic();

if(wada == 0)

w = w+1;

lcdcmd(1);

msgdisplay("WADA added to order");

delay(500);

lcdcmd(1);

lcdbasic();

if(dosa == 0)

d = d+1;

lcdcmd(1);

msgdisplay("DOSA added to order");

delay(500);

lcdcmd(1);

lcdbasic();

if(puri == 0)

46
p = p+1;

lcdcmd(1);

msgdisplay("PURI added to order");

delay(500);

lcdcmd(1);

lcdbasic();

if(enter == 0)

break;

if(enter == 0)

lcdcmd(1);

msgdisplay("Oder transfered to Kitchen");

delay(500);

tx("Order is placed \n\r");

delay(200);

while(1)

if(i > 0)

i = i-1;

cost = cost + 20;

47
tx("IDLI RS: 20/- \n\r");

delay(200);

if(w > 0)

w = w-1;

cost = cost + 20;

tx("WADA RS: 20/- \n\r");

delay(200);

if(p > 0)

p = p-1;

cost = cost + 25;

tx("PURI RS: 25/- \n\r");

delay(200);

if(d > 0)

d = d-1;

cost = cost + 25;

tx("DOSA RS: 25/- \n\r");

delay(200);

if((i ==0 ) && (w == 0) && (p == 0) && (d == 0))

48
break;

if((i ==0 ) && (w == 0) && (p == 0) && (d == 0))

tx("Total Cost is: ");

convert1(cost);

tx("\n\r");

lcdcmd(1);

msgdisplay("TOtal cost is: ");

lcdcmd(0xc0);

convert(cost);

delay(500);

lcdcmd(1);

msgdisplay("Place wait....");

delay(1000);

lcdcmd(1);

msgdisplay("Order is Preparing");

delay(500);

cost = 0;

unsigned convert(unsigned int value)

49
{

unsigned int a,b,c,d,e,f,g,h;

a=value/10000;

b=value%10000;

c=b/1000;

d=b%1000;

e=d/100;

f=d%100;

g=f/10;

h=f%10;

a=a|0x30;

c=c|0x30;

e=e|0x30;

g=g|0x30;

h=h|0x30;

// lcddata(a);

// lcddata(c);

lcddata(e); lcddata(g);lcddata(h);//lcddata(' ');lcddata(' ');

return 1;

unsigned convert1(unsigned int value)

unsigned int a,b,c,d,e,f,g,h;

a=value/10000;

b=value%10000;

c=b/1000;

50
d=b%1000;

e=d/100;

f=d%100;

g=f/10;

h=f%10;

a=a|0x30;

c=c|0x30;

e=e|0x30;

g=g|0x30;

h=h|0x30;

tx1(a);

tx1(c);

tx1(e); tx1(g);tx1(h);//lcddata(' ');lcddata(' ');

return 1;

void serial_int (void) interrupt 4

if (RI == 1)

chr = SBUF;

RI = 0;

if(chr == '1')

lcdcmd(1);

51
msgdisplay("Order is Ready");

delay(2000);

6.2 DISPLAY WRITTEN CODE ON GLCD

This code display “WEL COME TO THE HOTEL” on GLCD.

Fig 6.2 (a) Code display on LCD

52
CHAPTER 7

FUTURE MODIFICATION CAN BE MADE

7.1 MODIFIED VERSION

• 7' inch 800*600 high resolution DIGITAL panels.

• 13000 pictures or 2GB built-in memory for your option with extra charge.

• Photo supported TXT, JPG format, Video support: JEPG (avi) video format

• Supported XD card. Slide show 10pcs of advertising Video and 50pcs of advertising
picture.
• Built-in memory function can save and calculate total price when customer order
food.

• Picture zooms in, zoom out, rotating, display food's picture, price list, nutrient
contents Optional. Copy files from cards to built-in memory ***** folder for storing
food's picture.
• Display price list and food's list (When food is uncountable as one Unit)

• Updated food's picture and food's price, advertising video and picture in SD card 10.
Multilanguage: English, French, German, Italia and so on.
• Can save your company logo (Advertising Video and pictures) as screen picture when
turn on digital menu.

53
7.2 FUTURE DEVELOPMENT

CUSTOMOR CUSTOMER CUSTOMER


DESK 1 DESK 2 DESK 3

MANAGER
DESK

KITCHEN

Fig 7.2(a)- future development

Our project is a very attractive and effective multipurpose. Foreign country and asian
countries use that technology. A growing number of companies in the foodservice world are
growing their brand with automated or self-service outlets as they strive to meet consumer
demand.

54
7.3 FEATURES OF THE TOUCH SCREEN MENU PAD

On single touch order is placed.

Items are displayed with nutrients value.

Games and surfing is provided.

Multilanguage’s can be provided which will increase more interaction


and can guide patrons.

With this another feature is additional hardware can be added on different table
such as mobile USB, pen drive or external hard disk.

55
CONCLUSION

As a conclusion, this hardware and software of project is successfully functioned as the


objectives of the project. This project solved the problem which is faced by the restaurant’s
entrepreneur in the attempt to organize the restaurant more efficiently skilled and capable. It is
also can be used to reduce the lateness and the error on ordering foods by the customer’s by
restaurant. By using this system, there are no more complaints about the services.

This project can contribute to the advancement of science and technology by having
upgrading keypad with touch screen to further develop on Smart Ordering System. This
project can be redesigned the electronic order keypad with more reliable function and
mismatch with other hardware e.g. smart phone. The interface of the keypad can be modifying
for a better service to the customers. A LCD display can be added to the keypad for the
customer as a reference to them during making an order. This is to avoid from sending wrong
information to counter or the waiters.

56
REFERENCES

WEBSITES

www.wikipedia.comwww.engineers
garage.comwww.datasheetarchive.c
omwww.alldatasheets.com

BOOKS

Micro controller Architecture and Design

57

You might also like