Cables to interface arduino to DS18B20 & SHT15

Hi,
Not a question directly related to arduino, but I am trying to interface a DS18B20 temperature sensor and an SHT15 humidity sensor to an arduino.

I am a bit of a beginner when it come to actually understanding what cable is best suited.

I was hoping someone could let me know what would be the recomended cable and why? If I was to use cat5 cable could someone please explain the advantages of twisted pairs? Is this important? and if so in what configuration should the sensor be wired? (I am using the sensor in parasitic mode, only DQ and Gnd)

I have found some old cable in the shed (real thick stuff) which was used for some telecoms application which I may be able to use. I'm not sure what the recomended cable is to use, but I'd be grateful if someone could share any experiences they may have had when attempting something similar.

I need to run the cable about 40 feet in all about 15 of those will be outside. Are there any precautions to be taken to protect the cable from the elements when it is run outside.

Many thanks for any advise.

If i understand correctly, you want to connect both sensors to the Arduino so you can read their detected values. Correct? If so, cat5 may be fine as long as you solder pins to the ends so the cables are easy to plug into a breadboard. That's just a simple recommendation. Most of the Cat5 cable i've seen is not solid core and therefore needs to be twisted to connect to a solid core pin for easier connection to other devices.

Cat5 is wired as twisted in order to minimize signal attenuation. over distance, regular, straight-through, cable signals may be corrupted with background noise. twisting the cables pairs reduces this problem.

Depending on the conditions, you may want to use pvc or rubber sealed enclosures to proptect your cable. If you live in a place with high humidity, you want to make sure your cable exposures are well protected against rust.

Hope this helps.

Andres

Hi Andres,
Thanks for the reply.
Yes I want to connect both sensors to the arduino and read the values.
I going to test my sensors any way indoors with the heavier cable I meantioned in my oroiginal post. If I have problems I will follow your recomendations on the cat5 cable.

Am I correct in saying that there is a certain type of cat5 cable which is suitable for outdoor work?

Many thanks for your help.

Am I correct in saying that there is a certain type of cat5 cable which is suitable for outdoor work?

i think that regular cat5 is covered by a pvc type of material that protects it from the elements. However, this material will probably degrade over time. You also need to consider whether this cable will be out on the open. If so, it could even act as an antenna/lightining rod and fry your equipment if struck by lightning. I know it may sound a little strange, but it has been known to happen.

i would suggest using the cat 5 and using a pvc pipe to protect.

good luck!

andres

The datasheet for the SHT15 says this:

1.9 Wiring Considerations and Signal Integrity
Carrying the SCK and DATA signal parallel and in close
proximity (e.g. in wires) for more than 10cm may result in
cross talk and loss of communication. This may be
resolved by routing VDD and/or GND between the two
data signals and/or using shielded cables. Furthermore,
slowing down SCK frequency will possibly improve signal
integrity.

So if you're set on using cat5, try to use a shielded variety and it would probably be a good idea to test it with the length of cable your application requires before final install. How long the cable run needs to be will have a big impact on how successful you'll be.

If I was to use cat5 cable could someone please explain the advantages of twisted pairs?

See Here. Ethernet uses differential signalling, where each signal is carried on two wires, one serving as the return for the other. No actual ground reference is required this way. Since current will be flowing equally in opposite directions in the two wires at all times, the magnetic fields that surround each wire will likewise be opposed. Twisting those two wires together holds them in close mutual proximity throughout the cable so that those two opposite magnetic fields largely cancel one another out which reduces crosstalk with adjacent pairs. Differential signalling also has other properties which are worth knowing about, but that's the reason for twisted pairs.

Cat5 does indeed come in specific outdoor varieties. Some of them are filled with a gel that helps to keep out moisture and deter animals from chomping on it, and generally they stand up to abuse and UV exposure better than the indoor varieties. Outdoor varieties may also be rated for direct burial if that's relevant to your application.

Many thanks again for the replies.
This morning I got myself some cat5e cable which I believe is the shielded type.
I am currently testing both sensors indoors with a length of cable a few metres longer than what will be required when they are mounted outside.

Anyway my temperature sensor seems to work ok, but the humidity sensor is not responding.

I was hoping someone could give me a little advice on how I should wire the sensors to the cable.

I am planning on using the both sensors with one length of cat5 cable. Is there anything wrong with this approach?
Or is it better to use 2 distinct cables?

How should I actually connect the sensors? In the case of the humidity sensor, should I use one pair lets say for data and gnd, another pair for clk and gnd, and a 3rd pair for Vcc and Gnd?
Would this be the best way to do it? Have a Gnd on each pair?
In the case of the temperature sensor, I had planned to use the 4th remaining pair (and as I am using parasitic mode, i.e. Vcc not required) for data and Gnd.

I'm not really 100% certain but this is what I had planned. Please let me know if this approach is not good.
Also all signals are 5V TTL levels. Pairs are advantagous for differential signalling, would this be correct to say? But also are there advantages of using them with single ended signals?

I am a bit concerned about what is stated in the SHT15 humidity sensor data sheet. (Pasted by ajb in the last post). They are talking about cross talk with wire lengths of more than 10cm's, I will be using a cable of around 12 metres. Will the cat5 cable be able to help me out here and is the wiring configuration I mentioned above the best in order to combat any signal integrity issues? If not please let me know.

Once again many thanks for the help. I appreciate it.

There are breakout boards for RJ45 connectors that you can use on the Arduino end. Here, for example: http://www.sparkfun.com/commerce/product_info.php?products_id=716. Then you can get RJ45 connectors for the sensor end and solder wires to the connector.

RJ45 has 8 wires in it and, although they are paired, you do not have to use them in pairs. You can use each wire for whatever signal you need. I think you can get into trouble sending power long distance on Cat5, but I'm not an expert.

Ardni,
I too am interested in using the Sensirion modules with cable length > 10cm. I have emailled sensirion to ask about this, and will post their reply here.

Ardni, I've found some information.

This chap achieved "200+ foot stretch of Cat5 cable without any issues" WBA Consulting - Sensirion SHT11 Temperature/Humidity Sensor Module

His module includes:

  • 1uF bypass cap
    10k pullup on data line
    10k pull down on clock line
    330ohm inline protection resistors for clock and data lines

Sensirion's SHT1x Datasheet only recommends his R4 and C1 (but in 100nF). However this chap has extensive experience (and success!) with these units so I'd take note of his connection recommendations.

Keep us posted on your progress.

In addition to those ideas, Sensirion also provide some recommedations at http://www.sensirion.com/en/pdf/product_information/AN_ESD_Latch-up_and_EMC_E.pdf under the heading EMC Protection.

In there they state "Best results may be achieved when using a low pass filter on either side of the cable connection", as shown in their Figure 5 therein.

It would be nice if they specifed values for the resistors & capacitors in the low pass filters, but they don't. I'd say use the values from the pic in my previous post. ie. 330 ohms and 1 uF.

They also reiterate that "A capacitor of 100nF must be used between VDD and GND as close as possible to the sensor". (as shown in their Figure 5 again).

  • though as shown in the previous post, 1uF appears acceptable.