BMW M20 & M30 MegaSquirt TPS Upgrade: Variable “Resistive” TPS, Wiring Pinouts, and Harness Options

BMW M20 & M30 MegaSquirt TPS Upgrade: Variable “Resistive” TPS, Wiring Pinouts, and Harness Options

If you’re converting a BMW M20 to MegaSquirt, one of the most important drivability upgrades is a true variable (“resistive”) throttle position sensor (TPS). The stock M20 TPS is usually a switch-style (idle/WOT contacts), which can’t provide a real throttle angle signal. This guide explains the TPS types, wiring pinouts, harness options, and the tuning steps that prevent the usual “my TPS is weird” headaches.

Important: MegaSquirt hardware (MS2/MS3/MicroSquirt/PNP), BMW harness years, and connector pin numbering vary. Do not trust wire colors alone. Verify every pin with a multimeter and your ECU’s wiring guide before powering the system. The MegaSquirt 5V reference (Vref) must never touch 12V.

Quick Executive Summary

  • Stock M20 TPS = usually a switch (idle/WOT), not a real throttle angle sensor.
  • MegaSquirt expects a 3-wire potentiometer TPS: 5V Vref + sensor ground + signal.
  • M50/E36 3-pin TPS is the common upgrade; you mount it with an adapter and either re-pin the connector or build an adapter harness.
  • After wiring: verify 5V Vref, verify smooth signal sweep, then Calibrate TPS in TunerStudio (KOEO).

TPS Types: Switch vs Variable (“Resistive”)

“Resistive TPS” in this context means a potentiometer TPS (variable resistor). MegaSquirt supplies 5V and sensor ground, then reads the TPS signal voltage (0–5V) as throttle angle.

TPS Type Output Wires What it enables
Switch TPS (stock M20) Idle/WOT contacts only 3 Basic idle/WOT detection; not true TPS%
Potentiometer TPS (M50/E36 3-pin) 0–5V analog (smooth sweep) 3 TPS%, TPSdot accel enrichment, Alpha‑N, better drivability tuning
Falk MFG M50 TPS Adapter for M20/M30
Mount an M50/E36 TPS on your M20 throttle body (cleanly):
Our M50 TPS Adapter (M20/M30) is designed for standalone ECU conversions. It includes an OEM-style O‑ring seal to reduce vacuum/oil leaks and includes stainless hardware.
See the M50 TPS Adapter →

Wiring Pinouts (Stock M20 TPS vs M50 TPS vs MegaSquirt)

The stock M20 TPS is typically a switch, so its pins are “closed/idle,” ground, and “WOT.” The M50/E36 TPS is a potentiometer, so its pins are ground, signal, and 5V reference. MegaSquirt typically provides TPS signal input, TPS 5V reference (Vref), and sensor ground.

Item Pin Function
Stock M20 3-pin TPS (switch) 1 Closed/Idle switch line
Stock M20 3-pin TPS (switch) 2 Ground (common)
Stock M20 3-pin TPS (switch) 3 WOT switch line
M50/E36 3-pin variable TPS 1 Sensor ground
M50/E36 3-pin variable TPS 2 TPS signal
M50/E36 3-pin variable TPS 3 5V reference (Vref)
MegaSquirt (typical DB37) Sensor GND Sensor ground pin(s) on your ECU harness (tie TPS ground here)
MegaSquirt (typical DB37) TPS IN TPS signal input
MegaSquirt (typical DB37) TPSVREF 5V reference output

Harness Options: How to Wire It Without Regrets

There are two clean approaches: (1) re-pin your existing TPS connector so the three existing wires become ground / signal / 5V in the correct order for the M50 TPS, or (2) build a short reversible adapter harness that plugs into the factory harness on one side and the M50 TPS on the other.

Falk MFG 3 Pin Bosch Style Connector (BMW)
Build a reliable, OEM-ish pigtail or adapter harness:
Our 3‑Pin Bosch Style Connector kits include the housing, rubber boot, and contacts. If your original plug is brittle or corroded, fresh connectors reduce intermittent TPS failures. Use dielectric grease and braided sleeving where appropriate.
See the 3‑Pin Connector Kit →

Calibration + Tuning Steps (TPS Scaling, Idle, AE)

Do not tune around a bad TPS signal. First, verify wiring with a multimeter (5V Vref present, good sensor ground, smooth signal sweep), then calibrate TPS in TunerStudio with key on, engine off.

  1. Verify Vref: you should have ~5V between TPSVREF and sensor ground.
  2. Verify TPS sweep: signal voltage should change smoothly as you open the throttle.
  3. Calibrate TPS: Tools → Calibrate TPS → “Get Current” at closed throttle, then WOT, then Accept.
  4. If WOT count is lower than closed count: swap TPS ground and TPSVREF at the sensor/connector.
  5. Accel enrichment: start simple. Many setups use TPSdot or blended TPSdot/MAPdot for crisp throttle response.
  6. Idle control: configure your idle hardware correctly (M20 setups often require proper drivers/boards depending on valve type and ECU variant).

Pre‑Start Testing Checklist

  • Battery charged, ECU power fused, fuel pump control verified.
  • All sensors grounded to appropriate MegaSquirt sensor ground strategy.
  • TPS: 5V Vref present, smooth signal sweep, calibrated in software.
  • No sensor grounds accidentally tied to chassis ground (common issue on old harnesses).
  • Datalog a short KOEO session: TPS stable, CLT/IAT sane, MAP sane.

Mermaid Flowchart (Wiring Steps)

If your theme doesn’t render Mermaid, paste this into any Mermaid editor to generate an image for the post.

flowchart TD
  A[Confirm MS platform + harness type] --> B[Confirm stock TPS is switch-style]
  B --> C[Install M50/E36 3-wire TPS using adapter]
  C --> D{Harness approach}
  D -->|Repin factory connector| E[Often swap pins 1 & 2, then map GND/SIG/VREF]
  D -->|Build adapter harness| F[Use 3-pin Bosch connectors + correct pin mapping]
  E --> G[Verify 5V Vref + smooth sweep]
  F --> G
  G --> H[Calibrate TPS (KOEO)]
  H --> I[Tune AE + idle control + drivability]

Troubleshooting (Fast Answers)

  • TPS reads backwards: swap TPSVREF and sensor ground at the TPS connector; re-calibrate TPS.
  • TPS jumps/noise: fix sensor grounding strategy; don’t share sensor ground with noisy high-current grounds.
  • Still on stock throttle switches: you’ll fight drivability tuning—move to a potentiometer TPS.
  • No 5V Vref: unplug sensors and check for a short; verify Vref isn’t tied to ground or 12V.

Sources / Helpful Threads

(Most are English. Some forums may require login or javascript.)

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.