Localizer with SIM908 module using arduino
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 product by SIMCOM.
wp-image-2212″ title=”S908″ src=”http://www.open-electronics.org/wp-content/uploads/2012/06/S908.bmp” alt=”Localizer base” width=”532″ height=”486″ />
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.
Both the boards are powered by the switch SW1 from the 3.6 volt Li-ion battery connected to the + and – poles of the PWR connector.
Many capacitors inserted along the positive power line filter noises coming from the cellular during transmission, that could lock the microcontroller.
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 “hibernate” mode the microcontroller can’t detect incoming SMS, this way a possible urgent request will be delayed until the microcontroller will wake up. To overcome this situation could be suitable to anticipate a phone call, may be of just one ring, and then send the SMS. The call will awake the microcontroller and the SMS will be detected immediately.
One specific application of the locator is its use as a motion detection sensor. In this mode the detection is based on the change of the cells the cellular is connected to, the microcontroller stores in memory the current cell and the neighbour cells; if the cellular commutes within these cells it means that it is almost standing still; if it commutes on cells outside the range in memory it means it is moving and, for instance, an alarm can be activated.
This approach can be little sensitive in case of scarcely inhabited lands with a little number of cells: in this case the motion, to be detected, requires a movement quite long.
The power supply comes from a 3.6 volt battery that can be charged by a miniUSB plug that allows recharge from any PC. The power regulator is the chip MCP73831T in SMD version (package SOT-23), it can supply up to 550 mA at 3.6 – 3.7 volt to fully charge a lithium or Li-Po battery with an input supply of 3.75 – 6 volt.
The chip charges the battery with a constant current. The charging current (Ireg) is set by the value of the resistor connected to pin 2, whose value is calculate as:
Ireg = 1.000/R
where the value of R is in ohm and Ireg in Ampere.
For more detail: Localizer with SIM908 module
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w