The DS18B20 digital thermometer offers 9-bit to 12-bit Celsius temperature readings and features an alarm function with nonvolatile, user-programmable upper and lower trigger points. It communicates via a 1-Wire bus that requires only one data line (and ground) to connect with a central microprocessor. Additionally, the DS18B20 can draw power directly from the data line, known as "parasite power", eliminating the need for an external power supply.
Each DS18B20 has a unique 64-bit serial code, enabling multiple units to operate on the same 1-Wire bus. This makes it easy to control numerous DS18B20s with a single microprocessor across a large area.
This feature benefits applications such as HVAC environmental controls, temperature monitoring systems inside buildings, equipment or machinery, and process monitoring and control systems.
Each 1-Wire device has a unique 64-bit 'ROM' address, which includes an 8-bit family code, a 48-bit serial number, and an 8-bit CRC. The CRC helps verify the integrity of the data.
For example, the sample code below checks if the device being addressed is a DS18S20 temperature sensor by looking for its family code, 0x10. To use the sample code with the newer DS18B20 sensor, you would look for a family code of 0x28. For the DS1822, you would check for 0x22.
With Arduino, multiple DS18B20 sensors can be connected to a 1-wire bus simultaneously. It is recommended to power the signal line with a 4.7 kΩ resistor from the 5V DC supply.
| Page | Date | Tags |
|---|---|---|
| 2025/05/31 21:56 | 1-wire, communication, bus, microlan, i2c, uart, usart, ds18b20 | |
| 2025/09/23 21:03 | 1-wire, communication, bus, xml, iec 61850, iec, ethernet, scl, goose, ied | |
| 2025/10/09 20:52 | ds18b20, sensor, 1-wire, communication, arduino, thermometer, parasitic mode |
This page has been accessed for: Today: 1, Until now: 3