DS18B20 Sensors DIY: Wiring Your Own 1-Wire Bus
Want to build your own temperature sensor bus across a few rooms or by the boiler? This guide walks through the actual steps -- and is honest about where parasitic power can let you down.
Steps to wire it up
Pick your cable
CAT5 or CAT5e twisted-pair cable is a common, practical choice -- one pair for data and ground, a second pair for extra Vdd power if you need it.
Wire the DS18B20 sensors in parallel
Every sensor sits on the same data+ground line, each with its own factory-burned ROM ID -- the bus master tells them apart without any manual addressing.
Choose Vdd or parasitic power
A separate Vdd wire gives more stable behaviour on longer or busier runs. Parasitic power saves a wire but is more sensitive -- see why below.
Connect a bus master or USB adapter
To let a computer or Home Assistant see the bus, you need a matching bus master/adapter that polls each device by its ROM ID.
What to know before you start
one bus, many sensors
A single data+ground pair can serve several DS18B20 sensors at once -- each one is told apart by its unique ROM ID, not by a separate set of wires.
Simple wiring
Data and ground on one pair -- for most setups, that's all the communication line needs.
Unique ROM ID
Every sensor has a factory-burned 64-bit ID, so the bus master can tell them apart without any switches or configuration.
Bus or star layout
Run the line as a straight bus or as a star from one distribution point -- pick whichever fits your building's layout.
Honest about parasitic power
It simplifies wiring, but on longer or busier segments it can produce unreliable readings -- we're not going to hide that.
Home Assistant and Loxone
Both platforms support 1-Wire through a matching bus master/adapter that feeds readings into your automations.
What this guide covers
Concrete steps, not just theory -- from picking a cable to your first reading in Home Assistant.
- {'t': 'Cable and pair choice', 'd': 'Why CAT5/CAT5e works well here and how to split the pairs between data and power.'}
- {'t': 'Wiring sensors in parallel', 'd': 'How to correctly connect several DS18B20 sensors on the same bus.'}
- {'t': 'Vdd vs parasitic power', 'd': 'When to pick each option, and how to spot parasitic power starting to struggle.'}
- {'t': 'Bus master/USB adapter', 'd': 'What device you need to connect the bus to a computer or gateway.'}
- {'t': 'Home Assistant/Loxone hookup', 'd': 'How the readings make it into your automation platform.'}
Frequently asked questions
Can all my DS18B20 sensors share the same cable?
Yes -- that's the whole point of 1-Wire: every sensor sits in parallel on one data+ground line, and the bus master tells them apart by their unique ROM ID.
When should I use parasitic power instead of a separate Vdd wire?
Parasitic power is convenient on shorter, lighter runs -- fewer wires, simpler wiring. But on longer runs, or with several sensors active at once, it gets more sensitive and can produce unreliable readings. If that happens, the first fix is adding a separate Vdd wire, not replacing the sensors.
How many DS18B20 sensors can I put on one bus?
There's no single fixed number -- it depends on bus length, wire gauge, topology, and the quality of your bus master/pull-up resistor. In practice it can be dozens of sensors across a long run through a building.
Do I need special hardware for a computer to see the bus?
Yes -- you need a bus master or USB 1-Wire adapter that polls devices by ROM ID and passes the readings on, for example to Home Assistant.
What cable should I use for the bus?
CAT5/CAT5e twisted-pair cable is a common practical choice -- one pair for data and ground, a second pair if you want a separate Vdd power line.
Ready to wire up your own bus?
Check out DS18B20 sensors and other 1-Wire parts in the shop -- and start with just one room.