What type of cable for 15m run with x8 DS18B20?

Hi

I’ve successfully hooked up eight DS18B20 to Cayenne using a breadboard (very painless!) and am now ready to install this on a 15 metre cable.

However, what kind of cable should I get? Use ethernet cable (solid core or stranded; twisted pair?) or get a 3-core cable? If so, what do I buy (13A mains cable seems over the top).

Any advice would be gratefully received!

Cheers, Christian

I’d use standard ethernet cable, and run extra ground and power for the other pairs. 15M isn’t terribly long, but you might as well build into your design some pullups and inline resistors to get a better impedance match to the cable (~100 ohm impedance).

I suggest a 120 ohm resistor in series with the sensors and a 1k pullup to your DC rail. This gives you an impedance equivalent of about 107 ohms. Close enough. Adding the inline resistor helps with the match, but makes you more impervious to noise, that’s why having the extra ground and power rails in your cable will help. If the cable doesn’t need to be too flexible, you could go with shielded 10 base T.

Here’s a good article on improving reception for longer 1-wire runs. Guidelines for Reliable Long Line 1-Wire | Maxim Integrated

Craig

2 Likes

Thanks for your comprehensive reply, Craig. I’m afraid my electronics knowledge is pretty basic, so I hope you don’t mind me asking a couple of follow-up questions.

Looking at the Maxim Integrated document, the wiring topology would be somewhere between the linear and stubbed, i.e. some stubs shorter than 3m and some just over. Should I go for solid core or stranded cable, or does it not matter?

Do I double up any of the individual cable strands, or leave all but the three unused?

I suggest a 120 ohm resistor in series with the sensors and a 1k pullup to your DC rail.

I’m currently using one 4k7 resistor for the eight sensors. Are you suggesting one 1k resistor for each sensor (wired to pin 2 and 3 of the resistor), instead of the one 4k7?

And the 120 ohm resistor, do I use one for each sensor or just one for the whole setup? Which pin/s do I wire this to?

Apologies for asking what I would guess is basic stuff. It’s a steep learning curve and I really appreciate any input you may be able to provide :slight_smile:

Cheers, Christian

I’d use one pair for your 1-wire setup running with the other conductor connected to ground on the sender side only.

Run another pair both 5V, and another pair both GND.

Stranded is always better for power, due to skin effect, but these sensors don’t need a lot of power, so go with cheap cat-5 or cat-6. Now for a newb, stranded might be better wrt soldering if you don’t plan on having RG-45 terminators.

You want a 120 ohm for each sensor. It is a transmission line, any deviation off the main trunk is a stub and thus you are trying to reduce the impedance mismatch at the stub with that resistor.

At each stub, I would also put a pull up to 5V on your 1 wire. Power is there, you might as well. If you have a bunch, make it 10K each or 47K each. The object is to keep the signal from getting into the unknown region.

If you do find some shielded ethernet cable, again, just connect the shield on one side. Attaching both sides makes what is called a ground loop and if there is any voltage difference between the grounds, you can make the noise problem worst, not better.

Also, don’t worry about it, dealing with electical and RF noise is more of an art than a science. Takes many years to get the hang of it, and even if you are well versed in the science, and many years of experience, it is still fun to hear the greenhorns exclaim, “But it should just work!!!”.

Craig

1 Like

Fantastic, thank you very much Craig. I’ll get wiring!

Cheers, Christian

Thanks for all your help here @kreggly :slight_smile:

Keep us updated with your project @Christian, I’m going to move this topic to the Helped category now.

Cheers all,

-B

@Christian, how goes it?

Craig

Thanks for the follow-up, Craig! Not much to report at this stage, other than the fact I have bought all the ‘bits’ required. All I need now is a few spare hours to pull it all together!

The plan is to have it all up and running by the end of the month and I’ll report back as soon as I can.

Cheers, Christian

Groovy :wink: