Friday, March 29, 2024

Restaurant Menu Ordering System

Written by Anusha V

Automation systems are increasing in day to day life. Applications like home and industrial automation reduce man power while increasing the efficiency. Here in this restaurant menu ordering system that lets you automate menu for ordering food in restaurants.

In these modern days the number of restaurants are increasing. They also require very fast processing for serving food to the customers. With the increasing number of customers, it would require more man power, since the current situation has become hectic for the restaurants. Also changes in the hardcopy of the menu can’t happen.

Using simple components and programming techniques, an automation system was proposed.

Block diagram

txblock
Transmitter section
Receiver Section
Receiver Section

SOFTWARE AND HARDWARE TOOLS:

Software Tools:

1. AVR Studio.
2. PROGISP.
3. PROTEUS.

Hardware Tools:

1. Microcontroller.
2. LCD
3. Key pad/touch panel
4. ZIGBEE

- Advertisement -

Schematic diagram

Transmitter Side
Restaurant menu ordering system: Transmitter Side
Receiver Side
Restaurant menu ordering system: Receiver Side

Restaurant menu ordering system circuit operation

Restaurant menu ordering system consists of a transmitter and a receiver section.

Atemga8 is the AVR microcontroller used for processing the data. The above circuit does not show any clock or reset circuit. For normal operation of the controller reset should be connected to high logic.

Vcc and ground should also be connected to the circuit, which are not shown in the above circuit. It has two ground pins (pin 8 &pin 22). Vcc is connected to 5V and a Vcc is used for A/D conversion. Below is the image showing reset and power connections to the controller.

- Advertisement -

tx

No need of external crystal, it can work with internal oscillator of 8MHz.

Transmitter

• Transmitter section is used for ordering from the menu.
• A 4X3 keypad is used to select the items. Four rows of the keypad are connected to PORT C of the microcontroller, while the three columns are connected to PORT D.
• Zigbee transmitter is connected to the transmit and receive pins of the microcontroller. Here the transmitter pin of the microcontroller is connected to the transmitter of the zigbee transmitter module. No need of connecting receive pin, as the module only transmits the data.
• LCD is also connected in order to view the selected items. Here LCD is used in 4 bit mode.

Receiver

• The receiver section is connected in the kitchen. The order placed by the customer is received by the zigbee receiver. In real one can form a zigbee network in which single receiver is used to receive data from different transmitters.
• Thus received data is decoded and is displayed on the LCD .

Working

• The menu is displayed on the LCD .
• User should press the corresponding number of the selected item from the display.
• The project code is provided below. It is written in such a way that one can select 3 items at a time. In real time one can use EEPROM of the microcontroller to store the menu.
• Items are selected using keypad provided. For example in order to select “1. Ice cream” press 1 one from the keypad. Similarly select your items and press ‘#’ .
• Pressing ‘#’ will transmit the order to the receiver.

 [stextbox id=”grey”]

Code: /*
* automation_of_restaurant_menu_ordering.c
*
* Created: 6/16/2016 11:40:10 AM
* Author: Anusha
*/

#include <util/delay.h>
#include <avr/io.h>

#define Rows PORTC //Pc0,pc1,pc2,pc3
#define Columns PIND //PD4,PD5,PD6

unsigned char upperNibble, keyCode, keyPressed,k,c[6];

char press_key()
{
unsigned char i;
DDRC = 0x0f;
PORTC=0x0f;
PORTD = 0xf0;
k=1;
while(k==1)
{

upperNibble = 0xff;

for(i=0; i<4; i++)
{
_delay_ms(1);
Rows = ~(0x01 << i);
_delay_ms(1);
upperNibble = Columns| 0x0f;

if (upperNibble != 0xff)
{
_delay_ms(20); //key debouncing delay
upperNibble = Columns | 0x0f;
if(upperNibble == 0xff) goto OUT;

keyCode = (upperNibble & 0xf0) | (0x0f & ~(0x01 << i));

while (upperNibble != 0xff)
upperNibble = Columns | 0x0f;

_delay_ms(20); //key debouncing delay

switch (keyCode)
{
case (0xee): keyPressed = ‘1’;k=0;
break;
case (0xed): keyPressed = ‘4’;k=0;
break;
case (0xeb): keyPressed = ‘7’;k=0;
break;
case (0xe7): keyPressed = ‘*’;k=0;
break;
case (0xde): keyPressed = ‘2’;k=0;
break;
case (0xdd): keyPressed = ‘5’;k=0;
break;
case (0xdb): keyPressed = ‘8’;k=0;
break;
case (0xd7): keyPressed = ‘0’;k=0;
break;
case (0xbe): keyPressed = ‘3’;k=0;
break;
case (0xbd): keyPressed = ‘6’;k=0;
break;
case (0xbb): keyPressed = ‘9’;k=0;
break;
case (0xb7): keyPressed = ‘#’;k=0;
break;
case (0x7e): keyPressed = ‘/’;k=0;
break;
case (0x7d): keyPressed = ‘X’;k=0;
break;
case (0x7b): keyPressed = ‘-‘;k=0;
break;
case (0x77): keyPressed = ‘+’;k=0;
break;
default : keyPressed = ‘X’;k=0;
}
OUT:;
}
}

}
return keyPressed;
}

void uart_init()
{

UCSRC=(1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0);

UCSRB=(1<<RXEN)|(1<<TXEN);

UBRRL=0x33; // baud rate(51 for 9600)
}

void tx_data(unsigned char c)
{

UDR=c;
while(!(UCSRA & (1<<TXC)));
UCSRA=(1<<TXC);
}

unsigned char rx_data()
{

while ( !(UCSRA & (1<<RXC)) );
UCSRA=(0<<RXC);
return UDR;
}

void Tx_String(unsigned char *str)
{
while(*str)
{
tx_data(*str);
str++;
_delay_ms(100);
}

}

int main(void)
{
uart_init();
unsigned char x,y[4];

int i,j=0;
_delay_ms(100);

while(1)
{
x=press_key();

if((x)!=’#’)
{

y[j]=x;
++j;

}
else if(x==’#’)
{

for (i=0;i<3;i++)
tx_data(y[i]);
_delay_ms(10);

}

}
}

[/stextbox]

Download source code: click here


 Written by Anusha V From electronicshub.org

59 COMMENTS

  1. haii…
    can we connect the rx nd tx of atmega8/atmega16 directly to the xbee module with out using max232. i am confusing as the controller is 5v and xbee is 3.3v can we connect directly iam scared of xbee module may be burn.

  2. Hello Anusha!
    Can I use the same code stated above with both transmitter and receiver sides?
    And also, can I have a circuit diagram of the clock and reset circuit. If possible, can I also have the PCB layout of all circuits? Kindly send it to my email [email protected]. It will be of great help. Thank you so much!

    • If you see that after uploading that shows that you do upload with wrong board setting in the Arduino IDE. So, all you need to do is to check the tools in the IDE and then select the Atmega8 as the board provided you are using Arduino board with the Atmega8. then reupload the code. it will not displace such error again.
      Thanks.

SHARE YOUR THOUGHTS & COMMENTS

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Calculators

×