Electronic – Dealing with signal noise over 50 foot communication link

interferencemicrocontrollerprotocolsignal integrity

Situation: Connecting a motor controller to an MCU. Motor controller is about 50 feet away from MCU. Connected via a single conduit (buried), containing the following cables: (There is no other electrical equipment in the area, and this is outdoors between two weather-proof boxes.)

  • 24VAC power to motor controller (#14/2) (60Hz)
  • Cat5 cable (24AWG copper)

Signals being transmitted to MCU:

  • Motor direction signal. This line is pulled high or low depending on the direction of the motor. No fast changes: motor runs one direction for at least 10 seconds.

  • Motor position indicator. A TTL-level square wave (100Hz to about 1kHZ) outputting a number of pulses per revolution of the motor.

The problem:
Signals arriving at the MCU are very noisy – you can see the 60Hz line interference clearly – and you can see crosstalk on the two lines – the Direction signal is pulsing along with position indicator square wave.

Any suggestions how to clean up these signals to be usable?

I could possibly put a second MCU inside the motor controller box, but what protocol could I use to transmit across the existing Cat5 cable that would not be as susceptible to this type of interference? Would prefer I2C… suggestions? Hoping to avoid CAN bus as it adds too much complexity and extra hardware.

Any suggestions appreciated.

Best Answer

Start with the easy stuff - replace the cat5 UTP with cat 5, 6 or 7 STP - shielded twisted pair. Ground the shield at one end. If that solves it, you're done with little effort. If not, whatever you do next (such as using proper differential line drivers) will work better.

I'm also wondering if you are making ground loop with motor power and signal ground.

Edit: as we elucidated in comments, both signals were running on a single pair, which is about as bad as they could get for cross-coupling the signals.

While differential transmission is what Cat5 is designed to do, simply moving each signal onto separate twisted pairs, with the other half of the pair grounded should make things much better from a cross-coupling point of view, and in fact, did, per further comments. I'd say it still falls under the general heading of this answer, start with the easy stuff, (even easier if you don't the change cables, just how you use the wires) though I hadn't thought of cable-pair mis-use until after I wrote the first form of the answer, and asked the question in comments.