This document applies to typical 1-Wire networks consisting of a 1-Wire driver (master) with a resistive pullup and one or more 1-Wire slave devices, as shown in Figure 1. The majority of 1-Wire devices is parasitically powered, meaning that the 1-Wire line serves as power line and bidirectional data line. The 1-Wire protocol is designed to have idle times without communication, precisely so power can be transmitted to the 1-Wire slave devices on the line. The critical parameter that limits the amount of power available for the 1-Wire slaves is the recovery time, tREC. The tREC value specified in product data sheets and read/write waveforms is valid only for 1-Wire networks of a single slave.
Figure 1. Schematic for a typical 1-Wire network.
Figure 2. Illustration of the initialization procedure: reset and presence pulse.
Figure 2 shows the reset/presence detect cycle copied from a recent 1-Wire data sheet. The recovery time begins after the presence pulse and ends with the falling edge of the next time slot. Typically, tRSTL and tRSTH are chosen to have the same duration. At standard speed, tRSTL is 480µs. Under worst-case conditions, tPDH + tPDL are 300µs, leaving 180µs for tREC. At Overdrive speed, these numbers are ten times shorter, reducing tREC to 18µs. Compared to the minimum data sheet specification of tREC, plenty of time remains for the parasitic power supply (a capacitor inside the slave) to recharge. Therefore, the reset/presence detect cycle is not critical for power considerations, as long as tRSTL does not exceed the data sheet's maximum limit and the parasitic power supply is sufficiently charged before tRSTL begins. At Overdrive speed an extended recovery time of 2.5 times the minimum value prior to a reset pulse provides this extra charge. At standard speed the extended recovery time prior to a reset pulse is optional.
The read/write timing diagram below consists of three waveforms: Write-One Time Slot-to write a logical 1; Write Zero Time Slot-to write a logical 0; and Read Data Time Slot-to read a bit from a 1-Wire slave. As can easily be seen in Figure 3, a Write-One Time Slot is not critical for power delivery. The window for power delivery, tSLOT-tW1L, is at least 50µs at standard speed and 6µs at Overdrive. The 6µs at Overdrive, however, are barely more than the minimum specification of tREC. The Write-Zero Time Slot, especially when there are multiple zeros in a row, is most critical for power delivery due to the long low-time compared to the recovery time. It is important to understand that the tREC specification in data sheets applies for a single slave on a 1-Wire line with a 2.2kΩ pullup resistor to 2.8V. A Read-Data Time Slot, when reading a zero, is also critical for power delivery. It is, however, more benign since a slave typically pulls the 1-Wire line low for less than the permissible 60µs (standard speed) or 6µs (Overdrive).
This application note explains how to set tREC in Write-Zero Time Slots, and, as a derived value, tSLOT, to ensure adequate power supply in 1-Wire networks with multiple slaves. The resulting tSLOT, if also applied to Read-Data and Write-One Time Slots, defines the maximum data rate for reliable communication in a given 1-Wire network.
Write-One Time Slot
Write-Zero Time Slot
Read-Data Time Slot
Figure 3. Read/write timing diagram.
Parameters of Impact
When analyzing the recovery time with respect to power delivery, several primary and secondary parameters are considered. These parameters are:
|Number of Slaves
||The demand for power increases with the number of consumers.
||The higher the voltage, the more energy can be delivered.
||At Overdrive, the duty cycle of a Write-Zero Time Slot is higher.
|Type of 1-Wire Driver
||An 'intelligent' driver can pump more energy.
||A cold 1-Wire device needs more energy.
||The capacitance of the cable needs to be charged too.
|1-Wire Device Type
||Some devices need slightly more or less energy than others.
We start with data sheet conditions: a driver consisting of a 2.2kΩ pullup resistor to 2.8V, the worst-case temperature, a single 1-Wire slave on the bus, and negligible cable capacitance. This document uses the number of 1-Wire slaves as the main parameter and provides answers for varying operating voltage, speed, and temperature. If the cable between 1-Wire driver and slaves becomes significant, it can be represented in the calculation as an additional slave for every 15 meters of length.
The results shown here apply for typical 1-Wire slaves for ROM function commands, general memory read functions and SRAM write functions. Writing to EEPROMs, temperature conversion and SHA-1 computations has special device-specific power delivery requirements, such as a strong pullup, which do not affect the validity of the method presented here. As far as ROM functions and memory reading are concerned, 1-Wire EPROM devices can also be considered as typical; for programming purposes, only a single EPROM device is permitted on the network.
The Results Matrix
The recovery time can be calculated using a linear equation: tREC = a * N + b. N is the number of parasitically powered slave devices on the network, assuming that all slaves are connected in parallel from the 1-Wire line to the ground reference. 1-Wire devices that get their power through a VCC pin do not significantly load the 1-Wire line; they should be counted as one tenth of a device. The slope 'a' varies with temperature, operating (pullup) voltage, and 1-Wire speed. For this document, it is sufficient to let the offset 'b' vary with speed only. Table 1 shows the equation with slope and offset inserted. The numerical values are generated through manual curve fitting; the results closely match those obtained through an iterative process based on scientific models. For N = 1, the results matrix does not generate exactly the same number as published in device data sheets. This different value is a side effect of the curve fitting, and should not be regarded as in conflict with the specification.
|Table 1. Results Matrix
|Operating Voltage (V)
||Standard Speed (µs)
||Overdrive Speed (µs)
|4.5 and higher
||tREC = 2.12 × N + 1.0
||tREC = 1.43 × N + 0.5
||tREC = 1.99 × N + 1.0
||tREC = 1.37 × N + 0.5
||tREC = 1.83 × N + 1.0
||tREC = 1.30 × N + 0.5
||tREC = 1.54 × N + 1.0
||tREC = 1.18 × N + 0.5
||tREC = 3.52 × N + 1.0
||tREC = 1.82 × N + 0.5
||tREC = 3.30 × N + 1.0
||tREC = 1.80 × N + 0.5
||tREC = 3.17 × N + 1.0
||tREC = 1.74 × N + 0.5
||tREC = 2.70 × N + 1.0
||tREC = 1.63 × N + 0.5
The recovery time is longest for low operating voltage and low temperature. If the application requires operation at very low temperatures, the -40°C entry should be used. For room-temperature environments, it is acceptable to use the +25°C entry, which also allows safe operation at higher temperatures. The +85°C entry yields a result that only applies at that temperature; it should be regarded as a reference, not as a design value for other temperatures.
The recovery time is shortest for high operating voltages. The 4.5V entries apply for pullup voltages of 4.5V or higher. A recovery time based on 2.8V entries also works for higher voltages, but unnecessarily slows the data rate. For an operating voltage, Vx, between 2.8V and 4.5V, a new slope value can be obtained through linear interpolation: Slope@Vx = Slope@2.8V - (Vx - 2.8V)/1.7V * (Slope@2.8V - Slope@4.5V).
Assume that an application requires a network of ten 1-Wire devices (N = 10), with tW0LMIN = 60µs at standard speed and 6µs at Overdrive. (These values derive from the device data sheet; with different device types, use the largest tW0LMIN value.) The network is supposed to operate from 0°C to 70°C. The operating voltage is not yet determined. The applicable entry for this temperature range is that of -5°C, because it is the nearest value below the minimum operating temperature. Since the slope for higher temperatures is lower than that of the -5°C entry, the result is valid for all temperatures above -5°C. Table 2 shows the tREC results for this example and the maximum data rate with this recovery time.
At standard speed, the data rate is reduced to approximately 70% of the 15.3kbps reference of a single slave network. At Overdrive, the data rate is less than 40% of the 125kbps reference. If any of the data rates in Table 2 is acceptable for the application, the choice of operating voltage is not critical. However, if an operating voltage of approximately 5V is available, it should be preferred because of better noise immunity.
|Table 2. Example Results (N = 10)
|Operating Voltage (V)
|4.5 and higher
||tREC = (19.9 + 1)µs = 20.9µs
data rate = 1/(60µs + 20.9µs) = 12.3kbps
|tREC = (13.7 + 0.5)µs = 14.2µs
data rate = 1/(6µs + 14.2µs) = 49.5kbps
||tREC = (33.0 + 1)µs = 34µs
data rate = 1/(60µs + 34µs) = 10.6kbps
|tREC = (18.0 + 0.5µs) = 18.5µs
data rate = 1/(6µs + 18.5µs) = 40.8kbps
If the recovery time resulting from this table is not acceptable, there are several ways to increase the data rate.
- Reduce the pullup resistor from 2.2kΩ to e.g., 1kΩ.
The lower resistor doubles the recharge current for the 1-Wire network, which in turn reduces the recovery time by 50%. With this approach, it is important to verify whether each of the slave devices can handle the increased current, VPUP/RPUP, when pulling the 1-Wire line low during a Read-Data Time Slot.
- Change the network topology.
Instead of one network, use two or more smaller networks or use the DS2409 1-Wire coupler to disconnect some slave devices from the active part of the network.
- Consider using an active 1-Wire driver.
An active driver uses transistors to temporarily bypass the pullup resistor. This allows a faster recharge of the 1-Wire network and, in turn, reduces the necessary recovery time.
Active 1-Wire Drivers
The Dallas Semiconductor product portfolio includes three active 1-Wire drivers: the DS2480B, DS2490, and DS2482.
The DS2480B and DS2490 have identical 5V 1-Wire drivers, but different interfaces to the host computer. In both chips the recovery time ends when the voltage on the 1-Wire line has crossed a specific threshold. With the DS2480B the host receives a response byte at its UART as soon as the 1-Wire activity (e.g., writing one byte) is completed. With the USB-compatible DS2490, the host needs to poll to detect the completion of the 1-Wire activity.
The DS2482 communicates with the host through its I²C interface. This device can operate at 3.3V and 5V on the 1-Wire side. With the DS2482 the recovery time ends when a 1-Wire time slot is over. If enabled, for a fixed duration an active pullup supplies additional energy to a rising edge on the 1-Wire line. The DS2482 is stronger than a purely resistive pullup, but is not as strong as a DS2480B or DS2490. The 8-channel version of the DS2482 makes it easy to split a larger application into smaller networks with fewer 1-Wire devices on each line. As with the DS2490, the DS2482's host needs to poll the driver chip to detect the completion of 1-Wire activity.
Most flexibility, in particular for driving a physically large 1-Wire network, is achieved with a microcontroller that operates as an intelligent 1-Wire driver. See Dallas Application Note 244 for a detailed description of such a circuit and its necessary software considerations. Depending on the characteristics of the microcontroller, such a driver can also operate at 3.3V or 5V.
Calculating the necessary recovery time of 1-Wire applications with multiple slaves is a simple and straightforward process. A 5V environment is generally the preferred choice for any 1-Wire network. For most applications, a 1-Wire driver with a resistive pullup is sufficient. For larger networks, a driver with active pullup may be required.
- DS2480B data sheet Serial 1-Wire Line Driver with Load Sensor
- DS2490 data sheet USB to 1-Wire Bridge Chip. The DS2490 is no longer recommended for new designs.
- DS2482-800 data sheet Eight-Channel 1-Wire Master
- DS2482-100 data sheet Single-Channel 1-Wire Master
- Reference Design 244 Advanced 1-Wire Network Driver
- DS2409 data sheet MicroLAN Coupler. The DS2409 is no longer recommended for new designs.
- Application Note 192 Using the DS2480B Serial 1-Wire Line Driver
- Application Note 4104 Understanding and Configuring the 1-Wire® Timing of the DS2480B
- Application Note 3684 How to Use the DS2482 I²C 1-Wire Master
- Application Note 126 1-Wire Communication Through Software