I am working on a product that has a controller connected to a device via an 8 conductor cable (an ethernet cable). The cable length varies depending on where the device is installed but the length varies from 15 to 30 feet. The device being controlled consists of a stepper motor, a digital temperature sensor and a limit switch. The controller outputs pulses to the four stepper motor wires to move the motor. The temperature sensor outputs a 0 to 5V square-ish wave that has a variable duty cycle proportional to the current temperature. The temperature sensor signal has a nominal frequency of about 50Hz. The controller monitors this signal to compute the current temperature at the device. The stepper motor driver is a constant current driver which means it pulses the motor on and off very quickly to keep the current through the coil at a set amount. This pulsing can occur upwards of 100kHz and the voltage switches from 0 to 12 Volts.

There are several problems occurring. Fist of all, the signal from output of the temperature sensor is being induced on the 5VDC supply voltage for the temperature sensor. This makes the supply voltage very inconsistent and noisy. I have tried putting a 10uF capacitor, and smaller ones, between this signal and ground inside the controlled device and that helps a bit but I can still see ripple. Is there a better way to get rid of this ripple that is at about 50Hz?

The next problem occurs when the stepper controller is pulsing the motor to provide holding torque. The controller pulses the motor at around 100KHz and this also causes noise on the temperature probe signal, the 5VDC signal, and the ground when measured at the controlled device.

The controlled device does have a small circuit board inside it so I do have some room to play with filtering techniques there. Do you have any suggestions? I would think that sending stepper motor controls and other digital data down the same cable is a rather common thing to do so there must be an intelligent way to get rid of the noise.

NOTE: I don't think changing the cable type is an option because of backward compatibility issues.

  • \$\begingroup\$ Generally, you want to prevent noise getting in in the first place, rather than trying to remove it afterwards. \$\endgroup\$
    – endolith
    Jul 21 '11 at 1:07
  • \$\begingroup\$ Yes. That's consistent with my (subsequent) suggestions re using balanced pairs, limiting slew rate, using a voltage regulator, having the limit switch line grounded by default. \$\endgroup\$
    – Russell McMahon
    Jul 21 '11 at 2:22
  • \$\begingroup\$ RE: "I have tried putting a 10uF capacitor, and smaller ones, between this signal and ground" If the induced signal on the power line is caused by current draw when the temp sensor drives its output, this is likely to make things worse rather than better. Adding additional capacitance to the power line would probably be more helpful. The other comments about the architectural problems with this setup are still valid though. You may need to do more than move a capacitor to really solve your problem. \$\endgroup\$
    – The Photon
    Nov 18 '11 at 16:56

Trying to send these kinds of signals 30 feet all together on the same cable is nuts. A much better overall architecture is to send power and simple digital serial signals over the cable. Handle the details of the stepper control and sensor readings at the far end of the cable, and receive commands and send results digitally. With the CAT5 cable you described, you can use one pair for transmit, one pair for receive, and the remaining two pairs for power.

Russell has described some things you can do to try and make this mess limp along. Maybe if you're careful those are good enough. However, the real problem is in the higher level architecture, which is where any real fix will have to be made.


The main problem is, alas, that the system need to be designed to work, based on fundamental principles, and it hasn't been.

A few key points

  • Balanced pairs for stepper.

  • Voltage regulator at temperature sensor.

  • Filter temperature sensor lead at master controller.

  • Consider small inductors as well as Caps BUT should not be needed.

  • Consider limiting stepper signals' slew rate.

  • 50 Hz is probably mains pickup.

While it may be possible to greatly improve what you are getting you have such a mix of high energy signals, and such an uncertain mix of problems that recommending a solution of the sort you ant is difficult.

A near certain solution is to put a slave microcontroller at the remote end, feed it power and balanced signalling (eg RS485) and remove the cable from the equation. You may not (yet) be ready to accept such an extreme change and it really shouldn't be needed - see below.

With the existing system, be CERTAIN that you are using balanced pairs within the cable as much as possible. Run the stepper on two balanced pairs, one stepper coil on one pair (probably). It would be useful to run the temperature sensor on a balanced pair but probably not feasible - see below.

Filtering using small inductors as well as capacitors would help but may not be needed.

The stepper motor signal slew rate can be limited if it is not already to minimise noise transfer.

The temperature sensor output need not be a high energy signal. If it is getting in to its own power supply you are doing something very wrong.

Your wire usage description does not allow what is there to be known with certainty


4 Stepper 1 5V supply 1 Limit switch 1 Temperature sensor 1 ground


If so you can run the stepper on balanced pairs but not the sensor directly. Temperature sensor output and ground on a common pair may be best.

What does limit switch do? Ground/open. 5V/open? 5V/ground? The latter is best and ground should be the normal state as it provides an extra shielding wire.

Supplying more than 5VDC and using a voltage regulator at the sensor would be an extremely good idea. 5V regulator can be VERY small and any needed caps can also be very small.

50 Hz ripple suggests mains pickup which is probably independent of the sensor inducing signals in its own power supply. I assume that the ripple you see is in the sensor output as well as its supply, as stated , yes? (Or else why would you care).

If the sensor output is signaled by its mark-space ratio, why is its level purity important. Averaged over some cycles the ripple would be irrelevant. Use of a regulator at the sensor would make its supply pure. Stepper induction into the sensor signal lead could be filtered at the master controller end and temperature sensing can be done within 1/50th of a second when the motor is not being stepped.

Where are you? What will you pay me to fix it for you ? :-).

  • \$\begingroup\$ Good thoughts. I'm in Michigan. You? \$\endgroup\$ Jul 21 '11 at 12:27
  • \$\begingroup\$ New Zealand :-). Not a problem (generally). For interest - is this a one off / fw off/ many off job? What sort of volume? \$\endgroup\$
    – Russell McMahon
    Jul 21 '11 at 23:44

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.