Skip to main content

DS18B20 Temperature Sensors

Antares 4G supports 1-Wire digital temperature sensors based on the DS18B20 chip.

DS18B20 sensors can operate in normal power mode or parasite mode.

⚠️ Purchase note: many low-cost probes are labeled as DS18B20 but do not include a genuine compatible chip. Prefer sensors explicitly indicating parasite-mode support. Example known-working model: https://www.amazon.com/gp/product/B00CHEZ250

Up to 10 temperature sensors can be connected simultaneously, mapped to signals TO0TO9.

Signals

SignalDescription
TO0TO9Temperature threshold signals (one per sensor slot)

Typical Setup Flow

  1. Connect one or more DS18B20 sensors to the 1-Wire bus.
  2. Query discovered sensors with QXATI.
  3. Assign each physical sensor ID to a logical tag (AJ) with SXATL.
  4. Configure threshold slots (09) with SXATO.
  5. Optionally include temperature values in reports using extended tag EA.

Temperature Thresholds

Each threshold slot (09) is associated with one tagged sensor and one threshold value.

Behavior:

  • Positive threshold: use sign 1 (or +) in command encoding.
  • Negative threshold: use sign 0 (or -) in command encoding.
  • Value is fixed-point with one decimal, encoded as 4 digits.
    • Example: 0255 = +25.5°C
    • Example: 0050 with negative sign = -5.0°C
  • A threshold slot cannot be shared by two different sensor tags at the same time.

Commands

Sensor Information — XATI

Query all detected sensors:

>QXATI<

Response format:

>RXATI<ID>,<TAG>,<VALUE>;<ID>,<TAG>,<VALUE>...<

Where:

  • TAG is AJ when assigned, or U when unassigned.
  • VALUE is signed fixed-point (+0255 = 25.5°C) or U if no valid reading yet.

Example — two sensors detected, one assigned to tag A reading 21.5°C, one unassigned with no reading yet:

>QXATI<
>RXATI28AABBCCDDEEFF,A,+0215;28112233445566,U,U<

Tag Assignment — XATL

Assign a sensor ID to a tag (AJ):

>SXATL<TAG><SENSOR_ID><

Example:

>SXATLA28AABBCCDDEEFF<

Query tag assignment:

>QXATL<TAG><

Remove tag assignment:

>SXATL<TAG>U<

Threshold Configuration — XATO

Set threshold at slot 09:

>SXATO<SLOT>1<TAG><SIGN><VALUE4><

Examples:

>SXATO01A10255< <- Slot 0, Tag A, +25.5°C
>SXATO11A00050< <- Slot 1, Tag A, -5.0°C

Query threshold by slot:

>QXATO<SLOT><

Remove threshold by slot:

>SXATO<SLOT>U<

Extended Tag: EA

Add the EA tag to include temperature sensor readings in reports:

>SXAEFA;EA<

Report example:

>REV001234567890+2578250-0802813901234512;EA=A21.50B22.10;ID=IMEI<

Special conditions for EA:

  • Output is tag-prefixed (A..J), not comma-only values.
  • If a sensor has no valid reading yet, it appears as <tag>*.
  • If no sensor has valid readings, the field is EA=A*.

Installation and commissioning tips

  • Connect and identify sensors one at a time during installation to avoid ID confusion.
  • Record each sensor physical location with its assigned tag (AJ).
  • Validate live values with QXATI before creating threshold events.