You are on page 1of 20

1

Question
Paper Protection
Box
Project Title: Question Paper Protection Box

ABSTRACT:
Today in the current national scenario, the prime question in every
student’s mind that the question is out before the examination has
started. This problem is going to the national problem.
In this project we used a new technology for students using GPS,
ARDUINO, SERVO, REAL TIME CLOCK. The system resembles a normal
opening the question paper box which when the time is exactly real
time to the examination time, tracks the location of the question
paper box using GPS (Global Positioning System).This device is so
user friendly that authorized person can control it with ease. This
device can also be used for automatic class-room open, and
automatic industrial purpose.

Components Used in this Project:

1. GPS Module (NEO-6)


2. Servo motor
3. Arduino UNO
4. Power Supply
5. Connecting Wires
6. Real Time Clock
7. Question paper Containing Box.
2
Question
Paper Protection
Box
Short Description of the Used Components:

GPS Module (NEO-6):


A GPS navigation device is a device that accurately calculates
geographical location by receiving information from GPS satellites.
To activate GPS NEO-6 module we used 4 header pins in four points
VCC, RX,TX and GND to provide power of 5V to VCC from
ARDUINO.From ARDUINO Tx pin we have divided this voltage by
using 2 registers of 4.7k and 10k to provide about 3.7V to GPS
module.

Servo:
Servo motors (or servos) are self-contained electric devices that
rotate or push parts of a machine with great precision. Servos are
found in many places: from toys to home electronics to cars and
airplanes. By rotating a shaft connected to the engine throttle, a
servo regulates the speed of a fuel-powered car or aircraft. Servos
also appear behind the scenes in devices we use every day.
The simplicity of a servo is among the features that make them so
reliable. The heart of a servo is a small direct current (DC) motor,
similar to what you might find in an inexpensive toy. These motors
run on electricity from a battery and spin at high RPM (rotations per
minute) but put out very low torque. An arrangement of gears takes
the high speed of the motor and slows it down while at the same
time increasing the torque. The gear design inside the servo case
converts the output to a much slower rotation speed but with more
torque (big force, little distance). The amount of actual work is the
3
Question
Paper Protection
Box
same, just more useful. Gears in an inexpensive servo motor are
generally made of plastic to keep it lighter and less costly.

The simple servo is shown in below:


4
Question
Paper Protection
Box
Arduino UNO:
Arduino is an open-source hardware and software company, project
and user community that designs and manufactures single-board
microcontrollers and microcontroller kits for building digital devices
and interactive objects that can sense and control both physically
and digitally.
Arduino board designs use a variety of microprocessors and
controllers. The boards are equipped with sets of digital and
analog input/output (I/O) pins that may be interfaced to various
expansion boards or breadboards (shields) and other circuits. The
boards feature serial communications interfaces, including Universal
Serial Bus (USB) on some models, which are also used for loading
programs from personal computers. The
microcontrollers are typically
programmed using a dialect of features
from the programming
languages C and C++. In addition to using
traditional compiler toolchains, the
Arduino project provides an integrated
development environment (IDE) based on
the Processing language project.

RTC DS3231: The DS3231 is a low-cost, highly accurate Real


Time Clock which can maintain hours, minutes and seconds, as well
as, day, month and year information. Also, it has automatic
compensation for leap-years and for months with fewer than 31
days.
5
Question
Paper Protection
Box

RTC is like as:


6
Question
Paper Protection
Box
The module can work on either 3.3 or 5 V which makes it suitable for
many development platforms or microcontrollers. The battery input
is 3V and a typical CR2032 3V battery can power the module and
maintain the information for more than a year.
The module uses the I2C Communication Protocol which makes the
connection to the Arduino Board very easy.

Power Supply:
In our project the used Arduino UNO is given supply from PC. The
GPS module gets supply from the Arduino board of 5V. To supply the
SERVO,GPS and RTC we used a 5V dc supply of arduino.
7
Question
Paper Protection
Box

Servo Global
Motor/ Positioning
Lock System(GPS)

Real Clock
Time
8
Question
Paper Protection
Box
Circuit Diagram:
Experimental circuit diagram of question paper protection box.
9
Question
Paper Protection
Box
Working Procedure:
Pin Connection:
At first power supply is connected to the Arduino then RTC is
connected to the Arduino pin as below:
Vcc is connected to the power supply of the Arduino
GND is connected to the Arduino Ground
SDA pin is connected to analog pin 4
SCL pin is connected to the analog pin 5
Then micro servo 9g is connected to the Arduino pin as below:
Vcc is connected to the power supply of the Arduino
GND is connected to the Arduino Ground
PWM or Orange pin is connected to the Arduino pin 9.
Then GPS is connected As below:
Vcc is connected to the power supply of the Arduino
GND is connected to the Arduino Ground
TX is connected to Digital pin 4
RX is connected to Digital pin 3
Then connect those pins to the Arduino, upload the code the
Arduino. After that time is set to the expected date (time, month,
date, year, minute and second).
Then getting a integer value for the expected date.
10
Question
Paper Protection
Box
After that this integer value is set up to the program code to open
the question containing box. Actually, In this project, GPS is shows
the latitude and longitude manually via computer.

Future Development:
1. To adding GSM module, it can message the corresponding
exact location of the question box to the authorized person
or company.
2. To add a camera, this device is controlled by the authorized
person or company.

Advantages:
1. It can protect the question form the corrupted person.
2. Without exact time, no other possibility to open the
question containing box
3. Low cost.
4. There is no possibilities to mixer the different years syllabus .

Another Practical Application:


1. Automatic class room / or any other time sensing room
opening.
2. Used in the military system for any kind of Time controlled
mission.

Limitations of submitted project:


1. If examination date is changed to the very near of the exact
date, then it creates a dangerous situation of leaking the
question.
2. Location is tracked manually.
11
Question
Paper Protection
Box
Additional
Necessary Arduino Code:
Code:
For controlling Servo and RTC,
#include <Wire.h>
#include "RTClib.h"
#include <Servo.h>

Servo myservo;
int pos = 0;

RTC_DS3231 rtc;

char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday",


"Wednesday", "Thursday", "Friday", "Saturday"};

int led=13;

void setup () {
myservo.attach(9);

pinMode(led,OUTPUT);
12
Question
Paper Protection
Box
Serial.begin(115200);

delay(1000); //delay

if (! rtc.begin()) {
Serial.println("Couldn't find RTC");
while (1);
}

if (rtc.lostPower()) {
Serial.println("RTC lost power, lets set the time!");
// rtc.adjust(DateTime(2018, 10, 21, 3, 0, 0));
}
//rtc.adjust(DateTime(2019, 01, 29, 11, 39, 0));
}

void loop () {
DateTime now = rtc.now();
String mytime=String
(now.month())+String(now.day())+String(now.hour())+String
(now.minute());
int myTimeInt=mytime.toInt();
13
Question
Paper Protection
Box

Serial.println(myTimeInt);
if (myTimeInt==28144
){
digitalWrite(led,HIGH); // LED high and rotate the servo for
opening the protection box
Serial.println("---------------------------------------------OPEN the
question paper protection box-----------------------------------");
for (pos = 0; pos <= 180; pos += 10) { // goes from 0 degrees to 180
degrees and variation 10 degree

myservo.write(pos); // position

}
}
else {digitalWrite(led,LOW); // Donot open the box
}
Serial.print(now.year(), DEC);
Serial.print('/');
Serial.print(now.month(), DEC);
Serial.print('/');
Serial.print(now.day(), DEC);
14
Question
Paper Protection
Box
Serial.print(" (");
Serial.print(daysOfTheWeek[now.dayOfTheWeek()]);
Serial.print(") ");
Serial.print(now.hour(), DEC);
Serial.print(':');
Serial.print(now.minute(), DEC);
Serial.print(':');
Serial.print(now.second(), DEC);
Serial.println();
delay(1000);
}

For controlling GPS,


#include <SoftwareSerial.h>

#include <TinyGPS.h>

/* This sample code demonstrates the normal use of a TinyGPS


object.
It requires the use of SoftwareSerial, and assumes that you have a
4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).
15
Question
Paper Protection
Box
*/

TinyGPS gps;
SoftwareSerial ss(4, 3);

static void smartdelay(unsigned long ms);


static void print_float(float val, float invalid, int len, int prec);
static void print_int(unsigned long val, unsigned long invalid, int len);
static void print_date(TinyGPS &gps);
static void print_str(const char *str, int len);

void setup()
{
Serial.begin(115200);

Serial.print("Testing TinyGPS library v. ");


Serial.println(TinyGPS::library_version());
Serial.println("by Mikal Hart");
Serial.println();
Serial.println("Sats HDOP Latitude Longitude ");
16
Question
Paper Protection
Box
Serial.println(" (deg) (deg) ");
Serial.println("------------------------------");

ss.begin(9600);
}

void loop()
{
float flat, flon;
unsigned long age, date, time, chars = 0;
unsigned short sentences = 0, failed = 0;
static const double LONDON_LAT = 51.508131, LONDON_LON = -
0.128002;

print_int(gps.satellites(), TinyGPS::GPS_INVALID_SATELLITES, 5);


print_int(gps.hdop(), TinyGPS::GPS_INVALID_HDOP, 5);
gps.f_get_position(&flat, &flon, &age);
print_float(flat, TinyGPS::GPS_INVALID_F_ANGLE, 10, 6);
print_float(flon, TinyGPS::GPS_INVALID_F_ANGLE, 11, 6);
print_int(age, TinyGPS::GPS_INVALID_AGE, 5);
print_date(gps);
print_float(gps.f_altitude(), TinyGPS::GPS_INVALID_F_ALTITUDE, 7,
2);
17
Question
Paper Protection
Box
print_float(gps.f_course(), TinyGPS::GPS_INVALID_F_ANGLE, 7, 2);
print_float(gps.f_speed_kmph(), TinyGPS::GPS_INVALID_F_SPEED,
6, 2);
gps.stats(&chars, &sentences, &failed);
print_int(chars, 0xFFFFFFFF, 6);
print_int(sentences, 0xFFFFFFFF, 10);
print_int(failed, 0xFFFFFFFF, 9);
Serial.println();

smartdelay(1000);
}

static void smartdelay(unsigned long ms)


{
unsigned long start = millis();
do
{
while (ss.available())
gps.encode(ss.read());
} while (millis() - start < ms);
}
18
Question
Paper Protection
Box
static void print_float(float val, float invalid, int len, int prec)
{
if (val == invalid)

{
while (len-- > 1)
Serial.print('*');
Serial.print(' ');
}
else
{
Serial.print(val, prec);
int vi = abs((int)val);
int flen = prec + (val < 0.0 ? 2 : 1); // . and -
flen += vi >= 1000 ? 4 : vi >= 100 ? 3 : vi >= 10 ? 2 : 1;
for (int i=flen; i<len; ++i)
Serial.print(' ');
}
smartdelay(0);
}
static void print_int(unsigned long val, unsigned long invalid, int len)
{
19
Question
Paper Protection
Box
char sz[32];
if (val == invalid)
strcpy(sz, "*******");
else
sprintf(sz, "%ld", val);
sz[len] = 0;
for (int i=strlen(sz); i<len; ++i)
sz[i] = ' ';
if (len > 0)
sz[len-1] = ' ';
Serial.print(sz);
smartdelay(0);
}
static void print_date(TinyGPS &gps)
{
int year;
byte month, day, hour, minute, second, hundredths;
unsigned long age;
gps.crack_datetime(&year, &month, &day, &hour, &minute,
&second, &hundredths, &age);
if (age == TinyGPS::GPS_INVALID_AGE)
Serial.print("********** ******** ");
20
Question
Paper Protection
Box
else
{
char sz[32];
sprintf(sz, "%02d/%02d/%02d %02d:%02d:%02d ",
month, day, year, hour, minute, second);
Serial.print(sz);
}
print_int(age, TinyGPS::GPS_INVALID_AGE, 5);
smartdelay(0);
}
static void print_str(const char *str, int len)
{
int slen = strlen(str);
for (int i=0; i<len; ++i)
Serial.print(i<slen ? str[i] : ' ');
smartdelay(0);
}

The End

You might also like