Project 8: 3 Ch Logger

Introduction:
Now that we have a working data logger recording and displaying real sensor signals, it is time to interface to an external sensor. In this project we will create a 3 channel data logger that will record, display and graph the PC case and CPU temperatures as well as the outside air temperature.

Hardware Interface:
To track outside ambient air temperature we will need an external sensor and a hardware interface to the PC.  For this project we will use the DLP-IO8-G, a low-cost USB interface shown below:

The DLP-IO8-G has 8 channels and accepts analog inputs as well as digital temperature sensors.  The DLP-IO8-G data sheet is here.

The digital temperature sensor that we will use with the DLP-IO8-G is the Maxim DS1820B which can measure with a resolution of 0.1 deg F.  This is easily connected to the DLP-IO8-G and is shown below.

DS1820B

The DLP-IO8 works with a Thin Basic program named Fixed that will read the DS1820B and place a temperature sensor reading into a file named fdata.txt at a fixed rate of every 15 seconds. 

The software is configured by editing a text file named fconfig.txt, as shown below:

Fixed configuration file

The 3-Channel Logger:
The 3-Channel Logger will be a modification of the program in Project 7.  We will add code to read the temperature placed in fdata.txt by the software, and read the PC case and cpu temperatures from the mbx.txt file as before.  

In this project we will store the air temperature in a separate file for graphing, and we will also record all three temperatures in a file called alltemps.txt.  The program will generate a webpage every minute and a new graph of air temperature every five minutes.

The source code for the entire Project 8 program is here.

Running the Logger:
The 3-Channel Logger needs the same sort of set-up as before: Run the Fixed software for the DLP-IO8-G, the Tiny Web Server, the Motherboard Monitor and finally the Project 8 program.

Launch the web browser and set the address to: http://localhost/pctemp.html. You should see something like that shown below:

Project 8 browser view

It will take some time to gather data for the graph, but eventually you should see the graph of the air temperature via the link, as shown below:

Project 8 Graph

You can also view the data file containing all the temperatures, stamped with the time and date by loading alltemps.txt into the browser or the Notepad utility.  A sample is shown below:

Project 8 - data file

 
Going Further:
With a few modifications you could add traces to the graph for PC case and cpu temperatures.

%d bloggers like this: