Determine the recovery time of multi-slave 1-Wire network

Abstract: When designing a 1-Wire network, one issue usually needs to be considered is to determine the appropriate recovery time to ensure that the 1-Wire slave device that is parasiticly powered provides sufficient power. This paper analyzes the 1-Wire protocol required to determine the events that have strict requirements for power supply, and provides recovery time calculation methods for different 1-Wire slaves, different operating voltages, and temperature conditions.

Introduction This application note applies to a typical 1-Wire network consisting of a 1-Wire driver (master controller) with pull-up resistors and one or more 1-Wire slave devices, as shown in Figure 1. As shown. Most 1-Wire devices are parasitic powered, which means that the 1-Wire bus acts as both a power line and a bidirectional data line. The 1-Wire protocol stipulates to enter the idle state when there is no communication, and the 1-Wire slave device can just get power from the bus. The critical parameter that limits the number of available power sources for 1-Wire slave devices is the recovery time tREC. The size of tREC is specified in the product data sheet, and the read / write waveforms that are valid only in the 1-Wire network of a single slave are given.

Figure 1. Typical block diagram of a 1-Wire network
Figure 1. Typical block diagram of a 1-Wire network

Figure 2. Timing diagram of the startup process: reset and acknowledge pulse
Figure 2. Timing diagram of the startup process: reset and acknowledge pulse

Figure 2 shows the reset / online response detection cycle given in the latest 1-Wire device data sheet. The recovery time starts after the online response pulse and ends on the falling edge of the next time slot. Usually, the selected tRSTL and tRSTH have the same duration. At standard rate, tRSTL is 480µs. In the worst case, tPDH + tPDL is 300µs and tREC is 180µs. In high-speed mode, the above time value is shorter, which is 1/10 of the standard rate, and tREC is reduced to 18µs. Compared with the minimum value of tREC specified in the data sheet, some time margin is left to recharge the parasitic power supply (a capacitor in the slave). Therefore, as long as tRSTL does not exceed the maximum limit in the data, and the parasitic power supply reaches charge saturation before tRSTL begins, the reset / online response detection cycle is not a key factor in power supply design considerations. In high-speed mode, the recovery time value before the reset pulse is extended to 2.5 times the minimum value, during which the parasitic power supply can be additionally charged. At the standard rate, the value of the extended recovery time before the reset pulse is arbitrary.

The read / write timing block diagram given below consists of three waveforms: write 1 time slot-write logic 1; write 0 time slot-write logic 0; read data slot-read one bit from a 1-Wire slave device. It is easy to see from Figure 3 that the power supply requirements for writing 1 time slot are not strict. The power supply window at standard speed (tSLOT-tW1L) is at least 50µs, and at least 6µs in high-speed mode. The 6µs in high-speed mode has just exceeded the minimum specified value of tREC. In the write 0 time slot, since the time when the bus is low is longer than the recovery time, the write 0 time slot is more demanding for power supply, especially when there are multiple 0s in a row. The tREC given in the data sheet is suitable for a single-slave 1-Wire network with a 2.2kΩ pull-up resistor to drive the bus to 2.8V. It is important to understand this correctly. When reading a data slot for a zero-read operation, the power supply requirements are also very strict. However, since the slave usually pulls down the 1-Wire bus and maintains at least 60µs (standard rate) or 6µs (high-speed mode), it is a more advantageous aspect.

This application note explains how to set the tREC in the write 0 time slot and the derived value tSLOT to ensure that there is enough power in the multi-slave 1-Wire network. If the resulting value is also used for reading data slots and writing 1 slots, then tSLOT determines the maximum data rate required to achieve reliable communication in a particular 1-Wire network.

Write 1 slot

Write time slot 0

Read data slot Figure 3. Read / write timing diagram
Figure 3. Read / write timing diagram

Affecting parameters When analyzing the recovery time during power supply, several main parameters and secondary parameters need to be considered. These parameters are as follows:

The main parameters
Slave number The required power supply energy increases as the number of slaves increases.
Pull-up voltage The higher the voltage, the more energy is consumed.
Communication rate In high-speed mode, the duty cycle of writing 0 time slots is relatively high.
1-Wire drive type "Smart" drives require more power.

Secondary parameter
Operating temperature Low-temperature 1-Wire devices require more power.
cable length Cable capacitors also need to be charged.
1-Wire device type Some devices require more or less power than others.

Let's start with the conditions given in the data sheet: a driver with a 2.2kΩ pull-up resistor (pulled up to 2.8V), worst-case temperature, a single 1-Wire slave device on the bus, and a Ignored cable capacitance. This article takes the number of 1-Wire slave devices as the main parameters and provides values ​​for recovery time at different operating voltages, rates, and temperatures. If the cable between the 1-Wire driver and the slave is very important, then every 15 meters of cable in the calculation can be equivalent to an additional slave device.

The results obtained here are suitable for a typical 1-Wire slave device, which can realize the ROM function, general register read function and SRAM write function. Writing EEPROM, temperature conversion, and SHA-1 calculations have specific power requirements (such as strong pull-ups), depending on the device, which does not affect the effectiveness of this calculation method. In terms of ROM functions and memory read operations, 1-Wire EPROM devices are also considered as typical devices; for programming purposes, only a single EPROM device is allowed to be attached to the network.

The result matrix uses a linear formula: tREC = a * N + b, and the recovery time is calculated. Assuming that all slave devices are connected in parallel between the 1-Wire line and the ground reference, N represents the number of parasitic powered slave devices in the network. 1-Wire slave devices powered by the VCC pin do not significantly load the 1-Wire bus; they should count as 1/10 of the device. The slope 'a' varies with temperature, operating (pull-up) voltage, and 1-Wire rate. In this paper, it is sufficient to make the offset amount 'b' change only with the rate. Table 1 lists the formulas with slope and offset. Digital values ​​are generated by manual curve fitting; then the results are approximately consistent with the results obtained by the iterative method based on the scientific model. When N = 1, the result matrix cannot produce the same data as in the device data sheet. This numerical difference is a deviation from the curve fitting and should not be considered as conflicting with the specification requirements.

Table 1. Results matrix
OperaTIng Voltage (V) Temperature (° C) Standard Speed ​​(µs) Overdrive Speed ​​(µs)
4.5 and higher -40 tREC = 2.12 × N + 1.0 tREC = 1.43 × N + 0.5
-5 tREC = 1.99 × N + 1.0 tREC = 1.37 × N + 0.5
+25 tREC = 1.83 × N + 1.0 tREC = 1.30 × N + 0.5
+85 tREC = 1.54 × N + 1.0 tREC = 1.18 × N + 0.5
2.8 (minimum) -40 tREC = 3.52 × N + 1.0 tREC = 1.82 × N + 0.5
-5 tREC = 3.30 × N + 1.0 tREC = 1.80 × N + 0.5
+25 tREC = 3.17 × N + 1.0 tREC = 1.74 × N + 0.5
+85 tREC = 2.70 × N + 1.0 tREC = 1.63 × N + 0.5

The longest recovery time is at low operating voltage and low temperature. If the application requires operation at very low temperatures, the -40 ° C item should be used. At room temperature, + 25 ° C can be selected, and it is also suitable when the temperature is higher, which can ensure safe work. The + 85 ° C term produces a result that applies only at + 85 ° C; it should be used as a reference, not as a design value for other temperatures.

The recovery time is the shortest at high operating voltage. The 4.5V item should be selected when the pull-up voltage is 4.5V or higher. The recovery time corresponding to the 2.8V item also applies to higher voltages, but does not reduce the data rate. When the operating voltage Vx is between 2.8V and 4.5V, the new slope value can be obtained by linear interpolation: Slope @ Vx =-(Vx-2.8V) /1.7V * (-).

The example assumes that an application requires a network with 10 1-Wire devices (N = 10), tW0LMIN = 60 µs at standard speed, and 6 µs at high speed. (These values ​​are from the device data sheet. For different device types, the maximum value of tW0LMIN is used.) It is assumed that the network operates at a temperature of 0 ° C to 70 ° C. The operating voltage is undefined. The term suitable for this temperature range is -5 ° C, because it is below the minimum operating temperature and the closest value. Since the slope at higher temperatures is lower than the slope at -5 ° C, this result is valid for all temperatures above -5 ° C. Table 2 lists the tREC of this example and the maximum data rate with recovery time.

At the standard rate, the data rate drops to approximately 70% of the 15.3kbps benchmark for a single-slave network. In high-speed mode, the data rate is less than 40% of the 125kbps benchmark. If the data rates in Table 2 are suitable for the application, the choice of operating voltage is not important. However, if it can provide an operating voltage of about 5V, it has better noise suppression and should be used as the first choice.

Table 2. Example calculation results (N = 10)
OperaTIng Voltage (V) Standard Speed Overdrive Speed
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
2.8 (minimum) 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

Available improvement methods If the recovery time in this table cannot meet the requirements, you can also use the following methods to increase the data rate. Reduce the pull-up resistance, for example, from 2.2kΩ to 1kΩ.
The lower resistance doubles the 1-Wire network recharge current, which reduces the recovery time by 50%. In this method, it is very important to confirm whether each slave device can handle the increased current VPUP / RPUP when reading the data slot and pulling down the 1-Wire bus. Change the network topology.
Instead of one network, use two or more smaller networks, or use DS2409 1-Wire couplers to disconnect some slave devices from the active part of the network. Consider using active 1-Wire drivers. Active drivers use transistors to temporarily bypass pull-up resistors. This allows the 1-Wire network to be recharged at the fastest rate, thereby reducing the necessary recovery time. Active 1-Wire Drivers Dallas Semiconductor products include three active 1-Wire drivers: DS2480B, DS2490, and DS2482.

The DS2480B and DS2490 have the same 5V 1-Wire driver, but have different host interfaces. The recovery time of both devices ends when the 1-Wire bus voltage exceeds the specified threshold. With the DS2480B, as long as 1-Wire is active (for example, writing 1 byte), the host can receive a response byte through the UART side. With the USB-compatible DS2490, the host needs to poll to check if the 1-Wire validity is over.

DS2482 communicates with the host through its I²C interface. The 1-Wire side of the device can operate at 3.3V and 5V. With DS2482, when the 1-Wire time slot ends, the recovery time ends. If the active pull-up function is activated, additional power can be provided on the rising edge of the 1-Wire bus for a fixed duration. The DS2482 is stronger than a purely resistive pull-up, but not as good as the DS2480B or DS2490. The 8-channel version of the DS2482 helps to separate a larger application into several smaller networks with fewer 1-Wire devices per wire. When using the DS2490, the DS2482 host needs to poll the driver chip to detect whether the 1-Wire validity is over.

Using a microcontroller that can be used as an intelligent 1-Wire driver allows greater flexibility, especially when driving a large physical 1-Wire network. For a detailed description of the considerations for this circuit and its necessary software, please see Dallas Application Note 244. This driver works at 3.3V or 5V, depending on the characteristics of the microcontroller.

Conclusion Calculating the recovery time required for 1-Wire applications in multi-slave devices is a very simple and intuitive process. For 1-Wire networks, usually 5V is the best choice. For more applications, the use of 1-Wire drivers with pull-up resistors is sufficient. For large networks, drivers with source pull-ups are required.

References: DS2480B data data serial, 1-Wire line driver, with load detection DS2490 data data USB and 1-Wire bridge chip DS2482-800 data data 8-channel 1-Wire master controller DS2482-100 data data single channel 1 -Wire Master Controller Application Note 244 Excellent performance 1-Wire network driver DS2409 data sheet MicroLAN coupler. DS2409 is not recommended for new designs. Application Note 192 Using the DS2480B Serial Interface 1-Wire Line Driver Application Note 3684 How to Use the DS2482 1-Wire Master Controller with I2C Interface Application Note 126 Using Software for 1-Wire Communication


Enershare's commitment to future-ready energy solutions for smart home innovations, Enershare's Energy Storage Systems create a flexible energy maintenance system for homeowners who want to take more control of their home energy use, it is intended to be used for Home Battery energy storage and stores electricity for solar self-consumption, load shifting, backup power, and off-the-grid use. you can use it anytime you want-at night or during an outage.

Residential Energy Storage System

Home Energy System,Home Battery Storage 10Kwh,Residential Energy Storage Unit,Residential Energy Storage System,Battery Energy Storage Solutions,Home Energy Storage Systems

Shenzhen Enershare Technology Co.,Ltd , https://www.enersharepower.com