← Back

MX-5 Miata NA8 1996-97 (BP-ZE, 1.8, OBD-II) → Speeduino Speeduino v0.4 (auto)

MX-5 Miata NA8 1996-97 (BP-ZE, 1.8, OBD-II) — Speeduino — Speeduino
⚠ NOT CHECKED. Don't build from this.
Drawn by Michael Gnankou · Rev 0 · draft · 2026-10-12

Before you start

Not confident with automotive wiring? Have a professional harness builder or tuner do it, or check your work before first power-up. A wiring mistake can damage the ECU, the engine or the car, or start a fire.

Statusdraft · not yet verified: nobody has reported building and running this harness
Open errors2: read the Findings page before cutting any wire
Size of the job34 wires · 6 connectors · 0 part lines
ToolsCrimp and extraction tools for each terminal family (see Connectors) · wire strippers · multimeter · heat gun + heat-shrink
Order of work1. Check every part against the parts list. 2. Cut and label every wire (labels: Export → Wire labels). 3. Crimp and pin connector by connector, ticking the build checklist. 4. Run the bench test with nothing plugged in and the battery disconnected. 5. Only then connect the ECU and power up.

Build checklist

Tick each box as you go. Continuity: meter from end to end, expect under 1 Ω.

WireFromToGaugeColourCutLabelCrimp ACrimp BPin APin BContinuity
W1OEM-4-ASP-GND-10.85☐☐☐☐☐☐☐
W2OEM-4-CSP-GND-10.85☐☐☐☐☐☐☐
W3OEM-4-DSP-GND-10.85☐☐☐☐☐☐☐
W4OEM-4-KSP-GND-10.85☐☐☐☐☐☐☐
W5SP-GND-1SPEEDUINO-A-100.85☐☐☐☐☐☐☐
W6SP-GND-1SPEEDUINO-A-90.85☐☐☐☐☐☐☐
W7OEM-3-OSP-0V-10.5☐☐☐☐☐☐☐
W8OEM-4-HSP-0V-10.5☐☐☐☐☐☐☐
W9SP-0V-1SPEEDUINO-A-120.5☐☐☐☐☐☐☐
W10SP-0V-1SPEEDUINO-A-230.5☐☐☐☐☐☐☐
W11OEM-3-ISPEEDUINO-A-130.5☐☐☐☐☐☐☐
W12OEM-4-ESPEEDUINO-A-250.5☐☐☐☐☐☐☐
W13OEM-4-GSPEEDUINO-A-240.5☐☐☐☐☐☐☐
W14OEM-4-FSPEEDUINO-A-260.5☐☐☐☐☐☐☐
W15OEM-4-NSPEEDUINO-A-70.5☐☐☐☐☐☐☐
W16OEM-4-RSPEEDUINO-A-340.5☐☐☐☐☐☐☐
W17OEM-4-USPEEDUINO-A-10.5☐☐☐☐☐☐☐
W18OEM-4-VSPEEDUINO-A-20.5☐☐☐☐☐☐☐
W19OEM-4-WSPEEDUINO-A-30.5☐☐☐☐☐☐☐
W20OEM-4-XSPEEDUINO-A-50.5☐☐☐☐☐☐☐
W21OEM-3-FSPEEDUINO-A-220.5☐☐☐☐☐☐☐
W22OEM-3-GSPEEDUINO-A-190.5☐☐☐☐☐☐☐
W23OEM-1-ASPEEDUINO-A-160.5☐☐☐☐☐☐☐
W24OEM-1-BSPEEDUINO-A-150.5☐☐☐☐☐☐☐
W25OEM-1-GSPEEDUINO-A-360.5☐☐☐☐☐☐☐
W26OEM-1-USPEEDUINO-A-350.5☐☐☐☐☐☐☐
W27OEM-3-MSPEEDUINO-A-370.5☐☐☐☐☐☐☐
W28OEM-1-ESPEEDUINO-A-380.5☐☐☐☐☐☐☐
W29OEM-4-LSPEEDUINO-A-170.5☐☐☐☐☐☐☐
W30OEM-3-HSPEEDUINO-A-110.5☐☐☐☐☐☐☐
W31OEM-3-CSPEEDUINO-A-210.5☐☐☐☐☐☐☐
W32OEM-3-KSPEEDUINO-A-200.5☐☐☐☐☐☐☐
W33OEM-1-MSPEEDUINO-A-140.5☐☐☐☐☐☐☐
W34OEM-1-CSPEEDUINO-A-180.5☐☐☐☐☐☐☐

Bench test (before first power-up)

Battery disconnected, ECU and every sensor unplugged. Meter on resistance. Each pair below must read open (OL): a reading means a pinched wire, a stray strand or a mis-pinned cavity. Then check continuity of every wire (last column of the build checklist).

#Probe AProbe BExpectWhyReading
1SPEEDUINO-A-13SPEEDUINO-A-10open (OL)5 V sensor reference must not touch power ground
2SPEEDUINO-A-13SPEEDUINO-A-12open (OL)5 V sensor reference must not touch sensor ground

If any reading doesn't match, stop and get help before powering up.

Revisions

RevLabelByDate
No revisions yet.

Schematic

OEM-1OEM-3OEM-4SP-0VSP-GNDSPEEDUINO-A

Connectors

OEM-1

CavityFunctionSignalWireColourGauge (mm²)DestinationTerminalSealPlug
ACooling fan relay (low-side)—W23—0.5SPEEDUINO-A-16———
BA/C condenser fan relay—W24—0.5SPEEDUINO-A-15———
CStarter input (12V while cranking)—W34—0.5SPEEDUINO-A-18———
ECheck engine light (MIL)—W28—0.5SPEEDUINO-A-38———
GA/C clutch relay—W25—0.5SPEEDUINO-A-36———
KA/C pressure switch (A/C request)————————
LClutch switch————————
MVehicle speed sensor (VSS)—W33—0.5SPEEDUINO-A-14———
QBrake switch————————
UFuel pump relay (low-side)—W26—0.5SPEEDUINO-A-35———

OEM-3

CavityFunctionSignalWireColourGauge (mm²)DestinationTerminalSealPlug
BMAF sensor input————————
CFront O2 sensor input—W31—0.5SPEEDUINO-A-21———
DRear O2 sensor input————————
FThrottle position (TPS)—W21—0.5SPEEDUINO-A-22———
GEngine coolant temp (CLT)—W22—0.5SPEEDUINO-A-19———
HEGR boost sensor—W30—0.5SPEEDUINO-A-11———
I+5V sensor reference—W11—0.5SPEEDUINO-A-13———
JEGR valve position sensor————————
KIntake air temp (IAT)—W32—0.5SPEEDUINO-A-20———
LIdle switch (closed throttle)————————
MFront O2 heater control—W27—0.5SPEEDUINO-A-37———
NEGR boost sensor (2nd channel)————————
OSensor ground—W7—0.5SP-0V-1———
PPower steering pressure switch————————

OEM-4

CavityFunctionSignalWireColourGauge (mm²)DestinationTerminalSealPlug
AChassis ground—W1—0.85SP-GND-1———
BECU power +12V (main relay)————————
CChassis ground—W2—0.85SP-GND-1———
DChassis ground—W3—0.85SP-GND-1———
ECrank position (CKP) sensor—W12—0.5SPEEDUINO-A-25———
FCAS SGT (cam trigger)—W14—0.5SPEEDUINO-A-26———
GCAS SGC (cam sync)—W13—0.5SPEEDUINO-A-24———
HCrank pickup timing ground (CKP gnd)—W8—0.5SP-0V-1———
IPermanent +12V (battery)————————
JPRC solenoid (FPR control)————————
KChassis ground—W4—0.85SP-GND-1———
LTachometer output—W29—0.5SPEEDUINO-A-17———
NIgnition coil trigger (cyl 1&4)—W15—0.5SPEEDUINO-A-7———
OEGR vent solenoid————————
PEGR vacuum solenoid————————
QIdle air control (IAC) valve————————
RIgnition coil trigger (cyl 2&3)—W16—0.5SPEEDUINO-A-34———
TEVAP purge solenoid————————
UInjector 1 (cyl 1)—W17—0.5SPEEDUINO-A-1———
VInjector 2 (cyl 2)—W18—0.5SPEEDUINO-A-2———
WInjector 3 (cyl 3)—W19—0.5SPEEDUINO-A-3———
XInjector 4 (cyl 4)—W20—0.5SPEEDUINO-A-5———

SP-0V

CavityFunctionSignalWireColourGauge (mm²)DestinationTerminalSealPlug
1——W7—0.5OEM-3-O———
1——W8—0.5OEM-4-H———
1——W9—0.5SPEEDUINO-A-12———
1——W10—0.5SPEEDUINO-A-23———

SP-GND

CavityFunctionSignalWireColourGauge (mm²)DestinationTerminalSealPlug
1——W1—0.85OEM-4-A———
1——W2—0.85OEM-4-C———
1——W3—0.85OEM-4-D———
1——W4—0.85OEM-4-K———
1——W5—0.85SPEEDUINO-A-10———
1——W6—0.85SPEEDUINO-A-9———

SPEEDUINO-A

CavityFunctionSignalWireColourGauge (mm²)DestinationTerminalSealPlug
1Injector 1—W17—0.5OEM-4-U———
10Ground—W5—0.85SP-GND-1———
11MAP sensor (0-5V)—W30—0.5OEM-3-H———
12Ground—W9—0.5SP-0V-1———
135V—W11—0.5OEM-3-I———
14Proto area 1 (flex fuel)—W33—0.5OEM-1-M———
15Proto area 2 (fan)—W24—0.5OEM-1-B———
16Proto area 3 (fuel pump)—W23—0.5OEM-1-A———
17Proto area 4 (tachometer)—W29—0.5OEM-4-L———
18Proto area 5 (clutch)—W34—0.5OEM-1-C———
19Coolant temp (CLT)—W22—0.5OEM-3-G———
2Injector 2—W18—0.5OEM-4-V———
20Inlet air temp (IAT)—W32—0.5OEM-3-K———
21O2 sensor—W31—0.5OEM-3-C———
22TPS input—W21—0.5OEM-3-F———
23Ground—W10—0.5SP-0V-1———
24Cam input / VR2+—W13—0.5OEM-4-G———
25Crank input / VR1+—W12—0.5OEM-4-E———
26VR2-—W14—0.5OEM-4-F———
27VR1-————————
285V————————
29Idle stepper 2B————————
3Injector 3—W19—0.5OEM-4-W———
30Idle stepper 2A————————
31Idle stepper 1A————————
32Idle stepper 1B————————
33Ignition 3————————
34Ignition 2—W16—0.5OEM-4-R———
35Boost—W26—0.5OEM-1-U———
36Idle 2 (3-wire idle)—W25—0.5OEM-1-G———
37PWM idle—W27—0.5OEM-3-M———
38VVT—W28—0.5OEM-1-E———
5Injector 4—W20—0.5OEM-4-X———
7Ignition 1—W15—0.5OEM-4-N———
8Ignition 4————————
9Ground—W6—0.85SP-GND-1———

Pin map

OEM pointOEM functionOEM familyTarget pointTarget functionTarget familyWire colourEvidence
OEM-1-ACooling fan relay (low-side)low_side_outSPEEDUINO-A-16Proto area 3 (fuel pump)low_side_outcorroborated
OEM-1-BA/C condenser fan relaylow_side_outSPEEDUINO-A-15Proto area 2 (fan)low_side_outcorroborated
OEM-1-CStarter input (12V while cranking)digital_inSPEEDUINO-A-18Proto area 5 (clutch)digital_incorroborated
OEM-1-ECheck engine light (MIL)low_side_outSPEEDUINO-A-38VVTlow_side_outcorroborated
OEM-1-GA/C clutch relaylow_side_outSPEEDUINO-A-36Idle 2 (3-wire idle)low_side_outcorroborated
OEM-1-KA/C pressure switch (A/C request)digital_in———corroborated
OEM-1-LClutch switchdigital_in———corroborated
OEM-1-MVehicle speed sensor (VSS)digital_inSPEEDUINO-A-14Proto area 1 (flex fuel)digital_incorroborated
OEM-1-QBrake switchdigital_in———corroborated
OEM-1-UFuel pump relay (low-side)low_side_outSPEEDUINO-A-35Boostlow_side_outcorroborated
OEM-3-BMAF sensor inputanalog_in———corroborated
OEM-3-CFront O2 sensor inputlambda_nb_inSPEEDUINO-A-21O2 sensorlambda_nb_incorroborated
OEM-3-DRear O2 sensor inputlambda_nb_in———corroborated
OEM-3-FThrottle position (TPS)analog_inSPEEDUINO-A-22TPS inputanalog_incorroborated
OEM-3-GEngine coolant temp (CLT)temp_inSPEEDUINO-A-19Coolant temp (CLT)temp_incorroborated
OEM-3-HEGR boost sensoranalog_inSPEEDUINO-A-11MAP sensor (0-5V)analog_incorroborated
OEM-3-I+5V sensor referencevrefSPEEDUINO-A-135Vvrefcorroborated
OEM-3-JEGR valve position sensoranalog_in———corroborated
OEM-3-KIntake air temp (IAT)temp_inSPEEDUINO-A-20Inlet air temp (IAT)temp_incorroborated
OEM-3-LIdle switch (closed throttle)digital_in———corroborated
OEM-3-MFront O2 heater controllow_side_outSPEEDUINO-A-37PWM idlelow_side_outcorroborated
OEM-3-NEGR boost sensor (2nd channel)analog_in———corroborated
OEM-3-OSensor groundsensor_groundSPEEDUINO-A-12 + SPEEDUINO-A-23Ground + Groundsensor_groundcorroborated
OEM-3-PPower steering pressure switchdigital_in———corroborated
OEM-4-AChassis groundgroundSPEEDUINO-A-10 + SPEEDUINO-A-9Ground + Groundgroundcorroborated
OEM-4-BECU power +12V (main relay)power_in———corroborated
OEM-4-CChassis groundgroundSPEEDUINO-A-10 + SPEEDUINO-A-9Ground + Groundgroundcorroborated
OEM-4-DChassis groundgroundSPEEDUINO-A-10 + SPEEDUINO-A-9Ground + Groundgroundcorroborated
OEM-4-ECrank position (CKP) sensortrigger_inSPEEDUINO-A-25Crank input / VR1+trigger_incorroborated
OEM-4-FCAS SGT (cam trigger)trigger_inSPEEDUINO-A-26VR2-trigger_incorroborated
OEM-4-GCAS SGC (cam sync)trigger_inSPEEDUINO-A-24Cam input / VR2+trigger_incorroborated
OEM-4-HCrank pickup timing ground (CKP gnd)sensor_groundSPEEDUINO-A-12 + SPEEDUINO-A-23Ground + Groundsensor_groundcorroborated
OEM-4-IPermanent +12V (battery)power_in———corroborated
OEM-4-JPRC solenoid (FPR control)low_side_out———corroborated
OEM-4-KChassis groundgroundSPEEDUINO-A-10 + SPEEDUINO-A-9Ground + Groundgroundcorroborated
OEM-4-LTachometer outputtacho_outSPEEDUINO-A-17Proto area 4 (tachometer)tacho_outcorroborated
OEM-4-NIgnition coil trigger (cyl 1&4)ignition_outSPEEDUINO-A-7Ignition 1ignition_outcorroborated
OEM-4-OEGR vent solenoidlow_side_out———corroborated
OEM-4-PEGR vacuum solenoidlow_side_out———corroborated
OEM-4-QIdle air control (IAC) valvelow_side_out———corroborated
OEM-4-RIgnition coil trigger (cyl 2&3)ignition_outSPEEDUINO-A-34Ignition 2ignition_outcorroborated
OEM-4-TEVAP purge solenoidlow_side_out———corroborated
OEM-4-UInjector 1 (cyl 1)injector_outSPEEDUINO-A-1Injector 1injector_outcorroborated
OEM-4-VInjector 2 (cyl 2)injector_outSPEEDUINO-A-2Injector 2injector_outcorroborated
OEM-4-WInjector 3 (cyl 3)injector_outSPEEDUINO-A-3Injector 3injector_outcorroborated
OEM-4-XInjector 4 (cyl 4)injector_outSPEEDUINO-A-5Injector 4injector_outcorroborated

Cut list

WireFromToGauge (mm²)ColourLengthSignalIdent
W1OEM-4-ASP-GND-10.85no routeChassis ground—
W2OEM-4-CSP-GND-10.85no routeChassis ground—
W3OEM-4-DSP-GND-10.85no routeChassis ground—
W4OEM-4-KSP-GND-10.85no routeChassis ground—
W5SP-GND-1SPEEDUINO-A-100.85no routeGround—
W6SP-GND-1SPEEDUINO-A-90.85no routeGround—
W7OEM-3-OSP-0V-10.5no routeSensor ground—
W8OEM-4-HSP-0V-10.5no routeCrank pickup timing ground (CKP gnd)—
W9SP-0V-1SPEEDUINO-A-120.5no routeGround—
W10SP-0V-1SPEEDUINO-A-230.5no routeGround—
W11OEM-3-ISPEEDUINO-A-130.5no route+5V sensor reference—
W12OEM-4-ESPEEDUINO-A-250.5no routeCrank position (CKP) sensor—
W13OEM-4-GSPEEDUINO-A-240.5no routeCAS SGC (cam sync)—
W14OEM-4-FSPEEDUINO-A-260.5no routeCAS SGT (cam trigger)—
W15OEM-4-NSPEEDUINO-A-70.5no routeIgnition coil trigger (cyl 1&4)—
W16OEM-4-RSPEEDUINO-A-340.5no routeIgnition coil trigger (cyl 2&3)—
W17OEM-4-USPEEDUINO-A-10.5no routeInjector 1 (cyl 1)—
W18OEM-4-VSPEEDUINO-A-20.5no routeInjector 2 (cyl 2)—
W19OEM-4-WSPEEDUINO-A-30.5no routeInjector 3 (cyl 3)—
W20OEM-4-XSPEEDUINO-A-50.5no routeInjector 4 (cyl 4)—
W21OEM-3-FSPEEDUINO-A-220.5no routeThrottle position (TPS)—
W22OEM-3-GSPEEDUINO-A-190.5no routeEngine coolant temp (CLT)—
W23OEM-1-ASPEEDUINO-A-160.5no routeCooling fan relay (low-side)—
W24OEM-1-BSPEEDUINO-A-150.5no routeA/C condenser fan relay—
W25OEM-1-GSPEEDUINO-A-360.5no routeA/C clutch relay—
W26OEM-1-USPEEDUINO-A-350.5no routeFuel pump relay (low-side)—
W27OEM-3-MSPEEDUINO-A-370.5no routeFront O2 heater control—
W28OEM-1-ESPEEDUINO-A-380.5no routeCheck engine light (MIL)—
W29OEM-4-LSPEEDUINO-A-170.5no routeTachometer output—
W30OEM-3-HSPEEDUINO-A-110.5no routeEGR boost sensor—
W31OEM-3-CSPEEDUINO-A-210.5no routeFront O2 sensor input—
W32OEM-3-KSPEEDUINO-A-200.5no routeIntake air temp (IAT)—
W33OEM-1-MSPEEDUINO-A-140.5no routeVehicle speed sensor (VSS)—
W34OEM-1-CSPEEDUINO-A-180.5no routeStarter input (12V while cranking)—

Bill of materials

CategoryPart numberManufacturerDescriptionQtyUnit

ECU setup sheet

RoleEngine refEngine signalSensorECU pointECU functionECU classSetup flag
No configured channels.

Findings

Open (7)

SeverityCodeSubjectMessage
errorREQUIRED_UNMAPPEDOEM-3-BRequired OEM function "MAF sensor input" (analog_in) is not connected to the new ECU.
errorREQUIRED_UNMAPPEDOEM-4-BRequired OEM function "ECU power +12V (main relay)" (power_in) is not connected to the new ECU.
warnLOAD_UNKNOWNSPEEDUINO-A-15SPEEDUINO-A-15 "Proto area 2 (fan)" drives OEM-1-B A/C condenser fan relay (load 0.2 A) but its current rating is unknown. Check the ECU manual.
warnLOAD_UNKNOWNSPEEDUINO-A-16SPEEDUINO-A-16 "Proto area 3 (fuel pump)" drives OEM-1-A Cooling fan relay (low-side) (load 0.2 A) but its current rating is unknown. Check the ECU manual.
warnLOAD_UNKNOWNSPEEDUINO-A-35SPEEDUINO-A-35 "Boost" drives OEM-1-U Fuel pump relay (low-side) (load 0.2 A) but its current rating is unknown. Check the ECU manual.
warnLOAD_UNKNOWNSPEEDUINO-A-36SPEEDUINO-A-36 "Idle 2 (3-wire idle)" drives OEM-1-G A/C clutch relay (load 0.2 A) but its current rating is unknown. Check the ECU manual.
infoUNMAPPEDOEM13 optional OEM pins are not mapped: OEM-1-K A/C pressure switch (A/C request); OEM-1-L Clutch switch; OEM-1-Q Brake switch; OEM-3-D Rear O2 sensor input; OEM-3-J EGR valve position sensor; OEM-3-L Idle switch (closed throttle); OEM-3-N EGR boost sensor (2nd channel); OEM-3-P Power steering pressure switch; OEM-4-J PRC solenoid (FPR control); OEM-4-O EGR vent solenoid; OEM-4-P EGR vacuum solenoid; OEM-4-Q Idle air control (IAC) valve; OEM-4-T EVAP purge solenoid

Accepted (1)

CodeSubjectReasonBy
REQUIRED_UNMAPPEDOEM-4-IBattery-constant (memory) feed of the stock ECU: the new ECU has no such input, so it is not needed.mapping-proposal

Notes

Auto-mapped by auto_map() from the library pin data on 2026-10-11. Review every wire against both manuals before building. Open items: - Main-relay feed: no ecu_main_power pin on the stock or the new ECU - OEM-3 B: MAF sensor input: no free maf/analog_0_5 on Speeduino Speeduino - OEM-4 B: ECU power +12V (main relay): no rule for class ecu_main_power; wire by hand Not wired: - OEM-4 I: Permanent +12V (battery): Speeduino Speeduino has no battery-constant input; not needed - OEM-4 J: PRC solenoid (FPR control): no free low_side/relay_control/heater_low_side/ls_hs/injector on Speeduino Speeduino - OEM-4 O: EGR vent solenoid: no free low_side/relay_control/heater_low_side/ls_hs/injector on Speeduino Speeduino - OEM-4 P: EGR vacuum solenoid: no free low_side/relay_control/heater_low_side/ls_hs/injector on Speeduino Speeduino - OEM-4 Q: Idle air control (IAC) valve: no free low_side/relay_control/heater_low_side/ls_hs/injector on Speeduino Speeduino - OEM-4 T: EVAP purge solenoid: no free low_side/relay_control/heater_low_side/ls_hs/injector on Speeduino Speeduino - OEM-3 N: EGR boost sensor (2nd channel): no free map/analog_0_5 on Speeduino Speeduino - OEM-3 D: Rear O2 sensor input: no free o2_narrowband/analog_0_5 on Speeduino Speeduino - OEM-3 J: EGR valve position sensor: no free analog_0_5 on Speeduino Speeduino - OEM-1 K: A/C pressure switch (A/C request): no free switch_in/frequency_in/analog_0_5 on Speeduino Speeduino - OEM-1 L: Clutch switch: no free switch_in/frequency_in/analog_0_5 on Speeduino Speeduino - OEM-1 Q: Brake switch: no free switch_in/frequency_in/analog_0_5 on Speeduino Speeduino - OEM-3 L: Idle switch (closed throttle): no free switch_in/frequency_in/analog_0_5 on Speeduino Speeduino - OEM-3 P: Power steering pressure switch: no free switch_in/frequency_in/analog_0_5 on Speeduino Speeduino

Sources

ReliabilityKindTitleURLArchiveCapturedSHA-256
4vendor_docAEM EMS 30-1720 Plug-and-Play adapter manual (1996-97 Miata)https://static.summitracing.com/global/images/instructions/avm-30-1720.pdf———
4vendor_docSpeeduino Manual (08/04/25) — V0.4 board IDC40 pinout & featureshttps://speeduino.com/Speeduino_manual.pdfarchive2026-10-0521806bd29ef0
3community_copyMellens.net: 1996 Mazda Miata wiring diagrams (FSM-derived)http://www.mellens.net/mazda/mazda_miata_extra_manual/1996_wiring.pdf———