การออกแบบ PCB และชุดสายไฟ

Schematics, layout, harness routing and noise reduction

Last updated:

Why it matters

Power and signals on a drone travel along two kinds of path. The first is the printed circuit board (PCB): an insulating board with copper strips that connect components, as in a power distribution board, a flight controller or an ESC. The second is the wiring harness: every wire on the airframe, bundled, routed and terminated as one organised system.

Mistakes in either rarely show on the bench. They show in flight, when motor current is high and the airframe vibrates. Typical symptoms are a compass heading that drifts with throttle, jumpy sensor readings, a flight controller reset, or a connector that shakes loose. This page covers general principles from the schematic to the routing on the airframe. Wire sizing by voltage drop, connector ratings and rail current budgets are treated in the lessons linked at the end.

From schematic to board

PCB design has two stages. The schematic records which pin connects to which, with no regard for physical position. The layout fixes where each part sits and how each trace (a copper strip that does the job of a wire) is routed. Each part has a footprint, the pattern of solder pads that must match its real package.

Tools such as KiCad provide two checks. The electrical rules check (ERC) inspects the schematic, for example a power pin with no source or two outputs driving each other. The design rules check (DRC) inspects the board against rules you set, such as minimum trace width and clearance. A clean DRC proves nothing if the rules were not derived from the real currents and voltages.

  • Layer count. Two-layer boards are cheap and fine for simple add-on boards. Four layers let you dedicate one layer to a ground plane, a solid copper sheet tied to ground, which gives return currents a short path and cuts interference substantially.
  • Copper weight. Thickness is quoted in ounces per square foot. 1 oz copper is about 35 µm (1.378 mil) thick; 2 oz is twice that.
  • Decoupling capacitors. Placed right at every IC power pin, they act as a small, fast local energy store, so the rail does not sag when the IC draws current in pulses. Horowitz and Hill stress that placement matters as much as value: a capacitor far from the pin does much less good.

Trace width and current

A trace has resistance and heats up with current. The IPC-2221 approximation used by most PCB-maker calculators is I = k × ΔT0.44 × A0.725, where I is current (A), ΔT the allowed temperature rise (°C), A the cross-section (square mils), and k = 0.048 for outer layers and 0.024 for inner layers. Inner traces must be wider because they are buried in the laminate and shed heat poorly. IPC-2152 is the dedicated standard for trace current capacity, built on more detailed test data, and should be used to check real designs.

Example 1: a 3 A trace on an add-on board

An add-on board must carry 3 A to a 5 V load with a 10 °C rise. Rearranging the formula gives A = (I / (k × ΔT0.44))1/0.725; dividing by the copper thickness gives the width.

Trace locationCopperCross-sectionWidth
Outer layer (k = 0.048)1 oz74 mil²54 mil ≈ 1.37 mm
Outer layer (k = 0.048)2 oz74 mil²27 mil ≈ 0.68 mm
Inner layer (k = 0.024)1 oz193 mil²140 mil ≈ 3.56 mm

The same current on an inner layer needs a trace about 2.6 times wider. If board space is tight, route high-current traces on the outer layers or order 2 oz copper, then enter the result as the power-net width rule in DRC.

Ground and the return path

Current always flows in a loop. Whatever leaves on the positive conductor must come back somewhere, and that route is the return path. Beginners often draw only the outgoing traces and let ground "sort itself out". The return current then takes a detour, the loop grows, and the loop becomes both an emitter and a receiver of noise.

  • Keep the ground plane continuous. For fast signals, the return current flows in the plane directly beneath the trace. A slot cut under the trace forces the return current around it and enlarges the loop.
  • Keep high current out of sensor reference ground. Motor current flowing through the same copper that an analogue sensor uses as its reference shifts the reading with throttle. The cure is a star ground: the high-current group and the small-signal group meet at a single point.
  • Place by function. Keep the power section (MOSFETs, switching regulators) on one side and signals and sensors on the other. Switching loops with fast-changing current must be as short and tight as possible.

The harness on the airframe

A good harness works, can be repaired, and survives vibration. Widely used practice:

  1. Document it. Every wire has an ID in a wire list with both endpoints, gauge, length, colour, signal type and voltage level, and the ID is labelled on the wire itself.
  2. Separate power and signal. Route them along different paths and cross at right angles where they must cross. UART, I2C and compass leads should not run alongside motor phase wires.
  3. Twist go and return conductors. Twisting positive with negative, or a signal with its ground, shrinks the loop area. That reduces both emitted field and picked-up noise.
  4. Take strain at a clamp, not at the solder joint. Use cable ties, heat-shrink and tie points near connectors. A solder joint that carries repeated vibration fatigues and cracks.
  5. Leave a service length. Enough slack to unplug a connector without pulling, but never enough to reach a propeller.
  6. Prevent mis-mating. Use keyed connectors, and do not use the same connector type for different voltages where they could be swapped.

Magnetic field from high-current wires

A straight wire carrying current I produces a field at distance r of B = μ0I / (2πr), where μ0 ≈ 1.2566 × 10-6 T·m/A is the vacuum permeability. The main geomagnetic field the compass must measure is typically only 20–60 µT, according to the World Magnetic Model (WMM2025) documentation. A battery lead near the compass therefore disturbs it easily.

If the positive and negative leads lie close together at spacing d, their opposite currents largely cancel. Far from the pair (r much larger than d) the residual field is approximately B ≈ μ0Id / (2πr2), which falls with the square of distance.

Example 2: move the compass, or pair the wires?

An assumed drone draws a peak 50 A. The compass sits 10 cm from the battery lead.

RoutingAt 10 cmAt 15 cm
Positive lead alone, negative routed elsewhere100 µT67 µT
Positive and negative together, 5 mm apart5.0 µT2.2 µT

A separated lead produces 100 µT, more than the whole geomagnetic field. Moving the compass 5 cm further only brings it to 67 µT, while pairing the leads cuts it about twentyfold. Routing beats relocation, and you should do both. After assembly, measure the real effect with ArduPilot's CompassMot procedure.

Common pitfalls

  • Trusting default DRC rules instead of setting power-net widths from the real current.
  • Slotting the ground plane under signal traces, or leaving ground to connect itself with no planned return path.
  • Placing decoupling capacitors far from the pins, or sharing one capacitor among several ICs.
  • Running signal leads alongside motor phase wires, or routing battery positive and negative apart.
  • Letting solder joints carry strain, so wires break at the connector after a number of flights.
  • No wire list or labels, so the next technician must guess at every repair.

Continue in the lessons

Key references

  1. Horowitz, P., & Hill, W. (2015). The art of electronics (3rd ed.). Cambridge University Press.
  2. IPC. (2009). Standard for determining current carrying capacity in printed board design (IPC-2152). link
  3. KiCad Developers. KiCad EDA (version 10). link
  4. NOAA National Centers for Environmental Information. (2024). The World Magnetic Model (WMM2025). link
  5. National Institute of Standards and Technology. CODATA value: vacuum magnetic permeability (CODATA 2022). link
  6. ArduPilot Dev Team. Advanced compass setup (CompassMot). ArduPilot Copter documentation. link

Used in courses

How to cite this page

Drone Institute, Rangsit University. (2026). การออกแบบ PCB และชุดสายไฟ. In UAS Technology Knowledge Hub (B.Tech.). https://rsu-uat.pk-research.work/en/kb/new/pcb-harness/