The tracker uses an ATGM332 GPS module to get the GPS position with more accuracy than the location services provided by Sigfox. Then, the position data is sent as a 'string' via the Sigfox network, and finally delivered by email.
The board is similar to the Arduino Zero, which is based on the SAM D21, and includes a ATA8520 Sigfox module. It is a low power board which comes with a one year free subscription to the Sigfox network with the board (for up to 140 messages per day), as well as free access to Spot'it geolocation service.
More info: https://store.arduino.cc/arduino-mkrfox1200
The ATGM332 GPS ModuleThis low-cost, low-power GPS module fits very well with the Arduino MKR FOX 1200 because it works with only 2.7V (nominal 3.3V).
Initially, I had bought a NEO6m2 module which has standby mode, but it resulted to be a fake NEO6 module. It actually was a ATGM332 module. The result was that it lacks of a standby mode, so I needed to use a transistor to turn the GPS module on when needed, and turn it off in order to save battery. My goal is to have location info at slow rate, i.e. 4 messages per hour, as Sigfox only allows 140 messages per day.
I use the TinyGPS library (https://github.com/mikalhart/TinyGPS) to decode the GPS frames.
The Transistor SwitchI needed to turn the GPS on and off when needed. I thought relay modules were too bulky and powerful if I only needed to switch a 3V and few milliamps load. In addition, most relay modules need 5V. So, a transistor would be a better solution. Also, the MKR FOX 1200 only provides 7 mA per I/O pin.
I use a BC548 NPN transistor to switch between the saturation and cut-off regions. When a zero signal is applied to the Base of the transistor it turns “OFF”, acting like an open switch and no collector current flows. With a positive signal appliedto the Base of the transistor it turns “ON” acting like a closed switch and maximum circuit current flows through the device.
More info at: https://www.electronics-tutorials.ws/transistor/tran_4.html
ConnectionsThe only power source is a two 1.5V AA battery pack that powers the Arduino MKR FOX 1200. The GPS module gets is power from the Arduino board.
The Arduino MKR FOX 1200, communicates with the GPS module using a second Serial port through pins 13 and 14, called Serial1 in the code. (See https://www.arduino.cc/en/Tutorial/SamdSercom). The TX data output of the GPS module is connected to the Serial data input (pin 13) of the Arduino board.
Besides, the Arduino board uses the PIN2 to turn the GPS module on and off, as it is explained.
Sending GPS Info via SigfoxI wanted to send the GPS info using float type data, but when I tried I always received null values.
Searching the web, I came across this project https://github.com/nicolsc/SmartEverything_SigFox_GPS by Nicolas Lesconnec. He uses AT commands to send any data type, and convert 'float' to 'hex'. However, I think the Arduino MKR FOX 1200 doesn't have AT mode, and I couldn't make it work.
So, I made dozens of tests and, modifying the Nicolas´s code, I found a way to send a 'string' that was parsed as 'float:32' by the Sigfox platform, and it could be used directly without any conversion by the final receiver.
Sigfox data is limited to 12 bytes. The data I send to the SigFox network is:
Latitude, float:32type, 4 bytes.
Longitude, float:32type, 4 bytes.
Altitude, float:32type, 4 bytes.
The Sigfox Callback ConfigurationThe Sigfox Custom Callback configuration is:
lat::float:32lng::float:32 alt::float:32
You will receive an email like this:
In order to see the position easily, I included a URL to Google Maps using the information received: https://maps.google.com/maps/?q={customData#lat}, {customData#lng}
And finally, this is the result:
Comments