1

I'm attempting to connect 6 DS18B20 temperature sensors to an Arduino GPIO pin in a topology that looks something like this:

enter image description here

Conceptually, it's a star network with two star subnets.

The GPIO pin on the Arduino is connected to point "E" through a 4-inch wire, a JST connector, and another 4-inch wire.

The 3 wires (shown in green) connecting sensors "A", "B", and "C" to point "D" are approximately 3 feet long (and are, in fact, the original ~1-meter wires that came pre-attached to the sensors when I bought them). Segment ED is ~4 feet long.

The 3 wires (shown in blue) connecting sensors "G", "H", and "I" to point "F" are approximately 20-30 feet long (including the original 3-foot wires attached to the sensors when I bought them). Segment EF is ~8 feet long.

No parasitic power is involved. Every DS18b20 has 3 wires... +5v (probably closer to 4.5v by the time it gets to G/H/I), ground, and 1-wire data.

So... where would YOU recommend putting resistors (feel free to describe points besides the ones I labeled with letters), and what values would you use?

And... would it actually be any better to take advantage of the fourth (presently unused) wire in the cables I have connecting G, H, and I to F as a 'return wire' to turn it into a much longer daisy chain (E to F, F to G, G back to F, F to H, H back to F, F to I), or something even more radical (say, ED, DA, AD, DB, BD, DC, CD, DE, then continuing the daisy chain with EF as described previously)?

For what it's worth, I presently have a single 4.7k pullup resistor sitting at point "E", and it seems to work... but after reading Maxim's AppNote about "Building reliable long 1-wire networks" (Appnote 148), I'm feeling like it shouldn't work, and that I really ought to do something more sophisticated for the sake of long-term reliability.

Bitbang3r
  • 355
  • 1
  • 2
  • 9
  • 1
    `where would YOU recommend putting resistors?` ... that question seeks an opinion, which is off topic here ... perhaps ask `what is the optimal location for a resistor?` – jsotola Jun 28 '22 at 00:39
  • Can you add link to that application note you mentioned? *I would* place one pullup at the master but I'm not aware of what Maxim suggest... – Sim Son Jun 28 '22 at 06:55
  • I think 4.5v is sufficiency unless you experiencing of getting reading of `85000`. I once use 3.3v and started get some error reading `85000` if the supply line is noisy. – hcheung Jun 28 '22 at 14:35
  • Added link to AN148 – Bitbang3r Jun 28 '22 at 21:31

1 Answers1

1

I have a linear network with three thermos at roughly 5', 20', and 40-50' from the micro (a 5v '328p), as well as being parasitically powered. The physical bus is a twisted pair from a Cat-5 cable. The pullup is 4.7KOhm on the processor board.

I've tested this network using a 3.3v '328p and it wasn't as reliable, but reducing the pullup to 2.2K (IIRC) fixed it.

I find Maxim's App Note 148, "Guidelines for Reliable 1-Wire Networks" to be very helpful and is my go-to for 1-wire network questions.

JRobert
  • 14,769
  • 3
  • 20
  • 49