This article instructs users to implement location coordinates via SMS and display them to Google Map using STM32F1 Easy, GSM/GPRS M95 Easy and GPS L70 Easy R2 of AT-COM. Users can "Plug and Play" thanks to the flexibility of ATCBus on each product.
1. Introduction of STM32F1 Easy
STM32F1 Easy is designed product by AT-COM that gives users the conveniences when combining between ATCBus with the microcontroller family is ARM 32-bit Cortex ™ -M3 CPU Core. The board is equipped with an STM32F107RCT6 microcontroller with 256KB Flash, 20 Kbytes SRAM, processing speed up to 72MHz. The board supports to connect with the computer via USB Full Speed v2.0, with a USB HID Bootloader that allows users to directly load the firmware to the microcontroller without any other programming kit. In addition, the Dual ATCBus Host Socket design maximizes the microcontroller's resources with SPI, UART, I2C, PWM, and so on. It meets the requirements of programmers who deploy applications like GSM, GPRS, GPS, Wifi, Ethernet, USB, CAN, PWM ...
2. Introduction of GSM/GPRS M95 Easy
M95 module is a GSM/GPRS module of Quectel. M95 module operates in quad-band: GSM850 MHz, GSM900 MHz, DCS1800 MHz, PCS1900 MHz. M95 module supports GPRS class 12 multi-slot, SMS, MMS... M95 module is integrated with Internet protocols such as TCP / IP, UDP, FTP and PPP, which is controlled by the AT Command set protocol.
GSM/GPRS M95 Easy is a product developed by AT-COM based on the features of M95 module. GSM/GPRS M95 Easy is designed with built-in SIMCARD antenna, GSM built-in PIFA Antenna, earphone / microphone jack for easy research and development of GSM / GPRS related applications such as: In addition, with its compact size, convenient data output, GSM/GPRS M95 Easy will bring to the inspiration of modern and refined design.
3. Introduction of GPS L70 Easy R2
L70 is a module of Quectel that brings the high performance of MTK positioning engine to the industrial applications with compact profile, ultra low power consumption and fast positioning capability.
Combining advanced AGPS called EASY™ (Embedded Assist System) and proven AlwaysLocate™ technology, L70 achieves the highest performance and fully meets the industrial standard. EASY™ technology ensures L70 can calculate and predict orbits automatically using the ephemeris data (up to 3 days) stored in internal flash memory, so L70 can fix position quickly even at indoor signal levels with low power consumption. With AlwaysLocate™ technology, L70 can adaptively adjust the on/off time to achieve balance between positioning accuracy and power consumption according to the environmental and motion conditions.
Additional feature of embedded logger function called LOCUS allows L70 to log position information to internal flash memory at default intervals of 15 seconds and provide typically more than 16 hours log capacity without adding cost.
With its tiny design, high precision and sensitivity, L70 is perfectly suitable for a broad range of M2M applications such as portable device, automotive, personal tracking, security and industrial PDA.
Inheriting the GPS L70 Easy product, AT-COM designs and delivers GPS L70 Easy R2 product to take advantage of the capabilities of the L70 and adds additional features such as 3V3 and 5V voltage, steady status indicator Led, Battery backup, Patch antenna integrated on the circuit. Plus, with its compact size, handy data output, GPS L70 Easy R2 will bring you the most modern and sophisticated design inspiration.
4. The application to locate the coordinates via SMS and show up Google Map
To implement the application we perform the following steps:
Step 1: prepare
+ STM32F1 Easy board.
+ GSM/GPRS M95 Easy board.
+ GPS L70 Easy R2 board.
+ Android phone has installed Google Map software and SMS2Map software .
+ SMS2Map .
Step 2: Connect the hardware
Step 3: Load the application code for STM32F1 Easy
Source code presented in the article uses the Keil ARM compiler for the STM32F107RCT6 microcontroller. The code is written in the USB HID Bootloader of STM32F1 Easy. Can Download source code for STM32F1 Easy ( STM32F1_M95_L70 Easy demo code ).
After downloading the code to the computer, the code needs to be edited and recompiled with Keil ARM software.
After unzipping, we open the STM32F1_M95_L70_Easy.uvproj file, the file is in the path: ...\STM32F1_M95_L70_Easy\Project\RVMDK. Proceed to revise the phone number in the code to the board sent the coordinates message.
Then we modify password of the board.
We proceed to compile the program: Project -> Translate
Next we create the executable file: Project -> Build target
To load code for STM32F1 Easy we use the USB HID Bootloader software , download the software in the product STM32F1 Easy, after download to the computer, extract the winrar file and click on the USB HID Bootloader.exe file to run the USB Bootloader program on the computer.
After opening the USB HID Bootloader program, you connect the STM32F1 Easy board to your PC via mini USB, within 5 seconds you press the Connect button to bring the microcontroller into Bootloader mode. If you do not press the Connect button within 5 seconds , the microcontroller will run into the previous application loaded, then press the RESET button on the STM32F1 Easy board to reboot the system.
File .hex is in the path: ...\STM32F1_M95_L70_Easy\Project\RVMDK\Obj
After selecting the file to load .hex, you click Open to load the program file.
Then click Download to load the program into the microcontroller.
When the program is loaded successfully, the software will automatically reset the microcontroller and run the loaded application.
Step 4: Implement Control to get coordinates and display to Google Map
Once the system has finished booting, the system will automatically send a notification message to the user's phone number (the phone number is changed in step 3).
When system startup is complete, we can get the coordinates of the system in two methods:
Method 1: Press the SW1 button on the STM32F1 Easy board , the system sends the message containing the link coordinates.
The system returns the message containing the coordinates.
Method 2: Messaging SMS with the following syntax to get coordinates:
After receiving the correct syntax message, the system returns the message with the link coordinates.
The user click on the link in the message to display on the map, we are positioned as follows:
* Use SMS2Map software to display the location of the system
+ Install SMS2Map software to your phone.
+ When the message contains the coordinates sent to the user's phone number, SMS2Map will automatically display the location on the map of the software.
When the user clicks on a location on the map, the software displays the address of the current system.
5. Video demo