ECU wiring and installation guide: power, grounds, sensors and first start

Good ECU wiring comes down to four things: a fused, switched power feed that holds voltage under cranking; power grounds and sensor grounds kept separate, with sensor ground never joined to chassis; shielded cable for crank, cam and knock signals with the drain wire connected at the ECU end only; and heat-rated wire routed away from coils, injectors and exhaust. Check every sensor and output at key-on, confirm base timing with a timing light, then start on a conservative map.116175

Key takeaways

  • Plan the pin map, loads and routing on paper before cutting a wire. Label both ends.
  • Feed the ECU from a fused, switched +12 V; fuse each feed for the wire it protects, not the load you hope to run.
  • Power grounds go to one solid engine ground point. Sensor ground returns only to the ECU's sensor-ground pin and is never joined to engine or chassis ground.
  • Crank, cam and knock signals run in shielded cable. Connect the drain to sensor ground at the ECU end only; leave it unconnected at the sensor.
  • In the engine bay use 125 °C cross-linked thin-wall wire (SAE J1128 TXL or ISO 6722 class C); keep 105 °C PVC to the cabin.
  • Before first crank: key-on sensor check, output test, fuel-pressure check, then timing-light confirmation of base timing on a conservative map.

Plan before you cut: pin map, loads and routing

ECU wiring starts on paper.

List every sensor and actuator, assign each to an ECU pin whose type suits it, and note which loads need a relay or a PDM channel rather than an ECU output.315

Then plan routing

Where the ECU mounts (cabin is kinder to electronics), where the loom passes the firewall, and how far each branch must reach. Keep sensor runs away from ignition coils, injector leads and high-current cables.Medium116

Label every wire at both ends with its pin and function. A harness that can be traced in five minutes is a harness that can be fixed at the track.Medium1

Power feeds and fusing

The ECU needs a switched +12 V feed through its own fuse, ideally from a relay or PDM channel driven by the ignition switch.

Example: ECU logic feed (universal flying-lead harness design)Switched +12 V through a 15 A fuseSourced1
Example: wideband heater feed (same design)Switched +12 V through a 7.5 A fuseSourced1
Supply transients to design forCranking dip, load dump, reverse batterySourced713

Injector and coil supplies usually come from a separate fused, switched feed, because they carry far more current than the ECU logic.115

A fuse protects the wire, so pick it for the wire's rating at its temperature and bundling, then check the load fits under it with margin. Fuse makers publish derating for continuous current and heat.1419

Vehicle supplies see cranking dips, load-dump spikes when a battery connection breaks with the alternator charging, and reverse-polarity mistakes. A good ECU is built for these, but a loose battery terminal still causes load dumps; tighten and protect it.72013

Grounding: power ground vs sensor ground

Engine grounding problems cause more strange ECU faults than any table.

Power ground (PGND)
  • To one engine ground point
  • Carries output currents
Sourced1
Sensor ground (SGND)
  • Only to the ECU SGND pin
  • Never to engine or chassis
Sourced1
Sensor-return splice location (example design)Within 150 mm of the ECU connector6 inSourced1

Run the ECU's power-ground wires to one solid engine ground point, and make sure the engine, chassis and battery negative are bonded with heavy straps.Medium1815

Sensor ground is different. It is the quiet reference for analog sensors and returns only to the ECU's sensor-ground pin. Joining it to the engine or chassis lets injector and coil currents flow through it, shifting every sensor reading.171

Splice sensor returns close to the ECU, not out at the engine, so every sensor sees the same reference. A star layout, where each return comes back to one point, keeps one sensor's current out of another's reading.Medium117

Two ground systems

Illustration in production.

Crank, cam and knock wiring: shield with the drain at the ECU end only

Crank, cam and knock sensors produce small or fast signals that ignition noise can corrupt.

Cable (example universal harness)
  • 3-core 20 AWG for crank/camsignal, SGND, +5 V
  • 2-core for knock
  • 100% foil + 22 AWG drain
Sourced1
Drain connection
  • Sensor ground at the ECU end only
  • Not connected at the sensor
Sourced12
VR sensor wiring
  • Polarity matters
  • Reversed leads move the trigger edge
Sourced2111

Run each in shielded cable: foil around the signal cores with a bare drain wire touching the foil along its length.161

Connect the drain to sensor ground at the ECU end only, and leave it unconnected at the sensor. Grounding both ends creates a ground loop, so engine-block currents flow in the shield and couple into the signal it is meant to protect.1217

Variable reluctance (VR) sensors are polarity-sensitive: swapped wires shift the detected tooth edge and the timing. Hall sensors need power, ground and often a pull-up on the signal; check the ECU input is set to match.21112

Wire, terminals and routing

Engine bays are hot.

Engine-bay wire125 °C cross-linked thin wallSAE J1128 TXL / ISO 6722 class CSourced61
Cabin-only wire105 °C PVC acceptableSourced1
CAN wiringTwisted pair, 120 Ω terminated at each end of the busSourced121

Use thin-wall cross-linked wire rated to 125 °C (257 °F): SAE J1128 TXL, JASO AVSSX or ISO 6722 class C. Ordinary 105 °C PVC is fine in the cabin section.61

Size each conductor for its current and run length. In one universal harness design, injector, half-bridge, power and ground leads are 18 AWG (0.8 mm²) and signal leads 20 AWG (0.5 mm²); drive-by-wire motor leads are twisted together.127

Use the connector maker's terminals, seals and crimp tool, and pull-test each crimp. Keep wiring clear of exhaust heat and moving parts, grommet every panel pass, and leave a service loop at the ECU.Medium81

Sensors: wiring and checks

Three-wire sensors (MAP, TPS, pedal, pressure) share the ECU's +5 V reference and sensor ground.

Two-wire thermistors (coolant, intake air) connect between an ECU input with a pull-up and sensor ground.231

Drive-by-wire pedal and throttle sensors must wire to the ECU's own analog inputs, never through CAN or another module. The ECU cross-checks the paired sensors and cuts the throttle motor if they disagree.324

Mount the wideband after any turbo, in the exhaust stream, with its wire pointing upward where possible and no leaks upstream. Bosch rates the LSU 4.9 connector for under 140 °C (284 °F), so keep it away from the pipe.9

Injectors, coils, relays and the fuel pump

Injectors take switched +12 V on one side and the ECU's low-side driver on the other.

Match the ECU's drive mode to the injector: saturated drive for high-impedance injectors, peak-and-hold for low-impedance ones.125

Smart coils and igniters take a logic-level trigger from the ECU. Do not add pull-up resistors to push-pull ignition outputs, and never drive a bare coil primary from a logic output.110

Relay coils go on low-side outputs rated for them, with a flyback path. The fuel pump must have prime, timeout and stall cut configured so it stops when the engine stops.263

Before first crank: the key-on checklist

1.

Continuity-check every wire against the pin map, and check for shorts to ground and +12 V. 2. With injectors and coils unplugged, power up and confirm the ECU communicates and reads battery voltage.Medium51

3. Check sensors read plausibly: coolant and intake temperature near ambient, MAP near barometric pressure, TPS and pedal sweep smoothly 0-100%. 4.

Run an output test on each injector, coil, fan and pump, and confirm the right cylinder responds.5

5. Prime the fuel system and check rail pressure and every fitting for leaks. Safety: port-injection fuel at 43.5 psi (3 bar) or more beside a hot exhaust is a fire risk; keep an extinguisher within reach.Medium515

First start: timing light, conservative map, what to watch

Start from a conservative calibration

Rich lambda targets, retarded spark, low rev limit and a high idle. Confirm crank sync and rpm during cranking before the engine fires.5

Once it runs, lock the spark angle and check base timing with a timing light. If the light disagrees with the ECU, correct the trigger offset before anything else; every spark event depends on it.5

Watch oil pressure, coolant temperature, lambda and battery voltage during warm-up, and check for fuel, coolant and exhaust leaks. Only then move on to idle and fuel tuning.Medium515

Common install faults: symptom, cause, fix

Most first-start problems trace back to grounds, trigger wiring or sensor configuration.

Sensor readings jump when fans or injectors switch
  • Sensor ground joined to engine or chassis
  • Fix: return SGND only to the ECU
Sourced · medium171
Lost sync or misfire at higher rpm
  • Unshielded or both-ends-grounded crank/cam cable, or reversed VR polarity
  • Fix: shield, drain at ECU end only, check polarity
Sourced · medium121
False knock readings
  • Knock cable unshielded or routed beside coil leads
  • Fix: shielded cable away from ignition
Sourced · medium122
Timing light disagrees with ECU
  • Trigger offset wrong
  • Fix: correct offset before tuning
Sourced5
ECU resets while cranking
  • Voltage drop on feed or ground
  • Fix: check battery, cable and ground strap resistance
Sourced · medium287

Work through them in that order.Medium175

Do it with GAINS (separate product module)

GAINS: a universal flying-lead harness for the ECU2 is in supplier quotation.

It uses 125 °C wire in the engine bay, shielded crank, cam and knock cables with drains at the ECU end, a terminated CAN plug and a genuine Bosch LSU 4.9 plug, and printed labels on every lead. Status: roadmap, pre-release.1

GAINS ECUs are designed to guide the key-on sensor check, output test and timing-light confirmation in the app before first start. That commissioning flow is specified and simulated; cranking and trigger detection are not yet modelled.5

Frequently asked

Where should the ECU ground go?

The ECU's power grounds go to one solid engine ground point, with the engine, chassis and battery negative bonded by heavy straps. The sensor ground is separate: it returns only to the ECU's sensor-ground pin and must never be joined to engine or chassis ground, or output currents will shift sensor readings.117

Should the crank sensor shield be grounded at both ends?

No. Connect the shield drain to sensor ground at the ECU end only and leave it unconnected at the sensor. Grounding both ends forms a ground loop, so currents in the engine block flow through the shield and couple noise into the crank signal it is supposed to protect. The same applies to cam and knock cables.1217

What wire should I use for an engine harness?

Thin-wall cross-linked automotive wire rated to 125 °C, such as SAE J1128 TXL or ISO 6722 class C, in the engine bay. PVC rated to 105 °C is acceptable inside the cabin. Size each conductor for its current and run length, and use shielded multi-core cable for crank, cam and knock signals.61

Can I splice the sensor ground to the engine block to save wire?

No. That turns the sensor reference into part of the engine's high-current return path, so every injector and coil pulse shifts the voltage your sensors are measured against. Run sensor returns back to a splice near the ECU and into its sensor-ground pin only.171

What should I check before the first start?

Continuity and shorts against the pin map, ECU communication and battery voltage, plausible key-on sensor readings, an output test of every injector, coil, fan and pump, fuel pressure and leaks. After it fires, confirm base timing with a timing light before any tuning, and keep a fire extinguisher close.515

Do I need a relay for the fuel pump?

Yes, or a PDM channel. A fuel pump draws far more current than an ECU output is built for. The ECU or PDM switches the relay coil or channel, and the pump control must include prime, timeout and stall cut so the pump stops when the engine stops.34

Related

Sources

Numbered as cited above. Hover or tap a citation chip to preview it.

28 sources
  1. internal GAINS internal: Single Controller universal 2.5 m wire-in harness v1, wire list and construction notes (hardware/harness/universal-mono/build_universal_harness.py), 2026-10-27
  2. internal GAINS internal: ECU2 K-swap harness re-termination concept (hardware/harness/k-swap/README.md)
  3. internal GAINS internal: ECU2 v0 concept (hardware/mini-ecu/CONCEPT.md): assignment rules and safety notes
  4. internal GAINS internal: PDM2 v0 design spec (hardware/mini-pdm/SPEC.md)
  5. internal GAINS architecture decision record: ADR-0009: First-start self-commissioning
  6. SAE J1128: Low Voltage Primary Cable · SAE International · standard · retrieved 2026-10-27
  7. ISO 16750-2:2023 Road vehicles, Environmental conditions and testing for electrical and electronic equipment, Part 2: Electrical loads · International Organization for Standardization · standard · retrieved 2026-10-27
  8. Superseal 1.0 34-position plug datasheets (4-1437290-0 / -1) · TE Connectivity · vendor-doc · retrieved 2026-10-27
  9. Lambda Sensor LSU 4.9 product page and data sheet (installation notes, temperature limits) · Bosch Motorsport · vendor-doc · retrieved 2026-10-27
  10. Ignition Coil P65-TWG data sheet · Bosch Motorsport · vendor-doc · retrieved 2026-10-25
  11. LM1815 adaptive variable reluctance sensor amplifier data sheet · Texas Instruments · vendor-doc · retrieved 2026-10-27
  12. Controller Area Network physical layer requirements (SLLA270) · Texas Instruments · vendor-doc · retrieved 2026-10-27
  13. Reverse current/battery protection circuits (SLVA139) · Texas Instruments · vendor-doc · retrieved 2026-10-27
  14. Fuseology Design Guide · Littelfuse · vendor-doc · retrieved 2026-10-27
  15. Automotive Handbook, 10th ed. (vehicle electrical systems, engine management) · Robert Bosch GmbH / Wiley, 2018 · book · retrieved 2026-10-27
  16. Shielded cable · Wikipedia · reference · retrieved 2026-10-27
  17. Ground loop (electricity) · Wikipedia · reference · retrieved 2026-10-27
  18. Ground (electricity) · Wikipedia · reference · retrieved 2026-10-27
  19. Fuse (electrical) · Wikipedia · reference · retrieved 2026-10-27
  20. Load dump · Wikipedia · reference · retrieved 2026-10-27
  21. Variable reluctance sensor · Wikipedia · reference · retrieved 2026-10-27
  22. Knock sensor · Wikipedia · reference · retrieved 2026-10-25
  23. Thermistor · Wikipedia · reference · retrieved 2026-10-27
  24. Electronic throttle control · Wikipedia · reference · retrieved 2026-10-27
  25. Fuel injection · Wikipedia · reference · retrieved 2026-10-25
  26. Flyback diode · Wikipedia · reference · retrieved 2026-10-27
  27. American wire gauge · Wikipedia · reference · retrieved 2026-10-27
  28. Voltage drop · Wikipedia · reference · retrieved 2026-10-27