Electronic – Using Ethernet cables cable for sensor wiring

cablesethernetsensor

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?

Best Answer

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.