5.3 Durham Tracker Project
5.3.1 Overview
The Durham Tracker project has been running for a number of years. The initial intention for the project was to produce a tracker for crates of produce, reporting intermittently their positions and giving additional information such as their tem- perature and whether they had received any undue vibrations. This would allow the user to see where their shipment was and how it was being treated. The tracker was later extended over numerous iterations to allow for a much wider set of use cases.
Unless otherwise specified the versions discussed in this paper are v.3.1 and 3.2. When the project was taken over for this PhD v.3.1 was current, but had a number of problems, most notably that the position of the shock sensors partially blocked the SIM card slot. Version 3.2 had been developed, but did not work — there was an unknown fault[144] which was discovered soon after to have been caused by a split ground plane. Connecting the two halves fixed the problem.
The tracker has been used with a number of experiments in the Engineering Department at Durham, some of which are documented in Section 5.3.2.
A hardware diagram for the tracker is shown in Fig 5.3. The main process- ing components of the tracker — a Telit GM862-GPS and an MSP430F169 — are described below, in sections 5.3.1.1 and 5.3.1.2 respectively.
The tracker runs sensors off an I2C bus (see Section 5.4.2.8 for more details). A socket allows for external sensors to be connected to the tracker, giving end users an opportunity to add their own inputs. An example of this is given in Section 5.3.2.7, where readings of audio levels were taken around Durham. The sensors on the board are an LM75 temperature gauge and three 10G shock sensors mounted orthogonally to give a three axis shock sensor.
The LM75 Digital Temperature Sensor and Thermal Watchdog with Two-Wire Interface[145] is a temperature gauge designed to connect to an I2C bus. It is rated to give temperatures from -55 to +125◦C , and is accurate to within 3 degrees (2 degrees from -25 to +100). It comes as a surface mount package, with eight connections — power, ground, overtemperature shutdown, two wire I2C (clock, data), and three
102 Chapter 5. GPS tracking pins for setting the three least significant bits of a 7 bit I2C slave address (the most significant bits are set internally to 1001).
The three ASLS-10 shock sensors from ASSEMtech are 10G acceleration switches, measuring 4.6mm (diameter) by 6.8mm (length).[146] They are connected to the MSP (see section 5.3.1.2), to give them an I2C interface.
The tracker is powered by four AA batteries, in a separate box, initially hard wired to the main PCB but later connected via a barrel connector. The reason be- hind this choice was to give the user an easy means of recharging the tracker when on the road.[146] The initial use case being a tracker for crated goods, the delivery driver would be more easily able to buy AAs from motorway services than to find a means to recharge an internal battery. However, this decision is inconvenient when either carrying the tracker around in person or when using the tracker on a weight limited UAV. It also means that the user gets through a large number of batteries, unless rechargeable AAs are used. Changing to using an internal rechargeable bat- tery is discussed in Section 5.4.2.10. An LM3475 SOT23 hysteretic buck controller is used to regulate the voltage.
As the batteries are unable to provide the high currents spikes required by the Telit when transmitting over GSM,2 a 1.8F 120mΩ supercapacitor3 is used as buffer.[144; 146]
In order to connect the tracker to a computer, a breakout board is used. This is described more fully in section 5.3.1.3.
Before the modifications were made as described in Section 5.4, the tracker would work as follows. Once switched on it would run through a short initiation procedure, after which it would enter the main loop. This would consist of taking a GPS reading, taking a series of sensor readings, uploading these to a remote server, and then putting the tracker into a low powered sleep mode for a preset period of time, before repeating. If a connection to the server could not be made, the details would be stored in a file. If, on a future occasion, a reading uploaded successfully then it would attempt to upload up to ten readings from this file; a process known as
2Due to their internal resistance, there is an internal voltage drop when current is drawn from
alkaline batteries.
5.3. Durham Tracker Project 103
Figure 5.4: The Telit GM862-GPS
‘backfilling’. When uploading to the server, the tracker could be given in reply an instruction to change between a series of configuration files; setting, for example, the frequency of readings.
The server (a single core virtual machine running Debian) receives the data from the tracker and appends it to a MySQL database. Users can then see the current and historical positions of the trackers by looking at a website, also hosted on the server, that displays the positions and other data on a map (see Section 5.4.2.9 for more details).
5.3.1.1 Telit GM862-GPS Module
The Telit module[147] (hereafter, ‘Telit’) is the main part of the Durham Tracker, as it supports the three main elements — a GPS receiver, the ability to make GSM/GPRS connections, and the processor which runs the code. It measures 43.9 x 43.9 x 6.9 mm, weighs 20g, and has a low power consumption.
The inbuilt SiRFstarIII single-chip GPS receiver has an advertised position res- olution accuracy of less than 2.5m, with a high sensitivity for indoor fixes (up to
104 Chapter 5. GPS tracking Power off <26 µA
Idle (registered, power saving) 2.6 mA Dedicated mode 200 mA
GPRS cl.10 370 mA
Table 5.1: GSM power consumption (typical values). All data taken from the GM862-GPS datasheet.
-159dBm, with an active antenna). It has a hot start of less than 3s, with warm and cold starts of less than 35s. The GPS has an operating current of 75mA.
The quad-band GSM/GPRS modem allows the module to connect to the internet via the mobile phone network. There is an integrated SIM card holder on the module itself. The GSM modem’s power consumption is given in Table 5.1.
The internal processor runs scripts written in Python (Python 1.5.2; this is now a somewhat outdated version). It also is capable of taking commands given directly via serial, using an extended version of the Hayes command set (‘AT’ commands, based on GSM 07.05 and 07.07, with Telit-specific enhancements).
The Telit module comes with 1.9MB of non-volatile memory set aside for user scripts, and 1.2MB of RAM for the Python engine. It also theoretically supports software updates sent over the air, although this has not been tested.
The 50 pin Molex connector (visible in Figure 5.4b) includes up to 13 I/O ports, and the Telit module supports both I2C and SPI as well as UART. It is capable
of sending and receiving SMS text messages and of making and receiving telephone calls.
The Telit includes a built in Watchdog timer, which will reboot the module after a period of 10 minutes if it is not regularly reset (or temporarily disabled). This is used to prevent the system from crashing, by restarting it if it takes too long to complete a given activity. It is set to be active at all times except when sleeping (using the built in low power mode of the Telit) and when uploading points to the server.
5.3. Durham Tracker Project 105 5.3.1.2 Texas Instruments MSP430
The MSP430F169[148] (hereafter, ‘MSP’) is part of the MSP430 family of ultralow power microcontrollers. The device’s low cost 16 bit RISC CPU, designed for embed- ded applications, has 60KB flash memory (plus 256B information memory) and 2KB RAM. It runs scripts written in C, and can be programmed via a JTAG interface.
The MSP is used for a number of applications on the tracker. The primary use is for the control of the three orthogonal shock sensors connected to its GPIO ports; it logs the time of each reported shock and returns the results when queried by the Telit over the I2C bus.
It is also used for initialising the Telit. On startup it holds the ON OFF pin of the Telit low for over 1 second to switch it on. It has additional functions for implementing a box mounted reset button, which could also be used for things such as immediate transmitting of position, but this has not been included in the current box design and is therefore unattached.
One great advantage of having the MSP in the system is that it can be interrupt driven, and can respond to interrupts without disrupting the running of the Telit. Things like the shock sensors require an immediate response (to get an accurate timestamp), and can be dealt with by the MSP and forwarded to the Telit at a later stage.
5.3.1.3 Breakout board
For connecting the trackers to a computer for programming and offloading data a breakout board was used. This was created in house, and connected onto the main PCB of the tracker to give three serial ports. The three ports (see Figure 5.5) gave connection to the raw NMEA data from the GPS, to the MSP for reflashing code, and to the Telit. This third gave a live stream of the tracker status while the code ran, the ability to upload / download files (mainly for uploading new code and downloading logs), and while code was not running a chance to enter commands directly.
106 Chapter 5. GPS tracking
Figure 5.5: The breakout board for interfacing between the Durham Tracker and a computer