3
\$\begingroup\$

I'm exploring the pitfalls of using an Ethernet cable for extending sensor cabling.

The term Ethernet cable is used ambiguously on purpose to denote an "easily available 8-wire cable whose category is defined by the constraints".

I'm looking to extend the following (or similar) sensors:

enter image description here

The signalling going through the wires can be analog or I2C, or some other type of digital signal. Ideally, I'm looking for a common solution that could extend the sensor 30m away from the gateway.

What I'm currently doing is patching the cable with tape and pairing two sensors on a single Ethernet cable:

enter image description here

Everything seems to be working for the distances tested so far (less than 5m) but this seems to be a very hacky, non-deterministic approach and I don't know at what point potential errors can be contributed to actual cabling issues.

Is there an industry standard or a 'more correct' way to do this?

\$\endgroup\$
  • 1
    \$\begingroup\$ what's the bandwidth and current demand of the sensor. until we know that, we can't answer. However, if bandwidth low and current demand low, probably max distance ~ infinity. You migth want to refer to the physical construction rather than the end use, so UTP (Unshielded Twisted Pair) rather than ethernet. The UTP may be significant, becuase if you have (say) strain guages, using one pair for excitation, and another pair for diff sense output would be much better than other connections. \$\endgroup\$ – Neil_UK Mar 9 '16 at 11:16
  • \$\begingroup\$ Couldn't you at least use a socket? (avoid ones with integrated magnetics) \$\endgroup\$ – pjc50 Mar 9 '16 at 11:24
8
\$\begingroup\$

How practical this is depends on how far you want to run the signals, their frequency, the environment, the voltage and current, and a host of other factors. But in general, it should work quite well. For only 30m, I doubt you'll need to do anything more complex than what you've already done.


Some things to consider to improve the performance (if you need to):

  1. Ethernet cables are made with twisted pairs. For best results, each signal should use one pair. Often, with signalling between ICs, each signal uses one trace/wire and they share a ground trace/pour/whatever. If you give each signal it's own ground wire, the current flowing in the two strands is the same and that reduces crosstalk. It also reduces noise due to currents flowing in the ground wire.
  2. Going one step further, you get the best from twisted pairs with balanced signals. An unbalanced signal is two wires with one at ground and the other at a varying potential. A balanced signal is two wires at a potentials symmetric about ground. You can convert signals from balanced to unbalanced and vice versa with a balancing transformer, also known as a balun. This is particularly valuable with small AC analog signals. Note that baluns only work with AC signals within their rated band - balancing DC is more awkward and rarely worth it.
  3. If you are using high frequencies, and need to worry about EMC, then using balanced signals will help, as will using shielded twisted pair (stp) cable.

If you do both 1 and 2 above, and use cat6 cable, there is no reason you can't push >100MHz digital signals down 100m of the stuff. That is after all exactly what it's designed for. And for lower frequencies, the distance would be essentially unlimited. For analog, it really depends on the characteristics of the signal.


Also, some non signal-related suggestions:

  1. If you're sending power along the same cable, make sure you have decoupling capacitors at the sensor end.
  2. Your tape and solder (presumably?) system is functional, but a bit messy and I doubt it'd be reliable long term. Terminating the ethernet cable with a connector with strain relief is probably a good idea.
  3. If you use voltages that would damage standard ethernet hardware, use a different connector so people can't plug it into a NIC by accident.

Edited in at Andrew Morton's suggestion. For the question asked, you are unlikely to need STP, but in the interests of completeness:

If you are using sheilded twisted pair (STP) cable, then the shields give several advantages: reduced crosstalk; less noise from the environment; controlled capacitances; less radiation and EMC concerns. To work properly, the shields need to be connected to something, and that something is almost always ground. Any ground gives big improvements over UTP, but for best results:

  1. Connect only one end of the shield. Heatshrink or tape the other end so it doesn't touch anything. Connecting both ends is will cause ground loops.
  2. Don't use the shield to carry return currents, even if it has a drain wire.
  3. If you're using baluns with a centre tap (such as the cheap and versatile autotransformer balun, but also 1:1+1 isolating baluns) then connect the shield to the centre tap, and arrange things so that is at ground.
  4. wherever you attach the shield, the usual concerns about PCB layout and noisy grounds apply. Don't have the path from the shield to ground pass close to e.g. a SMPS, or it won't stay at true ground.

Remember that there will be a relatively large capacitance between the wires and the shield. This replaces the uncertain capacitance between pairs you have in UTP. For particularly sensitive or high frequency circuits, you'll need to take this into account. On rare occasions, such as when transmitting a differential signal with a large common mode, you may want to connect the shield to something other than ground. The above points, especially 3. still apply.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Just a note .. the balun is for ac signals .. those sensors are possibly dc voltage output devices so that won't work and digital signals probably won't. However the balanced or differential signalling methods on a single pair are my preferred methods. \$\endgroup\$ – Spoon Mar 9 '16 at 12:43
  • \$\begingroup\$ Good point, I'll make an edit. \$\endgroup\$ – Jack B Mar 9 '16 at 13:08
  • 1
    \$\begingroup\$ The CAT6 UTP will have some rated capacitance-per-distance rating, say 15pF per foot. So 100ft would total 1500pf or 1.5nF. This capacitance "loads down" any signal transitions that happen, and can skew data results. On your existing set-up, add this 1.5nF from signal output to ground (or 0.75nF to each balanced lead to ground) and test it. If it works, then using 100ft of cable should work also. 100ft of cable will also introduce about 2Ω of resistance. \$\endgroup\$ – rdtsc Mar 9 '16 at 13:19
  • 1
    \$\begingroup\$ @AndrewMorton Grounding the shield is essential to get the benefits of STP, and any ground is better than nothing. For best results attach only one end to ground, to avoid ground loops. Never use the shield to return currents, even if there is a drain wire. If using baluns with centre taps use the centre tap as ground. The usual concerns about PCB layout and noisy grounds apply - don't have the path from the shield to ground pass close to e.g. a SMPS. Remember that there will be capacitance between wire and shield, in rare cases it may make sense to connect the shield to something else. \$\endgroup\$ – Jack B Mar 9 '16 at 20:38
  • 1
    \$\begingroup\$ And... done. I don't think it's particularly relevant to the OP, based on those photos, but it might be useful to others. \$\endgroup\$ – Jack B Mar 9 '16 at 21:07

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.