In a 5m long room, I want to measure the temperature for every 1m, and I will do so with the DS18B20 probe that communicates via OneWire, using an Arduino Uno.

At first I was worried that it could not communicate over such distances. Some people, in forums, recommended no longer than 2m. However there is a commonly sold waterproof version of DS18B20, that comes with a cable in sizes between 1 and 10meters. So I expect, that it does actually work with 5m.

So I need to have five pieces of 1m cable, with three wires (GND, VCC, data), and five probes. Every (intermediate) probe is connected to two others, with one 3-wire cable to the previous and one 3-wire cable to the next.

So how do I do this. What should the gauges be? What happens if I pick too high or too low? Should the gauge be the same for all three?

Should the three cables lie in parallel, or should they twist in some way, like I've seen in some cables?

Does it matter how I connect them at the probes? Can I just solder them to the pins? Perhaps I can get some kind of cheap and elegant connector for making a daisy chain? Will this affect the effective range?

I'm a hobbyist, so don't assume too much from me. It's great if you have a complete/elaborate perfect answer, but if it's too complex for my kind to understand, perhaps you can give some kind of "easy" answer along with the complete one :)

  • 1
    \$\begingroup\$ SE usually has a one question per question format, you are asking a lot of different things. Sit down and think a moment about how you can condense this into less questions. \$\endgroup\$ – PlasmaHH Feb 18 '16 at 14:19
  • \$\begingroup\$ The essence is: Is it possible to put five slaves on a rather long cable. The other more specific questions are about how to "build it", so that the 1-Wire communication is most likely to run well, and thus work with many slaves on this rather long cable. \$\endgroup\$ – Mads Skjern Feb 18 '16 at 14:47
  • \$\begingroup\$ Why not just try it? 5m doesn't sound that long, especially with low-speed applications like 1wire. \$\endgroup\$ – JavaForStarters Feb 18 '16 at 15:23
  • \$\begingroup\$ I think the biggest question here is about protocol. Simply put, if your furthest (5m) probe can communicate directly with your MCU (arduino), then the whole shebang can work... as long as your master (arduino) and slaves (probes) are communicating on a data protocol that has enough collision avoidance, detection and recovery to handle the 1-wire traffic. \$\endgroup\$ – Robherc KV5ROB Feb 18 '16 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.