Collecting Weather Data in the Field with High Spatial and Temporal Resolution Using iButtons S. Mittra, J. van Etten and T. Franco June 2013 Version Content Page SECTION I: INTRODUCTION AND GENERAL INFORMATION ....................................................................................... 1 IBUTTONS MAIN COMPONENTS ........................................................................................................................................... 1 IBUTTON GENERAL FEATURES .............................................................................................................................................. 2 DS1923 HYGROCHRON IBUTTON DEVICE WITH 8KB DATALOG MEMORY .................................................................................. 2 KEY FEATURES OF IBUTTONS (REF: DS1923) ........................................................................................................................ 3 PRICING .......................................................................................................................................................................... 4 SECTION II: MISSIONING AN IBUTTON ...................................................................................................................... 5 STEPS FOR MISSIONING AN IBUTTON USING THE 1-WIRE VIEWER SOFTWARE ............................................................................... 5 SECTION III: SETTING UP IBUTTONS IN THE FIELD .................................................................................................... 10 SECTION IV: DOWNLOADING DATA FROM THE IBUTTON ........................................................................................ 12 STEPS FOR DOWNLOADING TEMPERATURE DATA FROM THE IBUTTON DIRECTLY TO THE COMPUTER ................................................. 12 STEPS FOR DOWNLOADING HUMIDITY DATA FROM THE IBUTTON DIRECTLY TO THE COMPUTER ....................................................... 17 SECTION V: DOWNLOADING DATA FROM THE IBUTTON IN THE FIELD .................................................................... 22 GENERAL INFORMATION .................................................................................................................................................. 22 ALARM INDICATORS OF THE TDHC 400 DATA DOWNLOADER.................................................................................................. 23 When the USB port is not connected .................................................................................................................... 23 When the USB port is not connected .................................................................................................................... 24 REFERENCES ............................................................................................................................................................ 30 1 Collecting Weather Data in the Field with High Spatial and Temporal Collecting Weather Data in the Field with High Spatial and Temporal Collecting Weather Data in the Field with High Spatial and Temporal Collecting Weather Data in the Field with High Spatial and Temporal Resolution Resolution Resolution Resolution UUUUsing sing sing sing iButtonsiButtonsiButtonsiButtons Section I: Introduction and general Section I: Introduction and general Section I: Introduction and general Section I: Introduction and general iiiinformationnformationnformationnformation A common challenge in the agricultural and environmental sciences is to collect detailed weather data, spatially and temporally. Different types of weather stations and data loggers are commercially available but most of them are fairly expensive. This limits their use, as equipment may be stolen or destroyed when no supervision is available. However, more simple environmental sensors are now available in the market which are less costly, can be easily replaced when lost, and can be placed in less accessible areas such as in farmer’s fields. Also, several of these sensors can be used in the same area thus generating data with a higher spatial resolution. However, it is important to be aware of that these simple environmental sensors are not as accurate as true weather stations although they can provide useful environmental indicators. When combined with data from weather stations, they can be used to improve spatial interpolations. This technical guideline explains how to collect temperature and humidity data using the Data logger iButtons reference DS-1923 Hygrochron. This device measures temperature and/or humidity and records the result in a memory section. iButtonsiButtonsiButtonsiButtons main componentsmain componentsmain componentsmain components Six main components are required for recording data with iButtons: 1) Data logger iButtons. We are using the DS-1923 Hygrochron to measure temperature and/or humidity 2) A device to hold the iButton while it is used in the field. We use a pole made of white PVC pipe (following Hellström & Mark 2006, see below) 3) A desktop or laptop computer 4) A Blue Dot Receptor plus the 1-Wire Adaptor to mission the iButton 5) A reader device to get information into and out of the IButton. This task can be accomplished by connecting the Blue Dot Receptor directly to the computer. But this could be a cumbersome procedure in you want to download the data directly in the field. Therefore we are using the TDHC 400b: Handheld Thermochron Downloader to download the information from the iButtons directly in the field. 6) Software to interface iButton devices to computers 2 iButtoniButtoniButtoniButton general featuresgeneral featuresgeneral featuresgeneral features The iButton has the following characteristics (adapter from Maxim Integrated) � The iButton is a computer chip enclosed in a 16mm thick stainless steel can � The steel iButton can be mounted virtually anywhere � It is rugged enough to withstand harsh environments, indoors or outdoors � An iButton can be dropped, stepped on or scratched. � The iButton is wear-tested for 10-year durability � It is small and portable enough to attach to a key fob, ring, watch, etc. � It can be used daily for applications such as access control to buildings and computers, asset management, and various data logging tasks. The iButton product line now comprises over 20 different products with different functionality added to the basic button and come in the following varieties: � Address Only � Memory � Real-Time Clock � Security � Data Loggers DS1923 Hygrochron DS1923 Hygrochron DS1923 Hygrochron DS1923 Hygrochron iButtoniButtoniButtoniButton Device with 8KB Datalog MemoryDevice with 8KB Datalog MemoryDevice with 8KB Datalog MemoryDevice with 8KB Datalog Memory The iButton temperature/humidity logger (DS1923) is a rugged, self-sufficient system that measures temperature and/or humidity and records the result in a protected memory section. The recording is done at a user-defined rate. A total of 8,192 8-bit readings or 4,096 16-bit readings taken at equidistant intervals ranging from 1s to 273 hrs can be stored. In addition to this, there are 512 bytes of SRAM for storing application-specific information and 64 bytes for calibration data. A mission to collect data can be programmed to begin immediately, or after a user-defined delay or after a temperature alarm. Access to the memory and control functions can be password-protected. The DS1923 is configured and communicates with a host-computing device through the serial 1-Wire protocol, which requires only a single data lead and a ground return. Every DS1923 is factory-lasered with a guaranteed unique 64-bit registration number that allows for absolute traceability. It contains lithium-metal batteries. 3 Key Features of Key Features of Key Features of Key Features of IButtonsIButtonsIButtonsIButtons (Ref: DS1923)(Ref: DS1923)(Ref: DS1923)(Ref: DS1923) Operating Range -20°C to +85°C; 0 to 100%RH Sensor Built-in Humidity Sensor for Simultaneous Temperature and Humidity Logging Digital Hygrometer Measures Humidity with 8-Bit (0.6%RH) or 12-Bit (0.04%RH) Resolution Digital Thermometer Measures Temperature with 8-Bit (0.5°C) or 11-Bit (0.0625°C) Resolution Temperature Accuracy Better than ±0.5°C from -10°C to +65°C with Software Correction Sampling Rate From 1s up to 273 hrs Start Delay Programmable Recording Start Delay After Elapsed Time or Upon a Temperature Alarm Trip Point Alarms Programmable High and Low Trip Points for Temperature and Humidity Alarms Password Protection Two-Level Password Protection of All Memory and Configuration Registers Filter Hydrophobic Filter Protects Sensor Against Dust, Dirt, Contaminants, and Water Droplets/Condensation Memory 512 Bytes of General-Purpose Memory Plus 64 Bytes of Calibration Memory Automatically Wakes Up, Measures Temperature and/or Humidity and Stores Values in 8KB of Datalog Memory in 8- or 16-Bit Format Source: Maxim Integrated, http://www.maximintegrated.com Source: Maxim Integrated, http://www.maximintegrated.com/datasheet/index.mvp/id/4379 4 PricingPricingPricingPricing DS-1923 Hygrochrons Quantity Device Temperature 1-24 25-99 100- 499 500- 999 > 1000 DS1923- F5# Industrial (-200C to + 850C) Price in USD 96.90 81.60 61.20 61.20 55.59 Source: Maxim Integrated, Price and Availability, https://shop.maximintegrated.com/ iButton Connectivity Kit, RoHS compliant USD 55.12 per unit (includes Blue Dot Receptor and 1-Wire Adaptor + USB + software DVD) TDHC 400b Thermochron Data Downloader USD 225 per unit (includes the handheld downloader + connecting wire with USB port + software DVD) 5 Section II: Missioning an Section II: Missioning an Section II: Missioning an Section II: Missioning an iButtoniButtoniButtoniButton The term “missioning” 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. Information is transferred between the iButton and a PC with a momentary contact at up to 142kbps. Simply attach the iButton to a Blue Dot receptor or other iButton probe, which is connected to a PC. The Blue Dot receptor is cabled to a 1-Wire adapter that is attached to a spare PC port. 1-Wire adapters exist for USB, serial, and parallel ports. The iButton is also the ultimate information carrier for AutoID and many portable applications. All the latest handheld computers and PDAs can communicate with iButtons. Steps for mSteps for mSteps for mSteps for missioning an issioning an issioning an issioning an iButtoniButtoniButtoniButton using the 1using the 1using the 1using the 1----WireWireWireWire Viewer Viewer Viewer Viewer softwaresoftwaresoftwaresoftware The OneWireViewer is a Java demonstration application for exploring iButton or 1- Wirechip features from your PC. It automatically finds iButtons, and then displays their serial numbers and a description of relevant features and menu options. The 1- WireViewer supports the features of most 1-Wire devices, including temperature, humidity, data logging, switch, analog-to-digital conversion, and memory features. 1-wire adapter Blue Dot Receptor 6 Step 3: Connect the USB Adaptor to the computer Install the software. A 64-bit Java Runtime Environment (JRE) is required to be downloaded and installed before this program will run properly. Visit the following website to download an x64 JRE: http://java.sun.com/. Many PCs have Java software installed at the factory. The One-Wire Viewer requires Java (version 5, update 8 or higher). To check if you have Java installed or what version you do have, go to the Java website. Click on the appropriate links that autodetect and verify the version. If your version is out of date, follow the links to download and install the latest version. Follow the steps below: Step 1: Attach the iButton to the Blue Dot Receptor by pushing it in facedown. The iButton attaches with a small click. iButton Blue Dot Receptor Step 2: Connect the Blue Dot Receptor to the USB Adaptor Adaptador USB Receptor Blue 7 1-Wire Viewer main window Step 4: Start the 1-Wire Viewer software Identificador del Viewer tabs The selected device is highlighted iButton unique ID 8 Setting the iButton clock Missioning the iButton A new un-misssioned iButton usually does not have the clock set. Once synchronized, it reflects the current PC time. Click on Mission tab Then click on Start New Mission tab Default unit is degree Celsius. It can be changed to degree Fahrenheit 9 The following window appears on clicking Start New Mission: Sampling rate for data logging set to 10 minute intervals. Recording begins after 24 hours (1440 s) If checked, this command starts a 1-second mission. When the test mission is over, the new mission starts with the specified parameters. Temperature logging resolution set at 0.0625 °C. It can be changed by clicking on 0.5°C. The blue highlighted value applies. Same principle applies to humidity logging resolution. It is recommended that the temperature/humidity resolution be set at the finest (0.0625°C / 0.04%). No alarms set here. If added, the logger makes a note of the value and time greater or less than the set alarm values. Useful if the temporal resolution set is high like daily or more. Once the mission parameters are set, the mission tab reflects the changes. 10 Section III: Setting up Section III: Setting up Section III: Setting up Section III: Setting up iButtonsiButtonsiButtonsiButtons in the field in the field in the field in the field The iButtons require a sturdy, portable and simple stand within which they can be placed and set in the field. Stands can be made of white PVC pipes with wire meshing and holes for ventilation (Hellström and Mark, 2006). White PVC to reflect solar radiation. The top is detachable. Height is 5 feet (1.5 m). A red tape is marked at every 1 foot from below to aid in a standard depth of placement in different fields Detachable tops. Holes to allow ventilation Wire mesh on which the iButton will rest 11 Setting up an iButton recorder in the field in IARI Regional Station, Pusa, Bihar, INDIA on 5 February, 2013 12 Section IV: Downloading Section IV: Downloading Section IV: Downloading Section IV: Downloading data from the iButton data from the iButton data from the iButton data from the iButton There are two main methods to transfer data between an iButton and a computer: For the first method, explained in this Section IV, you need to attach the iButton to a Blue Dot Receptor which in turn should be connected to a desktop or laptop computer. For the second method, explained in the next section (Section V), you use a handheld data downloader to transfer data from the iButton to the downloader and then to the computer. The following steps will show you how to successfully transfer the data from your iButton directly to the computer. Steps for downloading Steps for downloading Steps for downloading Steps for downloading temperature temperature temperature temperature data from the iButton directly to the computerdata from the iButton directly to the computerdata from the iButton directly to the computerdata from the iButton directly to the computer Make sure that you have successfully installed the 1-Wire Viewer software in your computer. The steps 1- 4 are the same described on pages 6 and 7 of this guide for missioning the iButton. Please refer to these pages to view explanatory photographs. 1) Attach the iButton to the Blue Dot Receptor (see step 2, page 6) 2) Connect the Blue Dot Receptor to the USB Adaptor (see step 2, page 6) 3) Connect the USB Adaptor to the computer (see step 3, page 6) 4) Start the 1-Wire Viewer software The Device List tab on the main screen highlights the reference of the connected iButton. The Description tab shows the device address and a short description of the iButton. 13 5) Click on the Mission tab to view the mission parameters of the iButton 6) Click on the Temperature Data Log tab The Mission tab displays the mission parameters In this example the iButton was missioned to start recording data on May 20th ,2013 at 14:43 hours. Temperature and humidity are recorded every 30 minutes (1800 seconds) The Refresh Mission Results tab displays the device status, temperature and humidity data logs. It also allows a mission in progress to be watched without changing device viewers The Temperature Data Log tab displays the temperature log as a graphic The temperature scale can be changed between oC (default) and oF 14 7) Right-click on the temperature log graphic to display the menu for saving the data in different formats All the menu options displayed on the screen shown above are explained below: � Copy Data to Clipboard (comma-separated). This option allows the user to copy the iButton data to the computer clipboard (separated by commas) as shown in the following figure. 15 � Copy Data to Clipboard with Labels. As show in the next graphic, this option allows the user to copy the iButton data (with labels) to the computer clipboard � Copy Data to Clipboard without Labels. This option allows the user to copy the iButton data (without labels) to the computer clipboard as shown in the figure shown below � Save Data to .csv File. The .csv is a common, relatively simple file format that is widely supported by consumer, business, and scientific applications such as spreadsheets and database management systems. Microsoft Excel can open .csv files, but depending on the system's regional settings, it may expect a semicolon as a separator instead of a comma since in some languages the comma is used as the decimal separator. Also, many regional versions of Excel will not be able to deal with Unicode in CSV. One simple solution when encountering such difficulties is to change the filename extension from .csv to .txt, then opening the file from an already running Excel with the "Open" command. o Click on Save Data to .csv File. The following window is displayed: In this window the user can select the folder in which he/she wants to save the iButton data as a .csv file. 16 o Name the file and save it 17 o When you open the .csv file with Excel you get the following results: � The fifth and last item of the Menu is the Rescale Graph option which allows the user to activate of the automatic rescaling of the temperature log graph. Steps for downloading Steps for downloading Steps for downloading Steps for downloading humidity humidity humidity humidity data from the iButton directly to the computerdata from the iButton directly to the computerdata from the iButton directly to the computerdata from the iButton directly to the computer If the iButton is not yet connected to the computer please follow the steps 1- 3 described on page 12. But first make sure that you have successfully installed the 1-Wire Viewer software in your computer. 1) Start the 1-Wire Viewer software Excel displays the recorded data including all the relevant information on the iButton ID and mission parameters. Excel also displays the recorded data for temperature including the date and time of the measurement, the unit (degree Celsius in this case), and the value. As indicated in the mission parameters set by the user, the Sample Rate was set to 1800 seconds or 30 minutes. 18 2) Click on the Mission tab 3) Click on the Humidity Data Log tab 4) Right-click on the humidity log graphic The Humidity Data Log tab displays the temperature log as a graphic 19 As shown in the figure below, when you Right-click on the humidity graphic a new menu shows up. This menu has the same options and works the same way as it is described for the Temperature Data Log on pages 14 through 17. The first four options of the menu allow the user to save the iButton humidity data to the computer/laptop hard drive in four different formats as shown below � Copy Data to Clipboard (comma-separated). This option allows the user to copy the iButton data to the computer clipboard (separated by commas) as shown in the following figure � Copy Data to Clipboard with Labels. This option allows the user to copy the iButton humidity data (with labels) to the computer clipboard 20 � Copy Data to Clipboard without Labels. This option allows the user to copy the iButton data without labels to the computer clipboard as shown in the figure below � Save Data to .csv File. Click on Save Data to .csv File. The next window is displayed. In this window, the user can select the folder in which he/she wants to save the iButton data as a .csv file. Select the folder in which to save the data and name the file to be saved � When you open the saved .csv file for humidity using Excel you get the results shown in the figure below 21 Excel displays the recorded data including all the relevant information on the iButton ID and mission parameters Excel also displays the recorded data for humidity including the date and time of the measurement, the unit (% in this case), and the value. As indicated in the mission parameters set by the user, the Sample Rate was set to 300 seconds or 5 minutes 22 Source: https://www.embeddeddatasystems.com/ Section V: Downloading data from the Section V: Downloading data from the Section V: Downloading data from the Section V: Downloading data from the iButtoniButtoniButtoniButton in the fieldin the fieldin the fieldin the field General iGeneral iGeneral iGeneral informanformanformanformationtiontiontion The TDHC 400 Data Downloader is a handheld, microprocessor-based data collection device. � It is small and portable: 82 x 50 x 19 mm (3¼ x 2 x ¾”), 55 g. � Complete download of data from DS1923 Thermochron loggers take less than 5 seconds. � With 4 MB of memory, the device stores the data from approximately 400 DS1923 loggers. � The data is preserved in flash memory and is safe even if battery power is lost. � The user replaceable battery is rechargeable and runs for approximately 3 days between Charges. The device is connected to the computer and recharged directly via its USB port. � It is not waterproof. � The TDHC 400b has a rechargeable lithium ion battery which, under average use, should last at least 5 years (typically at least 500 charge/discharge cycles). However, it cannot be replaced by the user but has to be returned to the vendor who will arrange for the battery replacement. 23 Alarm indicators of the TDHC 400 data downloader Alarm indicators of the TDHC 400 data downloader Alarm indicators of the TDHC 400 data downloader Alarm indicators of the TDHC 400 data downloader When the USB port is not connected LED color Alarm indicator Meaning of the alarm Data download successful During a logger download the green LED flashes as downloading proceeds. At the end of a logger download, the green LED remains on for 5 seconds to indicate that the download completed successfully. Data download error During a logger download the amber LED flashes once to indicate a single failed data record download. At the end of a logger download, the amber LED remains on for 5 seconds to indicate that the complete download failed. High temperature alarm The red LED indicates that the high temperature alarm was triggered. At the end of a logger download, the red LED may flash concurrently with the green LED. The TDHC handheld downloader does not have any written or verbal signals or other user inputs. Single colored LEDs that light up display specific alarm indicators. Each light has a double set of indicators depending on whether the TDHC is attached to the USB port or not. https://www.embeddeddatasystems.com/ 24 High temperature alarm The blue LED indicates that the low temperature alarm was triggered. At the end of a logger download, the blue LED may flash concurrently with the green LED. Source: https://www.embeddeddatasystems.com/ When the USB port is not connected LED color Alarm indicator Meaning of the alarm Battery fully charged A steady green LED indicates that the battery is fully charged Battery partially charged A steady amber LED indicates that the battery is partially charged Battery low A steady red LED indicates that the battery is low 25 Battery charging A steady blue LED indicates that the battery is charging and data transfer is not available (e.g. using a standalone USB charger) Device ready to upload data A flashing blue LED indicates that the THDC 400 successfully connected to the PC and it is ready to upload data Source: https://www.embeddeddatasystems.com/ Charge the TDHC 400b. The first charge needs at least 8 hours. 26 Install the TDHC Manager software. The TDHC 400b handheld has to be disconnected from the laptop/desktop while installing the software. Download the data from the iButton to the TDHC 400b by turning the device on its back and holding the iButton on the groove provided. A steady green light with an accompanying audio alarm will signal when the data download to the device is complete. Start the TDHC Manager. Step 1. On starting, this window appears. Click on connect to display the TDHC 400b connected. 27 On clicking "Download", the following prompt appears: Step 2. Once connected, the device clock can be synchronized to PC Step 4. To download data, click here. Step 3. Clic on Format to clean memory General Information on the TDHC downloader Data is downloaded as csv. file which can then be opened in most spread sheet and database software The TDHC Manager confirms once data has been downloaded File name generated automatically includes the TDHC 400b ID and the date and time of downloading 28 The recorded data for temperature and humidity The data displayed here using Microsoft Excel was recorded in an open area outside the Bioversity office, Pusa Campus, New Delhi between 9.48 AM and 2.28 PM with a sampling rate of 1 minute. The temperature resolution was 0.0625°C and the humidity was recorded with resolution of 0.04%. The results are displayed below. The downloaded data is displayed with all the relevant information including the iButton ID and mission parameters 29 0 5 10 15 20 25 30 35 40 9 :4 8 :0 1 9 :5 7 :0 1 1 0 :0 6 :0 1 1 0 :1 5 :0 1 1 0 :2 4 :0 1 1 0 :3 3 :0 1 1 0 :4 2 :0 1 1 0 :5 1 :0 1 1 1 :0 0 :0 1 1 1 :0 9 :0 1 1 1 :1 8 :0 1 1 1 :2 7 :0 1 1 1 :3 6 :0 1 1 1 :4 5 :0 1 1 1 :5 4 :0 1 1 2 :0 3 :0 1 1 2 :1 2 :0 1 1 2 :2 1 :0 1 1 2 :3 0 :0 1 1 2 :3 9 :0 1 1 2 :4 8 :0 1 1 2 :5 7 :0 1 1 3 :0 6 :0 1 1 3 :1 5 :0 1 1 3 :2 4 :0 1 1 3 :3 3 :0 1 1 3 :4 2 :0 1 1 3 :5 1 :0 1 1 4 :0 0 :0 1 1 4 :0 9 :0 1 1 4 :1 8 :0 1 1 4 :2 7 :0 1 Temperature °C 0 10 20 30 40 50 60 70 80 9:36:00 10:48:00 12:00:00 13:12:00 14:24:00 15:36:00 Relative humidity % 30 ReferencReferencReferencReferenceeeessss Hellström, R. Å., and B. G. Mark, (2006) An Embedded Sensor Network for Measuring Hydrometeorological Variability Within an Alpine Valley. Proceedings of the 63rd Eastern Snow Conference. U. Delaware, Newark, DE, USA. iButton Devices. Available from URL: http://www.maximintegrated.com/products/iButton TDHC 400b: Handheld Thermochron Downloader: Available from URL: https://www.embeddeddatasystems.com/TDHC-400b-Handheld-Thermochron- Downloader-_p_198.html#