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.