GSM Modem Rev 1r0
GSM Modem Rev 1r0
GSM MODEM
Technical Manual Rev. 1r0 e-Gizmo GSM Modem is a data oriented GSM transceiver system that uses a network provider to connect and transfer data. Using a network provider infrastructure has several advantages. Among them is a low initial cost (you dont need to setup an expensive 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 serial 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.
Thinking of building a wireless gadget you can monitor and control remotely anywhere you are on earth?
Page 1 of 9 pages
GSM Modem
Power In 5V 1.5A
GSM Module
SW2 PWON OPTION Remove jumper to disable PWON pin on Jp5 and JP6 SW3 VDD OPTION Remove jumper to disconnect VDD pin 6 from Jp5
JP6
DEFAULT
TTL
232 TTL
TTL RXD Receive Data, 3.3 V LVTTL TTL TXD Transmit Data, 3.3V LVTTL VDD +3.3V Out (if SW3 jumper installed)
GSM Modem
Page 2 of 9 pages
Page 3 of 9 pages
GSM Modem
PC HOST
Figure 3. The on board RS-232 interface can be used to connect the GSM Modem directly with a PC.
5. Give the hyperterminal window a name and specify the PC comm port where your GSM Modem is con-
GSM Modem
Page 4 of 9 pages
nected.
Baud Rate: 9600 bps Data bits: 8 Parity: None Stop Bits: 1 Flow 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.
Page 5 of 9 pages
GSM Modem
And let it choose the network operator automatically. Note: This command will take a few seconds to complete. Wait for the OK respose. AT+COPS=0<CR> OK Wait for the GSM Modem to complete its setup. A 30 second wait is usually enough, but if you are a bit impatient, you can nag the GSM modem by repeatedly typing the command AT$SRN=1<CR> 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<CR> Show operator network AT+COPS?<CR> Signal Quality AT+CSQ<CR> Display a SMS Message AT+CMGR=1<CR> 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<CR> Your screen will be ooded with all your stored SMS messages.
Send an SMS AT+CMGS=09171234567<CR> Hello There! <CTRL Z> This will send Hello There! SMS message to telphone 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: <CTRL Z> = press [CTRL] and [Z] at the same time List all available commands AT+CLAC<CR> Turn OFF GSM Module AT$POWEROFF<CR> 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 popular 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 microcontroller 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 designed 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 microcontroller 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 Modem
Page 6 of 9 pages
UART
RXD TXD
OUT PORT
GND
1K
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.
GSM MODEM 1 2 Jp6 3 RXD TXD PWON 2K2 3K3 5 GND 2K2
5V MICROCONTROLLER
GND
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.
Page 7 of 9 pages
GSM Modem
GND
VDD
D
1 2
Vin
+Vout
JP1
3
2
+ C2 22 uF
D1 DIODE
F1 FUSE1
R1 680
C4 0.1
D2 LED
U1 LM1086
Page 8 of 9 pages
U2
HEADER 2
C3 0.1
ADJ
+ C1 22 uF
C5
19
0.1
C6
U3
VCC
2
0.1
GND VBATRF VBATRF VBATRF GND IO10 PWON RXD2 BU GND TXD RXD RTS CTS DSR IO8 IO13 IO11 GND I06 I01/RI VRSIM 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23
C1+
4 C1 -
V+
C8 0.1
0.1
S1 SW-PB
C2 -
13
12
15
T1 IN
T1 OUT
17
T2 IN
T2 OUT
R1 OUT
R1 IN
16
10
SW1
2 4 6
R2 OUT
1
1 3 5
R2 IN
1 6 2 7 3 8 4 9 5
J1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
M23
VBATBB GND GND GND GND LEDA ROW4 TXD2 IO12/DCD GND SIM_CLK SIM_IO SIM_RST NC MICBIAS MICIP MICIN AUXI GND EARP EARN AUXOP
C7
C2+
V-
C9 0.1
DB9
GND
SHDN
20
Q1
SW2
1
NPN
HEADER 1X2
18
MAX3222
JP5
B
CON1
R2 22
C10
VDD
SW3
2 HEADER 1X2
1 2 3 4 5 6
HEADER 6
1
3
5
SIM
DATA
2
4
R3 10 K
R4 3.3
1 uF
JP6
GND
5 4 3 2 1
HEADER 5
GSM Modem
A
Title
Number
Revision
GSM Modem
Page 9 of 9 pages
GSM Modem