AC320011 Microchip Technology, AC320011 Datasheet
AC320011
Specifications of AC320011
Available stocks
Related parts for AC320011
AC320011 Summary of contents
Page 1
... This application note describes a reference design that enables the implementation of GSM/GPRS/GPS connectivity using a PIC32 microcontroller (MCU), the M2M Board, and the MEB. © 2011 Microchip Technology Inc. AN1373 Feature Overview The M2M PICtail Plus Daughter Board contains many features, including GSM, GPRS, and GPS. ...
Page 2
... MEB R6 4.7k 1. M2M PICtail™ Plus Daughter Board LEON-G200 (u-blox) GSM/GPRS Module SCHEMATIC OF CONNECTOR TO MEB +3. 4.7k DTR 11 12 DSR SDA3 RXD 17 18 RESET_N TXD 19 20 PWR_ON RTS 21 22 SCL3 CTS 23 24 DCD NEO-6Q (u-blox) GPS Module © 2011 Microchip Technology Inc. ...
Page 3
... GPS performance under poor GPS conditions. Figure 3 provides a detailed diagram of the M2M Board. FIGURE 3: M2M PICtail™ PLUS DAUGHTER BOARD BLOCK DIAGRM GSM Antenna SIM Holder © 2011 Microchip Technology Inc. chain is UART V CC LDO LEON-G200 NEO-6Q GPRS/GSM GPS Module ...
Page 4
... By default, the M2M demonstration has SMS receiving turned ON. This means that if a text message is sent to the board, the demo will pause and show the number and message received, and then return to the demo. © 2011 Microchip Technology Inc. the Figure 4 that function ...
Page 5
... Note: GPS data is not ready until the LED labeled TIMEPULSE on the M2M Board is blinking green. © 2011 Microchip Technology Inc. FIGURE 7: The map demo uses HTTP requests and the on-board memory to receive and store an image from the Internet. The image is from Google Maps and shows the current GPS location of the M2M Board ...
Page 6
... Power-on GPS with AssistNow off-line (use 14 days almanac). Power-on GPS with AssistNow on-line. Head command. Get command. Delete command. Put command. Post file command. Post data command. Table 2, which are needed to Description © 2011 Microchip Technology Inc. ...
Page 7
... This function configures the GPS module. Returns • UBX_E_OK • UBX_E_ERROR • UBX_E_WARNING Example See Example 3. UBX_ERROR ubxConfigureGsm(void) Description This function configures the GSM network. Returns • UBX_E_OK • UBX_E_ERROR • UBX_E_WARNING Example See Example 2. © 2011 Microchip Technology Inc. AN1373 DS01373A-page 7 ...
Page 8
... System (core) frequency [in] Returns • UBX_E_OK • UBX_E_ERROR • UBX_E_WARNING Example #include <plib.h> #include "libubx.h" #include "libp32.h" UBX_ERROR rc ubxConfigureSystem(SYSTEM_FREQ); if (rc != UBX_E_OK) { return; } DBPRINTF("System core is running at %d Hz\n", p32GetSystemClock()); DBPRINTF("Peripheral bus is running at %d Hz\n", p32GetPeripheralBusClock()); DS01373A-page 8 © 2011 Microchip Technology Inc. ...
Page 9
... This function returns the current aiding mode of the GPS module. Returns • UBX_S_GPS_ASSIST_LOCAL • UBX_S_GPS_ASSIST_NONE • UBX_S_GPS_ASSIST_OFFLINE • UBX_S_GPS_ASSIST_ONLINE UBX_STATUS ubxGetGpsPowerStatus(void) Description This function returns the power status of the GPS module. Returns • UBX_S_GPS_POWERED • UBX_S_GPS_NOT_POWERED © 2011 Microchip Technology Inc. AN1373 DS01373A-page 9 ...
Page 10
... UBX_ERROR ubxGetGsmNetworkSignal(UINT32 *netss, char *netss_text) Description This function returns the signal strength of the GSM network. Parameters [out] netss GSM network signal strength, integer [0...5] [out] netss GSM network signal strength, null-terminated string Returns • UBX_E_OK • UBX_E_ERROR • UBX_E_WARNING DS01373A-page 10 © 2011 Microchip Technology Inc. ...
Page 11
... UBX_S_GSM_NOT_CONFIGURED Example See Example 2. UBX_ERROR ubxGetPdpServiceAddress(char *ipadd) Description This function returns the IP address from GPRS service (current context). Parameters [out] ipadd GPRS service address, null-terminated string Returns • UBX_E_OK • UBX_E_ERROR • UBX_E_WARNING © 2011 Microchip Technology Inc. AN1373 DS01373A-page 11 ...
Page 12
... UBX_S_PDP_CONFIGURED • UBX_S_PDP_NOT_CONFIGURED UBX_STATUS ubxGetPinStatus(void) Description This function returns the status of the PIN code. Returns • UBX_S_PIN_ENABLED • UBX_S_PIN_NOT_ENABLED UBX_STATUS ubxGetSimStatus(void) Description This function returns the status of the SIM card. Returns • UBX_S_SIM_PRESENT • UBX_S_SIM_NOT_PRESENT DS01373A-page 12 © 2011 Microchip Technology Inc. ...
Page 13
... This function turns off power to the C16-G26Q plug-in board. Returns • UBX_E_OK • UBX_E_ERROR • UBX_E_WARNING UBX_ERROR ubxPowerOffGps(void) Description This function turns off power to the GPS module. Returns • UBX_E_OK • UBX_E_ERROR • UBX_E_WARNING © 2011 Microchip Technology Inc. AN1373 DS01373A-page 13 ...
Page 14
... This function turns on power to the GPS module. Parameters mode GPS aiding mode [in] Returns • UBX_E_OK • UBX_E_ERROR • UBX_E_WARNING Example See Example 3. UBX_ERROR ubxRegisterGsmNetwork(void) Description This function registers to the GSM network. Returns • UBX_E_OK • UBX_E_ERROR • UBX_E_WARNING Example See Example 2. DS01373A-page 14 © 2011 Microchip Technology Inc. ...
Page 15
... GSM subscriber number [in] sms Short message (160 character maximum) [in] Returns • UBX_E_OK • UBX_E_ERROR • UBX_E_WARNING UBX_ERROR ubxUnregisterGsmNetwork(void) Description This function unregisters from the GSM network. Returns • UBX_E_OK • UBX_E_ERROR • UBX_E_WARNING © 2011 Microchip Technology Inc. AN1373 DS01373A-page 15 ...
Page 16
... UBX_E_WARNING Example #include <stdlib.h> #include <plib.h> #include "libubx.h" #include "libgps.h" UBX_ERROR rc; GPS_DATA_GGA *gga ubxUpdateGpsContext(GPS_C_GGA); gga = gpsGetGGA(); DBPRINTF("Altitude: %i m/sl\n", atoi(gga->alt)); DBPRINTF("Latitude: %f %s\n", atof(rmc->lat), rmc->lat_ns); DBPRINTF("Longitude: %f %s\n", atof(rmc->lon), rmc->lon_ew); DS01373A-page 16 © 2011 Microchip Technology Inc. ...
Page 17
... DBPRINTF("Latitude: %f %s\n", atof(rmc->lat), rmc->lat_ns); DBPRINTF("Longitude: %f %s\n", atof(rmc->lon), rmc->lon_ew); UBX_ERROR ubxVerifyPin(char *pin) Description This function verifies the Pin code. Parameters pin Pin code (null-terminated string) [in] Returns • UBX_E_OK • UBX_E_ERROR • UBX_E_WARNING © 2011 Microchip Technology Inc. AN1373 DS01373A-page 17 ...
Page 18
... Servername Character string of server name [in] FileLocation Character string of server file location [in] Filename Character string of M2M file to save the file from HTTP server to LEON-G200 memory [in] Returns BYTE value showing return value of HTTP request. Value error. DS01373A-page 18 © 2011 Microchip Technology Inc. ...
Page 19
... Description This function sends an e-mail. Parameters FileName Character string of Filename of local file [in] File Character string of File in PIC memory [in] Returns Integer value showing BYTE length of file read from M2M memory. © 2011 Microchip Technology Inc. AN1373 DS01373A-page 19 ...
Page 20
... EXAMPLE 7: READING FROM MEMORY “fileLength =”acdReadM2MFile("Map", &PIC32MapMemoryLocation[0]) DS01373A-page 20 //Check to see SIM card is present //Setup SMS Reading //Type of HTTP request //HTTP server //file location on server //Read Google Maps JPEG //Reads file from M2M Board //to PIC32 memory © 2011 Microchip Technology Inc. ...
Page 21
... Library is free and available for download from: www.microchip.com/MAL. REFERENCES LEON-G200 and NEO-6Q Communications Modules (www.u-blox.com) LEON-G100 G200 “2G GPS/GPRS AT Commands Manual” GSM.G1-SW-09002 (www.u-blox.com) M2M PICtail™ Plus Daughter Board (www.microchip.com) Multimedia Expansion Board (MEB) (www.microchip.com/meb) PIC32 device family (www.microchip.com/PIC32) © 2011 Microchip Technology Inc. AN1373 DS01373A-page 21 ...
Page 22
... APPENDIX A: SOURCE CODE The software supplied herewith by Microchip Technology Incorporated (the “Company”) is intended and supplied to you, the Company’s customer, for use solely and exclusively with products manufactured by the Company. The software is owned by the Company and/or its supplier, and is protected under applicable copyright laws. All rights are reserved. ...
Page 23
APPENDIX B: SCHEMATICS FIGURE B-1: LEON-G200 MODULE AND ANTENNA VBAT V_BCKP CHARGE_SENSE 1-E4 R109 res0402_nm DSR 1-F4 RI 1-F4,1-G5 DCD 1-F4 DTR 1-F4 RTS 1-F4 CTS 1-F4 TxD 1-F4 RxD 1-F4 PWR_ON 1-G4 GPIO1 1-E8 GPIO2 2-G8 L102 RESET_N 1-G4,1-G5 ...
Page 24
FIGURE B-2: POWER BOARD HEADER V_CHARGE J101 PIN 2,54STRIP MALE RIGHTANGLE VBAT V_GPS CHARGE_SENSE 1-B3 DSR 1-B3 RI 1-C3,1-G5 ...
Page 25
FIGURE B-3: SIM CARD HOLDER SIM_VCC 1-C10 SIM_IO 1-C10 SIM_CLK 1-C10 SIM_RST 1-C10 USB0002 D100 USB0002 D101 SLM76CF3201P VQFN-8-1 R108 8 VDD 0Ohm_5% R107 6 CLK 0Ohm_5% R106 7 RST 0Ohm_5% R102 ...
Page 26
FIGURE B-4: AMPLIFIER CIRCUIT VBAT R113 820Ohm_5% R114 RESET_N 1-D3,1-G4 330KOhm_5% R115 RI 1-C3,1-F4 0Ohm_5% VBAT NETWORK INDICATOR D103 1 2 0603ORANGE R116 GPIO1 1-C3 10KOhm_5% VBAT C109 100nF_10% IC100 5 VCC GND 3 ...
Page 27
FIGURE B-5: NEO-6Q GPS MODULE AND ANTENNA V_GPS V_GPS V_GPS 13 GND3 C212 14 MOSI_CFG_COM0 15 47pF_5% MISO_CFG_COM1 16 CFG_G PS0_SCK C202 17 RESERVED3 1uF_10% SDA NFL18ST207X1C3 U208 18 SDA2 1-C10 SCL NFL18ST207X1C3 U210 19 SCL2 1-D10 V_GPS TP200 GPS_TxD ...
Page 28
FIGURE B-6: VOLTAGE REGULATOR CIRCUIT R215 GPIO2 1-D3 0Ohm_5% R202 V_GPS_EN 1-G4 res0402_nm VBAT U204 LT1962EMS8 ADJ SHDNn SENSE_ADJ GND 4 V_GPS 1 OUT BYP 3 2 ...
Page 29
FIGURE B-7: GSM/GPS POWER SUPPLY DAUGHTER BOARD R6 R7 4.7K 4.7K +VIN D1 C1 22uF GND CHARGER ...
Page 30
APPENDIX C: LAYOUT FIGURE C-1: M2M BOARD LAYOUT (TOP ASSEMBLY) ANT201 ANT200 External Antenna L203 Connector C216 R200 J200 C210 C207 C204 TR200 NEO-6Q U202 C219 R221 C208 R222 J101 C108 U104 U103 U102 R116 T100 R111 C200 C109 R210 ...
Page 31
FIGURE C-2: M2M BOARD LAYOUT (BOTTOM ASSEMBLY) C104 C103 D100 J100 C105 C102 D101 C101 OPT101 ...
Page 32
FIGURE C-3: GSM/GPS POWER SUPPLY DAUGHTER BOARD LAYOUT M ...
Page 33
... PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance, TSHARC, UniWinDriver, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. ...
Page 34
... Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 Taiwan - Hsin Chu Tel: 886-3-6578-300 Fax: 886-3-6578-370 Taiwan - Kaohsiung Tel: 886-7-213-7830 Fax: 886-7-330-9305 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 © 2011 Microchip Technology Inc. 02/18/11 ...