---
title: "How does a sensor run on just ground and data?"
topic: "1-Wire"
answer: "It charges a tiny capacitor from the data line while the line is high, and runs on that while the line is low."
url: "https://nearfieldnotes.com/notes/one-wire/"
site: "Near Field Notes"
author: "Michael Walker"
note: 38
family: "Signal integrity"
published: "2026-11-14"
revised: "2026-11-14"
revision: 1
video: "https://nearfieldnotes.com/videos/one-wire/"
---

Note 38 · [Signal integrity](https://nearfieldnotes.com/families/si/) · Rev 1 · [Watch the video · 2:52](https://nearfieldnotes.com/videos/one-wire/)

1-Wire

# How does a sensor run on just ground and data?

**Short answer:** It charges a tiny capacitor from the data line while the line is high, and runs on that while the line is low.

That is enough to talk, but not to take a reading. A reading takes up to 1.5 mA. On a 3.3 V board a 4.7 kΩ pull-up can give 64 µA before the pin falls under the 3.0 V the chip needs.

Simulated, the pin sags to 2.51 V. With the master’s own pin driven high, it holds at 3.24 V.

A DS18B20 that loses power partway through a reading resets. Read it back and it says exactly 85 °C, the value it wakes up with.

The bus is 1-Wire, Dallas Semiconductor’s from 1989, now Analog Devices’. The same bus is in MagSafe plugs, Dell adapters and steel-can door keys.

**Note 38’s opening figure: A reading on two wires.** The data pin, simulated at 3.3 V

![Note 38’s opening figure: A reading on two wires](https://nearfieldnotes.com/notes/one-wire/fig-opening.png)

*What the figure shows:* A 3.3 V board's master and a DS18B20 temperature sensor joined by two wires, data and ground, with the sensor's VDD leg tied to ground. A 4.7 kilohm resistor pulls the data line up to 3.3 V. Inside the sensor a diode runs from the data pin to a storage capacitor that feeds the chip. Three steps, simulated. Asleep: current runs through the resistor and the diode and charges the capacitor; the data pin sits at 3.30 V and the capacitor at 2.82 V. Taking a reading on the resistor alone: the pin falls to 2.51 V, under the 3 V the chip needs. Held hard high by the master's own pin: the pin holds at 3.24 V.

The big number is the voltage on the sensor’s data pin. The band is the path the current takes, and the purple number is the chip’s storage capacitor. Simulated in ngspice with a stand-in chip. Nothing here was measured. It rests on the last step.

## A temperature sensor on two wires

*DS18B20, 3.3 V*

Take a small 3.3 V board with a DS18B20 temperature sensor on a cable. The cable has two wires: ground and data.

A DS18B20 has three legs: ground, data and VDD, its supply. Wired for what Analog Devices calls parasite power, VDD is tied to ground. The chip takes its power from the data line instead.

On the board, a 4.7 kΩ resistor pulls the data line up to 3.3 V.

**Fig. 38a: The board and the sensor.**

![Fig. 38a: The board and the sensor](https://nearfieldnotes.com/notes/one-wire/fig-38a.png)

*What the figure shows:* Figure 38a: two Blender renders. Above, a small 3.3 V board with a USB connector, a microcontroller as the master and a 4.7 kilohm pull-up resistor, joined by two wires, data and ground, to a small board carrying a DS18B20 temperature sensor in its three-legged TO-92 package. Beside or below it, a close-up of the sensor's board: the ground wire and the data wire land on two pads; the sensor's first leg is ground, its middle leg is data, and a copper trace joins its third leg, VDD, to the ground leg.

Rendered in Blender. The board is an example drawn for this page, with generic parts. On the sensor’s small board, a trace joins its VDD leg to its ground leg.

As a circuit, nothing drives the line high. The master and the sensor can each pull it low through a switch, and the resistor brings it back up. That is an open-drain bus, the same idea as I2C in [Note 24](https://nearfieldnotes.com/notes/i3c-vs-i2c/).

Inside the sensor, a diode runs from the data pin to a capacitor, and the capacitor feeds the chip. The datasheet calls the capacitor C_PP and doesn’t give its size.

**Fig. 38b: The same, as a circuit.**

![Fig. 38b: The same, as a circuit](https://nearfieldnotes.com/notes/one-wire/fig-38b.png)

*What the figure shows:* Figure 38b: the board as a circuit. A 4.7 kilohm resistor pulls the data line up to 3.3 V. The master can pull the line low through a switch to ground, and so can the DS18B20 through a switch inside it. Neither drives the line high. A ground wire runs from the master to the sensor's GND pin, and its VDD pin is tied to that ground. Inside the sensor a diode runs from the data pin to a capacitor C, which feeds the chip.

After Figure 3 of the DS18B20 datasheet. It also has a diode from the VDD pin, which stays off with VDD at ground and is left out. The simulation uses 800 pF for C, ADI’s figure for its iButton chips.

## A bit is a timed low pulse

*70 µs a slot*

Every bit starts with the master pulling the line low. How long it holds it says what the bit is. A short low is a 1 and a long one is a 0.

To read, the master pulls the line low for a moment and lets go. A sensor sending a 1 does nothing, so the line climbs back up. A sensor sending a 0 holds it low. The master looks at 15 µs. In the simulation the line is at 3.29 V for a 1 and 0.07 V for a 0.

The sensor’s own clock may be off by a factor of four, so it samples anywhere from 15 to 60 µs after the edge. The long slots allow for that. ADI puts the speed at 15.4 kbit/s.

**Fig. 38c: One slot, written and read.**

![Fig. 38c: One slot, written and read](https://nearfieldnotes.com/notes/one-wire/fig-38c.png)

*What the figure shows:* Figure 38c: the simulated data line, 0 to 3.3 V, through one 70 microsecond slot. Above, the master writes. For a 1 it pulls the line low for 6.2 microseconds, for a 0 for 60.2. Below, the master reads: it pulls the line low for 6 microseconds and lets go. For a 1 the chip does nothing and the line is back at 3.29 V when the master reads it at 15 microseconds. For a 0 the chip holds the line low, at 0.07 V.

The simulated data line at 3.3 V, one sensor, no cable. Two slots are drawn on each panel, one for each bit.

**The numbers**

3.3 V, 4.7 kΩ, one sensor, no cable. Each slot is 70 µs.

| Slot | The line | At 15 µs |
|---|---|---|
| Write 1 | 6.2 µs low | — |
| Write 0 | 60.2 µs low | — |
| Read 1 | 6 µs low, then let go | 3.29 V |
| Read 0 | Held low by the chip | 0.07 V |

A command is eight slots, lowest bit first. Convert T, the command that starts a temperature reading, is 44 in hex.

Ahead of every command the master holds the line low for 480 µs, a reset. Each sensor answers with a low pulse of its own to say it is there, a presence pulse.

**Fig. 38d: Convert T, 44h, on the line.**

![Fig. 38d: Convert T, 44h, on the line](https://nearfieldnotes.com/notes/one-wire/fig-38d.png)

*What the figure shows:* Figure 38d: the simulated data line during one byte, the Convert T command, 44 in hex, sent lowest bit first: 0, 0, 1, 0, 0, 0, 1, 0. Each bit is one 70 microsecond slot, a long low pulse for a 0 and a short one for a 1. The byte takes 560 microseconds.

The simulated data line through the whole byte. 44h is 01000100 in binary, so it goes out as 0, 0, 1, 0, 0, 0, 1, 0.

## Power from the data line

*0.60 V in a reset*

While the line is high, current runs through the pull-up and the diode and charges the capacitor. In the simulation it sits at 2.82 V, a diode drop under the pin.

While the line is low, the diode blocks and the chip runs on the capacitor alone. Asleep, a DS18B20 draws 750 nA typical and 1 µA at most.

A short slot costs it little. The longest low is the reset, 480 µs. At 1 µA from 800 pF, that takes the capacitor down 0.60 V, to 2.22 V. It is just the current times the time over the capacitance: 1 µA × 480 µs ÷ 800 pF.

**Fig. 38e: The chip’s power, line high and line low.**

![Fig. 38e: The chip’s power, line high and line low](https://nearfieldnotes.com/notes/one-wire/fig-38e.png)

*What the figure shows:* Figure 38e: the same circuit in two steps, simulated. Line high: current runs through the pull-up and the diode into the storage capacitor, which sits at 2.82 V. Line low: the master holds the data line at 0 V, the diode blocks, and the chip runs on the capacitor, which falls to 2.22 V by the end of a 480 microsecond reset pulse.

The circuit of Fig. 38b with the current’s path lit. The capacitor’s voltage is in purple. It rests on the line held low.

The capacitor charges back in about 20 µs once the line goes high, and the chip answers the reset.

There is room, but not a lot. The datasheet warns that under parasite power a reset low for more than 960 µs can reset the chip.

Twice the time is twice the drop: 960 µs takes the capacitor down 1.20 V. The supply voltage doesn’t change that. The drop is only the current times the time over the capacitance.

**Fig. 38f: A reset pulse, and what it costs.**

![Fig. 38f: A reset pulse, and what it costs](https://nearfieldnotes.com/notes/one-wire/fig-38f.png)

*What the figure shows:* Figure 38f: the simulated data line and the chip's storage capacitor through a reset. The master holds the line low for 480 microseconds. The capacitor, at 2.82 V before, runs down to 2.22 V, a drop of 0.60 V, then charges back within about 20 microseconds of the line going high. The chip then pulls the line low for a moment to say it is there.

Simulated at 3.3 V with 800 pF and 1 µA asleep, both stand-ins. The sensor’s answer, its presence pulse, is the dip after the reset.

**The numbers**

3.3 V, 4.7 kΩ, an 800 pF storage capacitor and 1 µA standby, both stand-ins. The drop is the current times the time over the capacitance, so the supply hardly changes it.

|  | Simulated |
|---|---|
| Capacitor before | 2.819 V |
| Capacitor, end of the 480 µs low | 2.219 V |
| Drop, 1 µA standby | 0.600 V |
| Drop, 750 nA standby, 5 V run | 0.451 V |
| Drop, a 960 µs low, 1 µA, 5 V run | 1.200 V |
| Back within 50 mV after | 20.3 µs |

## A reading takes more than the line can give

*1.5 mA wanted, 64 µA there*

Talking is cheap. A temperature reading isn’t. While it converts, a DS18B20 draws 1 mA typical and 1.5 mA at most, for up to 750 ms at 12 bits.

The capacitor can’t carry that. At 2.82 V, 800 pF holds about 2.3 nC. A reading at 1 mA for 750 ms uses 750 µC, some 300,000 times as much. The reading has to run on the pull-up.

In parasite mode the chip needs at least 3.0 V on its pin. ADI’s formula for what a pull-up can give before the pin falls under that is the supply minus 3.0 V, over the resistor. At 3.3 V that leaves 0.3 V across 4.7 kΩ: 64 µA.

**Fig. 38g: What a pull-up can give.**

![Fig. 38g: What a pull-up can give](https://nearfieldnotes.com/notes/one-wire/fig-38g.png)

*What the figure shows:* Figure 38g: the current a pull-up resistor can give a parasite-powered sensor before the data pin falls under 3 V, by ADI's formula: the supply minus 3 V, over the resistor. At 3.3 V a 4.7 kilohm pull-up gives 64 µA, and 1 kilohm gives 0.30 mA. At 5 V, 4.7 kilohms gives 0.43 mA and 1 kilohm 2.0 mA. A dashed line marks 1.5 mA, the most a DS18B20 draws while it takes a reading.

Arithmetic, not a simulation: ADI’s formula from its AN4255. The first row is the board of Fig. 38a.

**The numbers**

ADI AN4255’s formula. A DS18B20 draws 1 mA typical and 1.5 mA at most while it converts.

| Pull-up | Sum | Current |
|---|---|---|
| 3.3 V, 4.7 kΩ | (3.3 − 3) V / 4.7 kΩ | 64 µA |
| 3.3 V, 1 kΩ | (3.3 − 3) V / 1 kΩ | 300 µA |
| 5 V, 4.7 kΩ | (5 − 3) V / 4.7 kΩ | 426 µA |
| 5 V, 1 kΩ | (5 − 3) V / 1 kΩ | 2000 µA |

Simulated on the pull-up alone, the pin falls through 3.0 V as soon as the reading starts and settles at 2.51 V. The chip gets 0.17 mA of the 1.5 mA it asks for.

Where the pin settles depends on the model: on where the chip stops drawing current, which no datasheet gives. What doesn’t depend on the model is that it ends up under 3.0 V.

At 5 V the same resistor gives 0.43 mA, and one sensor at 5 V on 4.7 kΩ often works. In one forum test, a parasite sensor on 4.7 kΩ passed at 5 V and failed at 3.3 V. Those results fit chips that draw only 0.3 to 0.5 mA, less than the datasheet’s 1 mA typical. A stand-in chip that keeps drawing 0.3 mA holds the pin at 3.59 V at 5 V, and drags it to 1.89 V at 3.3 V.

**Fig. 38h: The data pin as a reading starts.**

![Fig. 38h: The data pin as a reading starts](https://nearfieldnotes.com/notes/one-wire/fig-38h.png)

*What the figure shows:* Figure 38h: the simulated data pin as the sensor starts a reading, from 8 microseconds before to 60 after, on the 4.7 kilohm pull-up alone at 3.3 V. It falls from 3.30 V through the 3 V the chip needs and settles at 2.51 V.

Simulated at 3.3 V with 4.7 kΩ, the master leaving the line on the resistor. The stand-in chip asks for 1.5 mA.

**The numbers**

3.3 V, 4.7 kΩ, a stand-in chip asking for 1.5 mA. Where it settles depends on the model.

|  | Simulated |
|---|---|
| Before the reading | 3.30 V |
| Settles at | 2.51 V |
| Capacitor settles at | 1.90 V |
| The chip gets | 0.17 mA |

**Figure: Four ways to a wrong reading.**

Fig. 38i

| What happened | Reads | Evidence |
|---|---|---|
| The chip loses power and resets | 85.00 °C | The power-on value, 0550h. Its register starts there |
| The master reads before the reading ends | 85.00 °C | Read at 590 ms: 85.00. At 591 ms: 21.37 |
| Any glitch on its supply, then a read | 85.00 °C | A 400 µs dropout set about half of 53 sensors to it |
| The chip is starved but doesn’t reset | 127.94 °C | 07FFh, on genuine parts |

The power-on value is from the DS18B20 datasheet. The other rows are published bench tests: the reads at 590 and 591 ms on an owfs list, the dropout on a 53-sensor bus with its own supply, and 127.94 °C from Chris Petrich’s tests. All are listed under Sources.

The 85 °C reading

### Exactly 85.00 °C

**Field marks.** A reading of exactly 85.00 °C. It is the value in the temperature register at power-on, 0550h. A chip that loses power partway through a reading resets, and hands it back.

**Look-alike.** A real 85 °C. It is a legal temperature, so a reading of 85 proves nothing alone. Chris Petrich found the two differ in byte 6 of the scratchpad, the memory the master reads the temperature from: 0Ch after power-on and 10h after a real reading. ADI doesn’t document it.

**Range.** Starved but not reset, a genuine chip reads 127.94 °C instead. A read that comes too soon gives 85.00 too, on any supply: in one test a read at 590 ms gave 85.00 and one at 591 ms gave 21.37 °C.

**Habitat.** 3.3 V boards whose master leaves the line on the resistor during a reading. Reported cases include owserver on a Raspberry Pi, an I2C-to-1-Wire bridge set not to drive the line high, and a level shifter in the line.

## Hold the line hard high

*3.24 V with the pin driven*

The datasheet’s fix is a strong pull-up. Something has to connect the line straight to the supply “within 10µs (max)” of the command, hold it there for the whole reading, and keep everything else off the bus meanwhile.

The simplest is the master’s own pin, switched from open-drain to driven high. In the simulation, a 40 Ω pin turned on 10 µs after the command holds the line at 3.24 V. The chip gets its full 1.5 mA.

A P-channel MOSFET from the supply to the line does the same, with a master pin working its gate: 3.29 V.

**Fig. 38j: The data pin during a reading.**

![Fig. 38j: The data pin during a reading](https://nearfieldnotes.com/notes/one-wire/fig-38j.png)

*What the figure shows:* Figure 38j: the simulated data pin as the sensor starts a reading, two ways. On the 4.7 kilohm pull-up alone it falls to 2.51 V. With the master's pin driven high 10 microseconds after the reading starts, it dips for those microseconds and then holds at 3.24 V, above the 3 V the chip needs. A FET in place of the pin holds it at 3.29 V.

Simulated at 3.3 V. The driven pin comes on 10 µs after the reading starts, so the line dips for those microseconds and the capacitor carries the chip.

**The numbers**

3.3 V. The pin or the FET turns on 10 µs after the reading starts.

| Way | Data pin | Capacitor | Chip gets |
|---|---|---|---|
| Pull-up alone | 2.51 V | 1.90 V | 0.17 mA |
| Master’s pin driven high, 40 Ω | 3.24 V | 2.54 V | 1.5 mA |
| FET across the pull-up, 10 Ω | 3.29 V | 2.59 V | 1.5 mA |

On an Arduino this is already done. The OneWire library’s write takes a power flag, as in ds.write(0x44, 1), that leaves the pin driven high after the byte. The DallasTemperature library sets it when it finds a parasite sensor, and the Linux kernel driver drives the line high too.

Reported failures cluster on 3.3 V hosts that don’t, which is how one sensor can work on one board and read 85 °C on another.

The other way out is the third wire. With VDD on a supply, the chip draws its reading from there and the line only carries data.

**Fig. 38k: Two ways to hold it high.**

![Fig. 38k: Two ways to hold it high](https://nearfieldnotes.com/notes/one-wire/fig-38k.png)

*What the figure shows:* Figure 38k: two ways to hold the data line hard high during a reading, each drawn on the circuit of Fig. 38b with the reading's current path lit. First, the master's own pin switched to its 3.3 V supply, which holds the pin at 3.24 V in the simulation. Second, a P-channel MOSFET, source on the 3.3 V rail and drain on the data line, its gate driven by a master pin, which holds it at 3.29 V.

Each drawn during a reading, with the current’s path lit. The numbers are the data pin, simulated.

## Finding every chip on the line

*13 ms a chip*

One line can carry many sensors, so the master needs to tell them apart. Each chip has a 64-bit ID set at the factory.

The last 8 bits, sent first, are the family code: 28 for a DS18B20. Then 48 bits of serial number, then a CRC, a check code worked out from the other 56 bits. The chip never checks it. The master has to.

**Fig. 38l: A 64-bit ID.**

![Fig. 38l: A 64-bit ID](https://nearfieldnotes.com/notes/one-wire/fig-38l.png)

*What the figure shows:* Figure 38l: an example 64-bit ID, D0 E6FD3C822044 28 in hex, as three fields. The last 8 bits, sent first, are the family code, 28 for a DS18B20. The middle 48 bits are the serial number. The first 8 bits are a CRC of the other 56.

An example ID, written as hex with the CRC first. It is made up, with a CRC that checks.

To learn the IDs, the master runs a search. Every chip answers every bit at once, on the same wire. For each bit the master reads the bit, then its opposite, then writes the value it picks.

| The master reads | It means |
|---|---|
| 0 then 1 | Every chip still in has a 0 |
| 1 then 0 | Every chip still in has a 1 |
| 0 then 0 | They disagree. The master picks a side |
| 1 then 1 | No chip answered |

At a 0 then 0 the master picks a side, and the chips on the other side drop out until the next pass. Each pass finds one chip.

A pass is a reset, the command and three slots for each of the 64 bits: 200 slots, 13.16 ms at the shortest timing allowed. ADI gives the same figure, “up to 75 different iButtons per second”.

**Fig. 38m: Ten chips, found one per pass.**

![Fig. 38m: Ten chips, found one per pass](https://nearfieldnotes.com/notes/one-wire/fig-38m.png)

*What the figure shows:* Figure 38m: the device search on ten DS18B20s with example IDs, drawn as a tree. All ten answer each bit at once. Bits 1 to 8 agree, the family code. At bit 9 some chips have a 0 and some a 1, so the master reads 0 and then 0, sends 0, and the 6 chips with a 1 drop out until the next pass. Each later fork, lower in the tree, splits the rest the same way, until one chip is left after 64 bits. Pass 2 goes the same way to pass 1's last fork, bit 13, and takes 1 there. 10 passes find all 10, at 13.16 milliseconds a pass with the shortest slots the timing allows.

A logic model of ADI’s search, AN187, on ten made-up IDs. A dot is a bit where the chips still in disagree. Lower dots are later bits. At each dot the left branch is 0 and the right is 1. Each pass goes the way of the one before to its last 0, takes 1 there, and runs on to one chip. It rests on all ten found.

**The numbers**

Ten made-up IDs, family 28. A pass is 200 slots: 13.16 ms at the shortest legal slot, 14.96 ms at ADI’s usual software timing.

| Pass | ID found, CRC first | Forks met at bits |
|---|---|---|
| 1 | D0 E6FD3C822044 28 | 9, 13 |
| 2 | 44 975F33D50B94 28 | 9, 13, 14, 15 |
| 3 | 2E E02CBFBB58D4 28 | 9, 13, 14, 15 |
| 4 | 2C 040D0B0FA234 28 | 9, 13, 14 |
| 5 | 14 0EF9306BC2F1 28 | 9, 10, 11 |
| 6 | 8B 919B61D8AA3D 28 | 9, 10, 11, 15 |
| 7 | CA EB7076B077FD 28 | 9, 10, 11, 15 |
| 8 | 19 E0710ED86EC3 28 | 9, 10, 11 |
| 9 | FE 7588E401DDC7 28 | 9, 10, 11, 12 |
| 10 | B8 CE7CF511C9FF 28 | 9, 10, 11, 12 |

## Where the bus hides

*Plugs, keys and cartridges*

Ken Shirriff’s teardowns found a 1-Wire chip in the MagSafe plug. Its ID carries the charger’s wattage, and its two outputs light the plug’s orange and green LEDs. The Mac, not the charger, picks the color. The chip answers like ADI’s DS2413 switch, though no marking was read.

Dell’s barrel adapters carry a Dallas memory on the center pin. Published dumps hold plain text like DELL00AC090195046, with 090 for 90 W and 195 for 19.5 V. If the laptop can’t read it, the laptop still runs, but it may not charge its battery and it slows its processor.

An iButton is a 1-Wire chip in a 16 mm steel can, with the lid for data and the can for ground: truly two contacts. The DS1990A kind is the door and intercom key. Maxim counted over 350 million iButtons in use in 2014.

Stratasys 3D-printer cartridges hold a DS2433 1-Wire memory that keeps track of the material left. The printer turns away an empty one.

**Fig. 38n: Four places 1-Wire is used.**

![Fig. 38n: Four places 1-Wire is used](https://nearfieldnotes.com/notes/one-wire/fig-38n.png)

*What the figure shows:* Figure 38n: four products with a 1-Wire chip, rendered in Blender as generic models. A MagSafe-style charger plug with its shell open, showing a small chip on its board, from which the Mac reads the charger's wattage. A Dell-style barrel plug, seen into its mouth, whose center pin carries an ID chip. A steel-can iButton door key beside one in a key fob: the lid is data and the can is ground. And a 3D-printer filament cartridge with a small memory board that holds how much material is left.

Rendered in Blender as generic models, not the makers’ parts. Not every steel-can key is 1-Wire, and teardowns show only some MagSafe chargers.

## How long a line?

*About 63 m on 4.7 kΩ*

A long cable puts capacitance on the line. In a read slot the master lets go at 6 µs and reads at 15 µs. In those 9 µs the pull-up has to charge the cable back above 2.2 V, the level a 1 has to clear.

Simulated at 5 V, with Cat 5e’s 52 pF per meter and one sensor at the far end, the line at 15 µs is 4.82 V after 10 m and 2.56 V after 50 m. After 100 m it is 1.52 V, and the master reads the 1 as a 0.

**Fig. 38o: A 1, read at the end of a cable.**

![Fig. 38o: A 1, read at the end of a cable](https://nearfieldnotes.com/notes/one-wire/fig-38o.png)

*What the figure shows:* Figure 38o: the simulated data line at the master during a read-1 slot, with one sensor at the far end of 10, 50 and 100 meters of cable, on a 5 V bus with a 4.7 kilohm pull-up. The master has held the line low since 0 microseconds; the drawing starts at 3. It lets go at 6 microseconds and reads at 15. The 50 and 100 meter lines climb in steps, one every 0.55 and 1.07 microseconds. By then the line is at 4.82 V with 10 meters, 2.56 V with 50 and 1.52 V with 100, which is under the 2.2 V a 1 has to clear.

The data line at the master, simulated at 5 V with 4.7 kΩ. The master has held it low since 0 µs. The cable is a chain of short sections of a 100 Ω pair. On the long cables the line climbs in steps. They are echoes off the far end, one per round trip: 0.55 µs on 50 m, 1.07 µs on 100 m.

**The numbers**

5 V bus, 4.7 kΩ, 52 pF/m, the cable as a chain of 2 m sections. Step every: measured on the simulated rise. Round trip: twice the length at the cable’s 5.2 ns per meter. At 200 m the steps come every 2.122 µs.

| Cable | At 15 µs | Read as | Step every | Round trip |
|---|---|---|---|---|
| 10 m | 4.82 V | 1 | 0.126 µs | 0.104 µs |
| 50 m | 2.56 V | 1 | 0.546 µs | 0.520 µs |
| 100 m | 1.52 V | 0, wrongly | 1.072 µs | 1.040 µs |

A smaller pull-up charges the cable faster. The climb takes longer than 9 µs past about 63 m with 4.7 kΩ and about 136 m with 2.2 kΩ. With 1 kΩ it still makes it at 300 m, in 8.8 µs. ADI reported 300 m working with 1.0 kΩ in 1997.

That is the rise time alone. Hobby reports put a 4.7 kΩ pull-up on a bare microcontroller pin at 10 to 20 m before it gets flaky, for other reasons such as hard edges and star wiring. ADI gives a bare port pin about 3 m.

**Fig. 38p: Time to climb back, by cable length.**

![Fig. 38p: Time to climb back, by cable length](https://nearfieldnotes.com/notes/one-wire/fig-38p.png)

*What the figure shows:* Figure 38p: the simulated time the data line takes to climb back to 2.2 V after the master lets go, against cable length, on a 5 V bus. The master reads 9 microseconds after it lets go. With 4.7 kilohms the climb takes longer than that past about 63 meters, with 2.2 kilohms past about 136 meters. With 1 kilohm it is still in time at 300 meters, the longest simulated.

The time from letting go to 2.2 V, simulated at 5 V with one sensor at the far end. A dot is where a pull-up runs out of time.

**The numbers**

Microseconds to 2.2 V, 5 V bus, 52 pF/m. Bold: past the 9 µs allowed. The cable as one lumped capacitor; a ladder of short sections lands within 8%.

| Pull-up | 10 m | 30 m | 50 m | 100 m | 200 m | 300 m | Limit |
|---|---|---|---|---|---|---|---|
| 4.7 kΩ | 1.6 | 4.4 | 7.2 | **14.3** | **28.3** | **42.4** | 63 m |
| 2.2 kΩ | 0.8 | 2.1 | 3.4 | 6.7 | **13.2** | **19.7** | 136 m |
| 1 kΩ | 0.4 | 1.0 | 1.5 | 3.0 | 5.9 | 8.8 | over 300 m |

## Will it read?

*Three questions*

Whether a DS18B20 on a data line gets through a reading comes down to how it is powered, what the master does during the reading, and the bus voltage.

Key to a DS18B20 that has to take a reading

### Does it need a strong pull-up?

1. 1a VDD is wired to a supply No, it draws from VDD
2. 1b VDD is tied to ground Go to 2
3. 2a The master drives its pin high for the reading It already has one
4. 2b The master leaves the line on the resistor Go to 3
5. 3a The bus is 5 V, one sensor, 4.7 kΩ Often works. Add one anyway
6. 3b The bus is 3.3 V Yes, it needs one

The board in Fig. 38a ends at 3b if its master leaves the line on the resistor. Driving the pin high, as Arduino’s OneWire library does with its power flag set, moves it to 2a.

#### Conditions

- **Simulated:** Every voltage, current and time on the bus comes from a circuit simulation. None was measured.
- **Circuit:** A 3.3 V supply and a 4.7 kΩ pull-up to the data line, with 30 pF for the master’s pin and a few centimeters of trace. The master pulls low through 20 Ω, the sensor through 100 Ω. One sensor, no cable, unless a figure says otherwise.
- **Sensor:** A stand-in: a generic diode from the pin, 0.5 V at 1 µA and 0.7 V at 1.5 mA, into an 800 pF capacitor. It draws 1 µA asleep and 1.5 mA converting, from a load that fades out below 2.0 V on the capacitor. Its replies are scripted. It has no reset.
- **Strong pull-up:** The master’s pin driven high through 40 Ω, or a FET of 10 Ω, each turned on 10 µs after Convert T.
- **Timing:** 70 µs slots. A 1 is about 6 µs low and a 0 about 60 µs. A read: low for 6 µs, sampled at 15 µs. A reset: 480 µs low.
- **Cable:** 5 V supply. Cat 5e as a 100 Ω pair with 52 pF per meter, ADI’s figure, as a chain of 2 m sections, or as one capacitor for the rise times. The two give rise times within 8%.
- **Search:** A logic model of the search in ADI’s AN187 on ten made-up IDs, family 28. Slot times from ADI’s AN937 and its recommended software timing.
- **Solver:** ngspice, 269 transient runs.
- **Render:** Blender. The boards and the products are generic models drawn for this page.

Simulated only. Nothing on this page has been measured on a board.

#### Limits

- The DS18B20’s storage capacitor, its diode drop and the voltage where it resets aren’t published. 800 pF is ADI’s iButton figure. The DS2401 lists 800 pF, the DS2431 1000 pF and the DS28E05 1500 pF.
- Where the pin parks during a reading depends on the stand-in load: 2.51 V as drawn, 1.1 V if the load never lets go.
- The model switches the reading’s current on in 0.5 µs. A real chip may ramp it, and the datasheet’s 10 µs allowance suggests it does.
- The simulation shows the sag, not the 85 °C. It has no reset in it.
- This is a 3.3 V story. At 5 V one sensor on 4.7 kΩ often works.
- The cable limits are rise time alone, with one sensor. Star wiring, many sensors and hard edges cut them short.
- Chris Petrich found every DS18B20 he bought on eBay and AliExpress in 2019 counterfeit. His most common bare clone can’t run on parasite power at all.

#### Files

- sim/onewire.py The ngspice circuit and its 269 runs: the whole exchange, the strong pull-ups, the reset, the cable
- sim/search.py The logic model of the search, its ten IDs and its slot times
- render/scene.py The boards and the four products in Blender

#### Sources

- [Analog Devices DS18B20 datasheet: parasite power, the strong pull-up, 1.5 mA, 750 ms, the power-on value](https://www.analog.com/media/en/technical-documentation/data-sheets/DS18B20.pdf)
- [ADI AN4255, powering 1-Wire devices: the pull-up formula](https://www.analog.com/media/en/technical-documentation/tech-articles/how-to-power-the-extended-features-of-1wire-devices.pdf)
- [Maxim AN126, 1-Wire communication through software: slot timing](https://web.archive.org/web/20220121034235/https://pdfserv.maximintegrated.com/en/an/AN126.pdf)
- [ADI AN148, reliable long-line 1-Wire networks: cable, 52 pF/m, sampling late](https://www.analog.com/media/en/technical-documentation/tech-articles/guidelines-for-reliable-long-line-1wire-networks.pdf)
- [ADI AN187, the 1-Wire search algorithm](https://www.analog.com/media/en/technical-documentation/app-notes/1wire-search-algorithm.pdf)
- [ADI AN937, the Book of iButton Standards: 800 pF, 13.16 ms a pass, 300 m with 1.0 kΩ](https://www.analog.com/media/en/technical-documentation/tech-articles/book-of-ibuttonreg-standards.pdf)
- [Maxim AN3808, what is an iButton device: 350 million in circulation](https://www.analog.com/media/en/technical-documentation/tech-articles/what-is-an-ibutton-device.pdf)
- [Arduino Playground, OneWire](https://playground.arduino.cc/Learning/OneWire/) and [the OneWire library: the power flag](https://github.com/PaulStoffregen/OneWire)
- [T-962 improvements, issue 114: a parasite sensor passing at 5 V and failing at 3.3 V](https://github.com/UnifiedEngineering/T-962-improvements/issues/114)
- [Jan Kandziora on the owfs developers list, 2016: power-on resets at 3.3 V with 4.7 kΩ](https://www.mail-archive.com/owfs-developers@lists.sourceforge.net/msg12275.html)
- [Guy Colin on the owfs developers list, 2016: 85.00 at 590 ms, 21.37 °C at 591 ms](https://www.mail-archive.com/owfs-developers@lists.sourceforge.net/msg12451.html)
- [OpenEnergyMonitor forum, 2022, post 36: a 400 µs dropout on a 53-sensor bus](https://community.openenergymonitor.org/t/ds18b20-temperature-sensor-sends-85-c-error-value/21573)
- [Chris Petrich, counterfeit DS18B20s: 127.94 °C, byte 6, the reading times, clones](https://github.com/cpetrich/counterfeit_DS18B20)
- [Ken Shirriff, teardown of the MagSafe connector, 2013](https://www.righto.com/2013/06/teardown-and-exploration-of-magsafe.html)
- [Ken Shirriff, Macbook charger teardown, 2015](https://www.righto.com/2015/11/macbook-charger-teardown-surprising.html)
- [Dell support, identifying AC adapter damage, 000125337](https://www.dell.com/support/kbdoc/en-us/000125337/identify-ac-adapter-damage-on-dell-systems)
- [Dell support, troubleshooting AC adapter issues, 000125125](https://www.dell.com/support/kbdoc/en-us/000125125/how-to-troubleshoot-ac-adapter-issues)
- [hclxing, hacking the Dell laptop power adapter, 2014: the ID chip’s text](https://hclxing.wordpress.com/2014/02/06/hacking-the-dell-laptop-power-adapter/)
- [realraum wiki, Stratasys cartridge chip](https://doku.realraum.at/3dprinting:stratasys_dimension_cartridge_hacking) and [the stratasys tool](https://github.com/bvanheu/stratasys)
- [US patent 5,210,846, one-wire bus architecture, Dallas Semiconductor, filed 1989](https://patents.google.com/patent/US5210846A/en)
- [ngspice, the circuit simulator](https://ngspice.sourceforge.io/)

What should the next note be? [Ask for one](https://nearfieldnotes.com/#ask-for-a-note)

---

Source: https://nearfieldnotes.com/notes/one-wire/

Cite as: Michael Walker, “1-Wire”, Near Field Notes, Note 38, Rev 1, 14 Nov 2026. https://nearfieldnotes.com/notes/one-wire/

Figures: free to reuse under CC BY 4.0 (https://nearfieldnotes.com/license/). Each one's image is linked under its name. Credit Michael Walker, Near Field Notes, and link the figure: this address plus #fig- and its number, like https://nearfieldnotes.com/notes/one-wire/#fig-38a.
