GSM Modem Rev 1r0

Embed Size (px)

DESCRIPTION

GSM

Citation preview

  • GSM Modem2009 e-Gizmo Mechatronix CentralPage 1 of 9 pages

    BenQ M23

    GSMMODEMTechnical Manual Rev. 1r0

    Thinking of building a wireless gadget you can monitor and control remotely

    anywhere you are on earth?

    This kit could be just right for you.

    e-Gizmo GSM Modem is a data oriented GSM trans-ceiver system that uses a network provider to con-nect and transfer data. Using a network provider infrastructure has several advantages. Among them is a low initial cost (you dont need to setup an expen-sive transceiver rig to cover a long distance), reliable, easy to use, and has wide coverage.

    You can use both data and voice services for your control applications. Example of data application is a remote appliance control via SMS. Data transfer via internet is even possible with BenQ M23 GPRS module installed.

    e-Gizmo GSM modem is built using the industry proven benQ M23 gsm module. Following is a short list of come of its features:

    BenQ M23A GSM module for SMS+Voice BenQ M23 GSM/GPRS module for

    SMS+Voice+Internet Switch selectable RS-232 or 3.3V TTL level se-

    rial port. On board 3.3V LDO regulator On board SIM card holder EZKonnek compatible port 5V 1.5A switch mode power supply adapter is

    supplied as standard accessory.

  • GSM Modem 2009 e-Gizmo Mechatronix Central Page 2 of 9 pages

    5V 1.5APower In

    - +

    GSM ModuleI/O Connector

    GSM Module

    DB-9RS-232Connector

    SIM CARDHolder

    POWER ONPush Switch

    JP6

    1-TTL TXD

    2-TTL RX

    D3-P

    WO

    N4-TH

    RU

    5-GN

    D

    Jp5

    6-VDD5-TTL TXD4-TTL RXD3-PWON2-THRU1-GND

    SW2 PWON OPTIONRemove jumper to disablePWON pin on Jp5 and JP6

    SW3 VDD OPTIONRemove jumper to disconnectVDD pin 6 from Jp5

    SW1 TTL-RS232 OPTION

    232

    TTL

    232

    TTL

    RS-232 EnabledCOMM via DB-9RS-232 port

    TTL EnabledCOMM via Jp5or Jp6 TTL port

    DEFAULT

    Table 2. JP5 connectorPin No: ID Description

    1 GND Circuit Ground2 THRU Thru connection to JP6 pin 43 PWON Power ON momentary, active high4 TTL RXD Receive Data, 3.3 V LVTTL5 TTL TXD Transmit Data, 3.3V LVTTL6 VDD +3.3V Out (if SW3 jumper installed)

    Table 3. JP6 connectorPin No: ID Description

    1 TTL TXD Transmit Data, 3.3V LVTTL2 TTL RXD Receive Data, 3.3 V LVTTL3 PWON Power ON momentary, active high4 THRU Thru connection to JP6 pin 4

    5 GND Circuit Ground

    Table 1. Connector FunctionsCON ID DescriptionJP1 Regulated +5V, 1.5A Power Input JackCON1 SIM Card HolderJ1 DB-9 RS-232 Serial Communication PortJP5 RJ25 Modular Jack TTL I/OJP6 Header Connector TTL I/O

    GSM Modem Pin Description

    Figure 1. GMS Modem jack and port connectors.

  • GSM Modem2009 e-Gizmo Mechatronix CentralPage 3 of 9 pages

    Table 4. Auxiliary connectorPIN ID I/O DESCRIPTION1 AUXOP O Aux Hands Free amplier (+) Output2 IO1/RI I General Purpose I/O (GPIO) 13 EARN O Earphone Ampier (-) Out4 IO6 O Re download data path and audio path switch5 EARP O Earphone amplier (+) Out6 GND PWR Ground7 GND PWR Ground8 IO11 I Power off mode switch control signal to open or link the system-module connection 9 AUXI I Aux hands free (-) input

    10 IO13 I GPIO 1311 MICIN I Microphone amplier (-) input12 IO8/DTR O GPIO 8 or Data Set Terminal Ready13 MICIP I Microphone amplier (+) input14 DSR I UART1 Data Set Ready15 MICBIAS PWR Microphone bias supply16 CTS I UART1 Clear to Send17 VBAK PWR Battery backup input18 RTS O UART1 Request to Send19 GND PWR Ground20 GND PWR Ground21 IO12/DCD O GPIO 1222 BU O Buzzer Output23 TXD2 O UART2 Transmit Data (Note: For debug use ONLY)24 RXD2 I UART2 Receive Data (Note: For debug use ONLY)25 ROW4 I Keyboard Interrupt (Ext device wakeup)26 IO10 O Wake up External Device27 LEDA I LED Driver, Paging Indicator28 NC No Connection

  • GSM Modem 2009 e-Gizmo Mechatronix Central Page 4 of 9 pages

    Setting Up the GSM Modem with a PC Host

    e-Gizmo GSM modem has on board RS-232 converter that you can use to connect the modem directly to a PC serial port. Using a windows accessory program HyperTerminal, you can immediately begin test driving your GSM Modem.

    1. With Power disconnected, congure SW1 so that the two jumper block are installed in the 232 position. See Figure 1 for more details.

    2. Install a valid SIM card in the SIM card holder.

    3. Connect the GSM modem to an available PC COM using a serial cable.

    PC SERIAL PORT

    SERIAL CABLE5V 1.5AAC/DC ADAPTER

    (as supplied)

    PC HOST

    GSM MODEM KIT

    Figure 3. The on board RS-232 interface can be used to connect the GSM Modem directly with a PC.

    4. Open a HyperTerminal window (may not be available on vista OS)

    5. Give the hyperterminal window a name and specify the PC comm port where your GSM Modem is con-

  • GSM Modem2009 e-Gizmo Mechatronix CentralPage 5 of 9 pages

    nected.

    6. Enter the communications parameters as follows:

    Baud Rate: 9600 bpsData bits: 8Parity: NoneStop Bits: 1Flow Control: none

    and then click [OK].

    7. Momentarily press PWON push button switch to switch ON your GSM Modem.

    8. Type AT and then press [ENTER]. Note: You wont see the characters as you type them on the screen.

    If you see OK response on your screen, your GSM modem is ready for a test drive.

    Example PC Hyperterminal Session

    Throughout this section, all characters you must type in are shown in RED color. GSM Modem response are shown in GREEN.

    Note: = Carriage Return or [Enter} key

    Setup the GSM modem as follows:

    Type

    ATAt this point, you may not see the characters as you type them on the screen This is normal.

    GSM Modem Responds with:

    OK

    If the characters you are typing are not showing on the hyperterminal screen:

    ATE1OK

    ATE1 tells the GSM Modem to echo each characters as you type them in. Watch the characters now ap-pearing each time you strike a key.

    This command will tell the GSM Modem to show you SMS messages in human readable text format:

    AT+CMGF=1OK

    You would also want the GSM Modem to report any error in a format you can read:

    AT+CMEE=2OK

    Tell the GSM Modem you want all its function avail-able for you.

    AT+CFUN=1OK

  • GSM Modem 2009 e-Gizmo Mechatronix Central Page 6 of 9 pages

    And let it choose the network operator automatically. Note: This command will take a few seconds to com-plete. Wait for the OK respose.

    AT+COPS=0OK

    Wait for the GSM Modem to complete its setup. A 30 second wait is usually enough, but if you are a bit im-patient, you can nag the GSM modem by repeatedly typing the command

    AT$SRN=1

    This command will let you know if the GSM Modem has nished reading the SIM card. The GSM Modem will reply READY when setup is complete. It will reply with an OK only if it is still busy reading the SIM.

    If more than a minute has elapsed and you are still getting an error message, check if the SIM card is seated properly in the socket. Remove power, check the SIM card, reapply power, and repeat the start up procedure from the beginning.

    If you get past this point, you are now ready to play around with some functions of the GSM Modem. Here are some interesting functions you may like to try:

    Display your own number

    AT+CNUM

    Show operator network

    AT+COPS?

    Signal Quality

    AT+CSQ

    Display a SMS Message

    AT+CMGR=1

    If there is no message in storage 1, the GSM Modem will reply with an error message. If you want to display all SMS messages

    AT+CMGL=ALL

    Your screen will be ooded with all your stored SMS messages.

    Send an SMS

    AT+CMGS=09171234567Hello There!

    This will send Hello There! SMS message to tel-phone number 09171234567. Of course, you should change this number (and the message) with your intended recipients number if you do not want your 1 peso vanish in thin air for nothing.

    Note: = press [CTRL] and [Z] at the same time

    List all available commands

    AT+CLAC

    Turn OFF GSM Module

    AT$POWEROFF

    For more detailed explanations of these functions, please refer to AT Command reference manual of the M22/23 GSM Module.

    Interfacing to a Microcontroller

    The GSM Modem will work with just about any popu-lar microcontroller. It is preferable though to pick a microcontroller with a built-in UART; this will save you from having to write bit banging codes that only for advanced programmers to consider. If your micro-controller works on 3.3V supply, interfacing will be a breeze. Figure 7 illustrates a connection example to a 3.3V microcontroller.

    Interfacing to a 5V microcontroller will require some more work. The RX pin of the GSM Module is de-signed to accept 3.3V logic level only, forcing a 5V logic input may damage the GSM Modem. To prevent this, a resistive divider must be added on the TX pin of your 5V microcontroller circuit. This is illustrated in gure 12.

    Example Code

    An example code using a z8 encore! XP microcon-troller can be downloaded from product page of the GSM Modem (www.e-gizmo.com). This code is written in C so that you can easily modify it as may be necessary if you want to use it with some other microcontroller.

  • GSM Modem2009 e-Gizmo Mechatronix CentralPage 7 of 9 pages

    5V 1.5AAC/DC ADAPTER

    (as supplied)

    GSM MODEM KIT

    TXD

    RX

    DP

    WO

    N

    GN

    D

    RX

    DTX

    D

    OU

    TP

    OR

    T

    GN

    D

    UART

    3.3VMICROCONTROLLER

    1K

    NOTE: PULSE PWON TO LOGIC 1 >150mS TO POWER ONTHE GSM MODULE.

    Jp6

    1

    2

    3

    5

    RXD

    TXD

    PWON

    2K2

    2K2

    3K3

    TXD

    RXD

    OUT

    GNDGND

    GSMMODEM

    5VMICROCONTROLLER

    Figure 7. The GSM Modem TTL serial I/O is 3.3V logic compatible and directly connects to the UART port of any 3.3V microcontroller. Note that TXD and RXD are cross connected.

    Figure 8. The TXD out of a 5V microcontroller has to be scaled down to 3.3V level with a pair of resistor to prevent it from damaging the GSM Modem RXD input.

  • GSM Modem 2009 e-Gizmo Mechatronix Central Page 8 of 9 pages

    12

    34

    56

    A B C D

    65

    43

    21

    DCBA

    Title

    Num

    berR

    evisionSize

    BDate:14-Jan-2008

    Sheet of File:

    D:\M

    y Docum

    ents\My D

    esigns\My D

    esign.ddbD

    rawn B

    y:

    CL

    OC

    K

    RE

    SET

    Vcc

    DA

    TA

    GN

    D

    12

    34

    56

    CO

    N1

    SIM

    R2

    22R

    3

    10 K

    R4

    3.3

    +

    C10

    1 uF

    12

    JP1

    HE

    AD

    ER

    2

    F1FUSE

    1V

    in3

    ADJ1

    +Vout

    2

    U1

    LM

    1086

    +C

    122 uF

    C3

    0.1

    +C

    222 uF

    C4

    0.1 R1

    680

    R1 O

    UT

    15

    R2 O

    UT

    10

    T1 IN

    13

    T2 IN

    12

    VCC 19

    T2 O

    UT

    8

    V+

    3

    T1 O

    UT

    17

    V-

    7

    C1+

    2

    C1 -

    4

    C2+

    5

    C2 -

    6

    R1 IN

    16

    R2 IN

    9

    EN

    1SH

    DN

    20

    GND18

    U2

    MA

    X3222

    C6

    0.1

    C7

    0.1

    C8

    0.1

    C9

    0.1162738495

    J1DB9

    C5

    0.1

    VB

    AT

    BB

    1

    GN

    D2

    GN

    D3

    GN

    D4

    GN

    D5

    LE

    DA

    6

    RO

    W4

    7

    TX

    D2

    8

    IO12/D

    CD

    9

    GN

    D10

    SIM_C

    LK

    11

    SIM_IO

    12

    SIM_R

    ST13

    NC

    14

    MIC

    BIA

    S15

    MIC

    IP16

    MIC

    IN17

    AU

    XI

    18

    GN

    D19

    EA

    RP

    20

    EA

    RN

    21

    AU

    XO

    P22

    VR

    SIM23

    I01/RI

    24I06

    25G

    ND

    26IO

    1127

    IO13

    28IO

    829

    DSR

    30C

    TS

    31R

    TS

    32R

    XD

    33T

    XD

    34G

    ND

    35B

    U36

    RX

    D2

    37PW

    ON

    38IO

    1039

    GN

    D40

    VB

    AT

    RF

    41V

    BA

    TR

    F42

    VB

    AT

    RF

    43G

    ND

    44U

    3

    M23

    123456

    JP5

    HE

    AD

    ER

    6

    12

    SW3

    HE

    AD

    ER

    1X2

    VD

    D

    VD

    D

    S1SW-PB

    Q1

    NPN

    12

    SW2

    HE

    AD

    ER

    1X2

    D1

    DIO

    DE

    D2

    LE

    D

    1 2 3 4 5

    JP6

    HE

    AD

    ER

    5

    1 23 45 6

    SW1

    HE

    AD

    ER

    3X2

    GSM

    Modem

    Figure 9. Schem

    atic diagram of the G

    SM

    Modem

    .

  • GSM Modem2009 e-Gizmo Mechatronix CentralPage 9 of 9 pages

    Figure 10. PCB component layout.

    Figure 11. PCB top layer copper pattern. Figure 12. PCB bottom layer copper pattern.