Determining the Mission Parameters for Temperature Logger iButton® Devices
Bernhard Linke, Principal Member Technical Staff
|© Mar 29, 2012, Maxim Integrated Products, Inc.
Abstract: For many first-time users, setting up a temperature logger for a mission can be a challenging task. This application note explains technical terms common with temperature logger iButtons. Additionally, it presents an algorithm that helps users choose the necessary input parameters, including the appropriate sample rate.
Button devices have gained a lot of popularity with researchers. Although free evaluation software is easy to use and well documented, the choices and inputs that need to be made can sometimes be challenging. This application note explains technical terms that are common with temperature
Buttons and how they relate to each other. Additionally, it presents an algorithm to help users choose the necessary input parameters, including the sample rate based on a user's needs and the available memory to store the data.
This term describes the interval from the instant when a logger is set up to collect data to the instant when, after having collected all the relevant data, further data collection is stopped.
This term describes all the data elements that are relevant for a logger to conduct a mission as intended by the user.
This is the memory where the data collected during a mission is stored. The DS1921
-series loggers have 2048 bytes, which can store up to 2048 temperature values. The DS1922
-series loggers and the DS1923
have 8192 bytes of data-log memory. The data-log memory is independent of the 512 byte general-purpose user memory, as is the histogram and alarm memory of the DS1921 series. The data-log memory cannot be erased. When a new mission is started, it is simply overwritten with new data. The "mission samples counter" in the i
Button tells how many entries are valid.
Resolution (DS1922/3 Only, Mission Parameter)
The DS1922/3-series loggers allow for choosing between low resolution (0.5°C for temperature values, same as with the DS1921G) and high resolution (0.0625°C). The DS1923 also supports "diverse resolution," where one channel operates in high resolution and the other one in low resolution. Table 1 shows how many samples can be stored per device at a given resolution. The high-resolution mode provides the full temperature accuracy, but consumes twice as much memory and up to 8 times more energy. The energy consumption of the humidity channel (DS1923 only) is independent of the resolution. With a typical humidity error of 5%, the DS1923 should be set up for low-resolution humidity logging.
|Table 1. Data-Log Samples Capacity
|DS1922 series, DS1923 (single-channel operation)
|DS1923 (dual-channel operation)
Rollover (Mission Parameter)
When setting up a logger for a mission, one must ensure that the number of samples taken during a mission fits into the data-log memory. If a mission takes longer than planned, the logger generates more data than can fit into the memory. The rollover option allows the user to choose what the logger does when the memory is full.
With the rollover disabled, no additional data is stored when the memory is full; the excess data is lost, but all the data from the beginning of the mission is stored up to the end of the memory. With the rollover enabled, the logging continues, but the data from the beginning of the mission is lost and overwritten with new data.
Sample Rate (Mission Parameter)
Logger iButton data sheets use the term sample rate to reference the time between consecutive measurements (log entries) during a mission. The sample rate is typically specified in minutes. The DS1922/3 series of loggers also support fast sampling, where the rate is specified in seconds.
Real-Time Clock (RTC)
Each logger has a clock that, together with the mission parameters, controls the event timing during a mission. Just like an electronic watch, the clock of a logger consumes some energy. To maintain freshness, loggers are shipped from the factory with the clock stopped (halted). To conserve energy, it is recommended to also stop the clock after a mission. In any case, to provide a timing reference for the data logged during a mission, it is necessary to first start and set the clock to the correct time.
Mission Start Delay (Mission Parameter)
When setting up a logger, one can specify a delay time between the instant where the mission parameters are written to the logger ("now") and the time of the first measurement (log entry) of the mission. The start delay is convenient when setting up several loggers before the actual logging is supposed to start. If the mission is to start immediately, the start delay is 0.
The start delay is an essential feature when using multiple loggers to monitor a mission that is too long for a single logger to store all the data. In this case it is important to disable rollover. When the mission is completed, users can download the mission data of the various loggers and reassemble it in a spreadsheet in the correct sequence for further processing.
Note: The start delay range (measured in minutes) varies with the logger series. For DS1921-series devices, the maximum delay is 65536 minutes or 45.5 days. With the DS1922/3 series, the maximum delay is 16.777 million minutes or ~31 years. Since the RTC of the logger could be off by up to 8 minutes per month at very high or very low temperatures of the device, a start delay of several months can cause a significant accrued time error. (See the temperature logger data sheets for RTC accuracy and the battery lifetime vs. temperature for more information).
The temperature error specifies how much the actual temperature could differ from the measured temperature. For most of the range, DS1921-series loggers have a maximum error of ±1°C. In high-resolution mode, DS1922L loggers have a maximum error of ±0.5°C for the -15°C to +65°C range. The error depends on the logger model and actual temperature (see device data sheets).
Temperature (or Humidity) Alarm Threshold (Mission Parameter)
The purpose of a logger is to monitor whether the temperature and/or humidity of the object to be monitored stays within certain limits. The desirable range is marked by a high alarm and low alarm threshold. Logger iButtons have registers to store these thresholds. When during a mission a logged value is outside the desirable range, a corresponding register bit is set to indicate the alarm. Reading the alarm bits is a fast way to check whether the mission was within the user defined limits. If a threshold breach occurred and one needs to find out when and for how long, the entire mission data must be downloaded and processed. This works for all logger iButtons. DS1921-series loggers have a separate alarm memory that records the alarm timing information in a compressed format.
Histogram Function and Temperature Alarm Logging (DS1921 Series Only)
There are two fundamentally different ways of logging data. A: one can record the time stamp of the first measurement along with the measured value. Then, at the given sample rate, record the value only. This commonly applied method yields a data profile over time. B: one can record the time stamp of the first measurement and, for each measurement, increment a counter that is associated with the value. The result is a histogram that tells how often a particular value occurred during the mission. Loggers of the DS1921 series perform both methods simultaneously. The histogram continues to be updated with every sample, no matter whether rollover is enabled or the data-log memory is full. The histogram method, however, does not record when a particular temperature was measured. As long as the temperature stays in the desired range, the lack of time information is not an issue. This is different when the temperature changes significantly, e.g., due to a broken refrigeration system. Now the alarm logging comes to the rescue, provided that temperature alarm thresholds, one for high and one for low, have been defined properly when the mission was set up. When an alarm threshold is reached or crossed, a DS1921-series logger records an alarm time stamp (equal to the sample number at which the alarm occurred) and maintains a counter to record the duration of the alarming condition (number of samples). The alarm logging works for 12 high-alarm and 12 low-alarm events, even if the data logging memory is full.
Clock (RTC) Alarm (DS1921 Series Only, Mission Parameter)
Besides temperature alarm, DS1921-series loggers also support a clock alarm. The clock alarm function is independent of a mission; when the alarm occurs the first time, a bit in a register is set. The clock alarm could be beneficial if the logger is connected to a remote-controlled master. The master could be set up to wirelessly transmit the day's log at a specific time and then start a new mission. This allows the master to sleep most of the time to conserve energy. When the master wakes up, it checks the DS1921 for a clock alarm. If there is no clock alarm, the master immediately goes back to sleep. Otherwise, it clears the clock alarm, and processes the mission data according to its setup. Typically, a logger is not connected to a master during a mission. In that case, the clock alarm function can be ignored.
SUTA (DS1922/3 Only, Mission Parameter)
The abbreviation SUTA stands for "Start (Mission) Upon Temperature Alarm." This feature allows conserving memory and, if high-resolution temperature logging is requested, battery energy. If SUTA is selected, first the logger waits until the mission start delay is over. Then it starts measuring the temperature in low-resolution mode at the specified sample rate. The temperature values are discarded until there is a value that matches or exceeds one of the specified temperature alarm thresholds. The first logged temperature is when the alarm occurred. At the time of the next sample, the mission time stamp is recorded and the device continues logging at the selected resolution.
Minimum Practical Sample Rate
Temperature logger iButtons have an inherent thermal mass and it can take up to 10 minutes for a logger iButton to fully adapt to a sudden temperature change. Therefore, we caution that a sample rate faster than 5 minutes may not reveal any meaningful data about the environment. The only meaningful information gathered is when the change in temperature started. This should be taken into account when selecting the sample rate for a mission.
Choosing Mission Parameters
First select the logger model and decide which temperature resolution is appropriate. High resolution is recommended when collecting data for scientific studies. In most other cases, low resolution is sufficient. Then obtain the samples capacity (CAP) from Table 1. The next important input is the duration of the mission (D, measured in days).
There are two methods to determine the sample rate. Method 1 relies on a simple sample rate calculator program that can be downloaded for free
. Look for a ZIP file with a name that begins with "TempLoggerCalc". Download the ZIP file, open it and double-click the setup.exe file to install the program.
Once installed, select the logger model and resolution. Then, move the "minutes" slider slowly and read the corresponding duration of the mission. If the duration in days is equal to or slightly exceeds the duration required, read the slider position. That is the sample rate in minutes to be used when setting up the mission. For the DS1922 and DS1922, the calculator allows specifying hours, minutes, and seconds to fine-tune the sample rate. Start with choosing the hours, then the minutes, and then the seconds. When the calculated duration matches the duration of the mission, read the duration in seconds and enter it when setting up the mission. Although quick and convenient, the sample rate obtained through the calculator leads to "rolling sample times." For example, let the sample rate be 17 minutes and let the mission start at exactly 14:00 hours. The sampling times will be:
With rolling sample times, post-processing the mission data to discover repeating patterns may be required.
Method 2 begins similar to the sample rate calculator. In a subsequent iterative process, it modifies the initially calculated sample rate to ensure that the measurements are taken at the same minute for every hour (multiple samples per hour), or at the same times every day (less than 1 sample per hour). Figure 1 shows the Method 2 flow chart.
Figure 1. Method 2 sample rate flow chart.
||Samples capacity of the logger as obtained from Table 1
||Duration of the mission in days
||Calculated sample rate in minutes, by dividing the mission duration (in days) by the samples capacity of the logger at the given resolution
||Samples per hour
||Samples per day
||Modified sample rate
||Any positive number that doesn't have a fraction, e.g., 1, 2, 3, 4, 5, etc.
CAP = 2048 samples; D = 12 days
SRC = 8.4375, less than 60, i.e., multiple samples per hour.
SPH = 7.11 (not an integer)
SRM = 9
SPH = 6.666 (not an integer)
SRM = 10 SPH = 6 done; sample rate = SRM = 10
Result: 6 samples per hour, one sample every 10 minutes. The mission can last for D' = SRM × CAP/1440 = 14.22 days before the memory is full.
CAP = 8192 samples; D = 365 days (1 year)
SRC = 64.16, larger than 60, i.e., less than one sample per hour.
SPD = 22.44 (not an integer)
SRM = 65
SPD = 22.15 (not an integer)
SRM = 66, etc.
SRM = 80 SPD = 18 done, sample rate = SRM = 80
Result: 18 samples per day, one sample every 80 minutes. The mission can last for D' = SRM × CAP/1440 = 455 days before the memory is full.
CAP = 8192 samples; D = 6 days
SRC = 1.0546875, less than 60, i.e., multiple samples per hour.
SPH = 56.8889 (not an integer)
SRM = 2 SPH = 30 done; sample rate = SRM = 2
Result: 30 samples per hour, one sample every 2 minutes; this is faster than the minimum practical sample rate. The mission can last for D' = SRM × CAP/1440 = 11.37 days before the memory is full. A slower sample rate can be chosen without losing accuracy.
To start the mission immediately, use a 0 start delay. Otherwise, specify the time difference in minutes between now and the intended start time of the mission. A nonzero start delay is needed when using several loggers for a long-term mission to ensure that the second logger starts when the first logger's data-log memory is full, etc.
Enable rollover if the latest data is more important than data from the beginning of the mission. Do not enable rollover when using several loggers for a long term mission (see the Start Delay description).
Setting these thresholds, one for temperature low alarm, another for temperature high alarm, is necessary to take advantage of the temperature alarm logging function (DS1921 series) or the SUTA function (DS1922 series and DS1923). The actual threshold values depend on the objects to be monitored and the temperature range that is considered acceptable during a mission (nonalarming).
SUTA (DS1922 Series and DS1923 Only)
Enable this function only if the temperature alarm thresholds are set properly. Otherwise, no data will be collected during the mission. In most cases, the SUTA function is not enabled.
RTC Alarm (DS1921-Series Loggers)
Unless the application benefits from the RTC alarm function, there is no need to enable clock alarms.
For many first-time users, setting up a logger for a mission can be a challenging task. In simple language, this application note first explains technical terms used in conjunction with iButton loggers. Then, starting with the sample rate, it explains how to choose the remaining mission parameters. The sample rate can be computed using the free sample rate calculator or be determined by an algorithm. Examples are included for the user to gain confidence with the sample rate algorithm.
iButton is a registered trademark of Maxim Integrated Products, Inc.
||Thermochron iButton Device
||High-Resolution Thermochron iButton Devices
||High-Resolution Thermochron iButton Devices
||iButton High-Temperature Logger with 8KB Data-Log Memory
||iButton Temperature Loggers with 8KB Data-Log Memory
||iButton Temperature Loggers with 8KB Data-Log Memory
||iButton Hygrochron Temperature/Humidity Logger with 8KB Data-Log Memory
The content on this webpage is protected by copyright laws of the United States and of foreign countries. For requests to copy this content, contact us.
APP 5335: Mar 29, 2012
APPLICATION NOTE 5335,