Jump to content

DS18B20 1-WIRE TEMPERATURE SENSOR: Difference between revisions

From Transight Wiki
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 5: Line 5:
*  A TO-92 package that looks like a small transistor  
*  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  
*  A waterproof probe that’s perfect for measuring temperatures in wet environments, underground, or places that are hard to reach  
[[File:DS18B20 SENSOR.webp|thumb|right|200px]]
[[File:DS18B20 SENSOR.webp|thumb|right|300px]]
{| class="wikitable"
{| class="wikitable"
! style="background-color:#800020; white-space:nowrap; color:white;" | Parameters
! style="background-color:#800020; white-space:nowrap; color:white;" | Parameters
Line 28: Line 28:
|< 750ms  
|< 750ms  
|-
|-
|Wiring  
|}
|Red-Power
'''Wiring'''
Black-GND
<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==
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.
 
<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 ==
 
This command activates the 1-Wire port for sensor communication.
'''Command:'''
<pre>
SET CUENOW:ON
</pre>
'''Expected Response:'''
<pre>
IMEI: 862942074896044
Command: SET CUENOW:ON
Response: 
Error : 0
</pre>
'''Verification Command:'''
<pre>
GET CUENOW
</pre>
'''Expected Verification Response:'''
<pre>
IMEI: 862942074896044
Command: GET CUENOW
Response: ENOW:ON
Error : 0
</pre>
 
== Step 2: Configure the 1-Wire Sensor Model ==
 
This command sets the sensor model to DS18B20.
'''Command:'''
<pre>
 
SET CUOWCFG:DS18B20
</pre>
'''Expected Response:'''
<pre>
 
IMEI: 862942074896044
 
Command: SET CUOWCFG:DS18B20
Response: 
 
Error : 0
</pre>
'''Verification Command:'''
<pre>
 
GET CUOWCFG
</pre>
'''Expected Verification Response:'''
<pre>
 
IMEI: 862942074896044
 
Command: GET CUOWCFG
Response: OWCFG: DS18B20
 
Error : 0
</pre>
== Step 3: Specify the Number of Connected Sensors ==


Yellow or White-Data
Define the number of connected DS18B20 sensors. Maximum supported: 3.
|-
|}
'''Command:'''
<pre>
 
SET CUOWNOS:1
</pre>
*(Update the number `1` to `2` or `3` if more sensors are connected.)*
'''Expected Response:'''
<pre>
 
IMEI: 862942074896044
 
Command: SET CUOWNOS:1
Response: 
 
Error : 0
</pre>
'''Verification Command:'''
<pre>
 
GET CUOWNOS
</pre>
'''Expected Verification Response:'''
<pre>
 
IMEI: 862942074896044
 
Command: GET CUOWNOS
Response: TEMPERATURE SENSOR NOS: 1
 
Error : 0
</pre>
== ⚠️ Mandatory Finalization Step ==
 
Apply and save the sensor settings.
'''Command:'''
<pre>
SET CUMR:2
</pre>
 
== 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.

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.