Picture of an E21 BMW
Motronic Wiring Charts
(note: this info is all on one page on purpose)

The following is an outline of the entire engine side wiring harness for an 88 325is (Motronic 1.3 - Ecu #173) and its interface with a 1979 Euro 323i (other E21's are probably similar)

E21 323i Engine Plug

Engine plug:
E21 Plug # E21 Wire color Motronic 1.3 Wire color Purpose
1 Brown/Green Brown/Green Oil pressure switch to instrument cluster
3 Green/Black Green/Violet & Black/Green Power to Fuel pump from Fuel pump relay and starter
5 Blue Blue Alternator Charge (D+) to instrument cluster
6 Green/Violet Green Coil 15+ / O2 Sensor Heater Relay
8 Green Green ignition switch to Motronic #27
10 Black Yellow/Black ignition switch (start) to starter
13 Brown/White Brown/Violet from injector rail (temp sensor) to instrument cluster
15 Black Black from Motronic #6 to tachometer

Motronic ECU Pinout:

Pin # Color Purpose/location Elsewhere? details
1 Black Ignition Coil (timing -) Yes Lead to diagnostic connector
2 Brown Ground Yes Lead to diagnostic connector
3 Brown/Green Fuel Pump Relay (85) No
4 White/Yellow Idle Control Valve #3 No
5 Brown Purge Canister (trigger -) No
6 Black Tachometer (engine speed out) Yes
7 Grey/Yellow Air Mass Sensor #2 No
8 Black Cylinder ID sensor (spark #6 lead) No
10 Brown Oxygen Sensor (ground) No
12 Grey/White Air Mass Sensor #3 No
13 White/Yellow Diagnostic - RxD (Motronic receive data line) No Lead to diagnostic connector
14 Brown Ground Yes Lead to diagnostic connector
15 Grey Check Engine Light (- triggered) No
16 Brown/White Injectors 1, 3, 5 (- triggered) No + lead is red/white
17 Brown/Yellow Injectors 2, 4, 6 (- triggered) No + lead is red/white
18 Red Power (direct battery lead +) Yes
19 Brown/Orange Ground Yes
22 White/Green Idle Control Valve #1 No
23 Brown/Green Oxygen Sensor Relay (85) No
24 Brown Ground Yes Lead to diagnostic connector
26 Grey/Blue Air Mass Sensor #4 No
27 Green Ignition Switch Lead (run position) Yes
28 Black Oxygen Sensor (+ read voltage) No
29 Black/White Vehicle Speed input Yes from Cluster Speed Output
31 Yellow Cylinder ID sensor (spark #6 lead) No
32 White/Black Present Fuel Rate output (to instrument cluster) Yes Lead to diagnostic connector
36 Brown Main Relay (85) No
37 Red/Blue Main Relay (87 #1) Yes Same as red/white
39 Green/Blue Programming Voltage No Lead to diagnostic connector
40 Black/Grey A/C Compressor ON to Motronic No A/C system
41 Violet/Grey A/C System ON to Motronic No A/C system
42 Red/Blue Park/Neutral switch to Motronic No Auto Transmission only
44 Grey/Violet Air Mass Sensor #1 No
45 Brown/Red Coolant Temp sensor (not cluster) No
47 Black Pulse (engine speed)/Crank Ref Sensor (+) No
48 Yellow Pulse (engine speed)/Crank Ref Sensor (-) No
52 Brown/Blue Throttle Position Sensor #1 No
53 Brown/Black Throttle Position Sensor #3 No
55 White/Violet Diagnostic - TxD (Motronic transmit data line) No Lead to diagnostic connector

Connector mappings:

Plug Pin Color Purpose Motronic 1.3 Pin
Injector rail connector:
1 Brown/Red Motronic Coolant Temp Sensor 45
2 Brown/Orange Motronic Coolant Temp Ground N/A
3 Brown Cluster Temp Sensor Ground N/A
4 Brown/Violet Cluster Temp Sensor Sender N/A
5 Red/White Power to Injectors from Main Relay N/A
6 Brown/White Trigger, Injectors 1,3,5 (-) 16
7 Brown/Yellow Trigger, Injectors 2,4,6 (-) 17
Diagnostic Connector:
14 + Red Battery + (unfused) 18
15 + White/Yellow Diagnostic - RxD (Motronic receive data line) 13
7 White/Green ? Not connected N/A
6 White/Black Present Fuel Rate 32
16 Green/White power to O2 heater relay N/A
12 Blue Alternator charge (D+) N/A
1 Black Coil Timing (-) 1
11 Black/Yellow Starter Solenoid N/A
18 - Green/Blue Programming Voltage 39
20 - White/Violet Diagnostic - TxD (Motronic transfer data line) 55
19 - Brown Ground N/A / 2, 14, 24, 19
Oxygen sensor plug:
1 Brown Oxygen Sensor ground lead 10
2 Black Oxygen Sensor volt lead 28
3 Brown Ground N/A / 2, 14, 24, 19
4 Green/Blue Sensor Heater power (from O2 relay) N/A
Ignition coil:
1 - Black Timing (-) 1
15 + Green Power (+) N/A
Air Flow Meter:
1 Grey/Violet Air Inlet Temp 44
2 Grey/Yellow Air Inlet Input 7
3 Grey/White Air Inlet Degree 12
4 Grey/Blue Air Inlet Closed 26
Throttle position switch:
1 Brown/Blue Closed/Idle Switch 52
2 Brown/Orange Ground N/A
3 Brown/Black Wide Open Switch 53
Idle control valve:
1 White/Green Idle Control Voltage (-) 22
2 Red/White Power from main relay N/A
3 White/Yellow Idle Control Voltage (-) 4
Cylinder Id Sensor:
1 Black Pulse Input 8
2 Yellow Pulse Input 31
3 Clear Shield/Ground N/A
Crank Pulse sensor:
1 Black Engine Speed (+) 47
2 Yellow Engine Speed (-) 48
3 Clear Shield/Ground N/A
Oil Level sender:
1 (blue/white) Blue Dynamic Oil level (closed when oil low) N/A
2 (brown) Brown/Orange Ground N/A
3 (blue/violet) Green/Yellow Static Oil level (closed when oil full) N/A

Engine Relays:

Relay diagrams:
Relay Connector Color Purpose
Main Relay:
30 (input) Red from Battery + (unfused)
85 (- trigger) Brown from Motronic #36
86 (+ trigger) Red from Battery + (unfused)
87 (output, switched) Red/White to injectors, purge solnd, fuel pump relay, idle valve
87 (output, switched) Red/Blue to Motronic #37
Fuel Pump Relay:
30 Red from Battery (unfused)
85 Brown/Green from Motronic #3
86 Red/White from Main Relay
87 Green/Violet to fuel pumps
Oxygen Sensor Relay:
30 Green/White from ignition switch
85 Brown/Green from Motronic #23
86 Green/White from ignition switch
87 Green/Blue to O2 sensor heater