Jump to content

DS18B20 1-WIRE TEMPERATURE SENSOR: Difference between revisions

From Transight Wiki
 
(One intermediate revision by the same user not shown)
Line 46: Line 46:
'''Command:'''
'''Command:'''
<pre>
<pre>
SET CUENOW:ON
SET CUENOW:ON
</pre>
</pre>
Line 52: Line 51:
'''Expected Response:'''
'''Expected Response:'''
<pre>
<pre>
IMEI: 862942074896044
IMEI: 862942074896044
Command: SET CUENOW:ON
Command: SET CUENOW:ON
Response:   
Response:   
Error : 0
Error : 0
</pre>
</pre>
Line 64: Line 59:
'''Verification Command:'''
'''Verification Command:'''
<pre>
<pre>
GET CUENOW
GET CUENOW
</pre>
</pre>
Line 70: Line 64:
'''Expected Verification Response:'''
'''Expected Verification Response:'''
<pre>
<pre>
IMEI: 862942074896044
IMEI: 862942074896044
Command: GET CUENOW
Command: GET CUENOW
Response: ENOW:ON
Response: ENOW:ON
Error : 0
Error : 0
</pre>
</pre>
 
== Step 2: Configure the 1-Wire Sensor Model ==
== Step 2: Configure the 1-Wire Sensor Model ==



Latest revision as of 12:00, 11 November 2025

Introduction to the product

The DS18B20 is a digital temperature sensor created by Dallas Semiconductor (now part of Maxim Integrated). It uses a special 1-Wire® communication protocol. This protocol allows data transfer using just a single data line, which significantly reduces the number of required connections!

You can find this sensor in two main types:

  • A TO-92 package that looks like a small transistor
  • A waterproof probe that’s perfect for measuring temperatures in wet environments, underground, or places that are hard to reach
Parameters Value
Power Supply 3V to 5.5V
Current Consumption 1mA
Temperature Range (-55 to 125°C)
Accuracy ±0.5°C
Resolution 9 to 12 bit (selectable)
Conversion Time < 750ms

Wiring

Red - Power
Black - GND
Yellow / White - Data

Configuration

Before configuring, ensure that the DS18B20 sensor(s) are connected to the Transight telematics device as per the sensor pinout. Improper wiring may lead to failed communication or sensor detection issues.

⚠️ Note: Up to 3 DS18B20 sensors can be connected to any Transight device that supports 1-Wire functionality.

Step 1: Enable 1-Wire Sensor Interface

This command activates the 1-Wire port for sensor communication.

Command:

SET CUENOW:ON

Expected Response:

IMEI: 862942074896044
Command: SET CUENOW:ON
Response:  
Error : 0

Verification Command:

GET CUENOW

Expected Verification Response:

IMEI: 862942074896044
Command: GET CUENOW
Response: ENOW:ON
Error : 0

Step 2: Configure the 1-Wire Sensor Model

This command sets the sensor model to DS18B20.

Command:


SET CUOWCFG:DS18B20

Expected Response:


IMEI: 862942074896044

Command: SET CUOWCFG:DS18B20
 
Response:  

Error : 0

Verification Command:


GET CUOWCFG

Expected Verification Response:


IMEI: 862942074896044

Command: GET CUOWCFG
 
Response: OWCFG: DS18B20

Error : 0

Step 3: Specify the Number of Connected Sensors

Define the number of connected DS18B20 sensors. Maximum supported: 3.

Command:


SET CUOWNOS:1
  • (Update the number `1` to `2` or `3` if more sensors are connected.)*

Expected Response:


IMEI: 862942074896044

Command: SET CUOWNOS:1
 
Response:  

Error : 0

Verification Command:


GET CUOWNOS

Expected Verification Response:


IMEI: 862942074896044

Command: GET CUOWNOS
 
Response: TEMPERATURE SENSOR NOS: 1

Error : 0

⚠️ Mandatory Finalization Step

Apply and save the sensor settings.

Command:

SET CUMR:2

Post-Configuration Validation Checklist

Once configuration is completed, verify the data stream:

  • 🔄 Monitor incoming packets from the device.
  • 🌡️ Ensure temperature values are included in the payload.
  • 📈 Confirm periodic updates from each connected sensor.
  • ✅ Check the accuracy and consistency of readings.