Assembled Serial Temperature Measurement and 10-bit A/D Module - TM #130

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 two analog voltages in the range of 0.0 to 5.0 VDC with a resolution of 5 mV. It also provides the capability of measuring the temperatures at 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.

The two 10-bit analog to digital converters use the onboard +5 VDC as Vref.

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.

The module includes a female DB9 connector, RS232 level shift circuitry, an on-board 5 VDC supply, a Microchip PIC processor and a six conductor screw type terminal block. There are four holes on the PCB to permit the user to mount the module in a box or on a plate. Four one-half inch spacers and associated 4-40 pan head screws are provided.

Note that this is the documentation for this module. A figure is also shipped with the unit.

The module is 1.5 X 2.125 inches.


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 and dual A/D 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.

Setup and Test.

The unit is shipped with small lengths of wire of various colors connected to the screw type terminal block to aid in identifying the functions.

GP5 (Yellow) DQ (to DS18S20s)
GP4 (White) ADC1
GP2 (White) ADC0
GP3 (Blue) Reset (ground to reset processor)
+5 VDC (Red) +5 VDC (output)
GRD (Black) GRD

When making or changing connections to the terminal block it is suggested that the unit be powered down

To test each A/D, connect two 10K resistors, provided with the package, in series between +5 VDC (term 2) and GRD (term 1). Thus, the voltage at the center node will be nominally 2.5 VDC. Connect one of the A/D inputs (White) to this node.

+5 VDC (Red) ----  10K ------ 10K ------- GRD (Black)

                             To ADC (White)

Connect a DS18S20 to the twisted pair as shown;

Screw Terminal Block		DS18S20

GP5 DQ (Yellow) ----------- DQ (term 2) --------------- To other DS18S20 devices
GRD (Black) --------------- GRD (terms 1 and 3) ------- To other DS18S20 devices
Connect the module to a PC COM Port using the DB9 serial cable.

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 not send an advertisement to the PC. There simply was not enough program memory. Although I have not observed it, there may be a few bytes of garbage on power on.

Type any character. This should first perform A/D measurements on each of the two 10-bit A/D channels and then initiate a temperature measurement sequence. You should view the results on the PC terminal in the format illustrated above.

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


1. This module is distributed with a programmed PIC which is code protected. The source code written in PIC 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". However, the PICs are not interchangeable.

3. This design uses a calibrated RC clock inside the PIC microcontroller (as opposed to an external crystal or resonator). In reviewing the specifications, this appears more than sufficiently accurate to perform the timing involved in communicating with the PC. If it isn't, this will be apparent with all kinds of control characters appearing on your terminal. By all means, return it to me. I honestly do not feel this will be a problem

4. A source of +5 VDC is provided on terminal 2. This should be used judiously and the current should not exceed 50 mA. This may be used to power a small amount of peripheral circuitry. Note that this is the Vref used by the A/Ds which may be of use in many applications.

5. 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.

6. The limiting factor on the amount of cable and the number of DS18S20 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.