Jump to content

DS18B20 1-WIRE TEMPERATURE SENSOR: Difference between revisions

From Transight Wiki
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 27: Line 27:
|Conversion Time  
|Conversion Time  
|< 750ms  
|< 750ms  
|-
|Wiring
|Red-Power
Black-GND
Yellow or White-Data
|-
|-
|}
|}
'''Wiring'''
<div style="color: red; font-weight: bold;"> Red - Power</div>
<div style="color: black; font-weight: bold;"> Black - GND  </div>
<div style="color: yellow; font-weight: bold;">Yellow / White - Data  </div>


==Configuration==
==Configuration==
Line 42: Line 40:
<div style="color: red; font-weight: bold;">⚠️ Note: Up to 3 DS18B20 sensors can be connected to any Transight device that supports 1-Wire functionality.</div>
<div style="color: red; font-weight: bold;">⚠️ Note: Up to 3 DS18B20 sensors can be connected to any Transight device that supports 1-Wire functionality.</div>


== Step 1: Enable 1-Wire Sensor Interface ==
== Step 1: Enable 1-Wire Sensor Interface ==


This command activates the 1-Wire port for sensor communication.
This command activates the 1-Wire port for sensor communication.
Line 48: Line 46:
'''Command:'''
'''Command:'''
<pre>
<pre>
SET CUENOW:ON
SET CUENOW:ON
</pre>
</pre>
Line 54: 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 66: Line 59:
'''Verification Command:'''
'''Verification Command:'''
<pre>
<pre>
GET CUENOW
GET CUENOW
</pre>
</pre>
Line 72: 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 ==


This command sets the sensor model to DS18B20.
This command sets the sensor model to DS18B20.
Line 122: Line 110:
</pre>
</pre>
   
   
== Step 3: Specify the Number of Connected Sensors ==
== Step 3: Specify the Number of Connected Sensors ==


Define the number of connected DS18B20 sensors. Maximum supported: 3.
Define the number of connected DS18B20 sensors. Maximum supported: 3.
Line 170: Line 158:
'''Command:'''
'''Command:'''
<pre>
<pre>
SET CUMR:2
</pre>


SET TSMR:2
== Post-Configuration Validation Checklist ==
</pre>
== Post-Configuration Validation Checklist ==


Once configuration is completed, verify the data stream:
Once configuration is completed, verify the data stream:

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.