Temperature Logger


Overview

The logger probes measure temperatures from -55C to +125C (-67F to +257F). No calibration required.

Suggested uses

Monitoring the temperature of: 

  • home brew beer
  • still
  • blood bank storage (As a back up for a commercial logger.)
  • marmalade cauldron
  • soap making
  • wine making
  • chicks being transported
  • sea water to see if it's warm enough to swim in

Description

The PIC Arbiter acts as interface between one or more Dallas temperature sensors and a logging PC. There are 8 terminations or single wire busses. Each of the 8 busses can support up to 8 sensors. As many sensors can be installed as required, limited to a maximum of 64. 

I have called it an Arbiter as the controller negotiates with each probe on the single wire bus. Each individual Dallas temperature sensor unique serial number. Where a particular probe is in relation to its peers, or particular bus pin on the PIC is irrelevant. The Arbiter sends to the PC the unique serial number of the temperature probe and its temperature in a serial frame.

The PIC Arbiter identifies sensors on each bus. Additional sensors can be plugged in at any time. Each  device is polled every five seconds: its address and temperature data are sent via a RS232 serial link to the PC.

Windows Applications

These run on XP, NT, Windows 2000, 2003, and where relevant, Windows 95 / 98. There are no other DLLs to download. All applications run stand-alone.

Hotbox

HotBox pulls apart the serial stream and builds a log file. This file can be read "raw", or imported to Excel, or viewed with Display. An overview can be found in the Display User Manual.

The hotbox software won't work directly with a DS1820 directly connected to the serial port. You'll need the PIC Arbiter  to convert from the Dallas single wire bus to asynchronous RS232 serial data.

Each sensor displays its temperature at a preset position on a custom plan.

A glance with "HotBox" shows current temperatures at various points in the system. Here seven probes are visible - a total of 64 is supported.

The probe graphics can be dragged to any position. Each probe is represented as a rectangle: a red frame - the sensor's getting hotter - blue colder.

Logs temperatures and displays current state.  Creates c:\hotbox\temp.log. Use Excel or Display to inspect the log. 

The background graphic is customisable - you may design a bitmap of any size. Name your custom backdrop file as c:\hotbox\bckgrnd.bmp.

HotBox - dragging the probe graphics

Use the mouse to select the probe text on top of your bitmap image. When first start Hotbox, off they default to the top left of the window.

Drag them to where you want.

They're sticky! Next time you run Hotbox you find them where you left them.

The HotBox configuration file format is here. 

Display

The temperature log can be viewed using "Display". Features: Zoom out, selected zoom in, Time and Temperature read out, trace enable / disable, temperature gradient.

The above image shows three day's worth of logging. Lower traces - external probes. Other probes placed around gas central heating system. Spikes occur when hot water is being heated.

The above shows a spike zoomed in. It shows more detail. ( Boiler shutting down during demand due to poor coil coupling in cylinder, or just an over-rated boiler.)

See the Display User Manual for more details.

Application Display.exe. Displays the log file. 

Tempsvc

Service - tempsvc.exe  Logs temperatures as a service. Use this on NT or 2000 if you don't want HotBox running as an application on the desktop. Just as with the "visible" app HotBox, the service creates c:\hotbox\temp.log. On Windows 98 services are not supported, so ignore tempsvc.exe.

Tempsvc user manual.

PIC Source Code

The PIC Source - all raw bit twiddling stuff! (PIC16L84). This contains the full documented source.

Arbiter Serial Frames

With the Arbiter wired up to the PC, the serial data from each temperature sensor can be examined with a terminal emulation program such as HyperTerm.

The frame format is slightly different depending on which Dallas Thermometer device is being read. You may have a DS1820, or a DS18B20. I describe each frame format separately: I have placed the DS1820 description here, and the DS18B20 description here.

The Arbiter doesn't care what device is connected. In fact you could put other Dallas "one wire interface" parts, as well as a combination of DS1820 and DS18S20 thermometers. The Arbiter will issue the Laser code ID command followed by the scratchpad RAM command, and serialises the response data as asynchronous RS232.

Here's my description for the DS1820 frame; and here's my description for the DS18B20 frame.

The Hardware

I don't show a layout for the Veroboard prototype - there is nothing too critical. Keep the crystal and associated components leads and tracks short.

The Schematic and Parts List - Click here.

New! The Dallas DS18B20

They do work with my design, so long as you use the latest Hotbox or tempsvc. Version 2.10, or greater. 

They have improved accuracy (12 bits instead of 9) and a tighter temperature specification (0.5C).

See the datasheet... 

Goodbye! Dallas DS1820

Dallas will be making the DS1820 obsolete. It is to be replaced with the compatible DS18S20.

FAQ's

I can't obtain a 2.4576 MHz crystal. I can get a 4.0 MHz. Will this work?

Yes. Use Colin's changes to my PIC source code. Try his 19200 bps, also his 2400 bps.

Is there a forum where I can discuss logging? Maybe get help building the logger?

Yes: Visit the Forum

Is there a DOS version of HotBox?

No.

OK - Do you have anything for Windows 3.1?

No! 16 bit segmentation! You've got to be joking! I've been there 15 years ago - I have no interest in doing conversions for machines that should have been recycled long ago.

Dare I ask about Linux?

Nothing planned as yet.

I'm using a long cable between PIC and PC- I want to run at 2400 baud. Ideas?

See the bit delay description here.

Why did you bother connecting RTS and CTS?

I could have ignored these connections, but when the Windows operating system loads the serial port is examined. Any data seen at this time can be misinterpreted as a new plug and play device. 

With this connection the arbiter shuts up during load time. With RTS de-asserted the arbiter stops sending data. If data is sent to the PC during re-boot the OS thinks it has got a new "plug and play" device! 

I was with Bill the other day. He whispered in my left ear:

There are several switches that can be used to modify how Windows NT boots up, and these switches can be applied in the c:\boot.ini file.

Placing /noserialmice:com1 after the path to the Windows NT installation will cause NT to skip polling the com port during the boot up process.

I had to fix this as some UPS's will switch to battery when this port is scanned during the boot process.

Sorry about that, I should have documented that years ago!

This page was last updated on the 11th September 2010.

Back To Therm Home Page