WARNING ::: Please read the disclaimer before viewing this website. ::: WARNING

   

Multichannel 1-wire thermometer for RS-232

   Here I show you something that I built not for fun, not because it's cool or challenging but because I just needed such a thing (probably the only project like that on this website :P ). The project is basically a thermometer that uses popular 1-wire digital temperature sensors: DS18B20.
   The DS18B20 sensor can measure temperature in range of -55 to +125 degrees C. The resolution is programmable, the highest available resolution is 1/16th of a degree (0.0625°C). The higher the resolution set, the slower the measurement is. For the highest resolution the measurement can take up to 750ms.
   The sensor uses 1-wire communication bus, which means it can be powered from the data transmission line. In my project there is separate wire for power, though. That increases the number of sensors that can be plugged into the same bus. All 1-wire devices have a unique 64-bit serial number that is used to address the device for communication, in this case for temperature reading. The 1-wire bus is designed to be used with microcontrollers and embedded systems, therefore it is easy to implement it for microcontroller, such as an AVR from Atmel. Although, it is possible to access 1-wire from computer port with quite low effort. An RS-232 to 1-wire interface can be built from just a few discreet components that can even be fit into a DSub connector shell. It is also very important that Maxim provides Windows and Linux drivers for those kind of 1-wire interfaces, which makes the programming side relatively simple.

   A schematic of popular DS9097E interface is presented in the following picture.

   It is NOT completely my design, similar schematics and also full projects of thermometers can be found in the internet. I just took one of those schematics and added a capacitor to provide separate power line. The BAT85 diodes can in fact be any Schottky diodes. The circuit is very simple so I think it does not require any comments.

   The assembled interface and a sensor soldered to a cable is shown in the following pictures.

       

   I decided to use mini-jack connector (headphone type) for attaching the sensors because it's really convinient and cheap. All kinds of cables and splitters are available very cheap. I spent only about $10 to buy a few 5m male-to-male cables and a few splitters. I just cut the cables in half to make two 2.5m temperature probes out of each cable. All the 1-wire devices in a single bus are obviously connected in parallel so you can cascade many headphone splitters to split the signal to as many sensors as you want.

   I made 5 sensors as you can see in the pictures so I have not tested the system with more sensors. Even though, I'm quite sure it can handle more.

   There are several programs for reading temperature from 1-wire sensors. Some of them are the following:

   Even though the programs are available I decided to write my own. My program is very simple, it's main job is to log the temperatures to a text file. The file can be then opened in MS Excel or other tool like that to analyze the measurements or plot a chart.
   The program is shown below. There is also a chart showing a simple plot of five temperature sensors during a test. The sensors were placed in an icecream to cool them down and after that they were heated up by hair dryer.



   The program supports only temperature sensors connected via DS9097E interface. If it detects any other 1-wire devices attached to the bus it will probably crash :) After clicking the 'START' button the program detects 1-wire devices and starts to read the temperature in given intervals. If the 'save to log file' checkbox is selected the program will store every measurement in the file. The measurements (with a date and time stamp) are just attached to the end of the file. The program supports up to 20 sensors on the bus, it will just stop detecting sensor after it finds the 20th (if for any reason you find this program useful but need to read more sensors, just e-mail me). The detected sensors and current temperatures are displayed in the program window. The program also allows to set the measurement resolution - just type the sensor number, choose the desired resolution and click 'write to sensor'. The new setting will be loaded into the sensor's EEPROM memory with immediate effect (no need to restart the measurement).

   This program is written in Visual Basic 6, so you might need VB6 Runtime installed to run it. I may also require Maxim drivers available here: LINK, however, I've attached the required DLL library so I hope it's enough.






Webdesign ©2006 c4r0 ::: Contents ©2006-2015 c4r0
The web server for this website is provided by www.elektroda.pl.