+ All Categories
Home > Documents > Gps Module (Skutel0051)

Gps Module (Skutel0051)

Date post: 13-Apr-2015
Category:
Upload: nhu-tong
View: 64 times
Download: 3 times
Share this document with a friend
31
GPS/GPRS/GSM Module V2.0 (SKU:TEL0051) Introduction This is a GPS/GPRS/GSM shield from DFRobot. This shield with a Quad-band GSM/GPRS engine works on frequencies EGSM 900MHz/DCS 1800MHz and GSM850 MHz/PCS 1900MHz. It also supports GPS technology for satellite navigation. It's possible for your robot and control system to send messages and use the GSM network. It is controlled via AT commands(GSM07.07 ,07.05 and SIMCOM enhanced AT Commands). And the design of this shield allows you to drive the GSM & GPS function directly with the computer and the Arduino Board. It includes a high-gain SMD antenna for GPS & GSM. This GPS/GPRS/GSM shield uses an embedded SIM548C chip from SIMCom.Featuring an industry-standard interface and GPS function, the combination of both technologies allows goods, vehicles and people to be tracked seamlessly at any location and anytime with signal coverage. Specification Power supply: 6-12v Low power consumption (100mA@7v - GSM mode) Quad-Band 850/900/18001900MHz GPRS multi-slot class 10 Support GPS technology for satellite navigation Embeded high-gain SMD antennas for GPS & GSM Directly support 4*4 button pad USB/Arduino control switch Size: 70x55mm
Transcript
Page 1: Gps Module (Skutel0051)

GPS/GPRS/GSM Module V2.0 (SKU:TEL0051)Introduction

This is a GPS/GPRS/GSM shield from DFRobot. This shield with a Quad-band GSM/GPRS engine

works on frequencies EGSM 900MHz/DCS 1800MHz and GSM850 MHz/PCS 1900MHz. It also

supports GPS technology for satellite navigation. It's possible for your robot and control system to

send messages and use the GSM network.

It is controlled via AT commands(GSM07.07 ,07.05 and SIMCOM enhanced AT Commands). And the

design of this shield allows you to drive the GSM & GPS function directly with the computer and the

Arduino Board. It includes a high-gain SMD antenna for GPS & GSM.

This GPS/GPRS/GSM shield uses an embedded SIM548C chip from SIMCom.Featuring an industry-

standard interface and GPS function, the combination of both technologies allows goods, vehicles and

people to be tracked seamlessly at any location and anytime with signal coverage.

Specification

Power supply: 6-12v

Low power consumption (100mA@7v - GSM mode)

Quad-Band 850/900/18001900MHz

GPRS multi-slot class 10

Support GPS technology for satellite navigation

Embeded high-gain SMD antennas for GPS & GSM

Directly support 4*4 button pad

USB/Arduino control switch

Size: 70x55mm

Page 2: Gps Module (Skutel0051)

Pin Out

GPS/GPRS/GSM Module V2.0 (SKU:TEL0051)

More details about switches: 

Switch S1: PC upload program to Arduino board/PC communicates with GPS/GPRS/GSM

Module( Arduino programming/module communication).

Switch S2: GPS/GPRS/GSM Module directly connects with PC through USB port or module

communicates with Arduino board, which communicates with PC(USB/Arduino serial

communication).

Switch S3: GPS power supply to be on/off(GPS power switch).

Tutorial

Prepare for Driving the GSM mode

The hardware requirements:

Page 3: Gps Module (Skutel0051)

1. Arduino Uno

2. GPS/GPRS/GSM Module V2.0

3. SIM Card

4. Earphone & Microphone

5. External power supply via the power jack

it is recommended you to supply 7~12v power via the power jack. When using the GSM mode, the

module requires an external power. But the power consumption is not high,just 200mA@7v, when

calling.

Module driver pin jumpers:

Applying the Module Pin Jumpers(J10-J12) will allocate Pin 3,4,5 for driving the module. Removing

the jumpers will release the above Pins, and you could connect the driver pins to the other digital pins

on your board to avoid the pin conflict.

Hardware Connection photo:

TEL0051 Hardware connection

Following the steps included in the sketch below first! The Sketch for GSM mode:

?

1 // #

Page 4: Gps Module (Skutel0051)

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

// # Editor     : Lauren from DFRobot

// # Date       : 23.05.2012

// # E-Mail : [email protected]

// # Product name: GPS/GPRS/GSM Module V2.0

// # Product SKU : TEL0051

// # Version     : 0.1

// # Description:

// # The sketch for driving the gsm mode via the USB interface

// # Steps:

// #        1. Turn the S1 switch to the EN(right side)

// #        2. Upload the sketch to the Arduino board

// #        3. Turn the S1 switch to the communication mode(left side)

// #        4. Turn the S2 switch to the USB side(left side)

// #        5. send AT commands via the Arduino Serial monitor

// #        wiki link- http://www.dfrobot.com/wiki/index.php?title=GPS/GPRS/GSM_Module_V2.0

byte gsmDriverPin[3] = {

  3,4,5};//The default digital driver pins for the GSM and GPS mode

//If you want to change the digital driver pins

//or you have a conflict with D3~D5 on Arduino board,

//you can remove the J10~J12 jumpers to reconnect other driver pins for the module!

void setup(){

Page 5: Gps Module (Skutel0051)

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

  InitGsmMode();

}

void InitGsmMode(){

  //Init the driver pins for GSM function

  for(int i = 0 ; i < 3; i++){

    pinMode(gsmDriverPin[i],OUTPUT);

  }

  digitalWrite(3,LOW);//Enable the GSM mode

  digitalWrite(4,HIGH);//Disable the GPS mode

  //Output GSM Timing

  digitalWrite(5,HIGH);

  delay(1500);

  digitalWrite(5,LOW);

}

void loop(){

  delay(100);

}

How to drive the GSM Mode via USB port

1. If your module works, the indicator LEDs beside the switch S2 will light up, this means that

the module is running correctly. The LED marked "NET" is used to drive a network status

indication LED. The working state of this LED is listed below.

2. Send the AT commands to the module by using Coolterm(or use the Arduino serial monitor).

Page 6: Gps Module (Skutel0051)

Note: If you want to program the Arduino, please disconnect the coolterm to release the communication port.

Network indication

State The GSM part of SIM548C function

Off The GSM part of the module is not running

64ms On/ 800ms Off The GSM part of the module does not find the network

64ms On/ 3,000ms Off The GSM part of the module found the network

64ms On/ 300ms Off GPRS communication

Serial communication

Default baudrate: 9600

Please do some settings as #Recommended settings before connection.If have trouble sending

Ctrl+Z, please refers to #Ways to send Ctrl +Z in Coolterm

Page 7: Gps Module (Skutel0051)

Serial monitor

GSM module signal strength test

Signal strength test with on-chip antenna:

Sending AT command for signal quantity report AT+CSQ through serial port terminal application, will

receive signal strength as below.

GSM module signal strength test with on-chip antenna

The returned data “15,0”, the first value “15” means the signal strength is:

Value Signal Strength

0 -113dBm or less

Page 8: Gps Module (Skutel0051)

1 -111dBm

2~30 -109~-53dBm

31 -51dBm or greater

99not know or not

detectable

The later value “0” means channel bit error rate.

Signal strength test with external antenna:

GSM module signal strength test with external antenna

Page 9: Gps Module (Skutel0051)

Types of AT commands and responses

1. AT+<x>=?  : Test command

The mobile equipment returns the list of parameters and value ranges set with the

corresponding Write command or by internal processes.

2. AT+<x>?  : Read command

This command returns the currently set value of the parameter or parameters

3. AT+<x>=<..> : Write command

This command sets the user-definable parameter values.

4. AT+<x>  : Execution command

This execution command reads non-variable parameters affected by internal processes in the

GSM engine

Commonly used AT commands

1. AT  : Test the serial communication.if it works,get "ok" as the picture show.

2. ATD<num>; : Dial a number

3. ATA  : Answer an incoming call

4. ATH  : Disconnect existing connection

5. AT+UART  : Configure dual serial port mode

6. AT+CSQ  : Signal quality report

7. AT+CMGF  : Select sms messages format

8. AT+CMGS  : Send sms message

1. After you input the sms, press 'ctrl-z'[HEX:0x1A]to send the message.

2. Press 'ESC' to quit without sending.

9. AT+CNMI  : New sms message indications

10. AT+CLVL  : Loud speaker volume level

11. AT+CRSL  : Ringer sound level

12. AT+CMIC  : Change the microphone gain level

For more detail AT commands, please check the document here!

Prepare for Driving the GPS mode

The hardware requirements:

1. Arduino Uno

2. GPS/GPRS/GSM Module V2.0

3. External power supply via the power jack

We recommend you to supply 7~12v power via the power jack. When using the GPS mode, the

module requires an external power. But the power consumption is not high, just [email protected]

Module driver pin jumpers:

Page 10: Gps Module (Skutel0051)

Applying the Module Pin Jumpers(J10-J12) will allocate Pin 3,4,5 for driving the module. Removing

the jumpers will release the above Pins,

Hardware Connection photo:

How to drive the GPS Mode via USB port

1. After turn switch s3 on (the right side), the GPSPWR led will be lit.

2. In this mode, switch s2 is on left side. The GPS module communicates directly with PC. The

serial port terminal application will show the data sent out by GPS module.

The Sketch for GPS USB mode: Following the steps included in sketch below first! 

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

// #

// # Editor     : Lauren from DFRobot

// # Date       : 23.05.2012

// # E-Mail : [email protected]

// # Product name: GPS/GPRS/GSM Module V2.0

// # Product SKU : TEL0051

// # Version     : 0.1

// # Description:

// # The sketch for driving the gps mode via the USB interface

// # Steps:

// #        1. Turn the S1 switch to the EN(right side)

// #        2. Upload the sketch to the Arduino board

// #        3. Turn the S1 switch to the communication mode(left side)

// #        4. Turn the S2 switch to the USB side(left side)

// #        5. Turn the S3 switch to the ON side(right side)

// #        5. get the information from the module via the Arduino Serial monitor(baud rate:4800)

// #        For more detail information, please check the product wiki page.~.

Page 11: Gps Module (Skutel0051)

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

// #        Wiki link - http://www.dfrobot.com/wiki/index.php?title=GPS/GPRS/GSM_Module_V2.0

byte gsmDriverPin[3] = {

  3,4,5};//The default digital driver pins for the GSM and GPS mode

//If you want to change the digital driver pins

//or you have a conflict with D3~D5 on Arduino board,

//you can remove the J10~J12 jumpers to reconnect other driver pins for the module!

void setup(){

  InitGpsMode();

}

void InitGpsMode(){

  //Init the driver pins for GSM function

  for(int i = 0 ; i < 3; i++){

    pinMode(gsmDriverPin[i],OUTPUT);

  }

  digitalWrite(3,HIGH);//Disable the GSM mode

  digitalWrite(4,LOW);//Enable the GPS mode

}

void loop(){

  delay(1000);

}

Serial communication

Default baudrate: 4800

Page 12: Gps Module (Skutel0051)

Coolterm(or Arduino serial monitor) is the recommended serial port terminal application. After serial

port is successfully connected with PC in Coolterm, GPS module will send out data continuously as

below:

Serial monitor in GPS mode via USB port

For location of the data received, please refer to Location Mapping (GPRMC)

How to drive the GPS Mode via Arduino board

1. After turn switch s3 on (the right side), the GPSPWR led will be lit.

2. In this mode, switch s2 is on right side. The GPS module communicates with Arduino board,

and Arduino board communicates with PC. The serial port terminal application will show

preliminary processed data from Arduino board, which gets the data from GPS module.

The Sketch for GPS mode via Arduino board: Following the steps included in sketch below first! 

?

1 // #

Page 13: Gps Module (Skutel0051)

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

// # Editor     : Lauren from DFRobot

// # Date       : 23.05.2012

// # E-Mail : [email protected]

// # Product name: GPS/GPRS/GSM Module V2.0

// # Product SKU : TEL0051

// # Version     : 0.1

// # Description:

// # The sketch for driving the gps mode via the Arduino TTL interface

// # Steps:

// #        1. Turn the S1 switch to the EN(right side)

// #        2. Upload the sketch to the Arduino board

// #        3. Turn the S1 switch to the communication mode(left side)

// #        4. Turn the S2 switch to the Arduino side(right side)

// #        5. Turn the S3 switch to the ON side(right side)

// #        5. get the information from the module via the Arduino Serial monitor(baud rate:4800)

// #        For more detail information, please check the product wiki page.~.

// #        wiki link - http://www.dfrobot.com/wiki/index.php?title=GPS/GPRS/GSM_Module_V2.0

byte gsmDriverPin[3] = {

  3,4,5};//The default digital driver pins for the GSM and GPS mode

//If you want to change the digital driver pins

//or you have a conflict with D3~D5 on Arduino board,

//you can remove the J10~J12 jumpers to reconnect other driver pins for the module!

Page 14: Gps Module (Skutel0051)

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

void setup()

{

  InitGpsMode();//Init the module to the GPS mode

  Serial.begin(4800);//Init the serial baudrate

  Serial.println("$GPGGA statement information: ");

}

void InitGpsMode(){

  //Init the driver pins for GSM function

  for(int i = 0 ; i < 3; i++){

    pinMode(gsmDriverPin[i],OUTPUT);

  }

  digitalWrite(3,HIGH);//Disable the GSM mode

  digitalWrite(4,LOW);//Enable the GPS mode

}

void loop()

{

  while(1)  //get the GPS datas and print them to the Arduino Serial monitor

  {

    Serial.print("UTC:");

    UTC();

    Serial.print("Lat:");

    latitude();

    Serial.print("Dir:");

    lat_dir();

    Serial.print("Lon:");

Page 15: Gps Module (Skutel0051)

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

    longitude();

    Serial.print("Dir:");

    lon_dir();

    Serial.print("Alt:");

//    altitude();

    Serial.println(' ');

    Serial.println(' ');

  }

}

double Datatransfer(char *data_buf,char num)//convert the data to the float type

{                                           //*data_buf:the data array

                                            //the number of the right of a decimal point

  double temp=0.0;

  unsigned char i,j;

  if(data_buf[0]=='-')//

  {

    i=1;

    //process the data array

    while(data_buf[i]!='.')

      temp=temp*10+(data_buf[i++]-0x30);

    for(j=0;j<num;j++)

      temp=temp*10+(data_buf[++i]-0x30);

    //convert the int type to the float type

    for(j=0;j<num;j++)

      temp=temp/10;

    //convert to the negative number

Page 16: Gps Module (Skutel0051)

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

    temp=0-temp;

  }

  else//for the positive number

  {

    i=0;

    while(data_buf[i]!='.')

      temp=temp*10+(data_buf[i++]-0x30);

    for(j=0;j<num;j++)

      temp=temp*10+(data_buf[++i]-0x30);

    for(j=0;j<num;j++)

      temp=temp/10 ;

  }

  return temp;

}

char ID()//Match the ID commands

{

  char i=0;

  char value[6]={

    '$','G','P','G','G','A' };//match the gps protocol

  char val[6]={

    '0','0','0','0','0','0' };

  while(1)

  {

    if(Serial.available())

    {

      val[i] = Serial.read();//get the data from the serial interface

      if(val[i]==value[i])   //Match the protocol

Page 17: Gps Module (Skutel0051)

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

      {

        i++;

        if(i==6)

        {

          i=0;

          return 1;//break out after get the command

        }

      }

      else

        i=0;

    }

  }

}

void comma(char num)//get ','

{

  char val;

  char count=0;//count the number of ','

  while(1)

  {

    if(Serial.available())

    {

      val = Serial.read();

      if(val==',')

        count++;

    }

    if(count==num)//if the command is right, run return

      return;

  }

Page 18: Gps Module (Skutel0051)

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

}

void UTC()//get the UTC data -- the time

{

  char i;

  char time[9]={

    '0','0','0','0','0','0','0','0','0'

  };

  double t=0.0;

  if(ID())//check ID

  {

    comma(1);//remove 1 ','

    //get the datas after headers

    while(1)

    {

      if(Serial.available())

      {

        time[i] = Serial.read();

        i++;

      }

      if(i==9)

      {

        i=0;

        t=Datatransfer(time,2);//convert data

        t=t+80000.00;//convert to the chinese time GMT+8 Time zone

        Serial.println(t);//Print data

        return;

      }

    }

Page 19: Gps Module (Skutel0051)

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

  }

}

void latitude()//get latitude

{

  char i;

  char lat[10]={

    '0','0','0','0','0','0','0','0','0','0'

  };

  if( ID())

  {

    comma(2);

    while(1)

    {

      if(Serial.available())

      {

        lat[i] = Serial.read();

        i++;

      }

      if(i==10)

      {

        i=0;

        Serial.println(Datatransfer(lat,5),5);//print latitude

        return;

      }

    }

  }

}

void lat_dir()//get dimensions

{

Page 20: Gps Module (Skutel0051)

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

  char i=0,val;

  if( ID())

  {

    comma(3);

    while(1)

    {

      if(Serial.available())

      {

        val = Serial.read();

        //Serial.println(val,BYTE);//print dimensions

        Serial.println(val);//print dimensions

        i++;

      }

      if(i==1)

      {

        i=0;

        return;

      }

    }

  }

}

void longitude()//get longitude

{

  char i;

  char lon[11]={

    '0','0','0','0','0','0','0','0','0','0','0'

  };

  if(ID())

Page 21: Gps Module (Skutel0051)

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

  {

    comma(4);

    while(1)

    {

      if(Serial.available())

      {

        lon[i] = Serial.read();

        i++;

      }

      if(i==11)

      {

        i=0;

        Serial.println(Datatransfer(lon,5),5);//print longitude

        return;

      }

    }

  }

}

void lon_dir()//

{

  char i=0,val;

  if(ID())

  {

    comma(5);

    while(1)

    {

      if(Serial.available())

      {

Page 22: Gps Module (Skutel0051)

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

        val = Serial.read();

        //Serial.println(val,BYTE);

        Serial.println(val);

        i++;

      }

      if(i==1)

      {

        i=0;

        return;

      }

    }

  }

}

void altitude()//get altitude data

{

  char i,flag=0;

  char alt[8]={

    '0','0','0','0','0','0','0','0'

  };

  if( ID())

  {

    comma(9);

    while(1)

    {

      if(Serial.available())

      {

        alt[i] = Serial.read();

        if(alt[i]==',')

Page 23: Gps Module (Skutel0051)

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

          flag=1;

        else

          i++;

      }

      if(flag)

      {

        i=0;

        Serial.println(Datatransfer(alt,1),1);//print altitude data

        return;

      }

    }

  }

}

Page 24: Gps Module (Skutel0051)

299

300

301

302

303

304

305

306

307

308

309

Serial communication

Default baudrate: 4800

Page 25: Gps Module (Skutel0051)

Serial monitor in GPS mode via Arduino board

Tips for Coolterm usage

Recommended settings

Settings below is recommended

Page 26: Gps Module (Skutel0051)

Recommended Coolterm settings

How to send out text message in GSM mode via Coolterm

After the network indication LED showing GSM module has found the network, we can use it to send

out message.

Setp 1: Set the system to text mode(as opposed to PDU mode) with command AT+CMGF=1(type

"AT+CMGF=1" in the input line, then press <ENTER> KEY), you will get response as below.

Step 1

Page 27: Gps Module (Skutel0051)

Step 2: Set message receiver number with command AT+CMGS="Number"(replace Number with

your destination number),after pressing <ENTER> key, it will show as follow

Step 2

Step 3: Type in you message content, end with pressing <ENTER> key.

Step 3

Step 4: Send Ctrl character Ctrl+Z to verify your message sending (just pressing Ctrl and Z

simultaneously, <ENTER> key is not need after that).If it send out successfully, it will show as below.

Step 4

Ways to send Ctrl +Z in Coolterm

1. After typing the message text, press enter key, it will show:

'Enter' after text finished

Page 28: Gps Module (Skutel0051)

Then, in the input area, pressing Ctrl+Z will send out the single ctrl character successfully as below:

After press Ctrl+Z

2. Ctrl characters can also be sent out in their hexadecimal format, in which form 1A is the value of

Ctrl+Z:

Sending Ctrl+Z with in hexadecimal format

FQA about coolterm usage in GSM/GPRS/GPS module V2.0

1.Serial connection errs. When connecting to PC, serial port terminal application occasionally warns

“A Serial Port Err Occur 103: No Stop Bit Received” or ” A Serial Port Err Occur 104: stop bit received

too early” 

A: set Coolterm in options-receive-ignore receiving signal err to ignore connection err and it will

reconnect automatically. 

2.Serial port terminal application warns “Normal power down” when reconnect after disconnect, and

Network indication LEDs both turn off. 

A: Choose disconnect, and connect again 

The Arduino board will reset at every connection to PC. During resetting, the Arduino board will emit a

low pulse to pin PWRKEY of GPS module. So if GPS module is already on before connection, the low

pulse will switch it off, if not, the pulse will switched it on. 

3.Serial port terminal application send out all the strings on the screen after pressing Ctrl+Z, when

Page 29: Gps Module (Skutel0051)

trying to send message in GSM USB mode. 

A: It is possible to send Ctrl characters when the terminal is set to Line Mode. We can choose the

Line Mode in options-terminal-terminal mode, or we can send the Ctrl character though sending string

box of Coolterm in hexadecimal format. Please refer to Ways to send Ctrl +Z in Coolterm. 

4.Restart the serial port terminal application always works for other troubles. 


Recommended