smart classroom using arduino with internet of thing (iot)

46
Smart Classroom using Arduino with Internet of Thing (IoT) AINAA ATHIRAH BINTI ABDULLAH BACHELOR OF SCIENCE COMPUTER (COMPUTER NETWORK SECURITY) UNIVERSITI SULTAN ZAINAL ABIDIN 2018

Upload: others

Post on 15-Nov-2021

24 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Smart Classroom using Arduino with Internet of Thing (IoT)

Smart Classroom using Arduino with Internet of

Thing (IoT)

AINAA ATHIRAH BINTI ABDULLAH

BACHELOR OF SCIENCE COMPUTER

(COMPUTER NETWORK SECURITY)

UNIVERSITI SULTAN ZAINAL ABIDIN

2018

Page 2: Smart Classroom using Arduino with Internet of Thing (IoT)

Smart Classroom using Arduino with Internet of Thing

(IoT)

AINAA ATHIRAH BINTI ABDULLAH

BACHELOR OF SCIENCE COMPUTER

(COMPUTER NETWORK SECURITY)

Universiti Sultan Zainal Abidin, Terengganu, Malaysia

MAY 2018

Page 3: Smart Classroom using Arduino with Internet of Thing (IoT)

i

DECLARATION

I hereby declare that this report is based on my original work except for quotations

and citations, which have been duly acknowledged. I also declare that it has not been

previously or concurrently submitted for any other degree at Universiti Sultan Zainal

Abidin or other institutions.

________________________________

Name : .AINAA ATHIRAH ABDULLAH

Date : ..................................................

Page 4: Smart Classroom using Arduino with Internet of Thing (IoT)

ii

CONFIRMATION

This is to confirm that the project of Smart Classroom using Arduino with Internet of

Thing (IoT) was prepared and submitted by Ainaa Athirah binti Abdullah(Matric

Number: BTBL15041534) and has been found satisfactory in terms scope, quality and

presentation as partial fulfilment of the requirement for the bachelor of Computer

science (Computer Network Security) with Honour in University Sultan Zainal

Abidin.

The research conducted and the writing of this report was under my supervison.

________________________________

Supervisor: Prof. Dr Mohd Nordin Abdul Rahman

Date : ..................................................

Page 5: Smart Classroom using Arduino with Internet of Thing (IoT)

iii

DEDICATION

First of all, all praised to Allah, the most Gracious and most Merciful for giving me

the opportunity to undergo this final year project Smart Classroom using Arduino with

Internet of Thing (IoT).

I would like to thank my family, my parents and to my brothers and sister for

supporting me spiritually and giving me strength throughout writing this thesis and my

life in general.

I also would like to thank my supervisor Prof. Dr Mohd Nordin Abdul Rahman for

giving me help and support throughout this project. I also would like to thank my

fellow friends that had always with me during hard times and helping me in finishing

this project. I also want to express my gratitude to my other lectures that have help me

in completing my project.

Last but not the least I would like to thank my friends for giving me help, advices,

guidance as well as suggestion for my project.

Page 6: Smart Classroom using Arduino with Internet of Thing (IoT)

iv

ABSTRACT

This project is about the motion detection using Passive Infra-Red sensor (PIR).

This project is aim to build a sensor system which is transmit and receive the signal in

wirelessly.

Besides that, it also acted as an auto power switching system. When the sensor

is triggered, the signal will transmit wirelessly to take further action. For this project, I

will relate this sensor system with an auto power light switching system. Which mean

when the sensor is triggered, light in a room will automatically switch ON or OFF.

For this project I will used Arduino with PIR motion sensor as it is much cheaper and

more easier to manage and control compare to other hardware sensor.

The main function of this project is tending to switch ON or OFF the light

automatically based on the motion detection. I have done few researches from the

internet and also consult the lectures to decide the tools and equipment needed for this

project. The Arduino PIR sensor software is the main software in this project because

it controls all the basic operations.

Page 7: Smart Classroom using Arduino with Internet of Thing (IoT)

v

ABSTRAK

Projek ini adalah berkaitan dengan pengesanan gerakan menggunakan sensor

Passive Infra-Red (PIR). Projek ini adalah bertujuan untuk membina sistem sensor

yang menghantar dan menerima isyarat tanpa menggunakan wayar.

Selain itu, ia juga bertindak sebagai sistem penukaran kuasa auto. Apabila sensor

dicetuskan, isyarat akan dihantar tanpa perlu menggunakan wayar. Untuk projek

ini, saya akan mengaitkan sistem sensor ini dengan sistem penukaran cahaya auto

kuasa. Maksudnya apabila sensor dicetuskan, cahaya di dalam bilik akan bertukar

ON atau OFF secara automatik. Untuk projek ini saya akan menggunakan Arduino

dengan sensor gerak PIR kerana ia jauh lebih murah dan lebih mudah untuk diurus

dan dikawal berbanding dengan jenis sensor lain.

Fungsi utama projek ini adalah untuk menghidupkan atau mematikan cahaya

secara automatik berdasarkan pengesanan gerakan. Saya telah melakukan

beberapa penyelidikan dari internet dan juga merujuk beberapa pensyarah kuliah

untuk menentukan peralatan dan peralatan yang diperlukan untuk projek ini.

Perisian sensor Arduino PIR adalah perisian utama dalam projek ini kerana ia

mengawal semua operasi asas.

Page 8: Smart Classroom using Arduino with Internet of Thing (IoT)

vi

CONTENTS

PAGE

DECLARATION i

CONFIRMATION ii

DEDICATION iii

ABSTRACT iv

ABSTRAK v

CONTENTS vi

LIST OF TABLES vii

LIST OF FIGURES xvi

LIST OF ABBREVIATIONS xv

CHAPTER I INTRODUCTION

1.1 Background Introduction 1-2

1.2 Objectives 3

1.3 Problem Statements 3-4

1.4 Project’s Scope 5

CHAPTER II LITERATURE REVIEW

2.1 Introduction 6

2.2 Internet of Things (IoT) 6-7

2.3 Pyroelectric Infrared Sensors 7-8

2.4 PIR Sensors-Based Application for smart

environments

9

2.5 Related Works 9-10

2.6 Summary of the Related Articles 11-15

2.7 Summary 16

CHAPTER III

METHODOLOGY

3.1 Introduction 17

3.2 Analysis Study & Research Paradigm Justification 18-20

3.3 Project Development Design and Development 19

3.3.1 Project Development Methodology 19-20

Page 9: Smart Classroom using Arduino with Internet of Thing (IoT)

vii

3.3.2 Internal Architecture for Arduino 21

3.3.3 Arduino’s Development Cycle 22

3.3.4 Data Flow Diagram 23

3.3.5 Project Development Flow Chart 24

3.3.6 Project Testing 25-27

3.4 Software and Hardware Requirements 27-28

3.5 Framework 28-30

3.6 Summary 31

REFERENCES 33

Page 10: Smart Classroom using Arduino with Internet of Thing (IoT)

viii

LIST OF TABLES

TABLE TITLE

PAGE

2.6 Summary of the Related Articles 11-15

Page 11: Smart Classroom using Arduino with Internet of Thing (IoT)

ix

LIST OF FIGURES

FIGURE TITLE PAGE

3.3.1 First figure in chapter 3 20

3.3.3 Second figure in chapter 3 22

3.3.4 Third figure in chapter 3 23

3.3.5 Fourth figure in chapter 3 24

3.3.6 Fifth figure in chapter 3 25

3.5 Sixth figure in chapter 3 28

3.5 Seventh figure in chapter 3 29

Page 12: Smart Classroom using Arduino with Internet of Thing (IoT)

x

LIST OF ABBREVIATIONS / TERMS / SYMBOLS

DFD Data Flow Diagram

FYP Final year project

IoT Internet of Things

PIR Passive Infra-red Sensor

Page 13: Smart Classroom using Arduino with Internet of Thing (IoT)

xi

LIST OF APPENDICES

APPENDIX TITLE PAGE

A Gantt chart 32

Page 14: Smart Classroom using Arduino with Internet of Thing (IoT)

1

CHAPTER I

INTRODUCTION

1.1 Background

This project is called “motion detection using Internet of Things (IoT). The main

reason for this project is to sense a human motion and then transmit the signal

wirelessly using a sensor. However, this project will relate to auto power ON light

and light system. When the sensor senses a human motion in the sensor’s detection

area, sensor will be triggered and then the room’s light will automatically switch ON.

Light and fan will automatically OFF when the sensor cannot detect any motion in the

room. As long as PIR sensor does not detect motion in the detection area, light will

not functioning. Once the sensor is triggered, system will have around 2 minutes to

run the function. After 30 minutes and sensor does not detect any motion, lights will

be switched OFF automatically.

Pyroelectric infrared (PIR) sensors are well-known occupancy detectors. They have

been widely employed for human tracking systems, due to their low cost and power

consumption, small form factor and modest and privacy-preserving interaction. In

particular, a dense array of PIR sensors having digital output and the modulated

Page 15: Smart Classroom using Arduino with Internet of Thing (IoT)

2

visibility of Fresnel lenses can provide capabilities for tracking human motion,

identifying walking subject and counting people entering or leaving the entrance of a

room or building. PIR sensors are widely used as a simple, but reliable, presence

trigger for alarms, and automatic lighting systems.

When the sensor can detect the movement, the data will be sent immediately to

the cloud based web. Motion detection is a system that uses infrared radiation as a

mechanism. This PIR sensor uses the timer mode as a tool for calculating a certain

time and it can thus turn on light automatically for a certain period of time when a

person is in sensor monitoring. The resulting switch works automatically and it differs

from the current switches that most of them work manually. Working manual

switches, it is less user-friendly if you want to switch on the switch in dark and hard-

to-reach.

The switch will be generated using an infrared sensor that can detect the movement

of an object that crosses the sensor's surveillance and it operates automatically. In

addition, this lamp switch reduces maintenance costs as well as existing lighting

switches that require manpower to switch on switches, which often cause damage as

they are often used.

Page 16: Smart Classroom using Arduino with Internet of Thing (IoT)

3

1.2 OBJECTIVES

1. To build a sensor system that can transmit and receive signal wirelessly.

2. To design and improve new lighting control system using Internet of Things (IoT)

3. To analyze data about the number of people that can be detected.

1.3 Problem Statement

Nowadays excessive and uncontrolled use of electricity have becomes one of the

source of increasing monthly bill payments. This is why there is an initiative in

improving the existing wiring system to more systematic and user-friendly. Today's

switchgear switches are seen as the cause of user negligence resulting in an increase in

electricity and unexpected events.

Page 17: Smart Classroom using Arduino with Internet of Thing (IoT)

4

This problem often happens and we can relate it to what happen around us. For

example in classrooms the students often forgets to OFF the lights when they exits the

class. With this system, users do not have to turn ONN or OFF the light manually.

Once motion is detected the lights will automatically ONN by itself. The same thing

goes when no movement or motion is detected within the allocated time, the lights

will OFF automatically.

Besides that, people start to find more easier or convenient solution in daily life.

Wireless technology is popular nowadays because it is convenient, easier to construct,

and save cost. User can get the signal in the long range without wiring. With wireless,

they can save cost and easy to change the location of the devices without rewiring.

They also can access to this system anytime. Moreover, this system is easy to build

and configure.

Page 18: Smart Classroom using Arduino with Internet of Thing (IoT)

5

1.4 Project’s Scope

i. Motion detector

Motion detector is use to detect moving objects or in this project people. The

sensor can only detect the range distance that has been allocated. So for this project,

the detection area to trigger the sensor is set to range within 1 meter range.

ii. Transmit and receive signal wirelessly

The signal that transfer to the receiver is wireless. Since it is only use in the room,

the range does not need to be very wide. Therefore, the range wireless device to

transmit the signal only need up to 100-150 meters only.

iii. Power Supply

Power supply that needed for this project is low since all the component or

equipment only need low voltage to operate. So to avoid the high voltage that will

cause wasted power supply or accident like spoilt circuit to happen.

Page 19: Smart Classroom using Arduino with Internet of Thing (IoT)

6

CHAPTER II

LITERATURE REVIEW

2.1 Introduction

This chapter will explain about the literature review for this project briefly. This

chapter will discuss about the concept, theory, perspective and the method that will be

used in order to finish this project. Besides that, related works with

PIR sensor also will be discussed.

2.2 Internet of Things (IoT)

In the beginning, the Internet was only designed for communication in which

computers could access websites, download content or communicate with other users.

However, technologies evolve creating more powerful devices, faster and with more

capabilities. Advances in electronics technology are also creating smaller devices with

low power consumption which means that large networks of sensors can be created,

with the ability to obtain information, process it and act accordingly. Here it is how

the idea of the Internet of Things arises. Under this term, computers and technologies

Page 20: Smart Classroom using Arduino with Internet of Thing (IoT)

7

are around users without noticing their presence, being able to cooperate and adapt

their behaviors to the environment and enabling users to interact with technology

without interfering with their everyday life. In this sense, the concept of computer as

hardware device is diluted to integrate connected devices around and in cooperation

with users’ daily life. This research group was created with the idea of developing

another emerging and innovative technology, RFID codes, and the belief that thoughts

ideas and knowledge information are important and things and objects are crucial.

However, the information we have today depends heavily on the data generated by

users in their interactions with objects. When the term the Internet of Things appeared

it was done under the premise that if there were devices with the capacity to know

everything about such objects or things. From all the data previously gathered we

would be able to track and control everything and to know when things need to

change.

2.3 Pyroelectric Infrared Sensors

Sensing systems for human movement detection and identification collect a raw

data set from the human body and extract distinguishable features to recognize the

principal context that we mentioned previously: the object location, the direction of

Page 21: Smart Classroom using Arduino with Internet of Thing (IoT)

8

the movement, the speed of the movement and the identity of the object. Numerous

sensing systems have been studied using various sensors, including cameras, motion

sensors, pressure pads, radars, electric field sensors. Among them, in this paper, we

focus on pyroelectric infrared (PIR) sensors as sensing systems to detect human body

movement in an indoor environment. PIR sensors are well known and have been

widely used as a simple, but powerful presence trigger for alarms, such as surveillance

systems and automatic lighting control. In particular, PIR sensors could address the

invasion of privacy issues raised by the use of camera-based surveillance systems.

What more presented an extensive survey on the technology of pyroelectric materials,

devices and its potential applications. PIR sensors belong to the class of thermal IR

detectors, voltage change-thermoelectrical conversion, and use materials having a

pyroelectric effect, which is spontaneously polarized in the crystal structure. Although

PIR sensors have been commonly used as simple presence triggers using digital

output, the analog output signal of PIR sensors depends on several aspects, including

the direction and speed of a moving object, the distance of the body from the PIR

sensor, the body shape and the presence of multiple people.

Page 22: Smart Classroom using Arduino with Internet of Thing (IoT)

9

2.4 PIR Sensors-Based Application for smart environments

PIR sensors usually are used with a variety of sensors in various applications for

building smart environments, such as healthcare, smart energy system and security.

Han et al in their article presented an occupancy and indoor environment quality

sensing method based on a suite of sensors, including PIR sensors, CO2 sensors,

humidity sensors and concentration sensors. Tsai et al. proved a way of reducing the

standby power consumption of lighting devices based on a PIR sensor, an ambient

light sensor and lighting duration modules. This capability of PIR sensor-based

occupancy and motion detection for diverse application domains provided the

motivation for this research into the feasibility of a human movement detection system

using various features extracted from the PIR sensor signal.

2.5 Related Works

Tracking Motion Direction and Distance With Pyroelectric IR Sensors

Piero Zappi, Elisabetta Farella, and Luca Benini, Fellow, IEEE

The PIR sensors are widely used in surveillance systems and automatic light

switching systems as simple but reliable triggers. They also have shown promising

Page 23: Smart Classroom using Arduino with Internet of Thing (IoT)

10

capabilities as low-cost camera enhancers in video surveillance systems. The work of

Rajgarhia et al. uses PIR sensors in conjunction with cameras to address privacy

issues. PIR sensors are deployed in private rooms while cameras in public areas.

Human tracking is performed by correlating information from the two systems. This

paper demonstrates the benefits of reducing camera deployment in favour of PIR

sensors. In fact, a survey on 60 people highlights how motion sensors are considered

less invasive for people privacy than cameras. In Bai and Teng, the design of a board

for home surveillance is proposed. The board includes an ARM processor together

with a Web camera and a PIR sensor. The latter triggers the Web camera in presence

of an intruder in order to capture and send to a remote server the snapshot. Cucchiara

et al. propose a technique to fuse information from a dense network of PIR sensors

with the video streaming from a set of cameras to improve consistent labeling of

people moving within the AoI. PIR sensors detect people presence and their direction

of movement, and these features help distinguish reflections and changes of

movement behind obstacles.

Page 24: Smart Classroom using Arduino with Internet of Thing (IoT)

11

2.6 Summary of the Related Articles

Title, author Year of publish Summary

Human Movement

Detection and

Identification Using

Pyroelectric Infrared

Sensors

Jaesok Yun* and

Sang-Shin Lee

2014

Yun and Sang proposed to use PIR

sensors conjunction with Fresnel

lenses to shape their field of view.

Fresnel lenses can be manufactured

by molding plastic materials

having transmission characteristics

appropriate for a particular

wavelength range, the human body

(8–14m) instead of using multi-

zone Fresnel lenses mainly

employed in traditional intruder

detection systems , we used single-

zone Fresnel lenses, IML-0637,

from Murata Manufacturing Co.

As presented in, they assume that

by narrowing the field of view of

PIR sensors to its horizontal

motion plane aligned with the

Page 25: Smart Classroom using Arduino with Internet of Thing (IoT)

12

sensing elements, the signal

captured from walking in the other

directions could be reduced, and

this would help in distinguishing

the walking direction aligned with

the sensing elements from the other

directions, thus improving

recognition accuracy. In conclusion

through this paper, Yun and Sang

have presented a human movement

detecting system based on

pyroelectric infrared (PIR) sensors

and machine learning technologies

for classifying the direction of

movement, the distance of the body

from the PIR sensors, the speed of

movement during two-way, back-

and-forth walking and identifying

the walking subject.

Page 26: Smart Classroom using Arduino with Internet of Thing (IoT)

13

An Energy Efficient Power

Usage Controlling and

monitoring Using Wireless

Sensor Network

V.V.Murali Krishna* and

T.Anuradha

2016 In this paper, V.V.Murali and

T.Anuradha proposed in main

system, having user terminal and

ZigBee module connected to

computer through ART (Universal

Asynchronous Receive

/Transmitter) port. If any person

presented in the room then only

takes the light intensity and

temperature and depending upon

the present temperature light

intensity only the lights and fans

will turn ON and turn OFF. Present

power displayed on LCD status

number of persons present, lights,

fans, in individual rooms is

displayed clearly on PC through

visual basic platform. Power usage

bill displayed on monitoring

section and able to send bill to

Page 27: Smart Classroom using Arduino with Internet of Thing (IoT)

14

customer through SMS using GSM

technology, depending on the

persons presented in the room the

fan speed will changing. In

conclusion the author want to

proposed that by using centralized

controlling points, we able to

monitor and controlling it much

more easier and much more simple.

A Survey of Human-

Sensing:

Methods for Detecting

Presence, Count, Location,

Track, and Identity

Thiago Teixeira et al

2010

Throughout this paper, Thiago

Teixera et al discuss about the

major obstacles and noise sources

that make human-sensing as a

challenging task. Common

obstacles, irrespective of sensing

modality can be grouped into six

broad classes (Sensing noises,

Environmental variations,

Similarity to background signal,

Appearance variability and

Page 28: Smart Classroom using Arduino with Internet of Thing (IoT)

15

unpredictability, similarity to other

people, and Active deception. They

also classify on how the process of

extracting any information

regarding the people in some

environment (Presence, Count,

Location, Track and identity. The

paper also proposed about the

Human Traits Classification. They

described about several traits

(Static, and Intrinsic traits, internal

organs, dynamic, and Intrinsic

Traits and Extrinsic Traits). In

conclusion, in this paper, Thiago

Teixeira et al have surveyed the

existing methods to acquire such

information, and classified them

according to taxonomy of human-

sensing.

Page 29: Smart Classroom using Arduino with Internet of Thing (IoT)

16

2.7 Summary

In conclusion, this chapter will focus on the study of the related articles or past

research about Arduino and Internet of Things (IoTs). Furthermore, this chapter also

focus more about the development of the related projects also come out with new

application that will benefits to all users.

Page 30: Smart Classroom using Arduino with Internet of Thing (IoT)

17

CHAPTER III

METHODOLOGY

3.1 Introduction

To have buildings that are able to adapt to the user needs and at the same time to

operate efficiently, it is essential to know the activity the people are performing.

Presence sensors, which are widely deployed in modern buildings, attempt to regulate

lighting to the presence of people in indoor spaces. Though, much more in terms of

comfort and energy efficiency can be achieved if more detailed information on the

activity of the users is detected sensors are widely used as a presence trigger, but the

analog output of PIR sensors depends on several other aspects, including the distance

of the body from the PIR sensor, the direction and speed of movement, the body shape

and gait.

Page 31: Smart Classroom using Arduino with Internet of Thing (IoT)

18

3.2 Analysis Study & Research Paradigm Justification

In order to develop this project, there are four stages that involves in research

paradigm and all these stages are related to each other. The four stages are as

followed:

1. Feasibility Study

During this stage, a research is carried out to find the impact of positive and

negative. The information such as objective, scope and problem statement was

identified after doing some research by reviewing few related articles or reports that

relate to the projects. Then a proposal was prepared and it was proposed according to

the investigation done. The final result shown that Smart Classroom to be develop due

to the energy consumption problems.

2. Data Collection and Gathering

In this stage, all the related data was collected through some method of data

collection techniques, which are reading articles, reports and journals. After reviewed

of information collected, the method that is suitable for this project is Internet of

Things (IoT). Therefore, this method will be implemented in this project.

Page 32: Smart Classroom using Arduino with Internet of Thing (IoT)

19

3. Framework design Stage

For this stage, framework is design as well as prototyping of the system. A

framework will describe about the collection of classes or tools that will be used to

help in developing the system.

4. Evaluation Stage

During this stage, all unit and sub modules will be tested before system integration

process. This is important as it is needed to ensure that the system for the project will

function as expected and meet the project requirement.

3.3 Project Design and Development

3.3.1 Project Development Methodology

For this project, Rapid Application Development (RAD) system will be used. RAD

is a new and highly interactive systems development approach that arose from 1990s.

Furthermore, RAD is a concept that can develop faster and higher quality products. In

addition, RAD also attempts to solve both weakness of the structured development

methodologies, which are long development time and difficulty in understanding a

system solely based on paper description. RAD methodologies adjust the Systems

Page 33: Smart Classroom using Arduino with Internet of Thing (IoT)

20

Development Life Cycle (SDLC) phases to develop some parts of the system quickly.

The advantage of this approach is to get the users to better understand the system

through interactive and simultaneous revisions which can bring the system closer to

what it needed.

Figure 1: Project Development phased

Page 34: Smart Classroom using Arduino with Internet of Thing (IoT)

21

3.3.2 Internal Architecture for Arduino

Program Memory is where all commands, written by users are stored at. Next is

Register. Register function is to determine what action the microcontroller takes in

reference to the program command. RAM role is to store data of any actions

temporarily. The next one is EEPROM. EEPROM is where the data is retaining even

after power is switched-off. Lastly, Ports. Ports are the bidirectional pins of Input and

Output.

Program

Memory

Register

RAM

EEPROM

PORTS

Page 35: Smart Classroom using Arduino with Internet of Thing (IoT)

22

3.3.3 Arduino’s Development Cycle

Figure 2: Arduino’ Development cycle

Edit

Edit

Compile Run

Finish

Upload

Page 36: Smart Classroom using Arduino with Internet of Thing (IoT)

23

3.3.4 Data Flow Diagram

Figure 3: Data Flow Diagram

Page 37: Smart Classroom using Arduino with Internet of Thing (IoT)

24

3.3.5 Project Development Flow Chart

Figure 4: Project Development Flowchart

Page 38: Smart Classroom using Arduino with Internet of Thing (IoT)

25

3.3.6 Project Testing

Figure 5: Example of Arduino

Arduino motion sensor or often referred to as PIR, "Passive Infrared",

"Pyroelectric", or "IR motion" sensors are the sensors that allow you to sense motion,

almost always used to detect whether a human has moved in or out of the sensors

range. They are small, inexpensive, low-power, easy to use and don't wear out. For

that reason they are commonly found in appliances and gadgets used in homes or

businesses.

Most PIR modules have a 3-pin connection at the side or bottom. The pinout may

vary between modules so triple-check the pinout! It's often silkscreened on right next

Page 39: Smart Classroom using Arduino with Internet of Thing (IoT)

26

to the connection. One pin will be ground, another will be signal and the final one will

be power. Power is usually 3-5VDC input but may be as high as 12V. Sometimes

larger modules don't have direct output and instead just operate a relay in which case

there is ground, power and the two switch connections.

The output of some relays may be 'open collector’, that means it requires a pull up

resistor. If the variable output are not available, be sure to try attaching a 10K pull up

between the signal and power pins. .

An easy way of prototyping with PIR sensors is to connect it to a breadboard since

the connection port is 0.1" spacing. By soldering in 0.1" right angle header, a PIR is

easily installed into a breadboard.

Once the PIR had wired up, it’s a good idea to do a simple test to verify that it

works the way it supposed to work. This test is also good for range testing. Simply

connect 3-4 alkaline batteries and connect ground to the - pin on your PIR. Power

goes to the + pin. Then connect a basic red LED (red LEDs have lower forward

Page 40: Smart Classroom using Arduino with Internet of Thing (IoT)

27

voltages than green or blue so they work better with only the 3.3v output) and a 220

ohm resistor (any value from 100 ohm to 1.0K ohm will do fine) to the out pin as

shown. Of course, the LED and resistor can swap locations as long as the LED is

oriented connection and connects between out and ground.

3.4 Software and Hardware Requirements

The requirement of hardware and software are the most important for this project as it

will lead to the successful of this project. Without software and hardware requirement,

this project cannot be accomplished.

3.4.1 Software Requirements

Software requirement for this project are :

1. Microsoft Office 2013

2. Microsoft PowerPoint 2013

3. Arduino Sketch 1.8.5

Page 41: Smart Classroom using Arduino with Internet of Thing (IoT)

28

3.4.2 Hardware Requirement

Hardware requirement for this project are :

1. Acer Aspire E 14

2. Arduino Uno Rev3-Main Board

3. USB B-Type Cable

4. Breadboard (Small)

5. LED 3mm (Green, Red, Yellow)

6. Resistor 0.25W 5% (220Ω, 10kΩ)

7. Male to Male Jumper Wire

8. Motion detector sensor

9. Wifi Shield

3.5 Framework

(Figure 6)

Page 42: Smart Classroom using Arduino with Internet of Thing (IoT)

29

When a crossing or human presence is detected within the allocated distance, the

sensor send the signal to the switch ON the light. Also when the sensor cannot detect

any motion within the allocated time which is 30 minutes, the switch will

automatically turn OFF.

(Figure 7)

The architecture of the proposed system is divided into three layers (Figure 7):

Sensor Layer, the Coordinator Layer and the Supervision Layer. At Sensor Layer,

each time the sensor detect any movement, it will automatically send the data to the

cloud based web service. The Sensor Layer consists of sensors that interact with the

environment. Every sensor was integrated with end device. For this project we will

use Arduino Uno as the sensor that will be equipped with a motion sensor. The End

Devices will form a Mesh network and send the information gathered by the sensors

Page 43: Smart Classroom using Arduino with Internet of Thing (IoT)

30

to the Coordinator Layer through the sink node called the base station. The base

station usually consists of Arduino Uno with GPS, Wi-Fi also Ethernet shield or other

suitable devices.

The Coordination Layer is responsible for the management of the data received

from the sensor network. It temporarily stores the gathered data into buffer and sends

it to the Supervision layer at predefined intervals. In this project, I will use Ethernet

Shield. The Arduino Ethernet Shield allows an Arduino Board to connect to the

internet, thus enables it to send data stored to the cloud server.

Finally, the Supervision Layer accommodates the base station with a Web server to

connect and publish the sensor data on the Internet. This layer stores the sensor data in

a database and also offers a Web interface for the end users to manage the sensor data

and generate statistics. For the Supervision Layer, we have used Open.sen.se HTTP

Service which provides a REST based API to publish and access the sensor data.

Thus, allowing existing networks to be connected into other applications with minimal

changes. Open.Sen.se offers a graphical interface for real-time monitoring of systems

using info graphic data streams and to retrieve the sensor values using device type and

timestamp. Alerts can also be automatically generated to notify the user each time if

the desired event has been sensed by the domain rules programmed in the base station.

Page 44: Smart Classroom using Arduino with Internet of Thing (IoT)

31

3.6 Summary

In conclusion, this chapter describe about the methodology for this project. Besides

that, the requirement of the software and hardware that needed for this project also has

been listed in this chapter.

Page 45: Smart Classroom using Arduino with Internet of Thing (IoT)

32

Gantt chart

month February March April May

task 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4

Final Year Project

Topic Discussion and Determination

Project Title Proposal

Proposal Writing - introduction

Proposal Writing - Literature Review

Preparation for FYP presentation and slide

Proposal Presentation 1

Proposal

Writing -Research

Methodology

Proposal

Writing -framework

Final

Preparation For proposal

presentation

Proposal

Presentation 2

Report

Submission

Page 46: Smart Classroom using Arduino with Internet of Thing (IoT)

33

REFERENCES

Piero Zappi, Elisabetta Farella, and Luca Benini, Fellow, Tracking Motion

Direction and Distance with Pyroelectric IR Sensors, VOL. 10, NO. 9,

SEPTEMBER 2010

Mr. Rahul Mishra, Dr. Shelej Khera, Mr. Manoj Kumar, Mr. Vikrant Verma,

Sensor Based Lighting Control System for Energy Efficient Building Environment

Using Real-Time Occupancy Measurements, Volume--9 •• Number--2 June --Dec

2017 pp.. 54—56

V. V. Murali Krishna* and T. Anuradha, An Energy Efficient Power Usage

Controlling and Monitoring using Wireless Sensor Network, Vol 9(17), DOI:

10.17485/ijst/2016/v9i17/93007, May 2016

Daniel Palma, Juan Enrique Agudo *, Héctor Sánchez and Miguel Macías Macías,

An Internet of Things Example: Classrooms Access Control over Near Field

Communication, 2014, 14

Rajeev Piyare1 and Seong Ro Lee, Towards Internet of Things(IoT) Integration

of Wireless Sensor Network to Cloud Service Data Collection and Sharing,

International Journal of Computer Networks & Communications (IJCNC) Vol.5,

No.5, September 2013