FixTheRobot Explore Robotics / Systems Engineering / Engineering Guides / Module 03

Engineering Guides · Module 03

Grounding, cabling and electrical noise

Noise reaches a sensor through a shared wire, a shared ground or the air. Find the path, then break it.

  • Intermediate
  • Module 03: Actuators, Motors, Electrical & Power Integration
  • Written for ROS 2 Jazzy where ROS 2 is used
  • Sources checked 2026-11-05

Assumptions: Numbers in the examples are illustrative and the code is executed by the site’s tests. Type and characteristic summaries are general engineering knowledge; always confirm values on the datasheet of the part you use.

1. Engineering problem

Motors switch amps in a few microseconds. If those currents share any conductor with a sensor, the sensor measures them. The usual symptoms are IMU spikes, encoder miscounts and noisy analogue readings that appear only when the motors run.

2. When is this needed?

  • A sensor reading is noisy only when motors or radios are active.
  • When designing the harness and ground layout.
  • Before adding a sensitive analogue sensor.

3. Selection and design decisions

Coupling paths: conducted (shared impedance in a ground or supply wire), capacitive (fast voltage edges), inductive (current loops) and radiated.

Overview
PathTypical fix
Shared ground impedanceStar ground; separate return for power and signal; short thick power returns
Supply rippleLocal decoupling, filter or separate converter for the sensor
Capacitive couplingSeparate cable routes, shielded cable with the shield terminated as the interface specifies
Inductive loopTwist the pair, keep the loop area small
RadiatedShielding, ferrites, distance from the source

4. Advantages and disadvantages

  • Single-point ground avoids loops at low frequency and is hard at high frequency, where a low-impedance plane helps.
  • Shield termination (one end or both) depends on frequency and the interface: follow the sensor manufacturer.
  • Differential signalling (CAN, RS-485, differential encoders) rejects common-mode noise better than single-ended.

5. Requirements and constraints

  • Do not run motor phase cables beside sensor cables.
  • Keep high-current returns off the sensor ground path.
  • Use the interface’s recommended cable type and termination.

6. Architecture

battery ─┬▶ motor driver ─▶ motor        (high di/dt)
         └▶ DC-DC ─▶ sensor              (sensitive)
join the returns at one point at the battery, not at the sensor

7. Implementation

  1. Draw the current paths including returns.
  2. Identify any conductor shared by a power load and a sensor.
  3. Separate returns and join them at one point.
  4. Route motor cables away from signal cables; cross at right angles if they must meet.
  5. Add filtering and use differential links where available.
  6. Measure with and without the motors running.
i, r = 10.0, 0.005
v = i * r
print(f"common-impedance voltage: {v * 1000:.0f} mV")
print(f"as a fraction of a 3.3 V ADC range with 12 bits: {v / 3.3 * 4096:.0f} LSB")

Printed (checked by the site’s tests):

common-impedance voltage: 50 mV
as a fraction of a 3.3 V ADC range with 12 bits: 62 LSB

Reading it: 10 A flowing through only 5 mΩ of shared return makes a 50 mV offset, which is 62 counts on a 12-bit, 3.3 V ADC. The sensor sees this as signal. Values are illustrative.

8. Real examples

  • IMU spikes at motor start: the IMU power came from the same converter as the motor driver; moving it to its own converter removed them.

9. Failure scenarios

  • Sensor ground tied to the chassis at the far end of the robot, in series with the motor return.
  • Shield connected at both ends producing a ground loop through the chassis.
  • Unshielded long cable beside motor phases.

10. Troubleshooting

  1. Compare the sensor signal with motors enabled but not moving, then moving.
  2. Scope the sensor supply and ground during motor switching.
  3. Disconnect shared grounds one at a time to find the path.

11. Validation

  • The example prints the values above (executed by the site tests).
  • Sensor noise with the motors running is within its datasheet noise figure.
  • The measurement is repeated after the harness is closed up.

12. Engineering checklist

13. Further references

  • Sensor, driver and bus (CAN, RS-485) interface documents for the recommended cabling and termination.

Related on FixTheRobot