Assembled Serial Temperature Measurement Module - TM #125

Single Run to Multiple DS18S20 / DS18B20

Sept, '09. This item has been discontinued. The TM #128 is similar in function.


This is an assembled unit which interfaces with a PC COM port and provides the capability of measuring the temperatures on each DS18S20 on a single twisted pair. It includes an assembled printed circuit board, a 12 VDC wall power unit, a six foot serial cable (DB9) and a single DS18S20. Additional DS18S20s may be purchased separately.

In theory, up to 256 DS18S20 temperature sensors may be accommodated on the single twisted pair. However, the limiting factor is the capacitance and my suggestion is up to sixteen DS18S20 devices on a maximum of 200 feet of twisted pair cable.

The PCB is professionally fabricated. However, it was adapted from another design and includes a minor amount of hand rework.

The module includes a female DB9 connector, RS232 level shift circuitry, an on-board 5 VDC supply, a Microchip PIC processor and a four conductor screw type terminal block. There are three hole on the PCB to permit the user to mount the module in a box or on a plate. Three standoffs and #4-40 screws are provided.

Note that this is the documentation for this module. No additional paper documentation is shipped with the unit.

Interface with Windows using Liberty Basic.

The module is 1.7 X 2.3 inches. The reference to EEPROM on the PCB was for a different design.


The intent is designing modules such as this is to involve my undergraduate students in meaningful design experiences, while at the same time providing useful low cost products for hobbyists and tinkerers.

In the spirit of this activity, I don't want people buying items that do not work for them or do not meaat their expectations. Thus, this unit may be returned at any time for a full credit.

Detailed Description.

The PC interfaces with the temperature measurement module using 9600 baud, 8-bits, no Parity, either 1 or 2 stop bits, no flow control.

When idle, the PC TX lead is low, which may be anything from ground to minus 12 VDC and the processor is idle.

When a character is sent by the PC, the PC TX lead momentarily goes high which causes the PIC to initiate a complete measurement sequence. The PIC determines the address of a DS18S20 on the twisted pair, performs a temperature measurement and returns both the temperature in degrees C and the 64-bit serial number in hexadecimal format at 9600 baud. It then continues to determine the second address on the twisted pair, performs a temperature measurement, sends the result and this process continues until no additional devices are found.

Each temperature measurement requires nominally one second.

The format of the returned data is;


DD a sequential hexadecimal number in the range of 00 - FF.

TTT.TT is the temperature result in degrees C.

SSSSSSSS SSSSSSSSS is the unique 64-bit serial number of the DS18S20 expressed on hexadecimal

For example;

00 27.32 10D6F33A 00000036
01 26.54 10773B3B 000000CE
02 -5.43  etc
03 105.34 etc
Note that in this example, four devices were found on the single twisted pair.

Note that fields are delimited by single spaces and the line is terminated by a new line consisting a CR and LF.

The range of the temperature is -55.00 to 125.00 degrees C. The unit provides a resolution of 0.03 degrees C. Please refer to the DS18S20 data sheet at Dallas Semiconductor for absolute accuracy over the full temperature range.

The serial numbers of the devices are provided to permit the user to ascertain which sensor is which. Note that the two digit device number DD is simply a running number beginning at 00 which is assigned as each device is found using a binary search on each of the twisted pair runs.

Thus, 00 might correspond to a DS18S20 in your PC, 01 to the living room, 02 to the freezer. Assume you then add one on a cold water pipe in the basement. You may well find 00 is still your PC, but 01 is now the water pipe, 02 is the living room and 03 in the freezer.

However, note that once a system is in place, 00 will always be the PC, 01 the water pipe, etc. But if your cat pulls off the sensor in the living room, 02 will then be the freezer.

If you don't wish to use the serial number information, you might consider initially connecting the sensors on a breadboard and use your finger to determine which device is 00, which is 01, etc and then label each of the sensors and then install them with 00 in the PC, 01 in the living room, etc.

Note that all DS1820 devices are operated in the parasitic power mode (the DS1820s use the signal lead for power) and thus a single twisted pair may be multipled from one device to the next.

The PIC is theoretically capable of finding and measuring the temperature of each of 281,000,000,000,000 devices on each of the twisted pair runs. However, the limiting factor is the capacitance of the cable and the capacitance of each DS1820. My guesstimate is that 16 devices on a total of 200 feet of twisted pair is realistic. Note that the use of the parasitic power mode does not limit the amount of cabling nor the number of devices.

Setup and Test.

The layout of the screw type terminal block is shown with the PCB oriented such that the power connections are at the lower left;

Term 4  Reset
Term 3  DQ
Term 2  GRD
Term 1  GRD
Connect a DS18S20 to the twisted pair as shown;
Screw Terminal Block		DS18S20

Term 3 DQ ------------- DQ (term 2) --------------- To other DS18S20/DS18B20 devices
Term 2 GRD ------------ GRD (terms 1 and 3) ------- To other DS18S20/DS18B20 devices
Connect the module to a PC COM Port.

Use a terminal emulator such as HyperTerm which is provided as a free accessory with Windows to establish a a direct connection to the COM port at 9600 baud, eight data bits, no parity, and no flow control.

Power the unit by plugging in the wall power unit. Observe the power on LED.

On boot (application of power), the module will send an advertisement, "" to the PC.

Type any character. This should initiate a temperature measurement sequence and you should view the results on the PC terminal in the format illustrated above.

Note that the application power will cause the PIC to boot and it should never be necessary to "boot" the processor again. However, just in case, I have provided RESET on terminal 4 of the screw type block. The processor may be reset by momentarily connecting this to ground (terminal 4 to terminal 1).


1. This module is distributed with a programmed PIC which is code protected. The source code written in C from CCS Info is available for $1000.00.

2. The firmware associated with this design is a rework of our "Serial Temperature Measurement System (8-pin DIP) Kit". The PICs are not interchangeable.

3. Several years ago, Dallas marketed a DS1820 in a PR35 package (an elongated TO-92 transistor). They then replaced this with the DS18S20 in a TO-92 package. However, for whatever reason, Dallas marks these parts as DS1820. This design is compatible with both. Both the old and the new may be accommodated on twisted pair.

4. The limiting factor on the amount of cable and the number of devices which can be accommodated is the capacitance associated with the cable and to a much lesser extent, that associated with the devices. In all probability, you can exceed my 200 foot recommendation. However, recognize that at some point, the measurements will fail and this will include both DS18S20s which are close to and far from the module.

Note that my 200 foot recommendation is 200 feet total. Thus you might have a single 200 foot twisted pair or two 100 foot pairs or five 40 foot pairs in a star configuration.

Ordering Information. Please order as TM #125.