This application note describes how to export the logged temperature/humidity data from the Thermochron line of temperature and humidity loggers, and then import that data into Microsoft Excel for graphing. The DS1921G is used to demonstrate the process.
This application note describes the process for exporting data from all iButton® temperature/humidity data loggers (DS1921G, DS1921H, DS1921Z, DS1922L, DS1922T, and DS1923) by using the OneWireViewer. This data is then copied into either Microsoft Notepad or Wordpad, and saved as a text file. This text file is then imported into a Microsoft Excel spreadsheet to generate printable graphs.
A working knowledge of the OneWireViewer and Microsoft Excel is required to use the information in this application note. The OneWireViewer is a Java®-based software package to explore Maxim's 1-Wire and iButton devices with a personal computer. For information on software download, installation and usage refer to "OneWireViewer User's Guide."
The software screenshots show data for the DS1921G iButton, but differences among the data loggers will be noted in the text. The DS1921H and DS1921Z will have windows similar to the DS1921G.
- Attach the necessary iButton PC-connectivity hardware. This would be a combination of a 1-Wire adapter, which plugs into a spare PC port, and a Blue Dot receptor, which plugs into the 1-Wire adapter and holds iButtons for reading/writing.
- Start the OneWireViewer and place the iButton in the receptor.
- Select the correct ROM ID number from the device list (Figure 1).
- For the DS1921G, open the Thermochron subviewer by clicking on the Thermochron tab. For the other data loggers, this screen does not have a Thermochron tab. Instead, open the Mission subviewer by clicking on the Mission tab (not shown in Figure 1).
- Select either Fahrenheit or Celsius in the command window.
- For the DS1921G, if the "Is Mission Active?" shows "true," then stop the mission by clicking the Disable Mission button. For the other loggers, the query will be, "Mission in Process?"
- On the screen in Figure 1, notice that there are two rows of tabs, an upper row and a lower row. Select the lower "Temperatures" tab. This displays graphically the Thermochron log of temperature vs. time (Figure 2).
- Place the mouse pointer on the graph and right click.
- Select the "Copy Data to Clipboard with Labels" line, and click on it (Figure 3) to save the data to the Clipboard.
- Open a text file using either Notepad or Wordpad.
- Paste from the clipboard, and save the file. If you are using the European numbering style (e.g., 77,0), please see Note 1 at the end of this application note.
- Start the Excel program.
- Select "Open" from the Excel "File" drop-down menu. Browse to the directory in which you saved the text file and change the "Files of type:" window to "All Files (*.*)."
- Select your text file, and select the "Open" button. The Text Import Wizard will appear (Figure 4).
- Be sure the "Delimited" button is marked before selecting the "Next" button.
- In the Delimiters window that appears, be sure that only the "Comma" or "Semicolon" box is checked (Figure 5). Then select the "Next" button.
- From the "Column data format" window, check the "Date:" button and select the proper format. Then select the "Finish" button (Figure 6).
- Column widths will have to be changed and other general changes for personal preference will have to be made in Excel, but the raw data is now in the proper columns for graphing.
The first column of the imported data contains date and time information that was downloaded from the logger (Figure 7).
Column B contains either C or F for either Celsius or Fahrenheit. This column can be deleted.After you delete the Celsius or Fahrenheit identifier from Column B, the second column (Column B, again) contains the temperature information (Figure 8).
- To create a graph, go to the first date and time entry of the graph. Select that cell. A space must be placed in front of the data in the operations line of the Excel file (Figure 9).
- Select the log data to be graphed, highlighting both the time and temperature columns (Figure 10).
- Next select "Chart" from the menu under "Insert" (Figure 11).
- From the Chart Wizard that appears, select the type of chart that is required. Typically the Line chart works well with log data (Figure 12).
- A sample of the graph will be shown. This allows the data range to be checked and set (Figure 13).
- Add chart options. In this example we will add titles and labels(Figure 14).
- The final step (Step 4) in the Chart Wizard sets the placement of the graph in the spreadsheet (Figure 15).
If you are satisfied and do not want to make other changes, click the Finish button to create the graph (Figure 16).
Note 1. If you are using the European numbering style (e.g., 77,0) and a Centigrade scale, open the text file. Select the "Replace" from the "Edit" menu. In the "Find what" window, place "M,C,"; then in the "Replace with" window, place "M;C;". Click on the 'Replace All' button. If you are using Fahrenheit, then "Find what" is "M,F," and "Replace with" is "M;F;". Then, select the Semicolon for the Delimiter when importing the text file.