1-wire long distance network cabling

Hi,

I'm about to set up a 1-wire network using 18x DS18B20 for ground temperature monitoring.
There will be 6 points of measure at about 50 meters from the arduino and about 50m between each point (an "almost perfect" star configuration with 6 branches)
I've read the GUIDELINES FOR RELIABLE LONG LINE 1-WIRE NETWORKS.
I will use CAT5E cable and each points of measure will use 3 DS18B20 at the same place for accuracy/reliability due to the fact that these points of measure will not be accessible later (underground). Low cost of these DS18B20 isn't an issue...

I'd like to know what is the best cabling solution for theses DS18B20 and if there is a better way to do it.
Here is 2 schematic with 2 differents options.
The first seems to be more common, the 3 DS18B20 are in parallel at the end of the cable.
The second is similar but the VDD and GND are splitted for each DS18B20 in case of defective device.

Is one of there 2 schematics better than the other and is there a better option?
Don't forget the CAT5E cable will be about 50m and there will be 6 in star configuration.
Reliability is the main factor...

Regards,

MiGoO

I think that the Gnd of each used pair should be connected at both ends.

Depending on what you fear most, a break or short, the supply lines can be connected in parallel or separately. How will your circuit look like with a single accidentally shorted pair? With a single Gnd for DQ the Gnd lines should all be connected at both sides, the one-or-all option only applies to VDD. Dedicated VDD lines can be fuse protected individually.

A single pin going to 6 wires of 50 meters and at the end a few temperature sensors ? That makes the total length 300 meters.

I suggest to use 6 pins, each pin connected to a cable of 50 meters with the right pullup resistor.
You can use the first drawing, I think there will be no difference.
Sometimes a capacitor is added to 5V and GND near the sensor. It does not make a big difference for the DS18B20, because it has an internal circuit to deal with problems, however it does not hurt and it might help a little.
Using 5V for the 1-Wire bus gives a better signal-to-noise ratio than 3.3V.

You could pair the signal with the GND and put the 5V on other wires. I don't know what is best. Is that somewhere on that page ?
The DS18B20 has an internal circuit that makes the 5V pin a higher impedance. The 5V and GND are not the typical power wires and the data signal is more important than the 5V.

As far as I know, the 1-Wire bus does not lock up as the I2C bus can do.
You have deal with problems in your sketch. If the signal is very bad and you get a good temperature only once per 5 minutes, then you should work with that temperature.

DrDiettrich:
I think that the Gnd of each used pair should be connected at both ends.

Depending on what you fear most, a break or short, the supply lines can be connected in parallel or separately. How will your circuit look like with a single accidentally shorted pair? With a single Gnd for DQ the Gnd lines should all be connected at both sides, the one-or-all option only applies to VDD. Dedicated VDD lines can be fuse protected individually.

I'm not sure that connecting GND at both end is a good idea, I think this will increase problems by adding a ground loop...
I don't really fear a break or a short from some lines but i'm most affraid of a defective DS18B20 that could perturb the others and not having the possibility to disconnect it to let the 2 others work normally.

I've not used the 1 wire networking system but I have used I2C over longer distances than it's designed for and I work in telecoms and know about transmission lines, cat 5 cabling and things that cause failures in external networks; my comments are based on that knowledge.

Both designs are at risk from a single point of failure, I suggest 2 DS18B20 each independently wired, that is, one using (say) the blue and orange pair, the other using the green and brown pair and with the ability to swap them at the master end.

The main thing you need to protect against is physical damage to the cable and water ingress to the cable or the electronics. Either of those things will kill either of your designs. Your design must be able to function with at least 1 wire damaged or any 2 wires coming into contact with each other.

Use 2 physically separate cables, perhaps with 2 sensors on each, each on separate pairs.

Make sure you use cat 5 cable specified for external use, it has a much stronger outer sheath and is resistant to damage by ultraviolet light. In the UK 305m external cat 5 typically costs about £70.00 excluding VAT from a wholesaler. If it costs considerably less than that don't buy it.

Make sure you buy cat 5 made from copper, not copper coated aluminium, which is all to common. CCA costs half the price or less of copper, avoid it.

Be prepared to need the switched star topography both to minimise problems with reflections in the cables and to have an easy way to detect which branch of the star has failed in the event of problems.

If access to maintenance is going to be a problem then the more effort (and money) you put into dealing with possible failures the less those failures will bother you when they happen.

EDIT

I don't really fear a break or a short from some lines

Please, you really need to fear that! Component failure, while not impossible, is the least of your worries with an external system with long cables.

Koepel:
A single pin going to 6 wires of 50 meters and at the end a few temperature sensors ? That makes the total length 300 meters.

I suggest to use 6 pins, each pin connected to a cable of 50 meters with the right pullup resistor.
You can use the first drawing, I think there will be no difference.
Sometimes a capacitor is added to 5V and GND near the sensor. It does not make a big difference for the DS18B20, because it has an internal circuit to deal with problems, however it does not hurt and it might help a little.
Using 5V for the 1-Wire bus gives a better signal-to-noise ratio than 3.3V.

You could pair the signal with the GND and put the 5V on other wires. I don't know what is best. Is that somewhere on that page ?
The DS18B20 has an internal circuit that makes the 5V pin a higher impedance. The 5V and GND are not the typical power wires and the data signal is more important than the 5V.

As far as I know, the 1-Wire bus does not lock up as the I2C bus can do.
You have deal with problems in your sketch. If the signal is very bad and you get a good temperature only once per 5 minutes, then you should work with that temperature.

Yes, the idea of dedicating a pin for each cable is something i've ever thought, i think that's what i'll do.
5V power will be used, capacitor is a good idea, thanx.
Still not sure what is the best use of this 4 twisted pair...
The problem is that i could never chagne it later.

PerryBebbington:
Both designs are at risk from a single point of failure, I suggest 2 DS18B20 each independently wired, that is, one using (say) the blue and orange pair, the other using the green and brown pair and with the ability to swap them at the master end.

Yes, it was the other solution I've considered, I'm going to reconsider this.

The advantage of a twisted pair is the same current flowing in both wires, so that no EM field is created or received. This requires both wires terminated at both ends. Ground loops can not exist when all Gnd lines are connected together at both ends, current distribution differs only between the pairs.

DrDiettrich:
The advantage of a twisted pair is the same current flowing in both wires, so that no EM field is created or received. This requires both wires terminated at both ends. Ground loops can not exist when all Gnd lines are connected together at both ends, current distribution differs only between the pairs.

This is incorrect. In audio applications the ground is ONLY at one end of a twisted-pair cable. Otherwise you can get a ground loop that generates hum.

OP- I really doubt this will work.The limiting factor in all one-wire networks is cable capacitance, and CAT5 cable is not known for low capacitance. It acts as a passive low-pass filter. An LPF is designed to reduce high frequencies, which describes the data on a one-wire network.

On top of that, with that much cable, have you considered the voltage drop over 50 meters?

I would put a Wemos D1 Mini at each location and send the data over MQTT. This way all you need to do is run power cables. In my opinion, much more reliable than 50+ meters of data.

SteveMann:
This is incorrect. In audio applications the ground is ONLY at one end of a twisted-pair cable. Otherwise you can get a ground loop that generates hum.

I think that you confuse signal ground and protective ground. Protective grounds have to be kept separate while signal ground connections are required for proper operation.

SteveMann:
OP- I really doubt this will work.The limiting factor in all one-wire networks is cable capacitance, and CAT5 cable is not known for low capacitance. It acts as a passive low-pass filter. An LPF is designed to reduce high frequencies, which describes the data on a one-wire network.

Steve,
I don't know if this will work or not, but I do know that I have I2C working over much longer distances than it was ever designed for! My recommendation for the OP is to try it on the bench first, preferably with 10% to 20% (or more) longer cable than will be used when it is deployed.

As the OP said, reliability is the main criteria, and 50M is a LONG data cable.

It has been a while since I have played with 1 wire, but if I remember correctly, you can govern how fast you pulse the wire. Speed is limited by the wire capacitance. If you slow it down, capacitance isn't an issue.

OP hasn't stated how fast he will be talking over the wire. There are many factors that will make or break this application.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.