PIC-GSM
-
Upload
lisandro-cunha -
Category
Documents
-
view
146 -
download
1
Transcript of PIC-GSM
PIC-GSM development board Users Manual
All boards produced by Olimex are ROHS compliant
Rev.A, June 2008Copyright(c) 2008, OLIMEX Ltd, All rights reserved
INTRODUCTION:PIC-GSM is excellent board for adding remote monitoring and control inremote places by GSM cellular network or ethernet or internet network. Doyou want to switch on/off your local heating in your mountain house? Tomonitor the temperature at up to 8 remote points up to 30 meters awayfrom the module? To listen what happens in your house with silent callafter you get message for alarm status? Then PIC-GSM is the board foryou! It contains PIC18F97J60 microcontroller and 3-band GSM GPRSmodule 900/1800/1900Mhz inside which covers most used GSM networksaround the world. The GSM antenna is build in the board so no need forexternal expensive GSM antennas. PIC-GSM have two relays 240VAC/10A,two opto-isolated inputs which could be connected to alarm sensors or justbuttons for user actions (like call pre-loaded phone numbers), on-boardtemperature sensor and connector for additional up to 8 addressableremote temperature sensors at up to 30 meter distance from the module.Normal phone hook can be connected to this board and to allow user tospeak, listen, taking and placing phone calls as normal stand alonecellular phone. PIC-GSM can be connected to PC with the USB connector ithave and it is recognized as modem which could be used to add internetvia GPRS to your computer (imagine how useful is this for your mountainhouse if there is no internet but only cellular network!). If you haveinternet connection you can monitor the same parameters on the WEBpage.
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. Theboard must not be subject to high electrostatic potentials. General practicefor working with static sensitive devices should be applied when workingwith 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 toPC or straight if the module is connected to router or ethernetswitch.
Hardware: PIC-ICD2, PIC-ICD2-POCKET, PIC-ICD2-TINYOr any compatible tool for programming and/or debugging
!!!Warning!!! When you want to program this microcontrollerwith PIC-ICD2, PIC-ICD2-POCKET or PIC-ICD2-TINY, beforeconnecting the programmer to your target board, you shouldfirst connect the programmer to your computer and openMPLAB. There, first from menu Configure – Select Device –choose the microcontroller you are about to program, thenfrom menu Programmer – Select Programmer – choose MPLABICD 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 fromMPLAB ICD 2 – this option should be forbidden, you could notselect it. Now it is safe to connect the programmer to yourtarget board.
Software: Microchip MPLAB IDE + C18 C compiler for developing yourown applicationsThe demo software show basic functionality and how to place /take phone calls (C source and HEX) or how to remote controlvia SMS and WEB page(C source and HEX)
Important: If your board does not work, first try to charge the battery asyou 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 ExternalSource:– 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) modulessupporting 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
SCHEMATIC:0
NA
NA
0
CO
N2P
H
GS
M_P
CB
_AN
T
90-D
EG
RE
E
PB
1221
1000
uF/1
6VD
C2.
2uF
100n
F
47uF
/6.3
V
10uF/10V/1206
220uF/10V/tant
100n
F
10p
100n
10p
33pF
33pF
10uF
10nF
33pF
33pF
1000
uF/6
.3V
/8x1
2/lo
w_E
SR
33pF
33pF
33pF
4.7n
F10
uF/1
0V/1
206
220u
F/10
V/ta
nt
1000uF/6.3V/8x12/low_ESR
2.2u
F10
uF/1
206
330p
F(N
A)
2.2u
F(N
A)
220n
F(N
A)
1n(N
A)
100n
F
100n
F
100n
F
100n
F
NA
NA
10uF/6.3V
100nF
100n
F
10uF
/6.3
V10
0nF
33pF
33pF
100n
F
100n
F
100n
F10
0nF
100n
F10
0nF
100n
F
100n
F10
0nF
100n
F
47uF
/6.3
V10
0nF
22pF
22pF
100n
F
100n
F
33p
33p
1000
uF/1
6VD
C
10nF
1000uF/6.3V/8x12/low_ESR
1N41
48
1N41
48
1N58
22(S
MC
)
1N41
48
1N41
48
1N41
48
1N4148 1N4148
1N4148 1N4148
1N58
19S
1N41
48
1N58
19S
1N58
19S
(opt
)
0B
-DIL
3
JAC
K-3
PIN
PH
ON
E_J
AC
K_U
NI
CO
N62
.54-
0-D
ferr
ite b
ead
15uH
/DB
S13
5
RJL
D-0
43TC
red
red
red
MIC
H11
A81
7SM
D
H11
A81
7SM
DC
ON
8PH
+5V
VB
AT
VB
AT
VB
AT
+12V
+5V
+12V
VB
AT
VB
AT
+12V
VB
AT
3VA
3VA
+12V
+12V
+5V
+5V
3VA
1x2
6x3.
8x2.
5/S
MD
25M
Hz
Q_G
ND
1
BC
817
BC
817
0
22K
4.99
K/1
%
68K
560R
NA
1K1K
2K
1K
2K
560R
10K
560R
2K
1K
22K
22K
22 22 22
10K
330
330
4.7K
560R
560R
560R
560R
4.7K
330
330
0 0
NA
33K
0
1K
10
330R
49.9
/1%
49.9
/1%
49.9
/1%
49.9
/1%
180
180
270/
1%
1M
2k/1
%
180
22K
/1%
2K/1
%
1K
33K
270/
1%
68k
4.7k
150K
4.99
K/1
%15
K/1
%
560
2K
33K
2K
33K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
2
3
J2
L1
L2
AG
AG
AY
AY
KG
KG
KY
KY
RC
T6
RD
+7
RD
-8
TCT
3TD
+1
TD-
275
75
7575
1nF/
2kV
1 4 5 2 3 7 8 6
GR
EEN
YELL
OW
LAN
LED
LED
2
LED
3
LED_R1 LED_R2
+P+-P-
MIC
1 2
4 3
OP
T1
1 2
4 3
OP
T2
12345678O
PT_
TEM
P
12P
IC_R
ST
PW
RK
EY
Q1
Q2
Q4
Q5
R1
R2
R3
R4
R5
R6
R7
R8
R10
R11
R12
R13
R14
R15
R16
R17
R18
R19
R20
R21
R22
R23
R24
R25
R26
R27
R28
R29
R30
R32
R33
R34
R35
R36
R37
R38
R39
R40
R41
R42
R43
R44 R
45
R46
R47
R48
R49
R50
R51
R52
R53
R54
R55
R56
R57
R58
R59
R60
R61
R62
R63
R64
R65
R66
R67
R68 R69
R70
R71
R72
RA
4
RB
0
1 2 3 4 5 6
RE
L
RE
L1
RE
L1
RE
L2
RE
L2
GN
D4
SIM
CLK
3S
IMIO
6
SIM
NC
5S
IMR
ST
2
VC
C1
SIM
12S
PE
AK
ER
STA
T
T3 T4
#MC
LR13
AV
DD
30
AV
SS
31
EN
VR
EG
29
NC
9
OS
C1/
CLK
I63
OS
C2/
CLK
O64
RA
0/LE
DA
/AN
035
RA
1/LE
DB
/AN
134
RA
2/A
N2/
VR
EF-
33
RA
3/A
N3/
VR
EF+
32
RA
4/T0
CK
I42
RA
5/A
N4
41
RB
0/IN
T0/F
LT0
5
RB
1/IN
T16
RB
2/IN
T27
RB
3/IN
T3/E
CC
P2(
1)/P
2A(1
)8
RB
4/K
BI0
69
RB
5/K
BI1
68
RB
6/K
BI2
/PG
C67
RB
7/K
BI3
/PG
D57
RB
IAS
80
RC
0/T1
OS
O/T
13C
KI
44
RC
1/T1
OS
I/EC
CP
2(1)
/P2A
(1)
43
RC
2/E
CC
P1/
P1A
53
RC
3/S
CK
1/S
CL1
54
RC
4/S
DI1
/SD
A1
55
RC
5/S
DO
156
RC
6/TX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S
STX
79
U1
A0
7
A1
6
A2
5
ALE
RT
3
GN
D4
SC
L2
SD
A1
VD
D8
U2
AG
ND
22
AN
TEN
NA
33
AU
DIO
OU
T+26
AU
DIO
OU
T-25
AU
XA
DC
29
BA
CK
UP
15
CTS
45
DC
D42
DE
BU
G_R
X1
DE
BU
G_T
X2
DTR
43
EA
R+
23
GN
D1
17
GN
D2
30
GN
D3
31
GN
D4
32
GN
D5
34
GN
D6
35
GN
D7
36
GN
D8
37
GN
D9
48
GP
O1
40
KB
RO
W0
10
MIC
1N20
MIC
1P21
MIC
2N19
MIC
2P18
NE
TLIG
HT
41
PO
WE
RK
EY
12
RE
R-
24
RI
11
RTS
44
RX
D3
SIM
CLK
7S
IMD
ATA
6
SIM
RE
SE
T8
SIM
_PR
ES
EN
CE
47S
PI_
CLK
13
SP
I_C
S46
SP
I_D
/C16
SP
I_D
ATA
14
STA
TUS
5
TEM
P_B
AT
27TX
D4
VB
AT1
38
VB
AT2
39
VC
HG
28
VS
IM9
U3
3
12U
4
GN
D
VC
CR
ES
ET
#RE
SE
T19
3V3O
UT
17
AGND25
CB
US
023
CB
US
122
CB
US
213
CB
US
314
CB
US
412
CTS
#11
DC
D#
10D
SR
#9
DTR
#2
GND17
GND218
GND321
NC
18
NC
224
OS
CI
27
OS
CO
28
RI#
6
RTS
#3
RX
D5
TEST26
TXD
1
US
BD
M16
US
BD
P15
VC
C20
VC
CIO
4
U5
UE
XT-
1U
EX
T-2
UE
XT-
3U
EX
T-4
UE
XT-
5U
EX
T-6
UE
XT-
7U
EX
T-8
UE
XT-
9U
EX
T-10
1 2 3 4
US
B
EN
/SY
NC
7
FB3
GN
D4
INV
5
RT
6S
W2
VIN
1V
R
GN
D1
VIN
3
VO
UT
2
VR
1
Z2
clos
e to
mod
ule
clos
e to
mic
roph
one
clos
e to
con
nect
or
J1J2
MO
DE
1-2
1-2
2-3
2-3
FT23
2 co
nnec
ted
to P
ICF
T232
con
nect
d to
GS
M
DT
X/M
TX
and
DR
X/M
RX
to b
e O
PE
N
PIC
-GSM
Rev
. A
CO
PY
RIG
HT(
C)
2008
, Olim
ex L
td.
http
://w
ww
.olim
ex.c
om/d
ev
+
+
+
+
+
+
+
+
+
+
+
+
1-L 2
3-R
RJ45 SIDE
1:1
1:1
GND
FT232RL
USB
SH
IEL
D
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 notconnected. 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 movedtogether.
2. Power from +12VDC with backup battery.The module is powered with battery and allows battery charging. Inthis 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 currentconsumption reach up to 500 mA when all microcontroler modulsare switched on and have a conversation.
RESET CIRCUIT:
PIC-GSM reset circuit is made with RC group and optional STM1001R chipwith typical threshold +2.63V. By default STM1001R chip is not assembled
CLOCK CIRCUIT:
Quartz crystal 25MHz is connected to PIC18F97J60.
CONNECTOR DESCRIPTIONS:
ICSP:
Pin # Signal Name
1 RST
2 VCC
3 GND
4 PGD
5 PGC
6 NC
This connector allows programming and debugging via PIC-ICD2, PIC-ICD2-POCKET, PIC-ICD2-TINY and other Microchip compatible tools.
USB:
Pin # Signal Name
1 VCC
2 USBDM
3 USBDP
4 GND
This is standard USB Type Bconnector for connection to PC. On board there is FT232RL USB to UARTconverter. To use it you should download and install the drivers for your OSfrom http://www.ftdichip.com . PIC18F97J60 can control FTDI chip as detectUSB present and can toggle RST line of FTDI chip, i.e. the microcontrolerdecides whether the communication is between PC terminal and GSMmodule or between PIC18F97J60 and GSM module. The microcontroler has possibility to communicates with PC host throughvirtual COM port emulated from FT232RL chip. For this purpose you canswitch J1 and J2 jumpers from 1-2 state to 2-3 state and remove DTX/MTXand DRX/MRX jumpers. For detail description see jumper descriptionsection.
SIM-CARD:
Pin # Signal Name
1 VSIM
2 SIMRST
3 SIMCLK
4 GND
5 NC
6 SIMDATA
This is standard SIM card connector, to operate PIC-GSM should haveinserted valid SIM card for your operator network. Note that the SIM cardshould be without PIN security.
PWR-CON :
Pin # Signal Name
1 +12-14V
2 GND
This connector is used to power the PIC-GSM. External (12-14VDC) powersource have to be applied to this pins. The board contain grec schematicand you can connect power supply without polar consideration.
OUTPUT RELAYS CONNECTOR:
Pin # Signal Name
1 NO-REL1
2 COMMON-REL1
3 NC-REL1
4 NO-REL2
5 COMMON-REL2
6 NC-REL2
NO – relay normally opened contact, NC – relay normally closed contactCOMMON – relay common contactBy this connector the user can switch on/off load witch not exceed nextmaximal admissible ranges:
- 15A/125VAC- 10A/250VAC- 15A/24VDC
INPUT OPTOCOUPLER & TEMP CONNECTOR:
Pin # Signal Name
1 DIGITAL IN1 +
2 DIGITAL IN1 -
3 DIGITAL IN2 +
4 DIGITAL IN2 -
5 GND
6 SCL
7 SDA
8 3V
Two digital optoisolated inputs are available for user code. The input levelare between 5 and 12V DC.I2C signals (SCL, SDA) are used for external temperature sensor connectionor 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 andcommunication with up to 30 meters between the PIC-GSM and MOD-TEMis possible error free.
HANDSFREE:
Pin # Signal Name
GND GND
AU+ AU+ audio out
MIC MIC2P audio in
This is Audio 2.5 mm connector. Standard hands-freeheadphone/microphone combined cable can be used
SPEAKER CONNECTOR - SPEAKER:
Pin # Signal Name
1 EAR–
2 EAR+
This is connector for external 32 ohm speaker
EXT1 :
Pin # Signal Name Pin # Signal Name
1 +3V(out) 2 GND
3 +3V analog(out) 4 GNDA
5 AREF 6 VBAT
7 USB_PWR(+5V) 8 DCDC_output – 5V default
9 +12V(Vin) 10 BACKUP_GSM-MODULE
11 AUXADC 12 POWERKEY
13 GPO1 14 SPI_DATA
15 SPI_CLK 16 SPI_CS
17 SPI_D/C 18 KBROW0
19 RG0/ECCP3/P3A 20 RH4/AN12/P3C(2)
21 RH5/AN13/P3B(2) 22 RH6/AN14/P1C(2)
23 RH7/AN15/P1B(2) 24 RD7/AD7/PSP7/#SS2
25 RA2/AN2/VREF- 26 RST
EXT1 is connector for external plug-in modules. It's standard 26 pin (90 degree) ribboncable 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 canbe used for external analog modules.
GNDA: Analog ground of PIC18F97J60 microcontroller. Can be used for external analogcircuits.
AREF: Analog reference input of PIC18F97J60 microcontroller. Can be used for externalanalogue circuits.
VBAT: Dedicated to connect main Li-ion battery. The power supply of GSM module has tobe a single voltage source of VBAT= 3.4V...4.5V. Li-ion battery with 650mA capacity is usedin 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 jumperconfiguration. For details see jumper description section.
+12V(Vin). Input or output terminal for power supply. If the power source is connected tothe module this terminal can use as +12V output . Otherwise this terminal can use forpower source input.
Backup: RTC backup power supply for the GSM module real time clock and RAM, when thebattery is discharged. If the battery attached to this signal is chargeable and the voltagelevel 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. Theinput voltage value should be in range 0V to 2.4V. This pin value can be read with ATcommand.
POWERKEY: This is GSM module power on/off key. When the module is ON if you pressand hold for more than 3 seconds the module go in power down state. If the module if inpower down mode and you press and hold this key for more than 1 second the module willgo in ON mode.
GPO1: This is GPO of GSM module and can be configured by AT command for outputtinghigh or low level voltage. All of the GPOs are initialy in low state without any setting from ATcommand.
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 PIC18F97J60port pins.
RST: PIC18F97J60 Reset pin.
EXT2:
Pin # Signal Name Pin # Signal Name
1 RE0/AD8/#RD/P2D 2 RE1/AD9/#WR/P2C
3 RE2/AD10/#CS/P2B 4 RE3/AD11/P3C(2)
5 RE4/AD12/P3B(2) 6 RE5/AD13/P1C(2)
7 RE6/AD14/P1B(2) 8 RE7/AD15/ECCP2(1)P2A(1)
9 RF0/AN5 10 RF1/AN6/C2OUT
11 RF2/AN7/C1OUT 12 RF3/AN8
13 RF4/AN9 14 RF5/AN10/CVREF
15 RF6/AN11 16 RJ0/ALE
17 RJ1/#OE 18 RJ2/#WRL
19 RJ3/#WRH 20 RJ4/BA0
21 RJ5/#CE 22 RJ6/#LB
23 RJ7/#UB 24 PB3/INT3/ECCP2(1)/P2A(1)
25 RB4/KBI0 26 RB5/KBI1
EXT2 is connector for external plug-in modules. It's standard 26 pin ribbon cable IDC keyedconnector. On this connector are routed the rest PIC18F97J60 port pins and you can usefor your custom application.
UEXT:
Pin # Signal Name
1 VCC
2 GND
3 TX2
4 RX2
5 SCL
6 SDA
7 SDI1
8 SDO1
9 SCK1
10 SS1
UEXT is connector for external plug-in modules. It's standard 10 pin ribbon cable IDCkeyed connector. UEXT is a universal OLIMEX connector with 3.3V power supply andUART, SPI and I2C interface. Other device or modules with these interfaces can connectedwith UEXT.
JUMPER DESCRIPTION:
BAT_E Connects 3.7V Li-ion battery to the GSM module. Default stateis to be open to not drain the battery during stocking themodules.
Default state - open
4V_E When this jumper is open state the DCDC voltage output is setto 5V, when the jumper is closed the DCDC output voltage isset to 4V. This is necessary when the main battery is notconnected and the supply voltage should be 4V, when thebattery is connected 4V_E jumper must be open and the DCDCvoltage should be 5V.
Default state – open.
4V_VBAT When the main battery is not present, this jumper feeds the 4Vfrom the DCDC output to the GSM module.
Default state – open.
5V_CHG_E The GSM module have build in li-ion charge circuit. Thisjumper connects the DCDC 5V output to the internal chargercircuit.
Default state closed
Important: 4V_E, 4V and 5V_CHG_E jumpers have to bemoved together.
Do not plug in external +12V if BAT_E jumper is open!
You should be very careful for battery voltage, whichshould be over 3.8 V, never lower. Battery is charged whenvoltage is 4.1 V.
DCDC_E This jumper connects the DCDC output to the GSM module. Itis useful to measure the current consumption.
Default state closed
3V_E This jumper connects +3V to FT232RL and PIC18F97J60.It isuseful to measure the current consumption.
Default state closed
Download This is GSM module bootloader enable pin. Reserved for GSMmodule firmware upgrade.
Default state – open.
MTX/DTX The GSM module have two UART channels. One for thecommands, one for debugging. With this jumper you controlwhich channel goes to PIC18F97J60 or FT232RL.
MTX/DTX
Default state MTX
MRX/DRX The GSM module have two UART channels. One for thecommands, one for debugging. With this jumper you controlwhich channel goes to PIC18F97J60 or FT232RL.
MRX/DRX
Default state MRX
J1,J2 These jumpers allow to switch the virtual RS232communication port of the FT232RL chip to the MTX/DTXcontroller or to the SIM300D module. Default configuration isSIM300D module to communicates with FT232RL chip, but ifyou wish to use USART communication option of MicrochipTCP/IP stack, you can switch J1 and J2 jumpers. When J1and J2 jumpers are to 1-2 state - serial communication fromFT232RL chip is connected to the GSM module. You can usevirtual com port for communication with GSM module. ThePIC18F97J60 microcontroller however must release RXD andTXD pins. When J1 and J2 jumpers are to 2-3 state - serialcommunication from FT232RL chip is connected to thePIC18F97J60 microcontroller. You can use virtual com port forcommunication with PIC18F97J60. MTX/DTX and MRX/DRXjumpers however must be open and you can not communicatewith GSM module.
1 2 3
Default state 1-2
INPUT/OUTPUT:
LAN: RJ45 isolated ethernet connector. You can connect to PC host(withcrossed 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 moduleis ON if you press and hold for more than 3 seconds the module go inpower down state. If the module if in power down mode and you press andhold 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 thevoice audio input to be taken from this microphone of from the handsfreeaudio connector.
SPEAKER – voice output for external 32 ohm speaker, with AT commandyou can switch the voice audio output to be directed to this speaker or tothe 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 running64ms On/ 800ms Off – GSM module does not find the network64ms On/ 3000ms Off – GSM module is connected to the network64ms On/ 300ms Off - GPRS communication
Optocouple 1 – OPT1 (H11A817SMD) - 5V-12V optoisolated input withLED2 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 PIC18F97J60input.
Optocouple 2 – OPT2 (H11A817SMD) - 5V-12V optoisolated input withLED3 indication and open collector output connect to PIC18F97J60 pin.14(PG4/CCP5/P1D).Positive voltage of '+' terminal and negative voltage orGND of '-' terminal of OPT_TEMP connector, reflect with log. 0 ofPIC18F97J60 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 withlog 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 withlog 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 iscombined with simple functionality for making calls and sending SMS with SIM300DGSM/GPRS module. This note explains features of PIC-GSM board. For more informationon the Microchip TCP/IP Stack, please refer to application note AN833 available athttp://www.microchip.com.
SMS sending functionality is strongly dependent of serial communication betweenPIC18F67J60 MCU and SIM300D module. Consequently board software functions are verysensitive to any messages send from SIM300D module. For example, when SIM300Dmodule goes to specific states(POWER DOWN, Call Ready etc), it sends indicating messagesvia serial line, which can affect communication with PIC18F97J60 and cause wrongbehavior 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 textfrom web page form. GSM number length is 16 digits
• Software allows sending SMS getting GSM number and SMS text from web pageforms. GSM number must be typed with country code without “+” sign. GSM numberlength 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. (AfterGSM number is dialed, “Open Call” value is set to “1”, if other side close call after awhile “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 auxiliaryconnected to HANDSFREE. You can switch to next audio channel by pressingbutton B1.
• Pressing button toggle the on board buzzer unless the GSM module is not in opencall mode.
• When you plug USB cable to the board, the FTDI chip on the board emulates virtualCOM port and you can connect to SIM300D module with HyperTerminal. Firsthowever have to install FTDI drivers available on the http://www.ftdichip.com/
• Temperature, displayed on web page is read from SIM300D module with ATcommand (AT+CMTE?). Any problem with correct displaying temperature, is relatedwith correct handling of used AT command output or GSM module response. Thismeasurement should not be treated as reliable .
• Another useful feature is ability of getting temperatures from up to 8 externaltemperature sensors TCN75A connected via I2C interface. In "Temperature sensorspresence" each item stands for presence of sensor with given hardware address 000for Temp sensor 1, 001 for temp sensor 2, ... and 111 for temp sensor 8."Temperature measured by sensors" section contains temperature in C° measured bysensor(s) available.
• Items: Relay 1, Relay 2 and LED buttons from “Status” section display voltageapplied 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” meanthat the LED is turned on. Logical “1” on Opto input 1(RG3) and Opto input 2 (RG4) means that high voltage isapplied to the input
• Status page item “seconds” displays seconds elapsed from program start, measuredby 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 SMSetc).
• SIM card, you put should be with disabled PIN code use. So before use, put SIM cardin 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.
All boards produced by Olimex are ROHS compliant
Revision history:
REV.A - create April 2008
Disclaimer:
© 2008 Olimex Ltd. All rights reserved. Olimex®, logo and combinations thereof, areregistered trademarks of Olimex Ltd. Other terms and product names may be trademarks ofothers.The information in this document is provided in connection with Olimex products. Nolicense, express or implied or otherwise, to any intellectual property right is granted by thisdocument or in connection with the sale of Olimex products. Neither the whole nor any part of the information contained in or the product described inthis document may be adapted or reproduced in any material from except with the priorwritten permission of the copyright holder.The product described in this document is subject to continuous development andimprovements. All particulars of the product and its use contained in this document aregiven by OLIMEX in good faith. However all warranties implied or expressed including butnot 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 thisdocument or any error or omission in such information or any incorrect use of the product.