Skip to main content
Digital temperature sensor with 1-Wire interface.

Pin names

Power
Positive voltage
Digital I/O
1-Wire data line (input/output)
Ground
Ground

Attributes

string
default:"22"
Initial temperature value (celsius)
string
default:"010203040506"
12-character hex device ID for the 1-Wire address
string
default:"28"
1-Wire family code

Controlling the temperature

You can change the temperature value while the simulation is running. Click on the DS18B20 sensor and a small popup window will open. Use the temperature slider to change the value. The temperature range is -55°C to 125°C.

Multiple sensors

You can connect multiple DS18B20 sensors to the same data pin. Each sensor must have a unique deviceID attribute. The 1-Wire protocol allows addressing individual sensors by their unique ID. Example with three sensors:

Arduino code example

The DallasTemperature library cannot read temperatures of exactly -55°C due to a limitation in how the library detects disconnected sensors. If you need to read this specific temperature, use the OneWire library directly.

Automation controls

The temperature sensor can be controlled using Automation Scenarios. It exposes the following controls:
float
Set the temperature value in Celsius (between -55 and 125)

Simulator examples