GSM/GPS Localizer with SIM908 module

Not rated 5,860

Circuit Image

The device utilizes a GSM/GPRS module that includes GPS functionality. Its primary purpose is to detect and communicate its geographical position using either the cellular phone reference system or GPS. The compact design is attributed to the integration of the GPS receiver within the GSM/GPRS module, specifically the SIM908, a recent product from SIMCOM. The localization circuit consists of two boards: one featuring the SIM908 module and the other housing the microcontroller and the lithium battery charger. To activate the GPS, an appropriate antenna must be added to the localizer circuit. The setup includes a motherboard that mounts the microcontroller and its associated circuitry, along with a daughterboard that contains the communication module, referred to as the GSM block in the schematic. The reference numbers linked to the contacts on the GSM block correspond to the pins of the connector that links the daughterboard to the motherboard. The program running on the microcontroller U1, a PIC18LF6722, is designed to wait for an incoming event or the activation of button P1. When the button is pressed, the line RB1, which has an internal pull-up resistor, changes from a logical high (1) to a logical low (0). Upon receiving an SMS message, the program's response depends on the message content, which could either be a configuration message or a request for geographical position. The process for retrieving the geographical position is similar for both manual requests and button activation (alarm or SOS). After detecting the request, the PIC microcontroller sends commands to the cellular module to connect to the Internet in GPRS mode. It then connects to the Google Maps server and requests the position based on the cell identification to which the SIMCom module is connected, entering a loop to wait for data on the RX channel of the UART. Once the data containing the position (latitude and longitude) and accuracy is received, it is formatted into a string with a link to Google Maps and sent to the requesting phone or to the phone number stored in memory associated with the alarm function. If the receiving phone is an Android smartphone or an iPhone, the SMS link can directly open Google Maps to the localizer's location. In other cases, the message includes the coordinates and additional data. The GSM module is managed by the microcontroller via lines RF1 (pin 8 on the connector) for incoming call detection through the Ring Indicator (RI), and RC7/RX1 (pin 14 on the cellular board), which are used for receiving and transmitting SMS messages. These two lines also manage the SIM908, excluding the reset and power supply lines. Power supply control is handled by line RC2, which affects pin 1 of the cellular module to turn the SIM908 on and off, enabling the phone after initialization. The previously mentioned lines are shared between the GSM and GPS sections of the SIM908. To conserve power, the device can enter a hibernation mode for up to 240 seconds, reducing power consumption of the microcontroller and allowing the cellular module to enter standby mode, thereby lowering the system clock speed. In standby mode, the cellular module consumes only 6 mA of power. The Slow Clock feature on the SIM900 can be activated using the AT command AT+CSCLK=2, which automatically enables Slow Clock mode when there is no serial port traffic and disables it upon new data arrival. The microcontroller exits hibernation mode upon receiving a new call or after the 240-second period, at which point it checks for any received SMS messages, processes requests, and returns to hibernation mode.

The circuit design integrates several critical components to ensure efficient operation. The GSM/GPRS module, SIM908, serves as the communication backbone, allowing for data transmission and reception. The microcontroller, PIC18LF6722, orchestrates the device's functions, including processing incoming requests and managing power consumption. The inclusion of a lithium battery charger on the second board ensures that the device remains operational without external power sources, enhancing its portability and usability in various environments.

The system architecture is designed to maximize efficiency and responsiveness. The microcontroller's firmware is programmed to handle multiple scenarios, including manual position requests and automated alerts triggered by the button press. This dual functionality is essential for applications requiring immediate geographical data, such as emergency response situations. The integration of Google Maps enhances the user experience by providing a visual representation of the localizer's position.

In terms of hardware, the connection between the motherboard and daughterboard is facilitated through a connector that allows seamless communication between the microcontroller and the GSM module. The design also incorporates protective features to ensure reliable operation under varying conditions. Overall, this device represents a sophisticated blend of technology that addresses the need for precise location tracking in a compact form factor.The device is based on a GSM/GPRS module with included GPS. Its main function is to detect and communicate its own geographical position using, on the choice, the cellular phone reference system or the GPS. Its small dimensions are due to the use, for the first time, of a GSM/GPRS module integrating the GPS receiver.

That is the SIM908 a recent pr oduct by SIMCOM. The circuit of the localizer is build around two boards, one with the SIM908 on board and the second one including the microcontroller and the battery charger for the lithium battery. To get the GPS working will be necessary to complete the localizer circuit with an appropriate antenna.

The circuit includes the mother board, mounting the microcontroller and its circuitry, and the daughter board mounting the communication module, the block named GSM in the schema. The reference numbers associated to the contacts on the GSM block correspond to the pins of the connector linking the daughterboard to the motherboard.

The program running in the microcontroller U1, one PIC18LF6722, waits for an incoming event or for the button P1 being pushed. While the button is pressed the line RB1, provided with internal pull-up resistor, switches from logical level 1 to the logical level 0, In case of incoming of an SMS message, the program reacts depending on the content of the message that could be a configuration message or a geographical position request.

Let focus on the process aimed to retrieve the geographical position, that is quite the same in both cases of manual request and P1 pushing (alarm or S. O. S. ). After the request has been detected, the program in the PIC microcontroller sends commands to the cellular module in order to have it connected to Internet in GPRS mode.

Then connects to the Google Maps server and sends a request of position based on the identification of the cell the SIMCom module is connected to; then again loop waiting for data on the RX channel of the UART. While got data back with the position (Latitude and Longitude) and accuracy, it is a composed string with the appropriate link to Google Maps and sent to the requesting phone, or to the phone number stored in memory coupled to the alarm function.

If the cellular phone is an Android Smartphone or an iPhone, the link received in the SMS can open Google Maps directly on the area where the localizer is present. In the other cases the message contains the coordinates and other data. The GSM module is managed by the microcontroller using the lines: RF1 (pin 8 on connector) through which it detects the incoming calls through the Ring Indicator (RI), RC7/RX1 (pin 14 on the cellular board); these last two are the lines, respectively, of reception and transmission of the UART used for receiving and sending SMS messages.

The same two lines are used for managing the SIM908, unless the reset and power supply lines. Power supply is controlled by line RC2 that affects pin 1 of the cellular module in order to turn ON and OFF the SIM908 and to enable the phone after initialization. Lines cited before are common to the GSM and GPS section of SIM908. To save power, there is the features to hibernate  the localizer for a maximum period of 240 seconds.

This limits the power consumption of the micro and enables the possibility to put also the cellular in standby mode and reduce the system clock speed. In standby mode the cellular soaks only 6 mA of power. On SIM900 the Slow Clock can be enabled using the AT extended command AT+CSCLK=2. This command enables the Slow Clock mode automatically when there is no traffic on serial port and disabled it while new data comes in.

The microcontroller exits the hibernate  mode when a new call come in or at the end of the period (240 seconds), in this case the microcontroller checks for possible SMS received. In the case, it executes and delivers the requests and, at the end, turn back in hibernate  mode. While in hiber 🔗 External reference