14
Technical internship Global Positioning System 1 Global Positioning System GPS module Receive and Application Member of group: Ha Hoang-Viet Manh Nguyen-Tien Nhat Thai-Xuan-Hong Quy Vo-Mai-Duy HCMUT, Faculty of Electrical and Electronics Engineering Department of Automatic Control June 10, 2012 Abstract This report present the overview of Global Positioning System (GPS) and how to find out the location using Sim908 module and save it by SD-card module. We develop applications include: positioning, data acquisition, distance measurement and Graphical User Interface (GUI) with more exact measurement. Keywords: Sim908, LM3s3749, GUI, measurement

Technical Internship - GPS - SIM908

Embed Size (px)

Citation preview

Technical internship Global Positioning System

1

Global Positioning System

GPS module Receive and Application

Member of group: Ha Hoang-Viet

Manh Nguyen-Tien

Nhat Thai-Xuan-Hong

Quy Vo-Mai-Duy

HCMUT, Faculty of Electrical and Electronics Engineering

Department of Automatic Control

June 10, 2012

Abstract

This report present the overview of Global Positioning System (GPS) and how to find

out the location using Sim908 module and save it by SD-card module. We develop

applications include: positioning, data acquisition, distance measurement and

Graphical User Interface (GUI) with more exact measurement.

Keywords: Sim908, LM3s3749, GUI, measurement

Technical internship Global Positioning System

2

Contents

1. Introduction .............................................................................................. 3

1.1 Sim908 module ........................................................................................... 3

1.2 SD-Card module .......................................................................................... 7

1.3 Micro-Controller Lm3s3749 ....................................................................... 7

2. Experimental ............................................................................................ 8

2.1 Algorithm Description ................................................................................ 8

2.2 Development Board..................................................................................... 10

3. Results ...................................................................................................... 13

4. Conclusion ............................................................................................... 14

List of Figures 1. SIM 908 Diagram ........................................................................................ 4

2. Reference circuit of the 8-pin SIM Card holder ......................................... 6

3. CPU Block Diagram ................................................................................... 7

4. Algorithm Description 1 ............................................................................. 8

5. Algorithm Description 2 ............................................................................. 9

6. SD Card Module .......................................................................................... 10

7. PL 2303 ....................................................................................................... 10

8. J-tag Debug Ports ........................................................................................ 10

9. IO of LM3s3749 .......................................................................................... 10

10. Main CPU LM3s3749 ................................................................................. 11

11. Power Supply circuit ................................................................................... 12

12. SIM Card circuit .......................................................................................... 12

13. Serial Ports circuit ....................................................................................... 12

14. The way we went in the map ....................................................................... 13

15. The way shown in Google map ................................................................... 13

List of Tables 1. Pin Description ............................................................................................ 5

2. AT Commands for GPS function ................................................................ 6

3. Pin Description of SIM Card ...................................................................... 7

Technical internship Global Positioning System

3

1. Introduction

The Global Positioning System (GPS) is a space-based global navigation satellite system

(GNSS) that provides location and time information in all weather, any-where on or near the Earth,

where there is an unobstructed line of sight to four or more GPS satellites. It is maintained by the

United States government and is freely accessible by anyone with a GPS receiver. In addition to

GPS, other systems are in use or under development. The Russian Global Navigation Satellite

System (GLONASS) was in use by only the Russian military, until it was made fully available to

civilians in 2007. There are also the planned Chinese Compass navigation system and the European

Union's Galileo positioning system.

The current GPS consists of three major segments. These are the space segment (SS), a

control segment (CS), and a user segment (U.S). The U.S. Air Force develops, maintains, and

operates the space and control segments. GPS satellites broadcast signals from space, and each GPS

receiver uses these signals to calculate its three-dimensional location: latitude, longitude, and altitude

and the current time. The U.S. Government controls the export of some civilian receivers. All GPS

receivers capable of functioning above 18 kilometers altitude and 515 meters per second are classed

as munitions (weapons) for which U.S. State Department export licenses are required. These limits

attempt to prevent use of a receiver in a ballistic missile. Specially, they would not prevent use in a

cruise missile because their altitudes and speeds are similar to those of ordinary aircraft.

Nowadays, GPS becomes the most popular system for positioning applications. It is used for

tracking, mapping, navigation, measurement include military applications, civilian use. This report

focuses on the way using Sim908 and LM3s3749 to find out position, assemble data and then draw

them on Google Earth.

1.1 Sim908 Module

SIM 908 offers this information as a service to its customer, to support application and

engineering efforts that use to the products design by SIM 908. The information provided is based

upon requirements specifically provided to SIM 908 by customers. SIM 908 has not undertaken any

independent search for additional relevant information, including any information that may be in the

customer possession. Furthermore, system validation of this product designed by SIM 908 within a

larger electronics system remains the responsibility of the customer of customer’s system integrator.

All specification supplied here in are subject to change.

Technical internship Global Positioning System

4

- Pin out diagram

Fig 1: Sim908 diagram

Technical internship Global Positioning System

5

- Pin description

Table 1: Pin Description

There are a lot of modes in this module, but we only focus on GPS mode.

GPS Application Interface

o Sim908 provide high-performance L1 GPS solution for cellular handset application. The

solution offer best-in-class acquisition and tracking sensitivity, Time-To-First-Fix

(TTFF) and accuracy. The GPS engine supports both fully-autonomous operation for use

in handheld consumer navigation devices and other standalone navigation systems.

o The GPS NMEA information is output by DEBUG port. The default baud rate is 115200bps.

Technical internship Global Positioning System

6

o The GPS engine is controlled by GSM engine, so when it is necessary to rub GPS the GSM

engine must be powered on and not in SLEEP mode.

o All the GPS function is controlled by AT command via serial port. The GPS function AT

commands are listed in the following table.

Table 2: AT Commands for GPS function

GPS Operation Mode

o Active mode: GPS is active as a GPS receiver. The GPS engine will automatically

acquire and track GPS satellites.

o Power down mode: The GPS engine will be set into this mode by sending AT commad

“AT+CGPSPWR=0”. In this mode the internal power supply for GPS will be shutdown

and the current consumption is very low. The last position, current time and ephemeris

data will be stored in the GS host memory.

Power on GPS engine : by sending AT command “ AT+CGPSPWR=1”

Power down GPS engine: by sending AT command “ AT+CGPSPWR=0”

GPS Antenna Interface : The RF interface has an impendence of 50 Ω

SIM Card Interface

d

Fig 2: Reference circuit

of the 8-pin SIM card

holder

Command Description

AT+CGPSPWR GPS power control

AT+CGPSRST GPS mode reset (hot/warm/cold)

AT+CGPSSTATUS Get current GPS status

AT+CGPSOUT GPS NMEA data output control

AT+CGPSINF Get current GPS location info

AT+CGPSIPR Set GPS NMEA output uart bps

Technical internship Global Positioning System

7

Table 3: Pin description of SIM card

1.2 SD-card Module

The SD-Card is a standardized flash memory storage device that is the mechanically

compatible successor of the MMC-Card. SD stands for Secure Digital. For usage it needs to be

plugged into a socket and can be used for any sort of data storage. Typically a file system like

FAT16 will be applied to such a device. Alternate file systems are possible, e.g. the optimized Linux

flash file systems, at the price of only being able to read the data in other common systems only with

extra efforts.

1.3 Micro-Controller TI LM3S3749

The ARM® Cortex™-M3 processor provides a high-performance, low-cost platform that meets

the system requirements of minimal memory implementation, reduced pin count, and low power

consumption, while delivering outstanding computational performance and exceptional system

response to interrupts.

Fig.3: CPU Block Diagram

Technical internship Global Positioning System

8

2. Experimental

2.1 Algorithm Description

Module ARM: main processor, send AT command to module SIM908 (GPS), handle the data

received then save them to memory of SD Card.

Using Graphic User Interface to display location from the SD Card to computer by Google

Earth service.

Fig 4. Algorithm Description 1

Technical internship Global Positioning System

9

System_init Sys_Clock:

50MHz(PLL)

Init UARTS

Init SSI

Init UARTS

Init SysTick

Init IO

Init Timers

Mount SD Card

Sleep

Interrupt

Log

on/off

Create new

file

Take GPS

Read current

file

Send to SD

Card

Computer

SD Card

Google Map

Fig 5. Algorithm Description 2

Technical internship Global Positioning System

10

21

SW2

GND

R0510k

3V3

D2R2

1k3V3

12

P3

IOTEST

C_SW

100n

1 23 45 67 89 1011 1213 1415 1617 1819 20

P2

JTAG 20 pin

GND

3V3

TDITMSTCK

TDOnRST

R01 10kR02 10kR03 10k

R04 10k

3V3

2.2 Development Board

Source Board: Provide the voltage and current

SD-card:

Fig 6. SD CARD Module

Arm Cortex M3 LM3S3749

Fig 7. PL2303

Fig 8. J-tag Debug Port Fig 9. IO of Lm3s3749

CS

GND

R8

1k

R12 33k

SDO

GND

C2100n

3v 3

SDI

D1

LED

3v 3U2SD card

123456789

10

11

12131415

CS/DAT3SI/CMDGND1VDDSCK/CLKGND2SO/DAT0RES/DAT1RES/DAT2

CD

WP

GND3GND4GND5GND6

SCK

SD_CD

3v 3

SD_WP

+ C110u

SD_WP

R10 33k

3v 3

R15

33k

SDI

R11 33k

CS

3v 3

J1

TO MCU

2468

1357

SDO

3v 3

SCK

R13 33k

3v 3

SD_CD

RXD

DTR

RTS

TXD

TXD1

RXD5

DTR_N2

VDD_2324

RTS_N3

RI_N6

GND17

VDD8

DSR_N9

DCD_N10

CTS_N11

SHTD_N12

EE_CLK13

EE_DATA14

DP15

DM16

VDD_3V317

GND_3V318

RESET19

VDD120

GND21

TRI_STATE22

LD_MODE23

VDD_PLL24

GND_PLL25

PLL_TEST26

OSC127

OSC228

U01

PL2303

PL_DP

PL_DM

GND

GND

GND

GND

GND

GND

3V3

R234k7

R21 220kR22 220k

R2427

R25

27

R26

1k5

C21

10p

C22

10p

C23100n

C25100n

C2410u

XT2

12M

3V3

USB_5V

USB_5V

Technical internship Global Positioning System

11

Fig 10. Main CPU (LM3S3749)

PA0/U0RX26

PA1/U0TX27

PA2/SSI0CLK28

PA3/SSI0FSS29

PA4/SSI0RX30

PA5/SSI0TX31

PC0/TCK/SWCLK80

PC1/TMS/SWDIO79

PC2/TDI78

PC3/TDO/SWO77

PC4/CCP525

PC5/C1+24

PC6/PHB023

PC7/C1O22

PD0/U2RX10

PD1/U2TX11

PD2/CCP612

PD3/CCP013

PE2/SSI1RX95

PE3/SSI1TX96

PD6/ADC599

PD7/ADC4100

GND9

GND15

GND21

GND33

RSTN64

LDO7

OSC048

OSC149

PB0/U1RX66

PB1/U1TX67

USB0DM70

USB0DP71

PB4/C0-92

PB5/C1-91

PB6/C0+90

PB7/NMI89

PB2/I2C0SCL72

USB0RBIAS73

PE0/SSI1CLK74

PE1/SSI1FSS75

PE4/ADC36

PE5/ADC25

PA6/CCP134

PA7/CCP335

PE6/ADC12

PE7/ADC01

PF0/PWM047

PF1/PWM161

PF2/PWM460

PF3/PWM559

PF4/C0O58

PF5/CCP246

PF6/PHA043

PF7/CCP442

PG0/I2C1SCL19

PG1/I2C1SDA18

PG2/FAULT017

PG3/FAULT216

PG4/FAULT141

PG5/IDX040

PG6/PWM637

PG7/PWM736

PH0/PWM286

PH1/PWM385

PH2/FAULT384

PH3/USB0EPEN83

VDDA3

PD5/ADC698

PD4/ADC797

GNDA4

VDD8

VDD20

VDD32

VDD44

VDD56

VDD68

VDD81

VDD93

GND39

GND45

GND54

GND57

GND63

GND69

GND82

GND87

GND94

VDD2514

VDD2538

VDD2562

VDD2588

WAKEN50

HIBN51

XOSC052

XOSC153

VBAT55

PB3/I2C0SDA65

PH4/USB0PFLT76

LM3S3749-IQC

U1

GND

VBAT

GND

GND

3V3

21

SW1

R0710k

GND

3V3

nWAKE

XT1

8MHzC07

10p

C0610p

GND GND

nRST

TDOTDI

TCKTMS

PE0PE1PE2PE3PE4PE5PE6PE7

PA0PA1PA2PA3PA4PA5PA6PA7

RX0TX0

PC0PC1PC2PC3PC4PC5PC6PC7

PB0PB1PB2PB3PB4PB5PB6PB7

PD0PD1PD2PD3PD4PD5PD6PD7

PF0PF1PF2PF3PF4PF5PF6PF7

PG0PG1PG2PG3PG4PG5PG6PG7

PH0PH1PH2PH3PH4

R06 9.1k 1%

GND

USB0_DPUSB0_DM

nHIB

XOSC0XOSC1

C110.01u

C120.01u

C130.1u

C140.1u

C151u

C011u

C020.01u

C030.1u

C040.1u

C050.01u

Technical internship Global Positioning System

12

R9 22R

SIM CARD

SIM_VDD

CLK

R10

22R

SIM_DATA DATA

RST

SIM_CLK

SIM_VDD

DATA

C6

104

SIM 6 Pins

123 5

67

RST

CLK

R8 22R

U2

SMF05C

1

234

65

T1

T2T3T4

T6T5

SIM_RSTC5

22

J_GPS/DEBUG PORT

GPS/DEBUG PORT

12

JCOM PORT

COM PORT

12345678

GTXDGRXD

RTSCTSRIDCDDTR

RXDTXD

SERIAL PORTS

SIM908

- Power supply

Fig 11 Power supply circuit

- SIM Card

Fig 12. SIM Card circuit

- Serial Ports

Fig 13. Serial Ports Circuit

VCC

C4

104

U1

LM2576ADJ/TO263

1 2

3 45

VIN OUT

GND FBON/OFF

+

C1

1uF/50V+ C3

330uF/25V

L1 100uH/3A

VR

10K

D1

1N5822

DC IN

12

SW

CONTAC

1 2 3

456

+

C2

100uF/50V

Technical internship Global Positioning System

13

3. Results

We developed typical applications successful!

Located the way we go with the application and saved it to SD card.

Draw the way to Google map.

Fig 14. The way we went in the map

Fig 15. The way shown in Google map

Technical internship Global Positioning System

14

4. Conclusion

- GPS is a good measurement to locate the position exactly.

- With this project, we can develop more application such as:

o Calculate area.

o Determine the way gone of the vehicle.

o Apply for “black box” to define position, speed of vehicles.

- Development : more intergrade o GPRS, GSM send information to web server in order to manage online.