What it is

One failed sensor can take down an entire 1-Wire network, and finding the fault often means opening walls.

This project is a transparent inline hub that splits one 1-Wire bus into eight independent branches while continuously measuring each branch.

To the controller it still looks like a standard 1-Wire network. Existing sensors keep their original ROM IDs, and no firmware changes are required.

What it measures

Fault location. An open cable becomes "Branch 3, ~34 m" instead of "Sensor missing."

Cable length, to about ±15%.

Degradation over time. Repeatability is around 1%. The device records a baseline at commissioning and watches for drift. An 8% rise over two weeks means moisture in a junction box — visible months before the first CRC error.

The right pull-up. It measures the branch and picks 4.7k, 1k, or active. Normally you find this by trial and error.

Real fault types. Short, open, and dead sensor are three different states, not one "no response."

Signal margin. How wide the valid read window is, in µs. The narrower it gets, the closer the line is to failing.

How the measurement works

Pull the line to ground, release it through a known resistor, and time the rise with a comparator. That gives you the line's capacitance, and capacitance gives you length.

C = t / (R · ln 2) at a 50% threshold.

50% rather than the textbook 63.2%: a divider made from two identical resistors has the lowest relative error, and supply drift cancels because the divider and the reference share a rail.

On RP2350 this runs in PIO — two instructions per count at 150 MHz, about 4 pF of resolution.

Absolute accuracy isn't the goal. Repeatability is.

Why star topology breaks

Capacitance. 50 m of twisted pair is roughly 2.75 nF. Through a 4.7k pull-up that's τ ≈ 14 µs, against a 1-Wire time slot that allows 10–15 µs to recover. The line never gets back up in time.

Star makes it worse, because every branch's capacitance sits in parallel on one driver, permanently.

Parasite power is worse than most people realize

In parasite mode a DS18B20 adds roughly 800 pF to the line, against about 25 pF when externally powered.

One parasite-powered sensor is capacitively equivalent to 14 m of cable. Eight of them contribute more capacitance than 50 m of the cable itself.

Which is the point of the whole project — the thing that breaks the bus is a number you can measure.

Hardware

  • RP2350A — the upstream slave emulation gets its own core and its own PIO block; branches and measurement run on the rest
  • 8 branch drivers with switchable pull-up, TVS and current limiting
  • Comparator for the rise-time measurement
  • ADC behind an 8:1 mux, one path shared across all branches
  • Browser configuration over USB

Limits

  • 32 sensors total. Many masters won't see more than that anyway.
  • Needs external 5 V, around 130 mA while polling. Bus power usually isn't enough — the Loxone extension supplies 50 mA.
  • ±15% on length, limited by cable spread rather than by the measurement.
  • Cloned DS18B20s with duplicate ROM IDs get remapped, so those sensors lose their original ID.
  • No TDR. With 4.7k pull-ups the edges are far too slow. Footprints are on the board, unpopulated.

Open questions

  • How much does DS18B20 capacitance actually vary between manufacturers? It needs measuring per batch — the datasheet isn't enough.
  • In parasite mode the charging path goes through an internal diode, so the rise isn't a clean exponential. Plan: measure twice, at 4.7k and 1k. Cable capacitance is linear, so both should agree; more than 5% divergence flags a reading you shouldn't trust. No idea yet how well that holds up.
  • 8 branches or 16? The electronics barely change, but 16 doubles the terminal blocks and needs a bigger enclosure — which is where the cost actually is.

Status

Design phase. Analog front end and measurement method worked out, PCB not routed yet. Firmware plan: USB and configuration first, slave emulation...

Read more »