Download datasheet for PIC-GSM by Olimex Ltd

Download datasheet for PIC-GSM by Olimex Ltd

PIC-GSM development board

Users Manual

All boards produced by Olimex are ROHS compliant

Rev.A, June 2008

Copyright(c) 2008, OLIMEX Ltd, All rights reserved

INTRODUCTION:

PIC-GSM is excellent board for adding remote monitoring and control in remote places by GSM cellular network or ethernet or internet network. Do you want to switch on/off your local heating in your mountain house? To monitor the temperature at up to 8 remote points up to 30 meters away from the module? To listen what happens in your house with silent call after you get message for alarm status? Then PIC-GSM is the board for you! It contains PIC18F97J60 microcontroller and 3-band GSM GPRS module 900/1800/1900Mhz inside which covers most used GSM networks around the world. The GSM antenna is build in the board so no need for external expensive GSM antennas. PIC-GSM have two relays 240VAC/10A, two opto-isolated inputs which could be connected to alarm sensors or just buttons for user actions (like call pre-loaded phone numbers), on-board temperature sensor and connector for additional up to 8 addressable remote temperature sensors at up to 30 meter distance from the module.

Normal phone hook can be connected to this board and to allow user to speak, listen, taking and placing phone calls as normal stand alone cellular phone. PIC-GSM can be connected to PC with the USB connector it have and it is recognized as modem which could be used to add internet via GPRS to your computer (imagine how useful is this for your mountain house if there is no internet but only cellular network!). If you have internet connection you can monitor the same parameters on the WEB page.

BOARD FEATURES:

ICSP/ICD connector for programming and debugging with PIC-

ICD2, PIC-ICD2-POCKET, PIC-ICD2-TINY;

USB 2.0 type B connector allow board to be interfaced to PC host;

GSM/GPRS module 900/1800/1900Mhz;

Li-ion backup battery;

PIC18F97J60-I/PT;

Ethernet RJ45 isolated connector.

GSM Audio In and Out;

RS232 connector;

Quartz crystal 20Mhz;

Two relays 10A/250VAC;

Two digital inputs;

Analog input;

Temperature sensor;

5V voltage regulator;

EXT connector for available GPIO;

Four mounting holes 3,3 mm (0,13");

FR-4, 1.5 mm (0,062"), green soldermask, white silkscreen component print;

Dimensions 124x90 mm (4880 x 3540 mils);

ELECTROSTATIC WARNING:

The PIC-GSM board is shipped in protective anti-static packaging. The board must not be subject to high electrostatic potentials. General practice for working with static sensitive devices should be applied when working with this board.

BOARD USE REQUIREMENTS:

Cables:

1.8 meter USB A-B cable to connect to USB host on PC.

Crossed ethernet cable if the PIC-GSM module is connected to

PC or straight if the module is connected to router or ethernet switch.

Hardware: PIC-ICD2 , PIC-ICD2-POCKET , PIC-ICD2-TINY

Or any compatible tool for programming and/or debugging

!!!Warning!!!

When you want to program this microcontroller with PIC-ICD2, PIC-ICD2-POCKET or PIC-ICD2-TINY, before connecting the programmer to your target board, you should first connect the programmer to your computer and open

MPLAB. There, first from menu Configure – Select Device – choose the microcontroller you are about to program, then from menu Programmer – Select Programmer – choose MPLAB

ICD 2, wait while MPLAB is downloading operation system, and after ICD2 is connected – check in menu Programmer –

Settings – Power – there is option – Power target circuit from

MPLAB ICD 2 – this option should be forbidden, you could not select it. Now it is safe to connect the programmer to your target board.

Software:

Microchip MPLAB IDE + C18 C compiler for developing your own applications

The demo software show basic functionality and how to place / take phone calls (C source and HEX) or how to remote control via SMS and WEB page(C source and HEX)

Important: If your board does not work, first try to charge the battery as you power supply the board for few hours.

PROCESSOR FEATURES:

Ethernet Features:

IEEE 802.3 compatible Ethernet Controller

Integrated MAC and 10Base-T PHY

8-Kbyte Transmit/Receive Packet Buffer SRAM

Supports One 10Base-T Port

Programmable Automatic Retransmit on Collision

Programmable Padding and CRC Generation

Programmable Automatic Rejection of Erroneous Packets

Activity Outputs for 2 LED Indicators

Buffer:

Configurable transmit/receive buffer size

Hardware-managed circular receive FIFO

Byte-wide random and sequential access

Internal DMA for fast memory copying

Hardware assisted checksum calculation for various protocols

MAC:

Support for Unicast, Multicast and Broadcast packets

Programmable Pattern Match of up to 64 bytes within packet at

– user-defined offset

Programmable wake-up on multiple packet formats

PHY:

Wave shaping output filter

Flexible Oscillator Structure:

Selectable System Clock derived from Single 25 MHz External

Source:

2.778 to 41.667 MHz

Internal 31 kHz Oscillator

Secondary Oscillator using Timer1 @ 32 kHz

Fail-Safe Clock Monitor:

Allows for safe shutdown if oscillator stops

Two-Speed Oscillator Start-up

External Memory Bus:

Address Capability of up to 2 Mbytes

8-Bit or 16-Bit Interface

12-Bit, 16-Bit and 20-Bit Addressing modes

Peripheral Highlights:

High-Current Sink/Source: 25 mA/25 mA on PORTB and PORTC

Five Timer modules (Timer0 to Timer4)

Four External Interrupt pins

Two Capture/Compare/PWM (CCP) modules

Three Enhanced Capture/Compare/PWM (ECCP) modules:

One, two or four PWM outputs

Selectable polarity

Programmable dead time

Auto-shutdown and auto-restart

Up to Two Master Synchronous Serial Port (MSSP) modules supporting SPI and I2C™ Master and Slave modes

Up to Two Enhanced USART modules:

Supports RS-485, RS-232 and LIN 1.2

Auto-wake-up on Start bit

Auto-Baud Detect (ABD)

10-Bit, Up to 16-Channel Analog-to-Digital Converter module (A/D):

Auto-acquisition capability

Conversion available during Sleep

Dual Analog Comparators with Input Multiplexing

Parallel Slave Port (PSP) module (100-pin devices only)

Special Microcontroller Features:

5.5V Tolerant Inputs (digital-only pins)

Low-Power, High-Speed CMOS Flash Technology:

Self-reprogrammable under software control

C compiler Optimized Architecture for Reentrant Code

Power Management Features:

Run: CPU on, peripherals on

Idle: CPU off, peripherals on

Sleep: CPU off, peripherals off

Priority Levels for Interrupts

8 x 8 Single-Cycle Hardware Multiplier

Extended Watchdog Timer (WDT):

Programmable period from 4 ms to 134s

Single-Supply 3.3V In-Circuit Serial Programming™ (ICSP™) via

Two Pins

In-Circuit Debug (ICD) with 3 Breakpoints via Two Pins

Operating Voltage Range of 2.35V to 3.6V (3.1V to 3.6V using

Ethernet module)

On-Chip 2.5V Regulator

BLOCK DIAGRAM:

PIC18F97J60 (100-PIN) BLOCK DIAGRAM

MEMORY MAP:

MEMORY MAPS FOR PIC18F97J60 FAMILY DEVICES

+5V +5V

3 V

VBAT

CO N2 PH

1

2

12 VDC

USB

S H IE L D

3

4

1

2

C1 4

1 0n F

G ND

G ND_

R3 5

0

R36

0

C3 5

NA

ICSP

C O N62 .5 4-0 -D

CO N6 PH

REL

1

4

5

2

3

6

G 1

B-DIL3

3V

4

5

6

1

2

3

C1

1000uF/16V DC

FB1

R5 2

PG D

PG C

USBDM

USBDP

C3 6 C3

NA

L1

C34

1 80 fe rrite b ea d

R4 4

49.9/1%

R 45

49.9/1%

R4 6

49.9/1%

1 00 nF

R EL1

REL 2

+12 V

RST

3 V

C6 2

1000uF/16V DC

USB_PWR

TX D

R7 0

2 2K

3 V

US B _P RE S E NT

R 71

3 3K

J 1

1-2

2-3

J 2

1-2

2-3

MO DE

FT232 c onnec td to G S M

FT232 c onnec ted to P IC

DTX /MTX and DRX /MRX to be O P E N

2

RX D

U5

FT2 32 RL SSO P2 8

FT_TX D

R4

68 K

R37

NA

US B _RS T

4

20

16

15

8

19

24

27

28

17

VCCIO

VCC

USBDM

USBDP

NC1

#RESET

NC2

OSCI

OSCO

3V3OUT

TXD

RXD

RTS#

CTS#

DTR#

DSR#

DCD#

RI#

CBUS0

CBUS1

CBUS2

CBUS3

CBUS4

23

22

13

14

12

1

5

3

11

2

9

10

6

R 27

R 28

R2 9

R3 0

R1 5

R5

R 13

C3 9

1 00 nF

C31

10 0n F

3V

R14

U4

1 0K

2

STM1 00 1 R(NA)

VCC RESET

1

GND

100nF

R4 3

49.9/1%

TPOUT+

TPOUT-

LEDA

2

AG

LEDB

KG

AY

KY

TPIN+

7

6

TPIN-

1

3

8

L AN

TD+

TCT

TD-

AG

KG

AY

KY

RD+

RCT

RD-

1:1

R JL D-04 3TC

GREEN

1nF/2kV

75

75

R1 0

2K

R 16

2K

C33

C2

2 .2u F

+1 2V

R EL1

T3

BC8 17

+1 2V

R EL2

C3

1 00 nF

D12

2 2K

R11

R 19

1K

D1

R5 8

6 8k

75

75

1N 41 48

1 N4 14 8

R5 9

4 .7k

RELAY1

1

4

5

2

3

7

8

6

C3 2

VR

1

6

VIN

RT

7

4

EN/SYNC

GND FB

BD97 78 HFP

3

10 0n F

RST

INV

SW

5

2

C 21

4 .7 nF

R60

15 0K

TX D

2 FT_RX D

RX D

56 0R

5 60 R

5 60 R

5 60 R

5 60R

56 0R

56 0R

L 2

15 uH/DBS1 3 5

D3

1 N58 22 (SMC)

R XD

TXD

R TS

CTS

DTR

DCD

RI

C2 2

R6 1

4 .99 K/1%

10 uF/1 0V/12 06

HAN DSFREE

1-L

2

3-R

1

4 V_ E

2

N A

R6 2 R3

1 5K/1%

C63

4 .99 K/1%

10 nF

C2 3

220uF/10V/tant

DCDC_ E

1 2

0

D 11

1 N58 19 S

D14

1N5 81 9S(op t)

D 13

1 N58 19 S

C25

2 .2 uF

VR 1

3

1

VIN

2

VOUT

GND

MCP1 70 0T-30 02 E/TT

TXD,RXD,RTS,CTS,DTR,DCD,RI,DBG _ TX,DBG _ RX,MAIN_ RX,MAIN_ TX

33 pF

MIC

MIC

C1 2

JAC K-3 PINPHO NE_ JACK_ UNI

C1 6

3 3p F

R6 8

68

R6 9

10

C 11

3 3p F

C1 5

33 pF

C18

33 pF

C19

33 pF close to microphone

C 13

10 uF

SPEAKER

HEAD2

C20

33 pF

2

1

C6 0 C6 1

33 p 33 p close to connector

TXD,R XD,RTS,CTS,DTR ,DCD,RI,DBG _TX,DBG _RX,MAIN _RX,MAIN _TX

R53

2 2K/1%

R 54

2 K/1 %

+1 2V

R3 4

33 0

C4 0

10 uF/6 .3 V

PIC_ RST

1x2

2

1

3VA

R55

1K

C4 1

10 0n F

33pF

C4 2

33pF

C 43

R5 1

3V

C4 6

100nF

3 V

3 V

3 V

EXT1 -25

EXT2-2 4

EXT2 -2 5

EXT2 -26

Q1

2 5MH z

2k/1%

EXT1-2 6

C4 7

100nF

R A4

RB0

R5 0

1M

R4 9

LEDA

LEDB

B1

ALE

PGC

PGD

3V

TPIN-

TPIN+

TPOUT-

TPOUT+

RST

100nF

100nF

C4 8 C4 9

C 44

C4 5

100nF 100nF

C51

100nF

AREF

270/1%

C5 0

100nF

C52

100nF

R5 7

27 0/1 %

C 54

47 uF/6 .3V

C53

100nF

3VA

C5 5

100nF

15

36

40

60

65

85

17

37

59

62

86

35

34

33

32

42

41

69

68

67

57

7

8

5

6

29

63

64

U1

RA0/LEDA/AN0

RA1/LEDB/AN1

RA2/AN2/VREF-

RA3/AN3/VREF+

RA4/T0CKI

RA5/AN4

RB0/INT0/FLT0

RB1/INT1

RB2/INT2

RB3/INT3/ECCP2(1)/P2A(1)

RB4/KBI0

RB5/KBI1

RB6/KBI2/PGC

RB7/KBI3/PGD

ENVREG

RC0/T1OSO/T13CKI

RC1/T1OSI/ECCP2(1)/P2A(1)

RC2/ECCP1/P1A

RC3/SCK1/SCL1

RC4/SDI1/SDA1

RC5/SDO1

RC6/TX1/CK1

RC7/RX1/DT1

RD0/AD0/PSP0

RD1/AD1/PSP1

RD2/AD2/PSP2

RD3/AD3/PSP3

RD4/AD4/PSP4/SDO2

RD5/AD5/PSP5/SDI2/SDA2

RD6/AD6/PSP6/SCK2/SCL2

RD7/AD7/PSP7/#SS2

OSC1/CLKI

OSC2/CLKO

73

74

77

78

TPIN-

TPIN+

TPOUT-

TPOUT+

RE0/AD8/#RD/P2D

RE1/AD9/#WR/P2C

RE2/AD10/#CS/P2B

RE3/AD11/P3C(2)

RE4/AD12/P3B(2)

RE5/AD13/P1C(2)

RE6/AD14/P1B(2)

RE7/AD15/ECCP2(1)/P2A(1)

9

80

NC

RBIAS

13

16

#MCLR

VDDCORE/VCAP

RF0/AN5

RF1/AN6/C2OUT

RF2/AN7/C1OUT

RF3/AN8

RF4/AN9

RF5/AN10/CVREF

RF6/AN11

RF7/#SS1

76

75

79

72

VDD

VDD1

VDD2

VDD3

VDD4

VSS

VSS1

VSS2

VSS3

VSS4

VSS5

VDDTX

VDDRX

VSSTX

VSSRX

RG0/ECCP3/P3A

RG1/TX2/CK2

RG2/RX2/DT2

RG3/CCP4/P3D

RG4/CCP5/P1D

RG5

RG6

RG7

RH0/A16

RH1/A17

RH2/A18

RH3/A19

RH4/AN12/P3C(2)

RH5/AN13/P3B(2)

RH6/AN14/P1C(2)

RH7/AN15/P1B(2)

81

82

30

31

VDDPLL

VSSPLL

AVDD

AVSS

PIC 18 F97 J60

RJ0/ALE

RJ1/#OE

RJ2/#WRL

RJ3/#WRH

RJ4/BA0

RJ5/#CE

RJ6/#LB

RJ7/#UB

55

56

45

46

44

43

53

54

BUZ

SC K1

SDI1

SDO 1

RX D

TX D

Q_GND1

C 56 22pF

C5 7

92

91

90

89

88

87

84

83

4

3

98

97

96

95

94

93

RTS

CTS

DTR

DCD

RI

12

28

23

22

21

20

19

18 SS1

14

11

10

38

71

70

52

51

49

50

66

61

47

48

58

39

27

26

25

24

1

2

99

100

TX2

RX2

IN1

IN2

LED

RELAY2

R ELAY1

EXT1 -1 9

STATUS

PWRKEY

US B _P RE S E NT

USB_ RST

EXT1 -20

EXT1 -2 1

EXT1-2 2

EXT1 -23

EXT2 -1 6

EXT2 -17

EXT2 -18

EXT2 -19

EXT2-2 0

EXT2-2 1

EXT2-2 2

EXT2 -2 3

EXT1-2 4

EXT2-1

EXT2 -2

EXT2 -3

EXT2 -4

EXT2 -5

EXT2-6

EXT2-7

EXT2 -8

EXT2 -9

EXT2 -10

EXT2-11

EXT2-1 2

EXT2-1 3

EXT2-1 4

EXT2 -15

22pF

3 V_E

0

C26

1 0u F/12 06

6

5

4

3

8

7

2

1

3 V

R4 1

1 0

O PT_TEMP

CO N8 PH

SCL,SDA

Z2

R2 4

SIMDATA

SIMC LK

SIMRST

VSIM

3 30

D2

1N4 14 8

R20

R 21

R2 2

2 2

22

22

STATUS

EXT1 -1 3

EXT1 -14

EXT1 -15

EXT1 -16

EXT1 -1 7

EXT1-1 8

MAIN_ RX

MAIN_TX

DTR

RTS

CTS

RI

DCD

DBG _TX

DBG _RX

5

40

14

13

46

16

10

3

4

43

44

45

11

42

2

1

A1

G SM_ PCB_ANT

33

18

19

20

21

23

24

26

25

C1 0 C9 C8

10 p 10 0n close to module

10 p

RXD

TXD

RTS

CTS

DTR

DCD

RI

R1

0

EXT1-1 0

U3

STATUS

GPO1

VSIM

SIMDATA

SPI_DATA

SPI_CLK

SIMCLK

SIMRESET

SPI_CS

SIM_PRESENCE

SPI_D/C

KBROW0

BACKUP

VCHG

RXD

TXD

DTR

RTS

CTS

RI

DCD

DEBUG_TX

DEBUG_RX

TEMP_BAT

AUXADC

NETLIGHT

POWERKEY

VBAT1

VBAT2

ANTENNA

MIC2P

MIC2N

MIC1N

MIC1P

EAR+

RER-

AUDIOOUT+

AUDIOOUT-

GND1

GND2

GND3

GND4

GND5

GND6

GND7

GND8

GND9

AGND

SIM300D_HD_V2

17

30

31

32

34

35

36

37

48

22

41

12

38

39

9

6

7

8

47

VSIM

SIMDATA

SIMCLK

SIMRST

15

28

27

29

R72

R6

N A

NA

NETLIG HT

C5

VBAT

C4

5V_CH G_ E

1

0

2

47 uF/6 .3 V

+5V

4V_VBAT

C1 7

1

NA

2

C6

1 000 uF/6 .3 V/8 x1 2/lo w_ESR

VBAT

VBAT

R39

C7

1 00 nF

R40

1 K

0

EXT1-1 1

PWRKEY

R3 8

3 3K

3 V

3V

EXT1 -12

PWRKEY

6 x3 .8 x2 .5 /SMD

3V

R 63

56 0

D4

1 N4 14 8 L ED

N ETL IG HT

R64

2 K

R6 5

33 K

STAT red

Q 4

BC81 7

BUZ

D5

R66

1 N4 148 2 K

R6 7

33 K

Q 5

BUZ

PB1 22 1

BC81 7

B1

R42

33 0R

C5 9

10 0n F

R2

2 2K

R3 3

3 30

LED

D BG _TX

D TX/MTX

1 3

TXD

MAIN _TX

D BG _R X

DRX/MR X

1 3

RXD

MAIN _RX

SDA

SCL

3V

TX2

RX2

SCL

SDA

SDI1

SD O 1

SC K1

SS1

R5 6

3 3K

UEXT-1

UEXT-2

UEXT-3

UEXT-4

UEXT-5

UEXT-6

UEXT-7

U EXT-8

U EXT-9

UEXT-10

3V

BAT_E

90 -DEG REE

VBAT

3 V

3VA

VBAT

+5 V

+1 2V

AREF

USB_ PWR

EXT1 -1

EXT1 -2

EXT1-3

EXT1 -4

EXT1 -5

EXT1 -6

EXT1-7

EXT1 -8

EXT1 -9

SD A

SCL

BZV55 C5V1(mini-melf)

LED3 red 1

O PT2

R 25

3 30

D6

1N4 1 48

LED2 re d

2

1

2

SD A

SC L

H1 1A8 17 SMD

O PT1

C27 C28

3 30 pF(NA) 2 .2u F(NA)

C29

3

2

1

2 20 nF(NA)

SIMCLK

SIMIO

6

SIMRST

SIMNC

VCC

5

GND

4

SIM

SIM-HO LDER

4

IN2

3

4 IN1

3

H11 A8 17 SMD

ALE

R26

4.7 K

R 32

4 .7 K

3V

R 12

2 K

3 V

3V

R 8

1 K

3V

R 7

1 K

R2 3

U2

10 K

1

2

3

4

SDA

VDD

SCL

ALERT A0

A1

GND

A2

8

7

6

5

TCN7 5A/SO IC 8(NA)

PIC-GSM

R ev. A

3V

C30

1 n(N A)

C58

1 00 nF

CO PYRIG HT(C) 2 00 8, O limex L td.

http://www.olime x.co m/d ev

T4

BC8 17

R1 7

RELAY2

R 18

22 K

1 K

BOARD LAYOUT:

POWER SUPPLY CIRCUIT:

The power supply of PIC-GSM could be done in two different ways:

1. Power from +12VDC without using the internal backup battery.

The module is powered only from external 12V and the battery is not connected. In this case:

− jumper BAT_E must be open

− jumper 4V_E must be closed

− jumper 4V_VBAT must be closed

− jumper 5V_CHG_E must be open.

Power consumption in this mode is:

− about 240mA when have a conversation.

About 90mA in normal mode (without conversation) and active

WEB interface + 60mA if relays are turned on.

Important: 4V_E, 4V and 5V_CHG_E jumpers have to be moved together.

2. Power from +12VDC with backup battery.

The module is powered with battery and allows battery charging. In this case:

− jumper BAT_E must be closed

− jumper 4V_E must be open

− jumper 4V_VBAT must be open

− jumper 5V_CHG_E must be closed

Power consumption in this mode: depend on the battery charge may vary between 90mA and 300mA.

If the 12V power supply is missing the battery discharge current depend from activated microcontroler modules. Max current consumption reach up to 500 mA when all microcontroler moduls are switched on and have a conversation.

RESET CIRCUIT:

PIC-GSM reset circuit is made with RC group and optional STM1001R chip with typical threshold +2.63V. By default STM1001R chip is not assembled

CLOCK CIRCUIT:

Quartz crystal 25MHz is connected to PIC18F97J60.

CONNECTOR DESCRIPTIONS:

ICSP:

3

4

5

1

2

6

Pin # Signal Name

RST

VCC

GND

PGD

PGC

NC

This connector allows programming and debugging via

PIC-ICD2 , PIC-

ICD2-POCKET , PIC-ICD2-TINY

and other Microchip compatible tools.

USB:

1

2

3

4

Pin # Signal Name

VCC

USBDM

USBDP

GND

This is standard USB Type B connector for connection to PC. On board there is FT232RL USB to UART converter. To use it you should download and install the drivers for your OS from http://www.ftdichip.com

.

PIC18F97J60 can control FTDI chip as detect

USB present and can toggle RST line of FTDI chip, i.e. the microcontroler decides whether the communication is between PC terminal and GSM module or between PIC18F97J60 and GSM module.

The microcontroler has possibility to communicates with PC host through virtual COM port emulated from FT232RL chip. For this purpose you can switch J1 and J2 jumpers from 1-2 state to 2-3 state and remove DTX/MTX and DRX/MRX jumpers. For detail description see jumper description section.

SIM-CARD:

1

2

3

4

5

6

Pin # Signal Name

VSIM

SIMRST

SIMCLK

GND

NC

SIMDATA

This is standard SIM card connector, to operate PIC-GSM should have inserted valid SIM card for your operator network. Note that the SIM card should be without PIN security.

PWR-CON :

1

2

Pin # Signal Name

+12-14V

GND

This connector is used to power the PIC-GSM. External (12-14VDC) power source have to be applied to this pins. The board contain grec schematic and you can connect power supply without polar consideration.

OUTPUT RELAYS CONNECTOR:

Pin #

1

4

5

2

3

6

Signal Name

NO-REL1

COMMON-REL1

NC-REL1

NO-REL2

COMMON-REL2

NC-REL2

NO – relay normally opened contact, NC – relay normally closed contact

COMMON – relay common contact

By this connector the user can switch on/off load witch not exceed next maximal admissible ranges:

15A/125VAC

10A/250VAC

15A/24VDC

INPUT OPTOCOUPLER & TEMP CONNECTOR:

1

2

3

4

7

8

5

6

Pin #

GND

SCL

SDA

3V

Signal Name

DIGITAL IN1 +

DIGITAL IN1 -

DIGITAL IN2 +

DIGITAL IN2 -

Two digital optoisolated inputs are available for user code. The input level are between 5 and 12V DC.

I2C signals (SCL, SDA) are used for external temperature sensor connection or other suitable I2C device interfacing.

There is possibility up to 8 external temperature sensors on this bus.

Olimex sell these modules separately under the order code MOD-TMP and communication with up to 30 meters between the PIC-GSM and MOD-TEM is possible error free.

HANDSFREE:

Pin #

GND

AU+

MIC

Signal Name

GND

AU+ audio out

MIC2P audio in

This is Audio 2.5 mm connector. Standard hands-free headphone/microphone combined cable can be used

SPEAKER CONNECTOR - SPEAKER:

Pin #

1

2

Signal Name

EAR–

EAR+

EXT1 :

This is connector for external 32 ohm speaker

21

23

25

15

17

19

7

9

11

13

1

3

5

Pin # Signal Name

+3V(out)

+3V analog(out)

AREF

USB_PWR(+5V)

+12V(Vin)

AUXADC

GPO1

SPI_CLK

SPI_D/C

RG0/ECCP3/P3A

RH5/AN13/P3B(2)

RH7/AN15/P1B(2)

RA2/AN2/VREF-

22

24

26

16

18

20

8

10

12

14

2

4

6

Pin # Signal Name

GND

GNDA

VBAT

DCDC_output – 5V default

BACKUP_GSM-MODULE

POWERKEY

SPI_DATA

SPI_CS

KBROW0

RH4/AN12/P3C(2)

RH6/AN14/P1C(2)

RD7/AD7/PSP7/#SS2

RST

EXT1 is connector for external plug-in modules. It's standard 26 pin (90 degree) ribbon cable IDC keyed connector.

3V: Digital power of PIC18F97J60. This is 3VDC output for external digital modules.

GND: Digital ground.

3VA: Analog power supply of PIC18F97J60 microcontroller. This is 3VDC output which can be used for external analog modules.

GNDA: Analog ground of PIC18F97J60 microcontroller. Can be used for external analog circuits.

AREF: Analog reference input of PIC18F97J60 microcontroller. Can be used for external analogue circuits.

VBAT: Dedicated to connect main Li-ion battery. The power supply of GSM module has to be a single voltage source of VBAT= 3.4V...4.5V. Li-ion battery with 650mA capacity is used in PIC-GSM.

USB-PWR. +5V output direct connected to +5V of the USB connector.

DCDC-OUTPUT. 5V or 4V output (up to 2A) from DCDC converter depending on jumper configuration. For details see jumper description section.

+12V(Vin). Input or output terminal for power supply. If the power source is connected to the module this terminal can use as +12V output . Otherwise this terminal can use for power source input.

Backup: RTC backup power supply for the GSM module real time clock and RAM, when the battery is discharged. If the battery attached to this signal is chargeable and the voltage level is low the module will charge the battery. Vnom = 1.8V, Inom= 20uA

AUXADC: This is general purpose analog to digital converter build-in the GSM module. The input voltage value should be in range 0V to 2.4V. This pin value can be read with AT command.

POWERKEY: This is GSM module power on/off key. When the module is ON if you press and hold for more than 3 seconds the module go in power down state. If the module if in power down mode and you press and hold this key for more than 1 second the module will go in ON mode.

GPO1: This is GPO of GSM module and can be configured by AT command for outputting high or low level voltage. All of the GPOs are initialy in low state without any setting from AT command.

SPI_DATA,SPI_CLK,SPI_CS,SPI_D/C: This is GSM module SPI port reserved for future use.

KBROW0: This is external keyboard input pin of GSM module.

RG0/ECCP3/P3A, RG0/ECCP3/P3A, RH5/AN13/P3B(2), RH6/AN14/P1C(2),

RH7/AN15/P1B(2), RD7/AD7/PSP7/#SS2, RA2/AN2/VREF- These are PIC18F97J60 port pins.

RST: PIC18F97J60 Reset pin.

EXT2:

9

11

13

15

17

1

3

5

7

19

21

23

25

Pin # Signal Name

RE0/AD8/#RD/P2D

RE2/AD10/#CS/P2B

RE4/AD12/P3B(2)

RE6/AD14/P1B(2)

RF0/AN5

RF2/AN7/C1OUT

RF4/AN9

RF6/AN11

RJ1/#OE

RJ3/#WRH

RJ5/#CE

RJ7/#UB

RB4/KBI0

10

12

14

16

18

2

4

6

8

20

22

24

26

Pin # Signal Name

RE1/AD9/#WR/P2C

RE3/AD11/P3C(2)

RE5/AD13/P1C(2)

RE7/AD15/ECCP2(1)P2A(1)

RF1/AN6/C2OUT

RF3/AN8

RF5/AN10/CVREF

RJ0/ALE

RJ2/#WRL

RJ4/BA0

RJ6/#LB

PB3/INT3/ECCP2(1)/P2A(1)

RB5/KBI1

EXT2 is connector for external plug-in modules. It's standard 26 pin ribbon cable IDC keyed connector. On this connector are routed the rest PIC18F97J60 port pins and you can use for your custom application.

UEXT:

7

8

5

6

9

10

1

2

3

4

Pin #

SCL

SDA

SDI1

SDO1

SCK1

SS1

Signal Name

VCC

GND

TX2

RX2

UEXT

is connector for external plug-in modules. It's standard 10 pin ribbon cable IDC keyed connector.

UEXT is a universal OLIMEX connector with 3.3V power supply and

UART, SPI and I2C interface. Other device or modules with these interfaces can connected with UEXT.

JUMPER DESCRIPTION:

BAT_E

Connects 3.7V Li-ion battery to the GSM module. Default state is to be open to not drain the battery during stocking the modules.

4V_E

Default state - open

When this jumper is open state the DCDC voltage output is set to 5V, when the jumper is closed the DCDC output voltage is set to 4V. This is necessary when the main battery is not connected and the supply voltage should be 4V, when the battery is connected 4V_E jumper must be open and the DCDC voltage should be 5V.

Default state – open.

4V_VBAT

When the main battery is not present, this jumper feeds the 4V from the DCDC output to the GSM module.

Default state – open.

5V_CHG_E

The GSM module have build in li-ion charge circuit. This jumper connects the DCDC 5V output to the internal charger circuit.

DCDC_E

3V_E

Default state closed

Important: 4V_E, 4V and 5V_CHG_E jumpers have to be moved together.

Do not plug in external +12V if BAT_E jumper is open!

You should be very careful for battery voltage, which should be over 3.8 V, never lower. Battery is charged when voltage is 4.1 V.

This jumper connects the DCDC output to the GSM module. It is useful to measure the current consumption.

Default state closed

This jumper connects +3V to FT232RL and PIC18F97J60.It is useful to measure the current consumption.

Default state closed

Download

This is GSM module bootloader enable pin. Reserved for GSM module firmware upgrade.

Default state – open.

MTX/DTX

The GSM module have two UART channels. One for the commands, one for debugging. With this jumper you control which channel goes to PIC18F97J60 or FT232RL.

MTX/DTX

Default state MTX

MRX/DRX

The GSM module have two UART channels. One for the commands, one for debugging. With this jumper you control which channel goes to PIC18F97J60 or FT232RL.

MRX/DRX

J1,J2

Default state MRX

These jumpers allow to switch the virtual RS232 communication port of the FT232RL chip to the MTX/DTX controller or to the SIM300D module. Default configuration is

SIM300D module to communicates with FT232RL chip, but if you wish to use USART communication option of Microchip

TCP/IP stack, you can switch J1 and J2 jumpers. When J1 and J2 jumpers are to 1-2 state - serial communication from

FT232RL chip is connected to the GSM module. You can use virtual com port for communication with GSM module. The

PIC18F97J60 microcontroller however must release RXD and

TXD pins. When J1 and J2 jumpers are to 2-3 state - serial communication from FT232RL chip is connected to the

PIC18F97J60 microcontroller. You can use virtual com port for communication with PIC18F97J60. MTX/DTX and MRX/DRX jumpers however must be open and you can not communicate with GSM module.

1 2 3

Default state 1-2

INPUT/OUTPUT:

LAN: RJ45 isolated ethernet connector. You can connect to PC host(with crossed cable), router or ethernet switch. The default IP address is:

192.168.0.105. The main page properties are described in software section.

Button B1: user button connected to PIC18F97J60 pin.6 RB1 (INT1);

PWRKEY button – This is GSM module power on/off key. When the module is ON if you press and hold for more than 3 seconds the module go in power down state. If the module if in power down mode and you press and hold this key for more than 1 second the module will go in ON mode.

MIC – on-board microphone (voice), with AT command you can switch the voice audio input to be taken from this microphone of from the handsfree audio connector.

SPEAKER – voice output for external 32 ohm speaker, with AT command you can switch the voice audio output to be directed to this speaker or to the handsfree audio connector.

HANDSFREE – audio 2.5 mm jack microphone input and speaker output.

BUZ – audio buzzer , can be used as RING signalization.

Status green LED with name LED connected to PIC18F97J60 pin.11 RG5.

Status red LED with name STAT – indicates the state of GSM module.

STAT is off state – GSM module is not running

64ms On/ 800ms Off – GSM module does not find the network

64ms On/ 3000ms Off – GSM module is connected to the network

64ms On/ 300ms Off - GPRS communication

Optocouple 1 – OPT1 (H11A817SMD) - 5V-12V optoisolated input with

LED2 indication and open collector output connect to PIC18F97J60 pin.51

(CCP4/P3D). Positive voltage of '+' terminal and negative voltage or GND of

'-' terminal of OPT_TEMP connector, reflect with log. 0 of PIC18F97J60 input.

Optocouple 2 – OPT2 (H11A817SMD) - 5V-12V optoisolated input with

LED3 indication and open collector output connect to PIC18F97J60 pin.14

(PG4/CCP5/P1D).Positive voltage of '+' terminal and negative voltage or

GND of '-' terminal of OPT_TEMP connector, reflect with log. 0 of

PIC18F97J60 input.

Relay1 – REL1 240VAC/10A (RAS1215) with default tied Normal Close (NC) and COM terminals and disconnected Normal Open and COM terminals.

LED_R1 (Red) indicated when turn on REL1. The relay is turned on with log 1 of PG7 port.

Relay2 – REL2 240VAC/10A (RAS1215) with default tied Normal Close (NC) and COM terminals and disconnected Normal Open and COM terminals.

LED_R2 (Red) indicated when turn on REL2. The relay is turned on with log 1 of PG6 port.

MECHANICAL DIMENSIONS:

All measures are in mm.

AVAILABLE DEMO SOFTWARE:

2. Software notes

Software, that PIC-GSM board is shipped with, includes Microchip TCP/IP stack is combined with simple functionality for making calls and sending SMS with SIM300D

GSM/GPRS module. This note explains features of PIC-GSM board. For more information on the Microchip TCP/IP Stack, please refer to application note AN833 available at http://www.microchip.com

.

SMS sending functionality is strongly dependent of serial communication between

PIC18F67J60 MCU and SIM300D module. Consequently board software functions are very sensitive to any messages send from SIM300D module. For example, when SIM300D module goes to specific states(POWER DOWN, Call Ready etc), it sends indicating messages via serial line, which can affect communication with PIC18F97J60 and cause wrong behavior of software.

Specific features:

First time you insert power to board USB should not be connected to board due to initialization procedures between PIC and GSM module.

UART baud rate, which ensures best performance is 115200 bps. Other specific

• features, which software rely on are:

Disable echo(command used is ATE0)

Set SMS text format (command used is AT+CMGF=1)

After board power-up software continuously sends “AT” command expecting “OK”

• string, ensuring proper communication with GSM module.

Software allows to dial GSM and make GSM call, getting GSM number or SMS text from web page form. GSM number length is 16 digits

Software allows sending SMS getting GSM number and SMS text from web page forms. GSM number must be typed with country code without “+” sign. GSM number length is 16 digits and SMS message length 32 digits.

Status page item “Open Call” displays information about call processing .”0” indicates that no call is in process. “1” indicates that GSM call is in process. (After

GSM number is dialed, “Open Call” value is set to “1”, if other side close call after a

• while “Open Call” value returns back to “0”. If other side accept call, “Open Call” value remains “1”, for the time of call is in process. When call is closed “Open Call” value is set back to “0”)

PIC-GSM Board has 2 audio channels – one connected to MIC, and auxiliary connected to HANDSFREE. You can switch to next audio channel by pressing button B1.

Pressing button toggle the on board buzzer unless the GSM module is not in open call mode.

When you plug USB cable to the board, the FTDI chip on the board emulates virtual

COM port and you can connect to SIM300D module with HyperTerminal. First

• however have to install FTDI drivers available on the http://www.ftdichip.com/

Temperature, displayed on web page is read from SIM300D module with AT command (AT+CMTE?). Any problem with correct displaying temperature, is related with correct handling of used AT command output or GSM module response. This measurement should not be treated as reliable .

Another useful feature is ability of getting temperatures from up to 8 external temperature sensors TCN75A connected via I2C interface. In "Temperature sensors presence" each item stands for presence of sensor with given hardware address 000 for Temp sensor 1, 001 for temp sensor 2, ... and 111 for temp sensor 8.

"Temperature measured by sensors" section contains temperature in C° measured by sensor(s) available.

Items: Relay 1, Relay 2 and LED buttons from “Status” section display voltage applied to corresponding input/output 1- high voltage; 0 – low voltage.

Log “1” of Relay1 (PG7) and Relay2 (PG6) outputs means that the Relay is turned on, while log “0” mean that the Relay is turned off.

Log “1” to the LED output (PG5) means that LED is turned off, while log “0” mean that the LED is turned on.

Logical “1” on Opto input 1(RG3) and Opto input 2 (RG4) means that high voltage is

• applied to the input

Status page item “seconds” displays seconds elapsed from program start, measured by RTC.

Status page item “Uin” displays input voltage in Volts, measured on RA5(AN4) pin .

“Test board area” section is not intended for user examination and shouldn't be used by customer.

Advices to customer for further use:

User should be familiar with basic AT commands(make call, send SMS, read SMS etc).

SIM card, you put should be with disabled PIN code use. So before use, put SIM card in normal GSM and disable PIN code use.

ORDER CODE:

How to order?

You can order to us directly or by any of our distributors.

Check our web

www.olimex.com/dev

for more info.

Revision history:

REV.A

All boards produced by Olimex are ROHS compliant

- create April 2008

Disclaimer:

© 2008 Olimex Ltd. All rights reserved. Olimex®, logo and combinations thereof, are registered trademarks of Olimex Ltd. Other terms and product names may be trademarks of others.

The information in this document is provided in connection with Olimex products. No license, express or implied or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Olimex products.

Neither the whole nor any part of the information contained in or the product described in this document may be adapted or reproduced in any material from except with the prior written permission of the copyright holder.

The product described in this document is subject to continuous development and improvements. All particulars of the product and its use contained in this document are given by OLIMEX in good faith. However all warranties implied or expressed including but not limited to implied warranties of merchantability or fitness for purpose are excluded.

This document is intended only to assist the reader in the use of the product. OLIMEX Ltd.

shall not be liable for any loss or damage arising from the use of any information in this document or any error or omission in such information or any incorrect use of the product.

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement