three dimensional model based camera positioning invariant vehicle ...

5 downloads 1122 Views 2MB Size Report
Sep 19, 1989 ... Block Diagram describing the approach of this project. 16. 3.2 ... Schematic diagram of the humidity sensor module. 22. 3.8 ... Proton Wira. 26.
i

PROTOTYPE OF GLOBAL POSITIONING SYSTEM DEVICE FOR VEHICLE TRACKING

LIM YI QIAO

UNIVERSITI TEKNOLOGI MALAYSIA

P S Zl 9 : 1 6 l P i n c j l / 0 7 1

TEKNOTOGIMATAYSIA UNIVERSITI PAPERAND COPYRIGHT PROJECT OF THESTS DECTARATTON / UNDERGRADUATE

Author'sfullnome

LIM YI QIAO

Dote of birth

1989 19SEPTEMBER

Title

PROTOTYPEOF GLOBAL POSITIONINGSYSTEM DEVICEFORVEHICLE TRACKING-

Annr{omicsaq(i^n'

201212013-2

os: declore thot thisthesisisclossified

E E E

CONFIDENTIAL

(Contoinsconfidentiolinformotionunder the OfficiolSecrel Act 19721*

RESTRICTED

(Contoinsresirictedinformolionos specifiedby the where reseorchwos done)* orgonisotion

OPEN ACCESS

I ogreethot my thesisto be publishedos onlineopen occess (fulltext)

I ocknowledgedthot UniversifiTeknologi Moloysioreservesthe rightds follows: l. Thethesisisthe propertyof UniversitiTeknologi Moloysio. 2. TheLibroryof Universiti TeknologiMoloysiohosthe rightto moke copiesfor the purpose of reseorchonly. 3. TheLibroryhos the rightto moke copiesof the lhesisfor ocodemic exchonge.

890919-07-5655 (NEWlC NO. /PASSPORT NO.)

Dote: l0JL]NE2013

DR. LIM CHENGSIONG NAMEOFSUPERVISOR Dote: l0 JUNE2013

"I herebydeclarethat I havereadthis thesisandin my opinionthis thesisio sufficientin termsof scopeandqualityfor thepurposeof awardingthe degrepof Bachelorof Engineering(Electrical-Mechatronics)"

Signature Name Date

......10. J.rlus .20.1 3

i

PROTOTYPE OF GLOBAL POSITIONING SYSTEM DEVICE FOR VEHICLE TRACKING

LIM YI QIAO

A thesis submitted in fulfillment of the requirements for the award of the degree of Bachelor of Engineering (Electrical-Mechatronics)

Faculty of Electrical Engineering Universiti Teknologi Malaysia

JUNE 2013

I declare this thesis entitled "Prototype of Global Positioning System Device fot Vehicle Tracking" is the result of my own work and developmentwith the exception of cited works in references.The thesis has not been acceptedfor any degreeand is not concurrently in candidatureof any other degree.

Signature Name Date

l0 June2013

iii

Dedicated to citizens of Malaysia

iv

ACKNOWLEDGEMENT

My deepest gratitude is indeed towards my final year project supervisor, Dr. Lim Cheng Siong who has been an aspiring figure in Final Year Project One and Final Year Project Two throughout two semesters.

I would like to express my appreciation for all friends and classmates who have aided me in my project, especially Yip Zheng Hou and Then Kit Sen who are my teammates of this project in the Innovate Malaysia Design Competition 2013.

Last but not least, huge thanks to my family who have always been by my side when I needed support.

v

ABSTRACT

High-efficiency delivery of emergency medical service can significantly reduce the mortality and disability rate. However, emergency medical service delivery in Malaysia is far behind compared with advanced countries. For example, the global positioning system together with computer aided dispatch system is applied in most advance countries‟ emergency medical service. Though the performance of emergency medical service can be further improved by manipulating ambulance fleet size, ambulance location model and dispatch policy, the current ambulance routing pattern must be first gathered and analyzes. From our literature review, none of the available global positioning system data logger is suitable for tracking ambulance routing pattern. Local weather and traffic conditions along the ambulance route must be recorded for emergency medical service performance analysis. Intel Atom Board is selected, acting as the main platform for all external devices and sensors. Arduino Board Mega 2560 is used in this project as a data acquisition board. Humidity and temperature sensors are to determine weather conditions while global positioning system module is to track the coordinates of the route taken. A high-definition camera is used to record the road happenings. A Liquid Crystal Display screen is used as a monitor. At the end of the project, a prototype of the advanced global positioning system device targeted for tracking ambulance routing pattern will be developed and tested. The outcome of the project is expected to be very useful for Ministry of Health in enhancing the quality of living for the citizens of Malaysia.

vi

ABSTRAK

Kecekapan yang tinggi bagi perkhidmatan perubatan kecemasan boleh mengurangkan kadar kematian dan kadar kecacatan. Walau bagaimanapun, perkhidmatan kecemasan perubatan di Malaysia agak jauh ketinggalan berbanding dengan negara-negara maju. Sebagai contoh, global positioning system dengan computer aided dispatch system digunakan dalam kebanyakan perkhidmatan kecemasan perubatan negara-negara maju. Walaupun prestasi perkhidmatan perubatan kecemasan boleh dipertingkatkan dengan memanipulasi saiz armada ambulans, lokasi modal ambulans dan polisi penghantaran, corak laluan ambulans perlu dikumpul dan dianalisi. Daripada kajian kesusasteraan kita, tiada global positioning system data logger adalah sesuai untuk mengesan corak laluan ambulans. Cuaca tempatan dan keadaan lalu lintas di sepanjang laluan ambulans mesti direkodkan untuk analisis prestasi perkhidmatan perubatan kecemasan. Intel Atom Board dipilih sebagai platform utama bagi semua peranti dan penderia. Arduino Board Mega 2560 digunakan dalam projek ini sebagai data acquisition board. Penderia kelembapan dan suhu adalah untuk menentukan keadaan cuaca manakala modul global positioning system adalah untuk mengesan koordinat laluan yang telah dijalani. Kamera definisi tinggi digunakan untuk merekod kejadian-kejadian jalan. Skrin Liquid Crystal Display digunakan sebagai monitor. Pada akhir projek ini, prototaip peranti global positioning system maju yang bertujuan untuk mengesan corak laluan ambulans akan dibina dan diuji. Hasil projek ini dijangka amat berguna untuk Kementerian Kesihatan dalam meningkatkan kualiti hidup rakyat Malaysia.

vii

TABLE OF CONTENTS

CHAPTER

TITLE

PAGE

DECLARATION

ii

DEDICATION

iii

ACKNOWLEDGEMENT

iv

ABSTRACT

v

ABSTRAK

vi

TABLE OF CONTENTS

vii

LIST OF TABLES

xi

LIST OF FIGURES

xii

LIST OF ABBREVATIONS

xv

viii

1

2

INTRODUCTION

1

1.1

Introduction

1

1.2

Problem Statement

2

1.3

Objectives of Research

3

1.4

Scopes of Research

3

1.5

Research Methodology

3

1.6

Thesis Outline

5

LITERATURE REVIEW

6

2.1

Introduction

6

2.2

Local Ambulance

6

2.3

Global Positioning System

7

2.4

NMEA Protocol

8

2.5

Examples of Related Project

10

2.5.1

Portable GPS Data Logger

10

2.5.2

GPS Data Logger with Wireless Trigger

2.5.3

Do It Yourself (DIY) Temperature and Humidity Wireless Data Logger

2.6

11

Summary

12 13

ix

3

SYSTEM DESIGN

15

3.1

Introduction

15

3.2

Project Overview

15

3.3

Hardware and Components

17

3.3.1

Intel Atom Processor E6xx Series

17

3.3.2

Arduino Board

18

3.3.3

Temperature Sensor – Waterproof

19

3.3.4

Humidity Sensor Module

22

3.3.5

GPS Module

23

3.3.6

Webcam

23

3.4

4

Summary

24

RESULT AND DISCUSSION

25

4.1

Introduction

25

4.2

Result

25

4.3

Discussion

30

4.4

Problem Encountered

31

4.5

Summary

31

x

5

REFERENCES

CONCLUSION AND FUTURE WORK

32

5.1

Introduction

32

5.2

Conclusion

32

5.3

Limitation

33

5.4

Direction for Future Work

33

34

xi

LIST OF TABLES

TABLE NO.

TITLE

PAGE

2.1

Summary of Related Projects

14

3.1

Temperature/Data Relationships

21

xii

LIST OF FIGURES

FIGURE NO. 1.1

TITLE Flow chart of the project that covers different stages from literature review until achieving objectives.

2.1

PAGE

4

A local ambulance in the Health Centre of Universiti Teknologi Malaysia (UTM) which Mr. Muhamad bin Jumaat currently drives.

2.2

7

GPS200 – NMEA 2000® GPS Antenna/Receiver with 32 channel GPS antenna and receiver capable of providing five position fixes/second and precision time once/second.

9

2.3

Portable GPS Data Logger for car tracing.

10

2.4

GPS Data Logger with wireless triggering capabilities.

11

2.5

DIY Temperature and Humidity Wireless Data Logger designed to monitor moisture condition at home.

13

3.1

Block Diagram describing the approach of this project.

16

3.2

Intel® Atom™ Innovation Kit 3 which is the main platform of this project.

3.3

17

Arduino Mega 2560 which is the data acquisition board in this project.

19

xiii

3.4

DS18B20 waterproof-temperature sensor is placed outside the vehicle to measure the temperature.

19

3.5

Pin assignment and description of the DS18B20.

20

3.6

Humidity Sensor Module pre-mounted with HR202 for obtaining the relative humidity.

22

3.7

Schematic diagram of the humidity sensor module.

22

3.8

The SkyNav SKM53 GPS module with accuracy of three meters in position.

3.9

23

Logitech HD Pro Webcam C920 with Logitech Fluid CrystalTM Technology that provides full HD 1080p video recording.

4.1

Placement of devices and sensors for data collection via Proton Wira.

4.2

26

Serial monitor of Arduino IDE showing data from GPS module, temperature & humidity sensors.

4.4

26

Snapshot of video recorded showing both smooth and heavy traffic.

4.3

24

27

Screenshot (a) shows the main GUI where Record button was clicked. Screenshot (b) shows two files which are a video file (.ts) and a text file (.txt) were created after Record button was clicked.

28

xiv

4.5

Screenshot (a) shows the main GUI where Stop button was clicked. Screenshot (b) shows the two generated files after Stop button was clicked.

4.6

28

log[Fri May 17 19:35:34 MYT 2013].txt loaded in GUI. Route starts from Nusa Idaman‟s residential area towards Sutera‟s shop lots, sunny day weather recorded along the route.

4.7

29

log[Tue May 21 17:53:31 MYT 2013].txt loaded in GUI. Route starts from UTM Stadium towards arked Kolej Tuanku Canselor (KTC), rainy day weather recorded along the route.

4.8

29

Serial port in Arduino IDE was disabled due to the user was not included in the tty and dialout groups.

31

xv

LIST OF ABBREVIATIONS

2D

-

Two Dimensional

3D

-

Three Dimensional

AC

-

Alternating current

ACPI

-

Advance Configuration and Power Interface

ASCII

-

American Standard Code for Information Interchange

BLS

-

Basic Life Support

CAD

-

Computer aided dispatch

CAN

-

Controller Area Network

CPU

-

Central Processing Unit

DC

-

Direct current

DOD

-

Department of Defence

DIY

-

Do it yourself

EMS

-

Emergency medical service

GPIO

-

General purpose input/output

GPRS

-

General Packet Radio Service

GPS

-

Global positioning system

xvi

GUI

-

Graphical user interface

HD

-

High definition

IA

-

Intel Architecture

ICSP

-

In-circuit serial programming

IDE

-

Integrated development environment

IP

-

Internet Protocol

LCD

-

Liquid Crystal Display

LPC

-

Low Pin Count

LVDS

-

Low-voltage differential signaling

NMEA

-

National Marine Electronics Association

OS

-

Operating system

OSM

-

OpenStreetMap

PCIe

-

Peripheral Component Interconnect Express

PWM

-

Pulse Width Modulation

PPS

-

Precise Positioning Service

RF

-

Radio Frequency

RTC

-

Real-time clock

SD

-

Secure Digital

SDVO

-

Serial Digital Video Out

SELinux

-

Security-Enhanced Linux

SMBUS

-

System Management Bus

xvii

SOC

-

System on a chip

SPI

-

Serial Peripheral Interface Bus

SPS

-

Standard Positioning Service

SSD

-

Solid-state drive

UART

-

Universal Asynchronous Receiver-Transmitter

USB

-

Universal Serial Bus

VGA

-

Video Graphics Array

1

CHAPTER 1

INTRODUCTION

1.1

Introduction

High-efficiency delivery of emergency medical service (EMS) can significantly reduce the mortality and disability rate. However, EMS delivery in Malaysia is far behind compared with advanced countries. Generally, hospitals managed by Ministry of Health are the main EMS providers in Malaysia. Besides, Ministry of Education, Civil Defense, and non-governmental organizations such as Red Crescent and St. John‟s Ambulance also provide EMS to Malaysian public [1]. However, there are no uniform medical control, communication systems, system management and quality assurance policies among the EMS providers [2]. The specialty of emergency medicine and emergency health care has been gradually accepted by the health care system in Malaysia. Emergency medicine of Malaysia is now transforming into the category of developing emergency care system. The EMS uses Basic Life Support (BLS) ambulances instead of private cars or taxis to transport the seriously ill or injured patients to hospitals. Existing emergency medicine is still far away from being categorized into the category of mature emergency care system as one of the conditions states the requirement to have paramedic ambulances [3]. Lim et al. [4] have identified that by manipulating ambulance fleet size, ambulance location model and dispatch policy, the

2 performance of EMS can be further improved. Prior to the application of the proposed method, current ambulance routing pattern must be first gathered and analyzed. From our literature review, none of the available global positioning system (GPS) data logger is suitable for tracking ambulance routing pattern. Local weather and traffic conditions along the ambulance route must be recorded for EMS performance analysis.

1.2

Problem Statement

This project is motivated by the current background of EMS in Malaysia which is far behind compared with advanced countries. The advanced GPS data loggers are equipped with powerful capability to capture and store video. This feature is very useful for analyzing ambulance performance to identify the main cause of the delay such as the problem of heavy traffic condition or unethical obstruction by road users. However, the available advanced GPS data loggers are unable to record local weather condition such as humidity and temperature. Note that the phrase „local weather‟ is referring to the weather condition at the surrounding area of the ambulance along the way en routing to call scene or hospital. The information is also important in analyzing ambulance performance as there is difference between rainy and sunny days. The data of weather condition, neither past nor forecasted, from the authority is less useful in this application as it covers a much bigger area like a city or state. The focus of this project is to identify the inevitable need of GPS navigation system to be applied in all Malaysia‟s ambulances through obtaining information using the prototype of GPS device for vehicle tracking.

3 1.3

Objectives of Research

The objectives of this research are defined as following: (i)

To design and develop GPS data logger targeted for tracking ambulance routing pattern;

(ii)

To provide evidence on how the performance and outcome of ambulance can be hinder.

1.4

Scopes of Research

The scope of the project is limited to develop an advanced GPS data logger that can record the local weather and traffic conditions. A graphical user interface (GUI) is developed to load the collected data. A car resembling an ambulance will be used in the live test. The collected data will not be further analyzed in this project. Nevertheless, the collected data has the value of providing evidence on how the performance and the outcome of ambulance can be hindered due to varying road conditions such as heavy traffic, heavy rain and mist, etc.

1.5

Research Methodology

Figure 1.1 describes the research methodology. It shows the process of designing and building a system to acquire important statistics regarding ambulance‟s performance on route.

4 From literature review, massive improvement is identified for EMS delivery in Malaysia. System development of the prototype of GPS tracking device considers all the hardware used to develop an advanced GPS data logger. Data acquisition was done through live test in a car.

Figure 1.1: Flow chart of the project that covers different stages from literature review until achieving objectives.

5 1.6

Thesis Outline

The rest of this thesis is arranged in four chapters. In Chapter 2, local ambulance, GPS, NMEA protocol, and related projects are elaborated. The related projects include Portable GPS Data Logger, GPS Data Logger with Wireless Trigger, and Do It Yourself (DIY) Temperature and Humidity Wireless Data Logger. Chapter 3 describes the project‟s approach and all its hardware. The Intel Atom Board is connected with the Arduino board and the Logitech high-definition (HD) webcam. Internet access must be available to the Intel Atom Board. The GPS module, temperature sensor, and humidity sensor module are connected to the Arduino board.

Chapter 4 presents the data collected by the developed GPS device for vehicle tracking. A GUI is created to load the collected data into the map for further analyzing.

The last chapter covers on the conclusion of this thesis, limitations and possible future work recommended for further improvements.

6

CHAPTER 2

LITERATURE REVIEW

2.1

Introduction

This chapter elaborates on local ambulance, GPS, NMEA protocol, and related projects. All these literature reviews contribute greatly towards both foundation and development of this project.

2.2

Local Ambulance

A short interview has been done with Mr. Muhamad bin Jumaat, an ambulance driver with 27 years of experience. Figure 2.1 shows the ambulance he currently in charge of. According to him, the needs for emergencies are most important. In which I interpret as device that can receives information regarding cases of emergencies such as walkie-talkie which are

currently use in most

ambulances, though it is not the best communication device as it is more time consuming. Other than that, he agrees that bad weather and traffic congestions are

7 common yet important factors that will slow down ambulance on the road. He also mentioned that there are lives lost in cases that have longer journey. Asked if a combined system of both GPS navigation system and computer aided dispatch (CAD) system would improve the overall performance of ambulance, Mr. Muhamad bin Jumaat said it will probably aid the drivers in performing their duties.

Figure 2.1: A local ambulance in the Health Centre of Universiti Teknologi Malaysia (UTM) which Mr. Muhamad bin Jumaat currently drives.

2.3

Global Positioning System

GPS is a space-based satellite navigation system that is funded and controlled by the U.S. Department of Defence (DOD) [5]. The system was originally designed for military purposes and is now freely accessible to all civil users in the world. The nominal GPS Operational Constellation consists of 24 satellites that orbit the earth in

8 24 hours. As new GPS satellites are being launched from time to time, there are now around 5 to 8 GPS satellites visible from any point on the earth at all times. Each GPS satellite has atomic clocks on board as its operations are dependent on precise time reference, which is provided by atomic clocks at the U.S. Naval Observatory.

There are 2 services specified in the federal radio navigation plan which are The PPS (Precise Positioning Service) and SPS (Standard Positioning Service). The PPS is reserved for authorised users with cryptographic equipment and specially equipped receivers for instance, the U.S and Allied military. The SPS is made available for civil users worldwide without any charges or restrictions but with degraded accuracy.

GPS receivers passively receive satellites signals, in other words they do not transmit. Outdoor use is highly preferable as they require an unobstructed view of the sky. Triangulation is the method used to indicate the GPS receivers‟ location by calculating the time needed for each signal to travel from the satellite to the receivers. Four satellites are required to compute the four dimensions of X, Y, Z (position) and time while five or more satellites can provide extra position fix certainty to detect out-of-tolerance signals under certain circumstances [5].

2.4

NMEA Protocol

The National Marine Electronics Association (NMEA) has developed a specification that defines the interface between various pieces of marine electronic equipment such as GPS receiver. There is a standard as to send a line of data called a sentence that is absolutely self-contained and independent from other sentences. All of the standard sentences have a two letter prefix that defines the device that uses that sentences type. For example, GP is the prefix for GPS receivers. It is then followed by a three sequence that defines the sentence contents.

9 Each sentence begins with a „$‟ and ends with a carriage return/line feed sequence which is limit to 80 characters of visible text. The data is contained within this single line with data items separated by commas. It uses American Standard Code for Information Interchange (ASCII) text and may extend over multiple sentences. There is a provision for a checksum at the end of each sentences that consists of a „*‟ and two hex digits representing an 8 bit exclusive OR of all characters between, excluding the „$‟ and „*‟.

NMEA 2000® Standard is the latest protocol used to create a network of electronic devices including GPS receivers. It contains the requirements of a serial data communications network and describes a low-cost moderate capacity bidirectional, multi-transmitter/multi-receiver instrument network. Besides, it connects devices using Controller Area Network (CAN) technology and it is based on the SAE J1939 high-level protocol, yet defines its own messages. NMEA 2000® uses a compact binary message format which differs from the ASCII serial communications protocol used by the NMEA 0183. It contains a significantly higher data rate of 250k bits/second compared to 4800 bits/second for NMEA 0183. It also supports a disciplined multiple-talker and multiple listener data network [6].

Figure 2.2 shows the state-of-the-art 32 channel GPS antenna and receiver capable of providing five position fixes/second and precision time once/second. It automatically decodes GPS correction signals in order to provide stunningly better than 2.5m accuracy.

Figure 2.2: GPS200 – NMEA 2000® GPS Antenna/Receiver with 32 channel GPS antenna and receiver capable of providing five position fixes/second and precision time once/second.

10 2.5

Examples of Related Project

The following is a list of related projects gathered from reliable online sources. The three projects showed the incompetent of the available devices for tracking ambulance routing pattern.

2.5.1

Portable GPS Data Logger

This GPS Data Logger was originally meant for car tracing. The GPS receiver has an excellent accuracy even without Differential Global Positioning System (DGPS) as an intentional offset added by US government has been removed. However that GPS logger was re-designed into a portable one for human tracing purpose. It has acceptable accuracy to trace the movement of walk [7]. Figure 2.3 shows a picture of the portable GPS data logger.

Figure 2.3: Portable GPS Data Logger for car tracing.

Portable equipment requires important features such as sustainable battery life and small in size. To achieve required operating time, the energy density of the battery should be as high as possible. The Li-Ion battery is suitable for such purpose,

11 and also its high output voltage eliminates the step-up alternating current (AC) – direct current (DC) converter that affects receivers‟ sensitivity. An AAA size 3.6V/500mAh Li-Ion cell is chosen as it provides high power flashlight. The GPS receiver‟s antenna must be installed at a place where it is exposed to the sky in order to receive better navigation signals [7].

2.5.2

GPS Data Logger with Wireless Trigger

This project‟s goal is to create a portable GPS data logger that could be wireless triggered by an external device, such as a camera. At the same time, it records GPS information as a mean of geotagging which is the process of adding location information to the metadata of digital photographs. Web sites such as Flickr depend on this information to display such photos on an interactive map. The hardware for this project comprised of ATmega644 prototype board which is to interface with a Navman Jupiter12 GPS receiver, a Secure Digital (SD) card and socket, a Liquid Crystal Display (LCD), a Radiotronix RCT-433 Transmitter, a Radiotronix RCR-433 Receiver and lastly a camera [8]. Figure 2.4 shows a picture of the project.

Figure 2.4: GPS Data Logger with wireless triggering capabilities.

12 This device operates in two modes; the first is to record GPS position information at timed intervals while the second is to record GPS position information only when triggered manually over an external device. GPicSync is the software used to correlate picture and position data. It takes a NMEA log file and determines the location of each picture by using the GPS location that is closest to the particular picture.

The performance of the GPS receiver was poor due to an external antenna required to obtain signal. It is advised to use a GPS module with a built-in antenna. Besides, the implementation of the wireless trigger was very sensitive to false positives from noise as only the amplitude of the signal is taken into account rather than any specific data sequence.

2.5.3

Do It Yourself (DIY) Temperature and Humidity Wireless Data Logger

This is a simple project designed to monitor the temperature and humidity in a house. Highly moisture condition is a major factor for mold growing in your home which can be hazardous in some cases. Besides, comfort at home is affected by both high and low temperature and humidity especially during season changes. This temperature and humidity sensor reports its readings every minute to a central Linux server [9]. Figure 2.5 shows a picture of the project.

13

Figure 2.5: DIY Temperature and Humidity Wireless Data Logger designed to monitor moisture condition at home.

In this project, the sensors were expected to sustain for 3 months using a 9V battery; instead none of them live up to expectation as only one of them lasted for a month, while the others lasted for a week. It can be deduced that battery-operated devices are challenging to design. XBee wireless radio frequency (RF) module indoor range is not excellent. The SHT11 temperature and humidity sensor performs well in terms of accuracy and ease of use despite its higher than moderate price. The RHT03 humidity and temperature sensor is an alternative recommended. It is advised to use a pull-up resistor on the DATA wire for the SHT11 two-wire interface [9].

2.6

Summary

The research completed in this chapter contributes greatly in the development of the prototype of GPS device for vehicle tracking. All related projects are summarized in Table 2.2.

14 Table 2.1: Summary of Related Projects Project Portable GPS Data Logger [7]

Description  Objective: To trace the movement of walk.  Features: 1. Excellent accuracy without DGPS 2. Small size 3. Long battery life 4. High output voltage  Objective: To create GPS logger that could be

GPS Data Logger with Wireless Trigger [8]

wireless triggered by an external device.  Features: 1. Log GPS information at a time interval. 2. Log GPS information when an external switch is being triggered on. 3. Universal Serial Bus (USB) port of a camera is modified to generate a pulse when the transmitter is activated. 4. Data are stored in a memory card for further analysis.  Objectives: To monitor and control relative

DIY Temperature and Humidity Wireless Data Logger [9]

humidity.  Features: 1. Store set of data every minute. 2. The sensors work easily. 3. Readings are fairly accurate.

15

CHAPTER 3

SYSTEM DESIGN

3.1

Introduction

The construction and configuration of this project for the development of the prototype GPS device for vehicle tracking are presented in this chapter. All hardware used in this project are explained in detail.

3.2

Project Overview

Intel Atom Board is selected, acting as a platform for all external devices and sensors. Multiple USB ports provide the opportunity to connect multiple devices for different features. It also comes with Video Graphics Array (VGA) port which provides the connectivity to the LCD screen. Besides, the Intel Atom Board‟s power management using Advance Configuration and Power Interface (ACPI) provides low power consumption for mobility application. Arduino board is used as data acquisition board for GPS module, temperature sensor and humidity sensor.

16 Humidity and temperature sensors are to determine weather conditions while GPS module is to track the coordinates of the route taken. A HD camera is to observe the road happenings ahead of the vehicle. A LCD screen is used as the monitor for the main platform. Figure 3.1 is the block diagram describing all hardware and components used in this project and its connection.

Figure 3.1: Block Diagram describing the approach of this project.

17 3.3

Hardware and Components

The devices and components applied in this project are listed as follow. The design is based on the Intel® Atom™ Innovation Kit 3 provided by Dreamcatcher for the Innovate Malaysia Design Competition 2013. All the external devices and components are to be fully compatible with the Intel Atom Board.

3.3.1

Intel Atom Processor E6xx Series

This project will be based on Intel Atom Board operating in Linux. It acts as the central processing unit of the system and also as a platform for all external devices such as the Arduino board, a camera and a LCD monitor. Figure 3.2 shows a picture of the Intel Atom Board.

Figure 3.2: Intel® Atom™ Innovation Kit 3 which is the main platform of this project.

18 The Intel® Atom™ Processor E6xx is a new embedded System on a Chip (SoC), with the idea that it can serve as a high performance, ultra-low power and low cost single chip processor for applications such as deeply embedded Internet Protocol (IP) media, networking, digital signage, and industrial control. It consists of a single low power Intel Architecture (IA) central processing unit (CPU) core, memory controller, three-dimensional (3D) graphics, video decode and video encode engine, two-dimensional (2D) display controller, Serial Digital Video Out (SDVO) and lowvoltage differential signaling (LVDS) interfaces, Intel® High Definition Audio Controller, general purpose input/output (GPIOs) , System Management Bus (SMBUS), Serial Peripheral Interface Bus (SPI) interface connectivity to SPI flash, Low Pin Count (LPC), Peripheral Component Interconnect Express (PCIe) controller, real-time clock (RTC), 8254 timer and watchdog timer. Different subsystems require different supply voltages and draw different amount of currents. While in operation mode, the power consumption of the device is the highest thus power management should be designed as economically as possible. While on standby mode, the power consumption of the device should be reduced to the absolute minimum. Transition from standby to operation mode must be achieved as smoothly as possible, with no voltage or current spikes that could disrupt the operation of the device.

3.3.2

Arduino Board

Based on the ATmega2560 datasheet, the microcontroller Arduino Mega 2560 has 54 digital input/output pins including 14 PWM inputs, 16 analog inputs, 4 UARTs (hardware serial ports), a 16Mhz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. Figure 3.3 shows the Arduino board with all its pins allocations and embedded components.

19

Figure 3.3: Arduino Mega 2560 which is the data acquisition board in this project.

This microcontroller is used in this project ahead of other simpler microcontrollers as it is available to borrow from a friend. It played an important role in this project as a data acquisition board. It then acts as an intermediate to transfer all data to the main platform.

3.3.3

Temperature Sensor – Waterproof

DS18B20 is a 1-Wire interface digital thermometer that requires one port pin (and ground) for communication. It has a unique 64-bit serial code stored in an onboard ROM, can measure temperatures from -55C to +125 C (-67F to +257F), and user-selectable resolution from 9 to 12 bits. Figure 3.4 shows a picture of the DS18B20 that is used in this project.

Figure 3.4: DS18B20 waterproof-temperature sensor for measuring the temperature.

20 The direct-to-digital temperature sensor is C core function. The resolution is configurable among 9, 10, 11, or 12 bits, which equates to a temperature resolution of 0.5°C, 0.25°C, 0.125°C, or 0.0625°C. Following the issuance of the Convert T [44h] command, a temperature conversion is performed and the thermal data is stored in the scratchpad memory in a 16-bit, sign-extended two‟s complement format. Once the conversion has been executed, the temperature information can be retrieved over the 1-Wire interface by issuing a Read Scratchpad [BEh] command. Least Significant Bit (LSB) is first transferred followed by Most Significant Bit (MSB). The „sign‟ (S) bit of the MSB denotes whether the temperature is positive or negative. Figure 3.5 shows the pin assignment and description of the DS18B20.

Figure 3.5: Pin assignment and description of the DS18B20.

Table 3.1 describes the relationship of output data to measured temperature. For a lower resolution configuration of the DS18B20, insignificant bits will contain zeros. The table assumes a 12-bit resolution.

21 Table 3.1: Temperature and Data Relationships TEMPERATURE

DIGITAL OUTPUT

DIGITAL OUTPUT

(Binary)

(Hex)

+ 125°C

0000 0111 1101 0000

07D0h

+ 85°C

0000 0101 0101 0000

0550h*

+ 25.0625°C

0000 0001 1001 0001

0191h

+ 10.125°C

0000 0000 1010 0010

00A2h

+ 0.5°C

0000 0000 0000 1000

0008h

+ 0°C

0000 0000 0000 0000

000h

- 0.5°C

1111 1111 1111 1000

FFF8h

- 10.125°C

1111 1111 0101 1110

FF5Eh

- 25.0625°C

1111 1110 0110 1111

FF6Fh

- 55°C

1111 1100 1001 0000

FC90h

* The power on reset register value is + 85°C

22 3.3.4

Humidity Sensor Module

This humidity sensor module is pre-mounted with HR202 humidity sensor. Figure 3.6 shows the humidity sensor module. It can operate in 3.3V to 5VDC. It comes with basic components and it can start measuring humidity by just supplying power to it. It is a humidity sensitive resistor made from organic macromolecule materials.

Figure 3.6: Humidity Sensor Module pre-mounted with HR202 for obtaining the relative humidity.

HR202 humidity sensor can be used in hospitals, storage room, workshop, production floor, toilet, garden and laboratory. Besides the basic operation, the module also has additional voltage comparator circuit which offer adjustable threshold level for humidity sensor to trigger and becomes a digital output. Figure 3.7 shows its schematic diagram.

Figure 3.7: Schematic diagram of the humidity sensor module.

23 3.3.5

GPS Module

The SkyNav SKM53 GPS module comes with an embedded GPS antenna which is based on the high performance features of the MediaTek 3329 single-chip architecture. It contains ultra-high sensitivity of -165dBm and 22 tracking/66 acquisition-channel receivers which enables it to extend positioning coverage into urban areas. Figure 3.8 shows the GPS module with its pins assignment and labels.

Figure 3.8: The SkyNav SKM53 GPS module with accuracy of three meters in position.

3.3.6

Webcam

The Logitech HD Pro Webcam C920 with Logitech Fluid CrystalTM Technology provides full HD 1080p video recording (up to 1920 x 1080 pixels). It uses Carl Zeiss® lens with 20-step autofocus and contains built-in dual stereo microphones with automatic noise reduction. It uses Hi-Speed USB 2.0 certified (USB 3.0 ready). Additional features including tripod-ready universal clip fits laptops or LCD and automatic low-light correction. Figure 3.9 shows a picture of the Logitech webcam.

24

Figure 3.9: Logitech HD Pro Webcam C920 with Logitech Fluid CrystalTM Technology that provides full HD 1080p video recording.

3.4

Summary

This project‟s approach and all its hardware are discussed in this chapter. The Intel Atom Board is connected with the Arduino board and the Logitech HD webcam. Internet access must be available to the Intel Atom Board. The GPS module, temperature sensor, and humidity sensor module are connected to the Arduino board.

25

CHAPTER 4

RESULT AND DISCUSSION

4.1

Introduction

The intention of this project is to gather information regarding possible issues encounter by an ambulance on the road. Data are collected using GPS module, temperature and humidity sensors, and a HD camera.

4.2

Results

Figure 4.1 shows the placement of GPS module with the Arduino board inside the vehicle and both sensors outside the vehicle. A Proton Wira is used for data collection. Figure 4.2 shows snapshot of video recorded showing smooth traffic in which ambulance may travel in full speed and heavy traffic in which ambulance would travel slower.

26

Figure 4.1: Placement of devices and sensors for data collection via Proton Wira.

Figure 4.2: Snapshot of video recorded showing both smooth and heavy traffic.

Figure 4.3 shows serial monitor of Arduino integrated development environment (IDE) showing data collected from GPS module, temperature & humidity sensors. It displays the latitude, longitude, temperature in degree celcius and relative humidity in percentage.

27

Figure 4.3: Serial monitor of Arduino IDE showing data collected from GPS module, temperature & humidity sensors.

The project's GUI is created using java language in Netbeans IDE. The Arduino board is connected via USB port to send its data to the main platform and process with Netbeans IDE. Figures 4.4 and 4.5 showing the main GUI where OpenStreetMap (OSM) is display on the left, location and weather information on the top right, three buttons which are File, Record and Stop on the bottom right, and lastly a scroll bar on the bottom. Two files are created after clicking the Record button and generated after clicking the Stop button.

28

(a)

(b)

Figure 4.4: Screenshot (a) shows the main GUI where Record button was clicked. Screenshot (b) shows two files which are a video file (.ts) and a text file (.txt) were created after Record button was clicked.

(a)

(b)

Figure 4.5: Screenshot (a) shows the main GUI where Stop button was clicked. Screenshot (b) shows the two generated files after Stop button was clicked.

29 Figures 4.6 and 4.7 shows after text file was loaded, a blue path would be painted indicating the route taken, and a red dot showing the current location according to the scroll bar position which is from the start point (left) to the end point (right).

Figure 4.6: log[Fri May 17 19:35:34 MYT 2013].txt loaded in GUI. Route starts from Nusa Idaman‟s residential area towards Sutera‟s shop lots, sunny day weather recorded along the route.

Figure 4.7: log[Tue May 21 17:53:31 MYT 2013].txt loaded in GUI. Route starts from UTM Stadium towards arked Kolej Tuanku Canselor (KTC), rainy day weather recorded along the route.

30 4.3

Discussion

Linux is used in this project as the operating system (OS) for the main platform. Programming for the Arduino board was done using C++ language in Arduino 1.0.4 IDE while programming for the GUI was done using java language in Netbeans 7.3 IDE. The free wiki world map, OSM is used to display the world map in GUI.

The GUI enables the user to analyse the data using the scroll bar. As it scrolls along from left to right, the program would read the text file and display its latitude and longitude data, convert the temperature and relative humidity data into weather information before displays it, and move the red dot to show its exact location in the map.

The user is able to analyse the performance of an ambulance on a particular route using the recorded traffic conditions and weather information along the whole journey. For example, if a patient was delivered late to the hospital, the root of cause can be determined using the recorded data. The user can then analyse if the ambulance‟s driver was aided with GPS navigation system together with CAD system, the patient might be able to be delivered sooner to the hospital using another route.

31 4.4

Problem Encountered

i.

Linux installed in the Intel Atom platform is Fedora which is different with most of the available sources online. Therefore, more research and work have to be done to get the desired results to be in compatible with the board. Figure 4.8 shows the problem where serial port in Arduino IDE was disabled. The matter was solved by following the guide in Arduino forum website. The user must be added to both the tty group and dialout group.

Figure 4.8: Serial port in Arduino IDE was disabled due to the user was not included in the tty and dialout groups.

ii.

Fedora in Intel Atom Board disabled the use of webcam video capturing by default. In order to run the video capturing program, Security-Enhanced Linux (SELinux) needs to run in permissive mode. Hence, the command “setenforce permissive” needs to be entered in terminal after log in as root user.

4.5

Summary

A GPS device for vehicle tracking is successfully developed. A GUI is created to load the collected data into the map for further analytics. All required data were collected for further analytics by the Ministry of Health.

32

CHAPTER 5

CONCLUSION AND FUTURE WORK

5.1

Introduction

This chapter covers on the conclusion of this thesis, limitations and possible future work recommended for further improvements.

5.2

Conclusion

This project had been successfully completed with all the objectives achieved. A prototype of GPS device for vehicle tracking had been designed and developed. Required data to measure the performance of ambulance had been collected.

33 This tracking device can be continually applied in ambulances even after the GPS navigation system and CAD system had been introduced. It provides evidence for unforeseen circumstances such as accidents and poor weather. Besides, road users who does not cooperate and refuse to make way for ambulances would be recorded and can be made proof for the police to take legal actions.

This tracking device is also suitable for other application in tracking company‟s vehicle to avoid misuse. Logistic company needs to utilise this tracking device to ensure its delivery of goods in time.

5.3

Limitation

Humidity sensor which is place outside the vehicle might encounter problems during heavy rain. Video recorded during night time is not the best as it might not be clear at times.

5.4

Direction for Future Work

A waterproof-humidity sensor can replace the current one to overcome the limitations during heavy rain. A night vision camera which can provide clearer images during night can be considered.

Images with time stamp can be captured and display at GUI together with its GPS data and weather information. It can provide better analysis as the user can observe the surroundings at a particular time.

34

REFERENCES

[1]

Hameed, S. A., Miho, V., Khateed, W. A. and Hassan, A.. Medical Emergency and Healthcare Model: Enhancemet with SMS and MMS Facilities. International Conference on Computer and Communication Engineering (ICCCE 2010). May 11-13, 2010. Kuala Lumpur, Malaysia: ICCCE. 2010.

[2]

Hisamuddin, N. A. R. N., Hamzah, M. S. and Holliman, C. J.. Prehospital Emergency Medical Services in Malaysia. The Journal of Emergency Medicine. 2007. 32(4): 415–421.

[3]

Hauswald, M. and Yeoh, E.. Designing a Prehospital System for a Developing Country: Estimated Cost and Benefits. American Journal of Emergency Medicine. 1997. 15(6): 600-603.

[4]

Lim, C. S., Mamat, R. and Bräunl, T.. Impact of Ambulance Dispatch Policies on Performance of Emergency Medical Services. IEEE Transactions on Intelligent Transportation Systems. 2011. 12(2): 624-632.

[5]

Global Positioning System Overview. Retrieved on December 28, 2012, from http://www.colorado.edu/geography/gcraft/notes/gps/gps_f.html

[6]

NMEA 2000® Standard. Retrieved on December 28, 2012, from http://www.nmea.org/content/nmea_standards/nmea_2000_ed2_20.asp

35 [7]

Portable GPS Data Logger. Retrieved on December 17, 2012, from http://elm-chan.org/works/glg2/report_e.html

[8]

GPS Data Logger with Wireless Trigger. Retrieved on December 18, 2012, from http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2009/ jsm66_mpk28/jsm66_mpk28/index.html

[9]

DIY Temperature and Humidity Wireless Data Logger. Retrieved on December 19, 2012, from http://blog.famzah.net/2011/12/26/diy-temperatureand-humidity-wireless-data-logger/

Suggest Documents