Anda di halaman 1dari 8

I.

Our Technical Solution:

a) Client – Customer system:

LCD & PIR Circuits

The technical solution for this problem is to construct a smart restaurant that is based on IoT
technology, we put a PIR Sensor (Motion sensor) in each table once the customer is in the sensor
send a signal to the kitchen staff, alerting the waiter that is a customer waiting for them and by that
we minimize the time of serving the client, which rise the satisfaction of our client . (FIGURE 1)

Once the command is sent to the Arduino the kitchen staff start to prepare the meal, (FIGURE 2)
while that is happening, a LED is turn on, in the table of the customer which indicates that his order is
in process.

The order now is prepared the restaurant is fully automated, by a line follower Robots, that deliver the
meal to the customer, in such a short time, which improve the efficiency of the restaurant.
Figure 1 : PIR Sensor Circuit
/*

This program blinks pin 13 of the Arduino when the PIR Sensor detect an obstacle (Customer)

*/

int led = 13;

int pin = 2;

int value = 0;

int pirstate = LOW;

void setup()

pinMode(led, OUTPUT);

pinMode(pin, INPUT);

Serial.begin(9600);

void loop()

{ value = digitalRead(pin);

if(value == HIGH) {

// turn the LED on (HIGH is the voltage level)

digitalWrite(pin, HIGH);

if(pirstate == LOW){

Serial.println("Customer Arrived");

pirstate = HIGH;

}else {

digitalWrite(led, LOW);

if(pirstate == HIGH){

Serial.println("Motion Ended");

delay(3600);

pirstate = LOW;

}
Figure 2 : LCD Circuit
/* This sketch prints the customer order "" to the LCD

The circuit:

* LCD RS pin to digital pin 12

* LCD Enable pin to digital pin 11

* LCD D4 pin to digital pin 5

* LCD D5 pin to digital pin 4

* LCD D6 pin to digital pin 3

* LCD D7 pin to digital pin 2

* LCD R/W pin to ground

* LCD VSS pin to ground

* LCD VCC pin to 5V

* 10K resistor:

* ends to +5V and ground

* wiper to LCD VO pin (pin 3)

* PIR SENSOR pin to digital pin 13

*/

// include the library code:

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {

// set up the LCD's number of columns and rows:

lcd.begin(16, 2);

// Print a message to the LCD.

lcd.print("Table Num 1"); }

void loop() {

// set the cursor to column 0, line 1

// (note: line 1 is the second row, since counting begins with 0):

lcd.setCursor(0, 1);

// print the number of seconds since reset:

lcd.print("Order Menu Num 9");

}
Line follower Robot:

Things used in this project:


 SparkFun Arduino Pro Mini 328 - 5V/16MHz
 Custom PCB
 Ultrasonic Sensor - HC-SR04 (Generic)
 RFID Module (Generic)
 SparkFun RedBot Sensor - Line Follower
 Texas Instruments H-Bridge Motor Driver 1A
( L293D, this one is compatible)
 Lithium Ion Battery - 1000mAh 7.4v
( 7,4V batter but doesn't have to be this specific one )
 Hobby Gearmotor - 140 RPM (Pair)
 Wheel - 65mm
 Jumper wires (generic)
 Toggle Switch
 RFID Tag (Generic)( 4 of them)
 Buzzer
 Male Header 40 Position 1 Row (0.1")

Design

Figure 1 : Drawings
CAD Design:

Circuit design:
Everything is controlled by Arduino pro mini that is connected to the
different components that we designed. To make it work on its own without
human input there are also line sensors and RFID module to detect tags
placed next to the line. H bridge that controls cheap and popular gear
motors is L293D, small and easy to use. we also decided to add a buzzer to
the circuit so that a robot can beep when certain RFID tag is detected.
Everything is powered by 2 cell LiPo battery (7, 4V of nominal voltage).
Because RFID module has to be powered with 3, 3V we had to add a
voltage regulator on the PCB so that it supplies proper voltage to the
module. There is also an ultrasonic sensor to detect obstacles, as they say,
safety first!

To build the PCB you need some tools and components (Arduino, L293D,
some breakaway headers, battery connector, buzzer, 3, 3V voltage
regulator).
Assembling the components of our circuits:

Arduino code:
You will find the code attached to the project by the name of line_follower_robot

Anda mungkin juga menyukai