I would like to present one of my latest projects which is the GSM GPS tracker. Basically, it is a device which allows to send its current position using GPS via SMS. Also it is able to log the position on a microSD card.
As mentioned above the module allows totrack current position via GPS. Also the position log file, in dedicated format, is stored on microSD card for further analysis. Communication with the device is based on short text messages SMS. Sending pre–formatted SMS to the module notifies it that the user wants to get information about the current position. In return the tracker sends SMS with Google Map link. This device is particularly useful for tracking moving objects like a RC model or a car.
The module is driven by STM32F103CBT6 microcontroller in 48 LQFP package which is more than enough for this device and still offers some room for additional functionality. It has ARM Cortex-M3 and it has 64 kB of Flash and 20 kB of SRAM. The maximum operating frequency of the core is 72 MHz.
The device is equipped with Li-Ion battery which allows for approximately 8 hours of constant work. Also it has build-in charger with PCM to prevent the Li-Ion cell from under–voltage, over–current etc. Furthermore, it also has thermal protection in case there is something wrong with Li-Ion battery. Because of unusual requirements for voltage levels three sources were implemented — 5V, 4V and 3V3.
5V is generated by step–up DC/DC converter from Li-Ion battery and used for other power stages and CAN transceiver. 4V and 3V3, as mentioned a moment ago, are generated by dedicated LDOs. The 4V is used to power the GSM module exclusively. The 3V3 is widely used including microcontroller and other logic but also GPS.
For the GPS a FGPMMOPA6C module was used. This module is equipped with build–in antenna which allowed to decrease overall footrpint. For the GSM a SIM900A was used. Since the SIM900A is dual–band and it is destined for Asian countries flashing was required. After a new version of firmware was burnt the module works well in Europe.
Beside the GSM and GPS modules and functionality related to them the device offers additional features. It includes CAN and I2C bus for other external devices. Also the module has:
- 2 digital inputs 0-3.3V,
- 2 digital outputs 0-3.3V,
- 2 ADC channels 0-3.3V,
- 2 PWM channels with base frequency of 1kHz.
Above allows to use the GSM GPS tracker not only as a device to track its location but also interact with other devices. Inputs and outputs can be also accessed via SMS. For example, it can control lights using some relay connected to the digital outputs.
The board is pretty neat — 100mm x 80mm. However, some parts like antenna, SMA connector, is sticking out.
I think that this device turned out to be an useful piece of hardware. During development I have stumbled upon some software problems. Who would expect that if there are 3 UARTs only two would work. All of them were in the same configuration with DMA in circular mode. The problem was that for one of the UARTs a workaround had to be utilized. The workaround was quite simple, but required some debugging. UART’s data register and status register had to be read manually. After this operation the peripheral was unblocked and normal operation was restored.
Also there was a problem with PL2303 for USB interface. The chip I have purchased turned out to be not original and I ended up installing older drivers for the interface.
Having all of that in mind a second version of the PCB is currently in design. Hopefully, all the problems will be solved and there will be no new ones 😉
Here are some photos of the PCB
Top and bottom layer
Two PCBs bottom and top layer (from left)
Assembled and in–operation module