Skip to content
If this is your first visit, please click here to learn about shipping and delivery.
If this is your first visit, please touch here to learn about shipping and delivery.
DS18B20 stainless-steel temperature probe with insulated cable

Reading Several DS18B20 Temperature Probes: Identity, Timing and Error Checks

Adding a second temperature probe changes a simple display into a small measurement system. The program must know which probe is which, wait for fresh results and recognise a disconnected cable. Otherwise “inside” and “outside” can silently swap places, or an old reading can look like a stable temperature.

The PMD Way DS18B20 stainless-steel probe is a practical example of a cabled digital sensor. Its listing shows several possible wire-colour arrangements, so confirm the supplied version's connections rather than assuming one colour convention. The listing also states that the surrounding heatshrink is not food-grade.

Give every physical probe a persistent identity

The Analog Devices DS18B20 product documentation describes a unique 64-bit serial code, allowing multiple devices to share a 1-Wire bus. Use that complete code as the software identity, then associate it with a human-readable location.

Connect and identify one probe at a time during initial setup. Label its cable and record the address, intended location and any installation notes. Confirm the association by observing a gentle, controlled temperature change at that probe while the others remain undisturbed.

Do not assign locations solely by the order returned from a bus search. Discovery order is not a physical label. If a probe is replaced, require an intentional mapping update rather than automatically naming the new first device “inside”.

Understand what 1-Wire does and does not mean

The name refers to the communication arrangement; the circuit still needs a reference and a suitable power scheme. For a first multi-probe project, externally powered three-wire operation is usually easier to reason about than parasite power, provided the actual probes support it.

Follow the DS18B20 datasheet for supply, bus pull-up and timing requirements. The documented chip supply range is 3.0–5.5 V. Keep the bus high level within the receiving controller's limits; a 5 V-powered probe does not justify applying 5 V to a 3.3 V-only input.

Parasite-powered operation has additional power-delivery requirements during conversion. Do not assume a weak input pull-up or a resistor chosen for a short demonstration can supply every operating condition. Establish one working probe on a short bus before extending the installation.

Make conversion a separate stage

A temperature conversion is not instantaneous. At 12-bit resolution the documented maximum conversion time is 750 ms; lower resolutions have shorter conversion times. Reading immediately after requesting a conversion can return an earlier result rather than a fresh sample.

Structure acquisition as request, wait or check completion as supported, then read and validate. During the waiting interval, the application can update its display or process buttons instead of blocking everything with an unnecessarily long delay.

For compatible devices on a shared bus, the documented command sequence can start conversions together and then read each addressed result. Keep the power mode and library behaviour in mind. Do not broadcast a scratchpad read when multiple devices would answer simultaneously.

Check the data, not just the presence pulse

A device acknowledging the bus does not prove that every subsequently transferred byte is correct. Analog Devices' packet-error checking guidance describes CRC information in the device identity and scratchpad data. Confirm that your library checks the appropriate CRC rather than assuming it does.

Keep separate statuses for missing device, conversion not complete, invalid data and valid temperature. A failed measurement should not become zero degrees in the log. Zero can be a legitimate temperature, making it a poor general error marker.

The manufacturer's DS18B20 and DS18S20 comparison note identifies 85 °C as the power-up temperature-register value. That explains a common startup symptom, but does not mean every real 85 °C measurement is invalid. Establish freshness from the conversion sequence and status, not from one forbidden numerical value.

Design the cable arrangement as part of the bus

Long leads, multiple branches and additional devices change the electrical loading. A pull-up value that works on one desk arrangement is not a universal recommendation for every multi-room installation.

The Analog Devices long-line 1-Wire guide discusses master capability, cable topology, capacitance and reflections. Its detailed examples have stated conditions; use the principles and applicable limits rather than copying a maximum distance without its context.

Add probes and cable length in stages, then repeat searches and measurement checks. Record error counts over normal operating cycles. An arrangement that works once after power-up but loses a probe when another load switches is not ready to become an unattended logger.

Distinguish resolution from useful temperature accuracy

The number of displayed decimal places does not establish the accuracy of the whole measurement. Sensor accuracy, thermal contact, placement and the probe assembly all contribute. A stainless sleeve also introduces a thermal path between the measured environment and the chip.

Put the probes together in a stable, representative environment and compare them before installing them at different locations. Allow them to settle. This is a consistency check, not automatically a traceable calibration.

Texas Instruments' ambient-temperature layout guidance explains how nearby heat sources and thermal paths affect readings. For a cabled probe, keep it away from unintended heaters or cold surfaces unless those are what you want to measure.

Check the complete probe's environmental limits

The chip's temperature range does not establish the rating of every cable, adhesive, seal or heatshrink used around it. Obtain the complete assembly's limits for the intended installation. A waterproof product description does not imply food-contact suitability, chemical compatibility or unlimited immersion depth.

Support the cable so it does not pull on the probe's seal. Keep connectors and controller electronics appropriately protected. Use benign, controlled temperature tests rather than assuming boiling water or extreme cold is suitable for every supplied assembly.

Use a short commissioning record

Information to retain for each digital temperature probe
Record Purpose
64-bit address and cable label Keep physical and software identity aligned.
Location and mounting photograph Explain what temperature is being measured.
Resolution and acquisition interval Make freshness and timing explicit.
Comparison results Identify offsets or unusual response.
Error count and cable arrangement Track communication reliability.

Finish by disconnecting one probe deliberately and checking that only its record becomes unavailable. Restart the system and verify the labels again. The digital temperature sensor collection can support useful monitoring when identity, timing and validity remain visible throughout the system.

Previous article Battery Power for Arduino Projects: Voltage Range, Runtime and Regulator Heat