DS18S20 Temperature Sensor

recent experience with hardware and the digitemp software for Win / Linux

 

 
The 1-wire temperature sensor Dallas DS1820 is very popular for intelligent remote computerised temperature measurements. Adaption to the RS232 serial port of an PC is easy and can be operated with fairly long leads (5 - 20 m).

The device DS1820 was recently redesigned, functionally improved and is now (2004+) available only as device DS18S20. The web-wide published circuit for the passive adapter aka DS9097 (here or here) is simple but does not always work as expected. Running my prototype like the standard circuit (DS9097) the software package "digitemp" recognized the individual DS18S20 device properly by the component ID but displayed 85C under all conditions (aka "I cannot measure").

In the Dallas product information it was mentioned that during conversion the DS18S20 draws "considerable" current (~ 2mA) and is sensitive to supply / DQ voltage variations, especially in 'parasitic mode' (two-wires without external supply). The only solution that made it work here was including an additional continous supply circuit for the sensor(s) based on an idea published by Marcel Tränhardt.

.

The circuit is just slightly more complex than the published standard DS9097 circuit. Resistor R3 generates an additional voltage drop in the DTR line. The R4 - C4 combination charges C1 to about 4 volts (DC), enough to operate one or several DS18S20. Resistor R2 is optional to provide some impedance matching for the RXD line and can be replaced by a wire bridge for cost reasons depending on the line properties.

Using the RS232-connection of a laptop or portable computer may lead to insufficient operation due to not enough voltage of the data lines. Sometimes the signal levels are just +/- 5 volts instead of +/- 12 volts. A decoded temperatur of "85" indicates system malfunction.


  Parts list /bill of materials:


enclosed a photo of a prototype. To improve the thermal response time a nickel coin was glued into the front side of the box and the sensor bonded to the inner side.

Below there is the screen printout of the digitemp Win version operating the DS18S20 above..


back to front page


Bei Lese- oder Druckerschwierigkeiten kurze email an:  m.hamann_at_fh-wolfenbuettel.de
last revision 25.01.05 mhn