What is 1-Wire®?

1-Wire or One-Wire is a method of transmitting information that only needs one data line. The wide usage of integrated 1-Wire components such as temperature sensors or small and rugged memories, the protocol is often employed in connection with measuring data and for identification of objects by what is called iButtons.

Digital Thermometer DS18B20

Integrated 1-Wire component

In the past the range of 1-Wire equipment was limited solely to true 1-Wire components. Today there are countless modules and applications, implementing the 1-Wire protocol by means of a microcontroller and without the need of native 1-Wire components. Thus many new and interesting devices became available during the years. Nevertheless, modules based on native 1-Wire components such as the Digital Thermometer DS18B20 are still very popular for the simple reason that they are widely supported by nearby any application.

Outdoor temperature sensor MFE-TEMP-O

Outdoor Temperature Sensor with native 1-Wire component DS18B20

Reader for NFC tags with 1-Wire interface

Reader for NFC Tags with 1-Wire interface

1-Wire Components

The table below shows examples of established 1-Wire components that are used in measuring and control equipment.

Part-No. Description Application
DS18B20 1-Wire Digital Thermometer Temperature Sensors
DS2438Z Smart Battery Monitor A/D Converter, e.g. Humidity Sensors
DS2401 Silicon Serial Number Identification of Objects
DS2413 1-Wire Dual Channel Addressable Switch Input- und relay modules
DS2480B Serial to 1-Wire Line Driver 1-Wire adapter for PC
Table: 1-Wire components and their application

Serial Number

Each 1-Wire component features a unique and unchangeable 16-digit registration number (e.g. 680000015BC84B28). The last two digits represent the 1-Wire family code, type of a tag of the respective 1-Wire component. For example, the number of a DS18B20 Thermometer typically ends with 28. The forgoing 12 digits contain the 1-Wire serial number. The first two digits represent a checksum (CRC) which can be calculated from the other 14 digits. The general structure of a 1-Wire registration number can be shown as follows:

8-BIT CRC 48-BIT SERIAL NUMBER 8-BIT FAMILY CODE
MSB LSB MSB LSB MSB LSB

1-Wire Bus System

The 1-Wire bus system is based on a single bus master to control one or more slaves. The 1-Wire equipment or components connected to the bus are always slaves. If only one 1-Wire device is connected to the bus, it is called single-drop system. With multiple bus participants it is called multidrop system. The bus participants are connected in parallel to the 1-Wire bus.

Bus Master

An open-drain pin of a microcontroller can be used as a bus master. For the general user who does not want to be bothered by such details, or who is planning to use an existing software solution, ready-made 1-Wire interfaces for USB, Ethernet or RS232 are available. Such kind of bus masters provide an interface for the 1-Wire bus mainly via RJ12, respectively RJ45 jack or via screw terminal.

Bus master for 1-Wire networks (OW-SERVER-ENET)

Bus Master for Ethernet

Application

Frequently the 1-Wire bus system is applied for the automatising of buildings or for driver and person identification using an iButton or RFID tag. In the field of building automatising the 1-Wire devices are often used to monitor environmental parameters like temperature or humidity. Data logger iButtons, also known as Thermo- or Hygrochron iButtons, use the 1-Wire protocol for data exchange as well.

1-Wire Networks

While the 1-Wire protocol probably was not intended for data exchange over large distances and many bus participants, it is nevertheless used as bus system in buildings. With increasing size of such Measuring Networks due to long cables and numerous branches, the protocol will reach its limitation due to the type of signal transmission. The use of intelligent 1-Wire interfaces will put things right, matching dynamically certain parameters to local conditions, thus improving the reliability of the application considerably.

1-Wire masters of the Link family

Intelligent 1-Wire adapters

Limitations

There are certain limitations with the application of the 1-Wire protocol because the data transmission is slow and the signal timing has to be very accurate. Therefore it is important to check in each individual case whether or how the 1-Wire protocol can be used.

If the amount of data to be transferred is small or the duration is not critical, the speed disadvantage may be acceptable, e.g. the amount of data in a measuring network with temperature sensors is rather small. Usually such applications are not time-critical. The situation is different if state changes from several buttons or switches have to be monitored without delay. With such kind of applications the 1-Wire bus system is not suitable, because the communication has to originate from the bus master.

The error-proneness due to timing comes into effect if the 1-Wire communication is disrupted by an interrupt of the microcontroller. In such a case the 1-Wire communication will seize up fast. In this case one can help oneself by disabling interrupts during 1-Wire communication. An approach not every application tolerates.

Feedback

* Required Information