1-Wire

from Wikipedia, the free encyclopedia

1-wire or one-wire or single-wire bus describes a serial interface from Dallas Semiconductor Corp. that gets by with one data wire (DQ) that is used both as a power supply and as a transmit and receive line. The term 1-Wire is misleading because it also requires a ground connection (GND). In the case of button-shaped arrangements, this ground connection is achieved by isolating the housing halves from one another. In fact, two physical conductor connections are always used (GND, DQ).

Integrated modules for temperature measurement, battery monitoring, real-time clock, small memory, etc. are available. The technology was developed for communication between the components of a device, e.g. B. to record the battery status in a mobile data acquisition device (PDA).

The button-shaped arrangements are widespread as mechanically particularly simple authentication factors related to the wearer, especially at checkout terminals .

Overview

One-wire interface in the application of an electronic lock on a door
  • The connection works serially and bidirectionally , i. H. with a common data line for sending and receiving.
  • The data transfer is asynchronous , i. H. no clock signal is transmitted.
  • Transmission is carried out in the half-duplex method , i.e. H. either a block is sent or a block is received, but not both at the same time.
  • The transmission takes place according to the one-master / multi-slave principle, i. H. only one master (control unit), but up to 100 slaves (sensors, memory, etc.) can be used per bus.
  • Each slave is addressed by a 64-bit ROM ID. This consists of an 8-bit family code, a 48-bit serial number (unique device ID) and an 8-bit CRC checksum.
  • The slaves are supplied by an internal capacitor that is charged via the data line. An external power supply is not necessary.
  • 1-Wire is a voltage interface. Depending on the device, the voltage is between 2.8 and 6 volts.

Electrical Properties

Many 1-Wire devices allow operating voltages between 2.8 V and 5.5 V. On the other hand, some devices only allow 3.0 V to 3.7 V. Therefore, the data sheet should be observed. Depending on the component, the current consumption of the 1-Wire devices is between 2 microamps and a few milliamps.

A special feature of 1-Wire devices is the connected power supply from the opposite station. The slaves are supplied via the data line: When communication is inactive (idle state), the data line is at +5 V high level and charges a storage capacitor, which is integrated in every 1-wire slave. During communication, the bus is pulsed to low by the devices . During the low pulse, the slave is fed from its capacitor. Depending on the state of charge, the capacitor can bridge low times of up to approx. 960 μs.

The 1-Wire bus is pulled to the high level via a pull-up resistor , which is usually between 1 and 2.2 kΩ . The size should be adjusted depending on the number of devices and cable length. In order to avoid malfunctions and problems, the values ​​of the pull-up resistors must be read in the data sheets.

timing

Since the 1-Wire bus, unlike many other bus systems, does not have a separate line for the clock signal , a specified timing must be adhered to. The synchronization takes place with each bit with the falling edge generated by the master. In order to write a logical 1, the bus is pulled to the low level by the master for 1 to 15 μs , with a logical 0 for 60 to 120 μs. For reading, the master pulls the bus to low level for 1 to 15 μs as with the "Write 1" signal and the slave also keeps the bus low for the transmission of a logical 0 . For a reset , the master sends a low level with a duration of 480 μs. A slave indicates its presence by pulling the bus to low for at least 60 μs within 60 μs .

The 1-Wire devices also have an overdrive mode, which enables much higher transmission rates to be achieved. In order to generate a logic 1 in overdrive mode, a low level only needs to be applied for 1–2 μs ; for a logic 0, 6 μs are sufficient in overdrive mode. 48 μs are sufficient to generate a reset. If the reset signal is longer than 80 μs, the 1-Wire devices go into regular operating mode, otherwise they stay in overdrive mode.

In regular operating mode, data rates of up to 16.3 kbit / s are possible due to the timing conditions listed above . The overdrive mode accelerates this up to 142 kbit / s.

Line requirements

The wiring can be done via a simple cable or a single line on a circuit board. With a passive pull-up resistor , cable lengths of up to 100 m are possible with 150 1-wire devices. By controlling the slew rate and using an active pull-up resistor, it is even possible to implement cable lengths of up to 300 m with 500 1-wire devices. The quality of the ground connection as a return line via the general ground potential must be checked under operating conditions.

Example of 1-wire communication

The signals in the following diagram were generated by an FPGA as master and a DS2432 ( EEPROM ) as slave and measured with a logic analyzer . The signal 1-wire output represents the isolated output signal of the master; 1-wire input is the measured 1-wire bus signal; if the input sample time signal is high, the 1-wire bus signal is measured by the master.

1 Wire reset, write and read example with DS2432-EPROM

Further standards

iButton ® : The registered standard is based on the same technology. It describes the communication with devices the size of button cells.

Examples of 1-wire chips

DS18B20
  • DS18B20 high accuracy temperature sensor
  • DS2408: 8-bit I / O module with 12 connections in a 16-pin housing
  • DS2417: RTC ( R eal T ime C lock = real time clock) with 6 ports
  • DS2438: Smart Battery Monitor with temperature / voltage / current / charge measurement, time measurement unit and 40 byte EEPROM with 6 connections in an 8-pin housing
  • DS2756: Smart Battery Monitor with temperature / voltage / current / charge measurement, time measurement unit, IO port / interrupt output and 96 byte EEPROM + 8 byte RAM with 8 connections
  • DS28EC20: 20480-bit EEPROM memory with 3 connections

See also

Web links

Commons : 1-Wire  - collection of pictures, videos and audio files