You are on page 1of 72

Project C.L.O.S.E.R.

An Official Entry to the 2023 Regional SciMathlympics

ROBOTICS AND INTELLIGENT MACHINES


(Team Category)

Keath Ashley B. Manalo


Paul William B. Dacula
Rainiel Jesh A. Atinon
Researchers

Mrs. Maria Fatima S. Bolido


Engr. Eduardo Moises Jr.
Research Adviser
Project C.L.O.S.E.R. 1

ABSTRACT

As the Holiday Season approaches, the safety and well-being of children in the Philippines
face a significant threat, particularly in densely populated areas such as markets, malls, and
public spaces. The alarming increase in reported cases of child disappearances highlights
an urgent need for immediate attention. Generally, this study aimed to construct and test a
device that gives the real time location of the child using Arduino Nano, Bluetooth
Modules, FPV Camera, GSM Module, and the GPS Module.

Results revealed that the Camera Clarity in both Open Area and Area with obstructions
showed a score of 4 (Clear Camera Output Visibility with Graying Scale) to 5 (Very Clear
Camera Output Visibility), but the quality deteriorates as distance increases. The Capability
of the GSM to send SMS was functional and had a score of 2 (able to send messages) using
the Smart Network. GPS Distance Error from Actual Location based on Height Distance
showed that as the height increases, the lower the GPS Distance error is, vice versa. In
terms of the Bluetooth module, It took less than 10 seconds for the device to disconnect
and less than 20 seconds to reconnect. The results showed that Project CLOSER was able
to determine the location of the child and alert the parents if ever their child gets lost
precisely through the components of the device which assures its functionality.

Based on the results gathered, it can be concluded that Project CLOSER is effective and
useful.
Project C.L.O.S.E.R. 2

INTRODUCTION

As the Holiday Season approaches, the safety and well-being of children in the

Philippines face a significant threat, particularly in densely populated areas such as

markets, malls, and public spaces. The alarming increase in reported cases of child

disappearances highlights an urgent need for immediate attention. Among the most

vulnerable are children aged 5 to 12, who lack awareness of their surroundings and are

susceptible to potential dangers. Parents who roam around with their children in public

places are sometimes oblivious to their little ones who vanish in the blink of an eye. As the

revelation dawns upon them a little too late, parents start a frantic search for the missing

child. A gallivanting kid is usually spotted by the security or other shoppers and brought

to the customer care desk (Sankar, A. 2023).

With the escalating rate of child abductions in the Philippines, the demand for an

efficient, user-friendly, and effective tracking device is more pressing than ever (Tupaz,

2022). While tracking devices are available in the current market, they come with notable

disadvantages and limitations. For instance, the Apple AirTag is restricted to Apple users,

leaving Android users without access (Segan, 2021). Furthermore, these devices often

exhibit limitations in tracking capabilities, lack user-friendliness, and are generally

challenging for the average person to use effectively.

In response to this, the Researchers introduce C.L.O.S.E.R. – an innovative device

designed to aid parents in locating their children in crowded areas. C.L.O.S.E.R., an

acronym for "Child Locator On Sight Electronic Radar," has been specifically crafted to

establish continuous communication between parents and their children. This device offers

efficiency and user-friendliness, helping parents act swiftly in ensuring the safety of their
Project C.L.O.S.E.R. 3

children. Generally, this study aims to construct and test a device that aims to give the real

time location of the child via Global Positioning System (GPS), maintaining connection

with the parent and child device through Bluetooth and acquire relevant footage via the

FPV Camera. Initiatives like C.L.O.S.E.R. play a pivotal role in safeguarding the well-

being of children. They provide a beacon of hope in these challenging times, offering an

effective means to address the pressing issue of child safety during the holidays and

beyond.

MATERIALS AND METHODS

Materials

The following materials were used during the conduct of this study: 1 HC-06

Bluetooth Module, 1 HC-05 Bluetooth Module, 1 GSM/GPRS Sim card Module, 2

Arduino Nano MCU board, 1 GPS Medium board module, 1 FPV 1050 TL camera, 2 Lipo

2s 2000mah battery, 2 Charging Module, 2 Main Circuit Socket Board, and 1 5” DVR

Monitor.

Figure 3. Figure 4. Arduino


Figure 1. HC-06 Figure 2. HC-05
GSM/GPRS Sim Nano MCU Board
Bluetooth Module Bluetooth
Card Module Photo taken by
Photo taken from Module Photo
Photo taken by Paul William
m.indiamart.com. taken by Paul
Paul Dacula Dacula
William Dacula

Figure 6. FPV Figure 7. Figure 8. Arduino


Figure 5. GPS 1050 TL Camera GSM/GPRS Sim Nano MCU Board
Medium Board Photo taken by Card Module Photo taken from
Module Photo Paul William Photo taken by www.tekparts.in.
taken by Paul Dacula Paul William
William Dacula Dacula
Project C.L.O.S.E.R. 4

Fig 9. Main Circuit


Socket Board Fig 10. 5 DVR Monitor
Photo taken by Paul Photo taken by Paul
William Dacula William Dacula

Tools

The following tools was used during the conduct of this study: Variable Power

Monitor, Variable Solder Station, Wire Cutter, Wire Splicer Grip, Scissor, Long Nose

Cutter, Wire Assembly Grip, 3D Printer, Precision Screw Set, and Digital Multitester.

Figure 11. Figure 12. Figure 14. Wire


Variable Solder Figure 13. Wire
Variable Power Splicer Grip Photo
Station Photo Cutter Photo taken
Monitor Photo taken by Paul
taken by Paul by Paul William
taken by Paul William Dacula
William Dacula Dacula
William Dacula

Figure 16. Long


Figure 17. Wire
Nose Cutter Fig 18. 3D Printer
Fig 15. Scissor Assembly Grip
Photo taken by Photo taken by
Photo taken by Photo taken by
Paul William Paul William
Paul William Paul William
Dacula Dacula
Dacula Dacula

Figure 20. Digital


Figure 19. Precision
Multitester
Screw Set
Photo taken by
Photo taken by
Paul William
Paul William
Dacula
Dacula
Project C.L.O.S.E.R. 5

Schematic Design

Figure 21. The Schematic Diagram of the Main Device

Figure 22. The Schematic Diagram of the Accessory Device


Project C.L.O.S.E.R. 6

PROCEDURAL DESIGN

Planning and Designing the Model

Gathering and Preparing Materials and Tools

Building the Prototype

Coding of Main Device and Accessory Device

Main Device Accessory Device

Testing of the Devices

A. Visibility of the main device camera output


B. Ability to send Text Messages to the programmed cellphone
Number.
C. GPS Distance Error
D. Distance Break Detection (HC-05 Module) Disconnect and
Reconnect time.
E. Acceptability of the Device

Gathering and Recording of Data


Project C.L.O.S.E.R. 7

Planning and Designing the Model

Prior to the development of the device, the researchers obtained vital information

from related literatures. Likewise, electronic expert machines were also consulted for the

finalization of the plan and design. The researchers closely worked with this expert for the

successful development of the device.

Both the main and accessory devices were designed in a blueprint along with

planning out the arrangement of materials.

Gathering and Preparing Materials and Tools

The materials and tools needed for the study were gathered and prepared.

The materials needed in the study were bought from hardware stores. Materials that

are not available in hardware stores were bought online.

The tools used in the study were borrowed from the electronic expert. All the

materials and tools were cleaned and tested for their functionality before using them.

Figure 23. Designing the prototype Figure 24. Materials and Tools
Photo taken by Keath Ashley Manalo Photo taken by Keath Ashley B. Manalo
Project C.L.O.S.E.R. 8

Building the Prototype

In this study, two separate devices were built: the main device and the accessory

device.

Building the Main Device Prototype

The LCD Trigger Coms and the BLE 05 was connected to the MCU board. Then,

the power supply section was assembled. Finally, the Main Device Code using Arduino

IDE was uploaded.

Building the Accessory Device Prototype

The BLE 06 Module, GPS Module, GSM Sim Module, and FPF Camera was

connected to the Arduino nano MCU Board. Then, the Power Supply section was

assembled. Finally, the Accessory Device code using Arduino IDE was uploaded.

Figure 25. Building the Main Device Figure 26. Building the Accessory
Photo taken by Keath Ashley Manalo Device
Photo taken by Keath Ashley Manalo

Coding of Main Device and Accessory Device

The codes were created in the Arduino IDE Software and were compiled and

uploaded to the MCU. The Main and Accessory devices have their own separate code and

the programming language used to create the program for these devices is C++.
Project C.L.O.S.E.R. 9

Testing the Device

A. Camera Output Visibility

The main device was attached to the parent/guardian while the accessory

device was attached to the child. The Camera Output Visibility of the Main Device

at varying distances was tested and observed in areas with and without barriers. The

Camera Output Visibility was evaluated and scored as follows; 5 – Very Clear

Camera Output Visibility, 4 – Clear Camera Output Visibility with Graying Scale,

3 – Blurred Camera Output Visibility, 2 – Inconsistent and Flickering Camera

Visibility, 1 – No Camera Output at all.

B. Ability to send Text Messages to varying types of SIM cards.

The device was tested and observed based on its ability to send the

generated text message to varying types of SIM cards. The time interval on which

the device will be sending a text message to the programmed cellphone number

was set to 1 minute. The device was evaluated and scored as follows: 2 – can

send message, 1 – cannot send message.

C. GPS Distance Error

The main device was used by the parent while the accessory device was

strapped to the child. The device went through testing and observation to assess the

accuracy and precision of its GPS capabilities, with a focus on measuring its GPS

Distance Error. The distance error of the given location of the GPS at varying

distances was measured through meters and was recorded, the mean was also

calculated in each trial with three replicates each.


Project C.L.O.S.E.R. 10

D. Distance Break Detection (HC-05 Module) Disconnect and Reconnect time.

To observe the distance break detection of the HC-05 Module, the main

device was attached to the guardian and the accessory device was strapped to the

child. The distance break detection of the HC-05 module and HC-06 modules

reconnect/disconnect time at varying distances was tested and observed based on

the input distance break and the buzzer, which beeps when the devices are

disconnected, and stops when reconnected. The disconnection and reconnection

time were recorded using a timer and expressed in seconds. The means was

calculated, and conclusions were drawn based on it.

E. Acceptability of the Device

The acceptability of the device was tested through a survey form given to

50 Parents, they rated the device as follows; 5 – Excellent, 4 – Good, 3 – Fair, 2 –

Poor, 1 – Needs Improvement. The average was then computed from the rating

given by the respondents.

Gathering and Recording of Data

After the experiment was conducted, the data were gathered, and the mean was

computed to determine the quantified data.


Project C.L.O.S.E.R. 11

RESULTS

The results from Table 1.1. show Camera Clarity in an Open Area. There were 3

trials, with 3 replicates. Trial A: with a mode of 5, Trial B: with a mode of 4, Trial C: with

a mode of 3.

Table 1.1. Camera Clarity in an Open Area


Varying Distances Trials Mode

1 2 3

A (10m) 5 4 5 5

B (20m) 5 4 4 4

C (30m) 3 3 2 3

Legend: 5 - Very Clear Camera Output Visibility, 4 – Clear Camera Output

Visibility with Graying Scale, 3 – Blurred Camera Output Visibility, 2 –Inconsistent and

Flickering Camera Visibility, 1- No Camera Output at all.


Project C.L.O.S.E.R. 12

The results from Table 1.2. show Camera Clarity with Obstructions. There were 3 trials,

with 3 replicates. Trial A: with a mode of 4, Trial B: with a mode of 2, Trial C: with a mode

of 1.

Table 1.2. Camera Clarity in an Area with Obstructions

Varying Distances Trials Mode

1 2 3

A (10m) 4 3 4 4

B (20m) 2 2 2 2

C (30m) 1 1 2 1

Legend: 5 – Very Clear Camera Output Visibility, 4 – Clear Camera Output Visibility with

Graying Scale, 3 – Blurred Camera Output Visibility, 2 –Inconsistent and Flickering

Camera Visibility, 1- No Camera Output at all.


Project C.L.O.S.E.R. 13

The results from Table 2 show the Capability of the GSM to send SMS based on

GSM Network. For each of the 3 GSM Networks, there were 3 replicates. Smart Network:

with a mode of 1, Globe Network: with a mode of 2, Other GSM Network: with a mode of

1.

Table 2. GSM Test if SMS was Sent Based on GSM Network.

GSM Network Trials Mode

1 2 3

A. Network 1 2 2 2 2

B. Network 2 1 1 1 1

C. Network 3
2 1 2 2

Legend: 1 – No, 2 – Yes.


Project C.L.O.S.E.R. 14

The results from Table 3 show GPS Distance Error from Actual Location based on

Height Distance. There were 3 trials, with 3 replicates. Trial A: with a mean of 6.33m, Trial

B: with a mean of 4m, Trial C: with a mean of 3.33m.

Table 3. GPS Distance Error from Actual Location based on Height Distance

Height Distance Trials Mean

1 2 3

A (24m) 7m 4m 8m 6.33m

B (30m) 4m 4m 4m 4m

C (35m) 3m 3m 4m 3.33m

Legend: Height Distance – Meters from the ground going up, m-meters
Project C.L.O.S.E.R. 15

The results from Table 4.1 show the time it took for the Devices to Disconnect from

each other. There were 3 trials, with 3 replicates. Trial A: with a mean of 9.0s, Trial B:

with a mean of 4.7s, Trial C: with a mean of 3.3s.

Table 4.1. Time(s) it Took the Devices to Disconnect from each other.

Distance Trials Mean

1 2 3

A (10m) 10s 8s 9s 9.0s

B (15m) 4s 5s 5s 4.7s

C (20m) 3s 5s 2s 3.3s

The results from Table 4.2 show the time it took for the Devices to Reconnect from

each other. There were 3 trials, with 3 replicates. Trial A: with a mean of 12.3s, Trial B:

with a mean of 15.7s, Trial C: with a mean of 19.3s.

Table 4.2. Time(s) it Took the Devices to Reconnect to each other.

Distance Trials Mean

1 2 3

A (10m) 14s 12s 11s 12.3s

B (15m) 16s 16s 15s 15.7s

C (20m) 21s 19s 18s 19.3s


Project C.L.O.S.E.R. 16

Table 5 shows the acceptability rate of Project C.L.O.S.E.R based on a survey given to 50

respondents. The total rating per score is tallied and the percentage of the total scores per

category is recorded.

Table 5. The acceptability rate of Project C.L.O.S.E.R based on a survey of 50


respondents.
Tally

5 4 3 2 1

SMS Sending Ability 60% 30% 10% 0% 0%

Camera Visibility Output 50% 35% 15% 0% 0%

GPS Location Accuracy 60% 40% 0% 0% 0%

User-Friendly 80% 20% 0% 0% 0%

Workmanship 30% 70% 0% 0% 0%

Actual Locating Ability of 75% 25% 0% 0% 0%


the Device

Economic Value 65% 25% 10% 0% 0%

Legend: 5 – Excellent, 4 – Good, 3 – Fair, 2 – Poor, 1 – Needs Improvement

The result from the survey shows that:

The device’s SMS sending ability was rated 5 or excellent by 60% of the total

number of respondents while 30% rated it as 4 or good and 10% rated it as 3 or fair.

The device’s camera visibility output was rated 5 or excellent by 50% of the

respondents while 35% rated it as 4 or good and 15% rated it as 3 or fair.

The device’s GPS location accuracy was rated 5 or excellent by 60% of the

respondents while 40% rated it as 4 or good.


Project C.L.O.S.E.R. 17

The device’s user-friendliness was rated 5 or excellent by 80% of the respondents

while 20% rated it as 4 or good.

The device’s workmanship was rated 5 or excellent by 30% of the respondents

while 70% rated it as 4 or good.

DISCUSSION

Arduino, a widely acclaimed open-source electronics platform, stands out for its

remarkable versatility in crafting interactive projects and prototypes. In this study, the

researchers focus on the Arduino Nano, a compact yet robust microcontroller board that

replicates the capabilities of its larger Arduino counterparts but in a more space-efficient

form. Boasting an array of digital and analog pins, the Arduino Nano proves to be an

excellent choice for this project. Its compact size and affordability have made it a preferred

choice for makers, students, and hobbyists, facilitating their experimentation with

electronics and programming.

The Bluetooth module plays a pivotal role in tracking devices, enabling both

reconnection and disconnection functionalities. Devices such as Bluetooth trackers

commonly employ Bluetooth Low Energy (BLE) technology to establish dependable

connections with smartphones and other compatible devices. When within range, they

automatically reestablish a connection, ensuring real-time tracking and monitoring.

Conversely, if a tracking device ventures out of range, Bluetooth technology seamlessly

disconnects, conserving battery life and signaling the user that their valuable item is no
Project C.L.O.S.E.R. 18

longer within reach. The efficient use of Bluetooth connectivity significantly enhances the

practicality and convenience of tracking devices. In our experiments, the researchers found

that both devices disconnected in less than 10 seconds and reconnected in under 20

seconds. Similar concept is found in the study titled "Developing a Bluetooth-Based

Tracking System for Tracking Devices Using Arduino" (H. A. S. Adjei, F. K. Oduro-

Gyimah, T. Shunhua, G. K. Agordzo, and M. Musariri, 2020), where Bluetooth

connectivity prompted GSM calls to the owner when Bluetooth disconnection occurred,

repeating until reconnection was established.

Regarding GSM connectivity, the SMS feature successfully operated with Network

1 and Network 3 networks, delivering the child's GPS coordinates via a Google Maps link.

However, issues arose with the Network 2, which blocked or restricted spam messages,

hindering the reception of coordinates.

The GPS Distance Error demonstrated relatively accurate results, closely mirroring

the real-time location of the device. These findings shed light on the GPS device's accuracy

concerning various height distances. It's apparent that GPS accuracy varies with height

distance, which resonates with the conclusions of a study titled "Consumer-Grade Global

Positioning System (GPS) Accuracy and Reliability" (Wing, M. G., Eklund, A., & Kellogg,

L. D., 2005). This study suggests that users can generally expect positional accuracies

within approximately 5 meters of the true position in open-sky settings, with variations

depending on environmental conditions. Notably, our study took place in an open area
Project C.L.O.S.E.R. 19

setting, which may account for the observed mean distance errors within specific height

distances.

A First-Person View (FPV) camera is a specialized camera system commonly

utilized in remote-controlled vehicles and drones. FPV cameras provide real-time video

feeds to a remote operator, granting them visual perspective from the device itself,

effectively creating a virtual experience. In the context of tracking devices, integrating an

FPV camera enhances accuracy and tracking efficacy. This incorporation allows users to

visually monitor the real-time location of their child, providing an additional layer of

assurance and precision. In the tests, the camera's clarity is generally impressive, with clear

visuals when obstructions are minimal, and the subject is within a short distance.

In the overall assessment, respondents rated C.L.O.S.E.R positively due to its good

quality, aligning with their expectations. This high level of satisfaction among parents and

the community underscores the device's usability. The study results confirm that Project

CLOSER and its capabilities effectively track and locate the child device with an

acceptable level of accuracy, contributing to a positive user experience.

CONCLUSION

Project C.L.O.S.E.R was able to determine the location of the child and alert the

parents if ever their child gets lost precisely through the components of the device which

assures its functionality. Based from the data gathered, it can be concluded that Project

C.L.O.S.E.R. can be constructed, tested, and is useful.


Project C.L.O.S.E.R. 20

RECOMMENDATIONS

1. Use of the C.L.O.S.E.R Device in crowded areas such as markets and malls.

2. Use of other Bluetooth modules that are compatible with the device.

3. Use of various GPS to determine which one has the less GPS Error.

4. Use of higher resolution cameras for a clearer output.

5. Use as reference for future investigations relating to tracking devices.

6. Further tests are recommended for the improvement of the device.

7. Use of Network 1 and Network 3 sim cards.

8. Modify the shape of the accessory device to be more suitable and safer for the child.

BIBLIOGRAPHY

5.8 GHz Wireless Security Camera – Indoor and Outdoor Video—Reolink Blog. (n.d.).

Retrieved November 6, 2023, from https://reolink.com/blog/5-8ghz-wireless-

security-camera/

Apple AirTag Review. (n.d.). PCMAG. Retrieved November 6, 2023, from

https://www.pcmag.com/reviews/apple-airtag?fbclid=IwAR2T-

zOK_1th_otASBiyfmGbiQA4fvhl8Utq6TFwbbuU6Z79NmeUGiuUF1w

Carlsen, J. (2023, April 24). How Do Wireless Security Cameras Work? SafeWise.

https://www.safewise.com/home-security-faq/how-wireless-security-cameras-

work/
Project C.L.O.S.E.R. 21

Jeng, Y.-N., & Wu, C.-H. (2012). Frequency Identification of Vibration Signals Using

Video Camera Image Data. Sensors (Basel, Switzerland), 12(10), 13871–13898.

https://doi.org/10.3390/s121013871

KGD, N. (n.d.). FPV System for Drones. Instructables. Retrieved November 6, 2023,

from https://www.instructables.com/FPV-System-for-Drones/

Mateo, H. F., Janvic. (n.d.). Almost 9,000 child abuse cases reported in 2022.

Philstar.Com. Retrieved November 6, 2023, from

https://www.philstar.com/headlines/2023/02/05/2242694/almost-9000-child-

abuse-cases

reported/2022?fbclid=IwAR3bu662e0iG9j3o_M7BBB6xCcbRL5uuBhE6fk3lj_G

MfVKM6rMS0T7kyJk

Missing and Abducted Children | Child Crime Prevention & Safety Center. (n.d.).

Retrieved November 6, 2023, from

https://childsafety.losangelescriminallawyer.pro/missing-and-abducted-

children.html?fbclid=IwAR1xh5TMVw-

VFdV48xxPD5LpP15zdkHVBPdwjcZxjm9hy3FBEzBEV7s9a3M

Oscar. (2023, April 1). Choose the Best FPV Camera For FPV Drones: Comprehensive

Guide and Product Recommendations. Oscar Liang. https://oscarliang.com/fpv-

camera/

Sensors and Modules. (n.d.). Retrieved November 6, 2023, from

https://www.electronicwings.com/sensors-modules/bluetooth-

?fbclid=IwAR3RZrGOIgDPnNMonwISO8SNkBojdN8YF4t2IZ5qzJiuz5R_-

AerKU_U50M
Project C.L.O.S.E.R. 22

Sharma, A., A, C. K., Abhishek, S., Krishnaan, S. M., Raveenthiran, S., Prakash, K., &

Beulet, A. S. (2021). Anti-Abduction Device for Women, Children and Elderly.

2021 IEEE 2nd International Conference on Technology, Engineering,

Management for Societal Impact Using Marketing, Entrepreneurship and Talent

(TEMSMET), 1–5. https://doi.org/10.1109/TEMSMET53515.2021.9768706


Project C.L.O.S.E.R. 23

ACKNOWLEDGEMENT

The researchers would like to thank the following persons for their support and help

throughout the study:

To the Almighty God who guides and gives strength to the researchers to continue

in doing the study;

To Mr. Charlie D. Begas, MS, Principal IV of Capiz National High School, for

allowing the researchers to conduct this study;

To Mrs. Judy B. Dunton, SSHT V, Science and Technology Department for

allowing the researchers to conduct such study;

To Mrs. Ma. Fatima S. Bolido and Mr. Eduardo L. Moises Jr. for their guidance

and advice for the improvement of the study and research papers;

To Mr. Danilo Modesto Jr., for his recommendations, support, untiring and selfless

service, and assistance and for sharing his expertise in the field of robotics;

And to the researcher’s parents who gave their financial and emotional support.

Thank you very much.

The Researchers
Project C.L.O.S.E.R. 24

APPENDIX A

CODING
Project C.L.O.S.E.R. 25

Code for Master Device:

#include <SoftwareSerial.h>

SoftwareSerial hc05(3, 2); //hc05 rx tx

#define statePin 6

int btStatus;

#define buzzer 11

#define ledPin 13

int masterMsg = 0;

unsigned long previousMillis = 0;

unsigned long interval = 0;

int distanceTresh = 1040;

void setup() {

Serial.begin(38400);

hc05.begin(38400);

pinMode(statePin, INPUT_PULLUP);
Project C.L.O.S.E.R. 26

pinMode(buzzer, OUTPUT);

pinMode(ledPin, OUTPUT);

digitalWrite(ledPin, HIGH);

delay(2000);

digitalWrite(ledPin, LOW);

Serial.println("Ready");

void loop() {

btStatus = digitalRead(statePin);

if (btStatus) {

digitalWrite(ledPin, LOW);

unsigned long currentMillis = millis();

if (hc05.available() > 0) { // Checks whether data is

comming from the serial port

interval = currentMillis - previousMillis;

masterMsg = hc05.read(); // Reads the data from the

serial port
Project C.L.O.S.E.R. 27

Serial.println(interval);

previousMillis = currentMillis;

if (interval > distanceTresh) {

tone(buzzer, 3250);

} else {

noTone(buzzer);

} else {

digitalWrite(ledPin, HIGH);

Serial.println("Disconnected!...");

tone(buzzer, 3250);

delay(100);

noTone(buzzer);

delay(100);

}
Project C.L.O.S.E.R. 28

void hc05Read() {

if (hc05.available()) {

Serial.write(hc05.read());

if (Serial.available()) {

hc05.write(Serial.read());

}
Project C.L.O.S.E.R. 29

Code for Accessory Device:

#include <TinyGPS++.h>

#include <SoftwareSerial.h>

int RXPin = 5;

int TXPin = 6;

int GPSBaud = 9600;

TinyGPSPlus gps;

SoftwareSerial gpsSerial(RXPin, TXPin);

SoftwareSerial sim800l(10, 9);

char contact[40];

char sms[160];

char message[] = "I am here!";

char smsNO[] = "+639690342154";


Project C.L.O.S.E.R. 30

SoftwareSerial hc05(3, 2); //hc05 rx tx

#define ledPin 13

int slaveMsg = 0;

#define statePin 4

int btStatus = false;

#define camPin 7

unsigned long previousMillis = 0;

const long interval = 60000;

void setup() {

sim800l.begin(9600);

Serial.begin(38400);

hc05.begin(38400);

gpsSerial.begin(GPSBaud);

Serial.println("Initializing...");

delay(1000);
Project C.L.O.S.E.R. 31

sim800l.println("AT"); //Once the handshake test is

successful, it will back to OK

updateSerial();

sim800l.println("AT+CSQ"); //Signal quality test, value

range is 0-31 , 31 is the best

updateSerial();

sim800l.println("AT+CCID"); //Read SIM information to

confirm whether the SIM is plugged

updateSerial();

sim800l.println("AT+CREG?"); //Check whether it has

registered in the network

updateSerial();

pinMode(statePin, INPUT_PULLUP);

pinMode(camPin, OUTPUT);

pinMode(ledPin, OUTPUT);

digitalWrite(ledPin, HIGH);

delay(2000);

digitalWrite(ledPin, LOW);
Project C.L.O.S.E.R. 32

Serial.println("Waiting for Initial Boot-Up Connection");

while (!btStatus) {

btStatus = digitalRead(statePin);

Serial.println("Ready");

void loop() {

unsigned long currentMillis = millis();

digitalWrite(ledPin, HIGH);

btStatus = digitalRead(statePin);

while (btStatus) {

previousMillis = currentMillis;

digitalWrite(camPin, LOW);

btStatus = digitalRead(statePin);

digitalWrite(ledPin, LOW);

hc05.write('2');

delay(1000);
Project C.L.O.S.E.R. 33

gpsRun();

digitalWrite(camPin, HIGH);

if (currentMillis - previousMillis >= interval) {

previousMillis = currentMillis;

Serial.println("Sending SMS!");

SendMessage();

DelAllMsg();

void gpsRun() {

while (gpsSerial.available() > 0) {

if (gps.encode(gpsSerial.read()))

displayInfo();

if (millis() > 5000 && gps.charsProcessed() < 10) {


Project C.L.O.S.E.R. 34

Serial.println("No GPS detected");

while (true)

digitalWrite(camPin, HIGH);

void displayInfo() {

if (gps.location.isValid()) {

Serial.print("Latitude: ");

Serial.println(gps.location.lat(), 6);

Serial.print("Longitude: ");

Serial.println(gps.location.lng(), 6);

Serial.print("Altitude: ");

Serial.println(gps.altitude.meters());

} else {

Serial.println("Location: Not Available");

}
Project C.L.O.S.E.R. 35

Serial.print("Date: ");

if (gps.date.isValid()) {

Serial.print(gps.date.month());

Serial.print("/");

Serial.print(gps.date.day());

Serial.print("/");

Serial.println(gps.date.year());

} else {

Serial.println("Not Available");

Serial.print("Time: ");

if (gps.time.isValid()) {

if (gps.time.hour() < 10) Serial.print(F("0"));

Serial.print(gps.time.hour());

Serial.print(":");

if (gps.time.minute() < 10) Serial.print(F("0"));

Serial.print(gps.time.minute());
Project C.L.O.S.E.R. 36

Serial.print(":");

if (gps.time.second() < 10) Serial.print(F("0"));

Serial.print(gps.time.second());

Serial.print(".");

if (gps.time.centisecond() < 10) Serial.print(F("0"));

Serial.println(gps.time.centisecond());

} else {

Serial.println("Not Available");

Serial.println();

Serial.println();

delay(1000);

void updateSerial() {

delay(500);

while (Serial.available()) {
Project C.L.O.S.E.R. 37

sim800l.write(Serial.read()); //Forward what Serial

received to Software Serial Port

while (sim800l.available()) {

Serial.write(sim800l.read()); //Forward what Software

Serial received to Serial Port

void testMessage() {

sim800l.println("AT+CMGF=1"); //Sets the GSM Module in

Text Mode

delay(1000); // Delay of 1000 milli

seconds or 1 second

sprintf(contact, "AT+CMGS=\"%s\"\r", smsNO);

sim800l.println(contact);

delay(1000);

sprintf(sms, "%s", message);

sim800l.println(sms); // The SMS text you want to send

delay(100);
Project C.L.O.S.E.R. 38

sim800l.println((char)26); // ASCII code of CTRL+Z

delay(1000);

void SendMessage() {

sim800l.println("AT+CMGF=1"); //Sets the GSM Module in

Text Mode

delay(1000); // Delay of 1000 milli

seconds or 1 second

sprintf(contact, "AT+CMGS=\"%s\"\r", smsNO);

sim800l.println(contact);

delay(1000);

sprintf(sms, "%s", message);

sim800l.println(sms); // The SMS text you want to send

delay(100);

sim800l.print("https://www.google.com/maps/@"); // The

SMS text you want to send

delay(100);

sim800l.print(gps.location.lat(), 6); // The SMS text

you want to send


Project C.L.O.S.E.R. 39

delay(100);

sim800l.print(","); // The SMS text you want to send

delay(100);

sim800l.print(gps.location.lng(), 6); // The SMS text

you want to send

delay(100);

sim800l.println(",54m/data=!3m1!1e3"); // The SMS text

you want to send

delay(100);

sim800l.println((char)26); // ASCII code of CTRL+Z

delay(1000);

void DelAllMsg() {

sim800l.println("AT+CMGD=1,4");

Serial.println("Deleting Messages");

delay(1000);

}
Project C.L.O.S.E.R. 40

APPENDIX B

RAW DATA
Project C.L.O.S.E.R. 41
Project C.L.O.S.E.R. 42
Project C.L.O.S.E.R. 43
Project C.L.O.S.E.R. 44
Project C.L.O.S.E.R. 45
Project C.L.O.S.E.R. 46
Project C.L.O.S.E.R. 47
Project C.L.O.S.E.R. 48
Project C.L.O.S.E.R. 49

APPENDIX C

LETTERS
Project C.L.O.S.E.R. 50
Project C.L.O.S.E.R. 51
Project C.L.O.S.E.R. 52
Project C.L.O.S.E.R. 53

APPENDIX D

SCANNED LOG-IN NOTEBOOK


Project C.L.O.S.E.R. 54
Project C.L.O.S.E.R. 55
Project C.L.O.S.E.R. 56
Project C.L.O.S.E.R. 57
Project C.L.O.S.E.R. 58

APPENDIX E

SURVEY FORM
Project C.L.O.S.E.R. 59
Project C.L.O.S.E.R. 60

APPENDIX F

ISEF FORMS
Project C.L.O.S.E.R. 61
Project C.L.O.S.E.R. 62
Project C.L.O.S.E.R. 63
Project C.L.O.S.E.R. 64
Project C.L.O.S.E.R. 65
Project C.L.O.S.E.R. 66
Project C.L.O.S.E.R. 67
Project C.L.O.S.E.R. 68
Project C.L.O.S.E.R. 69
Project C.L.O.S.E.R. 70
Project C.L.O.S.E.R. 71

You might also like