Page | 63
11.
Sensor Measurement
11.1
Automatic
The program uses configurable constants to determine the timing of various measurement operations such as when
to apply power to the sensor, and how frequently to measure and store the data. A typical example is with an EXO
Sonde, every 5s (
SCAN_INTERVAL_S
) the program will scan for user input and check the timing requirements. An
EXO takes 30s to warm up (
SENSOR_WARMUP_S
) and then approximately 90s to take a reading, which is commonly
performed every 15 or 30 minutes (
MEASUREMENT_INTERVAL_S
), and it typically stores data after each reading
(
DATA_STORAGE_INTERVAL_S
). It is possible to leave the sensor powered up all the time by setting
SENSOR_WARMUP_S
to 0. The sequence and frequency of these times is represented in the figure below.
Unless necessary, a
SCAN_INTERVAL_S
of 5 seconds or less is
recommended. Any shorter than this and the current consumption is
significantly higher, while any slower than this and the current
consumption savings are smaller, as summarised in Figure 34
Figure 34 - 5s is the recommended scan rate for optimum balance of responsiveness and
current efficiency.
11.2
Manual
It is also possible to trigger manual measurements or control sensor power by
setting program variables (or flags) to True. True is defined as any value other
than 0, typically -1. The program will automatically set most flags back to False
(0) when completed. The control variables are grouped in the Public table
between
Control____________
and
Measurements___________
.
Table 11 - Commonly Used Control Variables
ReadNow
Trigger a one-off sensor reading
ReadFast
Trigger continuous sensor readings each scan interval
ReadPause
Prevent any sensor readings (cleared at midnight if accidentally left on)
StoreData
Trigger data storage
SensorHoldPowerOn
Keep sensor power on (to override normal program control). Setting
SENSOR_WARMUP_S
to 0 also keeps power on all the time but is on if the program
restarts, whereas
SensorHoldPowerOn
is cleared if the program restarts.
SensorHoldPowerOff
Keep sensor power off (to override normal program control)
ReadStatusSensors
Read internal status sensors such as humidity, operating current (mA), GPS location, etc
SendToHydrosphere
Trigger sending of buffered data to Hydrosphere. Use
ReadNow
and
StoreData
before