Thermal Sensing Notes

All temperatures are in degrees C.

The sensors vary around the steady point, usually displaying +/- 0.06 deg.C difference between successive samples at a steady temperature. Thus, a change in temperature is defined as a change of greater than 0.15 deg.C (at least twice the bounce).

Heating Time: and Cooling Time: are in minutes, and reset at midnight each day. These values may not update until the current heating or cooling cycle is broken.

Long High: and Day High: are the long-term high and the daily high. Long Low: and Day Low: are the long-term low and the daily low.

Daily values are reset at midnight of each day. Long-term values accumulate over the running-time of the sensor application.


Rising (up arrow) means temperature is going up and has not gone down in this heating cycle. It may stay steady but may not fall in a rising cycle

Falling (down arrow) means temperature is going down and has not gone up in this cooling cycle. It may stay steady but may not rise in a falling cycle

Steady (right arrow) means temperature has remained stable for the last 60 samples and broken a rising or falling trend. Thus, if the temperature has started rising, it is considered to be rising even if it levels out for a short time.

The Hardware

The temperature sensor serial port device is built from a kit, kitsrus - Kit 145 Serial Temperature Sensor which I ordered from the Canadian rep, qkits - QK145: Serial Temperature Sensor Kit. I had never soldered a kit together before, but it worked OK first time. Beginner's luck?

The Software

The software is a rehash of Ramon de Klein's Serial library. I hacked the Listener project.

I have three temperature chips attached to the sensor serial device. One monitors the outside temperature, one monitors the general room temperature where the computer is located, and the third monitors the temperature in the heating duct into that room. Thus, over a long period, I may be able to monitor and correlate the heating/cooling cycles with the outside temperature. The software accumulates each reading from the three thermometers, and once every minute or so generates an HTML report and FTPs the file to my website. I was going to implant a thermometer in the cat, but family members intervened...

Software Update (Nov. 2009)

I have added code to send the temperatures recorded at my house to a MySQL database on my website.

The original C++ code to read the serial port sensors has been enhanced with the addition of MySQL++ , a wrapper of the MySQL C API. The code still writes the original HTML file, and at about 10 minute intervals writes a records of sensor ID, current temperature and date-and-time of the reading to a MySQL table. Another PHP script to be written will allow me to display a real-time graph of temperatures around the house. Still now implant for the cat, though.

The best thing, except for the hardware and the cost of the website, most the tools and software necessary for this data collection-and-display experiment are free. I use Visual Studio C++ development tools at home, and these can be had for free from Microsoft as Express editions, the MySQL DB and PHP server-side stuff is all included with the website, and XAMPP allows setting up a similar development environment at home, so scripts and database table and queries can be tested on the local machine before deploying to the website. I had to download some more free MySQL stuff, as the XAMPP version does not include development headers and libs. MySQL++ is free. XAMPP is free. I use Perforce for revision control, and at one time you could download a single-seat copy for personal use for free. Check their website.

But, I still have three of the most expensive thermometers you will ever see. The three thermometers at home are hooked up to a PC, running 24/7, and the PC is hooked up to an Internet, and the Internet is hooked up to a server that runs my website.

But, it is fun.