Home  |   Gallery  |   MG Midget  |   Le Mans  |   Networking  |   Downloads  |   Links

 Temperature Sensing with das3145

After a winter in Orchard House I began to have doubts about the effcitveness of the Heating Thermostat. Its position is far from ideal and therefore it seems to struggle to keep the rest of the house at an even temperature. I decided I wanted some independant recording of the temperature, preferably with it being logged to a PC. It quickly became apparent (after consulting Mr. Google) that the Dallas 1820 1-wire temperature sensing ICs were the device of choice for most people. For attaching to a PC the 1-wire bus needs converting to RS232 though. Some more googling, and I found the K3145 module from Quasar Electronics. This is a self assembly kit that provides a small PCB and a few components to allow 4 DS1820 sensors to be read by a PC.

Assembly itself was almost dissapointingly easy. About 10 mins of soldering and it was done. It proved slightly harder to find a correct Serial lead to get it hooked to the PC as it needs a 9pin to 9pin modem style lead (rather than null-modem). Eventually i found one at the bottom of a spares (or "junk") drawer - (Quasar do sell the Correct lead though). Firing up Hyperterminal quickly had a steram of temperatures from the single supplied DS1820 being shown. The PIC within the circuit polls the attached DS1820 sensors once a second and outputs the result straight to the Comm Port. The 1 reading /sec is maintained regardless of the number of sensors hence with four sensors each one is actually only polled once every 4 secs. With temperatures now arriving at the PC I needed to decide how to log and/or use them.

Quasar's Own Pic of the module
Plug-In Setup Screen

I quickly decided getting them into HomeSeer (HA software which I have running 24x7 on my home server) was by far the most ideal. However I couldn't find any sign of a plug-in module already available. Probably due to the slight US bias of HomeSeer users. At the time I was starting to get interested in programming in VisualBasic and as Homeseer provide the framework and documentation to write your own plug-ins - it seemed like an ideal learning oppurtunity.

A couple of nights (ok weeks) later and I had some working code. The main frustration was that HomeSeer devices cant have fractional values, sot he temperature is held as an ineteger of the value to 1 decimal place multiplied by 10. After a few refinements it been stable on my PC for several weeks. 1 such refinement is to actually look at an averaged (over a minute) value to iron out the inevitable small fluctuations. I used some existing HomeSeer icons to make the web-view presentable. I currently have 2 sensors. 1 in the loft monitoring node0 and 1 in the hallway attached via Cat5.

 >

Device View from the Web Interface

With the temperatures now available on the PC, it seemed almost rude not to graph them with MRTG, which was already running on my (Win2K) server to monitor traffic etc. A script runs in Homeseer which outputs a 4 line text file for each sensor giving the current temperature. MRTG reads the text file to get the temperature required. I'm sure its possible to get a script run my MRTG to directly query Homeseer, but access to the HomeSeer object via scripts outside the HomeSeer environment seems to be more awkward than perhaps it should be.

MRTG Weekly graph of my Loft/Node 0 temperature (note: Reading is Degrees C X 10)

*** UPDATE 27/10/2005 ***
A new HS2.0 compliant verison is available. No major change in functionality but configuration is now web-based and the code is compatible with HS2.0

 

Download

The Software is available for download. I cant make any promises that it will work for you but I'll do my best to help

The ZIP file contains:-

hspi_das3145.ocx  The Plugin File itself
readme.txt  Readme for Installation
icons  Icons for use in the Web Interface