Skip to content

Compact and lightweight tracker integrating the Astrocast communication module and u-blox CloudLocate service

Notifications You must be signed in to change notification settings

valcesch/AstroTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AstroTracker

A tracker that can transmit your location anywhere on Earth ? Even when there is no terrestrial network such as 2G, 4G, LoRa, etc. to relay your data ? A tracker that can acquire and transmit a location with only 10 joules of energy consumed (Yes, this is nothing !) ? A tracker that measures only 55x55x10mm ? A tracker that weight only 44g (with battery !) ? A tracker that can operate for at least 8 months when sending 1 location per day ? Sounds impossible ? Believe it or not, but YES, this is possible and fortunately, you will find plenty of details in this page to build your own!

The project is also on HACKADAY: https://hackaday.io/project/189798-astrotracker-mini

Principle of operation

The principle of operation is relatively simple: the GPS data are collected thanks to an ultra-low power GNSS receiver from u-blox and a satellite communication module from Astrocast is used to transmit the data to the cloud.

The GNSS receiver used on the tracker is a MAX-M10S from u-blox. It outputs a raw sample of data that we can upload to a server of u-blox which will then return the 3D location of the tracker. In good sky visibility, the receiver can start to output these raw messages in just 3 seconds, which is much shorter (and thus energy efficient), than going for a full PVT acquisition (up to 28 seconds for a cold start).

The following schematic summarizes well the overall acquisition process:

bottom

Follow this link if you want to learn more on the "CloudLocate" service from u-blox.

So how do we transmit our raw sample of data to the server ? Well, it's now that we have to give some more details on the satellite communication module from Astrocast: the Astronode S.

The Astronode S is a low power bi-directional satellite communication module which uses the L-band frequency band to communicate with the satellites. Once the raw GNSS sample is acquired, the tracker will place it in the message queue of the Astronode S and the module will automatically look for a satellite from the Astrocast constellation. When a satellite is in view, the module will transmit the data that will then appear on the Astrocast portal.

The following schematic summarizes the overall data upload process:

bottom

Follow this link if you want to learn more on the service from Astrocast.

In the schematics of the tracker, you will see that the Astronode S and GNSS receiver share the same patch antenna as they are working in the same frequency range (1.5 - 1.6 GHz). The RF switch that has been selected is a GRF6011 from Guerrilla RF. Its fail safe feature enables a good low power solution: when the RF switch is not powered, one of the two RF path will present low insertion losses (<0.4 dB). When the switch is powered, the second RF path will instead go in a low insertion loss state as illustrated below:

bottom

This solution allows to keep the GNSS RF path active when the RF switch is turned off. When the Astronode S wants to use the antenna, its "ANTN_USE" pin of the module will power up the RF switch and connect the Astronode S to the antenna.

Tracker "fact sheet"

The main features of the tracker are listed below:

  • GNSS "snapshot" mode (u-blox MEAS20 messages for M10 receivers - data will be processed on CloudLocate service.
  • Single shared antenna for satellite communication AND GNSS acquisition.
  • Remotely configurable thanks to satellite downlink (user can set the tracker configuration such as acquisition rates).
  • Real-time scheduler (GNSS/sensors acquisition, generate status reports, etc.).

Some key technical aspects are listed below:

  • Framework: Arduino core for SAMD21.
  • GNSS module: MAX-M10S from u-blox (L1 band: 1.575 GHz).
  • Communication module: Astronode S from Astrocast
    • Downlink frequency: 1525-1559 MHz
    • Uplink frequency: 1626.6-1660.5 MHz
  • RF switch: GRF6011 from Guerrilla RF
  • PCB substrate: FR4, 4 layers
  • Connectors:
    • 2 pin JST connector for wired battery.
    • USB interface for programming.

Some facts on latency and acquisition rates:

  • GPS acquisition rate: from 1 sample per day up to 1 sample per hour.
  • Message end-to-end latency: a few hours (depends on the location of the tracker).

Hardware versions

Multiple hardware variants of the tracker are available depending on the use case. Note that the same source code is used for all the versions by activating, deactivating the modules that needs to be used:

AstroTracker V0.3 REV1

Little name: AstroAnimal

Coming soon !

AstroTracker V0.4 REV1

Little name: AstroPager

Coming soon !

AstroTracker V0.5 REV3

Little name: AstroTrackerOne

Coming soon !

AstroTracker V0.6 REV2

Little name: MiniTracker

bottom

  • U-blox MAX-M10s GNSS receiver, shared antenna with Astronode S communication module.
  • MCU is SAM2121G18A, integrated below the Astronode S module (Astronode S is mounted on a PCB spacer).
  • Astronode S + patch antenna communication module.
  • Hardware watchdog using TPL5010
  • 2 pin JST connector for wired battery.
  • Connectors: USB interface.
  • 55x55mm, 4 layers PCB design.

AstroTracker V0.7 REV1

Little name: AstroTrackerMesh

Coming soon !

Tracker to Operator - Message format

All the data acquired by the tracker are managed by a logger. A new log entry will be generated for each GNSS measurement, user uplink command, user downlink message, etc. The list of possible log entries is provided in the following table:

Message ID

List of message types that are stored in the logger of the tracker.

Message Tag ID Length (Bytes) Description
LOGGER_TAG_PVT_SLOT 0x01 20 Logger GNSS PVT message
LOGGER_TAG_U_MSG_SLOT 0x02 41 Logger user message - Uplink message with text
LOGGER_TAG_RAW_SLOT 0x04 21 Logger GNSS RAW message - CloudLocate input

LOG_PVT_struct Logger GNSS PVT message

This structure contains the position, velocity and time (PVT) data generated by the GNSS receiver.

Byte offset Type Length (Bytes) Name Description
0 uint8_t 1 slot_tag Message ID
1 uint32 4 Timestamp Epoch of the measurement in UNIX time
5 int32 4 Latitude Degrees Latitude * 1E7 (i.e., latitude multiplied by 10'000'000)
9 int32 4 Longitude Degrees Longitude * 1E7 (i.e., longitude multiplied by 10'000'000)
13 uint8 1 SIV Number of satellites used in fix
14 int32_t 4 gSpeed Ground speed in mm/s
18 uint8 1 V Bat Voltage of the battery in the tracker (multiplied by 10)
19 int8 1 Temperature Temperature of the tracker in deg C (1 deg resolution)

LOG_RAW_struct Logger GNSS RAW message

This structure contains the RAW data that can be uploaded to the CloudLocate service from U-blox to compute the location of the tracker. Do not forget to add the timestamp "created date" provided by the satellite communication module.

Byte offset Type Length (Bytes) Name Description
0 uint8_t 1 slot_tag Message ID
1 uint8_t 20 meas20 U-blox MEAS20 message

LOG_U_MSG_struct Logger user message

This structure contains the text message queued by the user. This message can be directly read on the Astrocast portal.

Byte offset Type Length (Bytes) Name Description
0 uint8_t 1 slot_tag Message ID
1 uint8_t 40 data User message data

Operator to Tracker - Command format

The tracker can execute a certain amount of commands trough the different available communication interfaces (Satellite, BLE, Mesh). Here is the description of the transport layer. The protocol is inspired from the protocol used to communicate with the products from Advanced Navigation

Header Data
Header LRC Packet ID Packet Length CRC16 Packet Data

A description of each field is provided in the following table:

Byte offset Type Length (Bytes) Name Description
0 uint8_t 1 Header LRC Longitudinal Redundancy Check.
Error checking for the packet header.
LRC = ((packet_id + packet_length + crc[0] + crc[1])^0xFF) + 1
1 uint8_t 1 Packet ID Used to distinguish the contents of the packet. IDs can be in the range 0-255.
2 uint8_t 1 Packet Length Length of the data packet, from byte offset 5 included. Length can be in the range 0-255.
3 uint16_t 2 CRC16 CRC, CRC16-CCITT (start us 0xFFFF). Computed only over the data packet.

The list of supported packet IDs and their description is provided below:

Packet ID Length R/W Description
0 4 R Acknowledge packet
1 Varies W Request packet
2 44 R/W Message data packet
3 43 R Satellite status packet
4 8 R Logger status packet
5 18 R GPS status packet
6 6 R BLE status packet
7 8 R Asset status packet
11 8 W Configuration packet

packet_id_acknowledge Acknowledge packet

typedef struct __attribute__((__packed__))
{
    uint8_t packet_id;
    uint16_t packet_crc;
    uint8_t acknowledge_result;
} acknowledge_packet_t;

packet_id_msg_data Message data packet

typedef struct __attribute__((__packed__))
{
    uint8_t data[40];
    uint32_t acknowledgedDate;
} msg_data_packet_t;

packet_id_sat_status Satellite status packet

typedef struct __attribute__((__packed__))
{
    uint32_t sat_detect_operation_cnt;
    uint32_t signal_demod_attempt_cnt;
    uint32_t ack_demod_attempt_cnt;
    uint32_t sent_fragment_cnt;
    uint32_t ack_fragment_cnt;
    uint32_t queued_msg_cnt;
    uint32_t time_start_last_contact;
    uint32_t time_end_last_contact;
    uint8_t peak_rssi_last_contact;
    uint32_t time_peak_rssi_last_contact;
    uint16_t reset_cnt;
    uint32_t uptime;
} sat_status_packet_t;

packet_id_logger_status Logger status packet

typedef struct __attribute__((__packed__))
{
    uint16_t u_msg_cnt;
    uint16_t u_cmd_cnt;
    uint16_t pvt_cnt;
    uint16_t raw_cnt;
} logger_status_packet_t;

packet_id_gps_status GPS status packet

typedef struct __attribute__((__packed__))
{
    uint16_t meas_cnt;
    int32_t last_loc_lat;
    int32_t last_loc_lon;
    uint32_t time_last_update;
    uint32_t uptime;
} gps_status_packet_t;

packet_id_ble_status BLE status packet

typedef struct __attribute__((__packed__))
{
    uint32_t advert_burst_cnt;
    uint16_t user_connection_cnt;
} ble_status_packet_t;

packet_id_asset_status Asset status packet

typedef struct __attribute__((__packed__))
{
    uint32_t up_time_ms;
    uint32_t sys_time;
} asset_status_packet_t;

packet_id_config Configuration packet

typedef struct __attribute__((__packed__))
{
    // GPS config
    bool gps_settings_with_gps;
    bool gps_settings_with_galileo;
    bool gps_settings_with_beidou;
    bool gps_settings_with_glonass;
    bool gps_settings_with_rxm_meas20;
    uint8_t gps_settings_raw_timeout_s;

    // sat modem config
    bool sat_settings_with_pld_ack;
    bool sat_settings_with_geo_loc;
    bool sat_settings_with_ephemeris;
    bool sat_settings_with_deep_sleep_en;
    bool sat_settings_with_msg_ack_pin_en;
    bool sat_settings_with_msg_reset_pin_en;
    bool sat_settings_with_cmd_event_pin_en;
    bool sat_settings_with_tx_pend_event_pin_en;
    bool sat_settings_sat_force_search;
    uint8_t sat_settings_sat_search_rate;

    // Scheduler config
    uint8_t scheduler_settings_gps_interval_h;
    uint8_t gps_settings_pvt_timeout_s;

    // Asset status
    uint8_t battery_low_threshhold;

} config_packet_t;

The following table explains which commands are available for which communication interface:

Packet ID Packet Name Satellite BLE Mesh
0 Acknowledge packet
1 Request packet
2 Message data packet
3 Satellite status packet
4 Logger status packet
5 GPS status packet
6 BLE status packet
7 Asset status packet
11 Configuration packet

Configuration

The present chapter aims to provide some guidelines on how to set the configuration of the tracker. Note that for the time being, the configuration is not saved in the flash memory of the device and any change done during the operation of the tracker will be lost in case of reboot.

Each module of the tracker has its own set of configuration parameters:

ble_settings BLE radio configuration

Parameter values (default) Description
tx_power nRF52840: -40, -20, -16, -12, -8, -4, 0 (default), +2, +3, +4, +5, +6, +7, +8. BLE radio TX power level (in dBm)
advert_fast_interval custom (20 ms default) Advertising interval that is used in the first n seconds (in unit of 0.625 seconds). Recommended values here.
advert_slow_interval custom (1285 ms default) Advertising interval that is used after fast timeout (in unit of 0.625 seconds). Recommended values here.
advert_fast_timeout custom (30 s default) Timeout of the fast advertising mode (in s)

gps_settings GPS/GNSS receiver configuration

Parameter values (default) Description
with_gps True (default) / False Enable/Disable GPS constellation tracking.
with_galileo True (default) / False Enable/Disable Galileo constellation tracking.
with_beidou True (default) / False Enable/Disable Beidou constellation tracking.
with_glonass True (default) / False Enable/Disable GLONASS constellation tracking.
with_rxm_meas20 True (default) / False Enable/Disable acquisition of MEAS20 messages for u-blox CloudLocate.
nav_freq_hz custom (1 Hz default) Rate at which the receiver will give us an updated navigation solution (in Hz)
hacc_pvt_threshold custom (10000 mm default) Horizontal accuracy threshold. In PVT mode, the tracker will consider the solution as valid and creat a new log entry. (in mm).
raw_timeout_s custom (10 s default) Receiver will try to do a RAW acquisition until the timeout has expired. It will then continue for a full PVT acquisition. (in s)
pvt_timeout_s custom (120 s default) Receiver will try to do a full PVT acquisition until the timeout has expired. (in s)

sat_settings Satellite modem configuration

The configuration of the satellite modem should not be changed as it is tightly linked wit operation of the tracker (event based). Please do not change the configuration unless you know what you are doing !

Parameter values (default) Description
with_pld_ack 0 = Tracker not informed of ack to satellite
1 = Tracker informed of ack to satellite (default)
DO NOT CHANGE - Satellite Acknowledgement.
with_geo_loc 0 = No Geolocation bytes in uplink message (default)
1 = Add Geolocation bytes in uplink message
NOT SUPPORTED - Add Geolocation to uplink message.
with_ephemeris 0 = Disable Ephemeris (default)
1 = Enable Ephemeris
Enable Ephemeris. Could be used to save some energy. Please carefully read this in order to fully understand the limitations of this feature.
with_deep_sleep_en 0 = Deep sleep not used (default)
1 = Deep sleep is used
DO NOT CHANGE - Deep Sleep Mode.
with_msg_ack_pin_en 0 = EVT pin does not show EVT register Satellite Payload Ack bit state
11 = EVT pin shows EVT register Payload Ack bit state (default)
DO NOT CHANGE - Satellite Ack Event Pin Mask.
with_msg_reset_pin_en 0 = EVT pin does not show EVT register Reset Event Notification bit state (default)
1 = EVT pin shows EVT register Reset Event Notification bit state
NOT SUPPORTED - Reset Notification Event Pin Mask.
with_cmd_event_pin_en 0 = EVT pin does not show EVT register Command Available Notification bit state
1 = EVT pin shows EVT register Command Available bit state (default)
DO NOT CHANGE - Command Available Event Pin Mask.
with_tx_pend_event_pin_en 0 = EVT pin does not show EVT register Msg Tx Pending bit state (default)
1 = EVT pin shows EVT register Msg Tx Pending bit state
NOT SUPPORTED - Message Transmission (Tx) Pending Event Pin Mask.
sat_search_rate 0=17.905s (default), 1=1.377s, 2=2.755s, 3=4.132s, 4=15.150s, 5=17.905s, 6=23.414s Satellite detection period enumeration. In challenging environments without proper sky visibility, using a higher detection rate could improve the communication performances of the modem. Be careful as increasing the search rate will conduce to higher energy consumption.
sat_force_search 1 = search without message queued
0 = only search when a message is queued (default)
Enable search without message queued.

gps_scheduler_settings GPS scheduler configuration

Parameter values (default) Description
interval_h custom (24h default) GPS acquisition scheduler trigger interval (in hour).

Android app

An Android app allows the user to execute the above listed commands on the tracker thanks to BLE capabilities of the NRF52840.

Coming soon !

Copyright

AstroTracker Copyright (C) 2023 valcesch

This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

About

Compact and lightweight tracker integrating the Astrocast communication module and u-blox CloudLocate service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published