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.
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.
| Path | Typical fix |
|---|---|
| Shared ground impedance | Star ground; separate return for power and signal; short thick power returns |
| Supply ripple | Local decoupling, filter or separate converter for the sensor |
| Capacitive coupling | Separate cable routes, shielded cable with the shield terminated as the interface specifies |
| Inductive loop | Twist the pair, keep the loop area small |
| Radiated | Shielding, 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 sensor7. Implementation
- Draw the current paths including returns.
- Identify any conductor shared by a power load and a sensor.
- Separate returns and join them at one point.
- Route motor cables away from signal cables; cross at right angles if they must meet.
- Add filtering and use differential links where available.
- 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 LSBReading 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
- Compare the sensor signal with motors enabled but not moving, then moving.
- Scope the sensor supply and ground during motor switching.
- 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
- EKF-SLAM SLAM · Lesson