01 P0023 B camshaft position - actuator circuit (Bank 2) • 02 Car Parts Brands that Are Trusted by Professionals • 03 This Is How Brain-To-Vehicle Interface Technology Works • 04 P0037 H02S heater control circuit low (Bank 1 sensor 2) • 05 Should I Press the Clutch Every Time I Need to Apply Brakes… • 06 P0011 A Camshaft Position - Timing Over Advanced or System … • 07 CVT Gearbox Blues: Common Problems and Warning Signs • 08 How to Diagnose and Fix Issues with Your Start Engine Push … • 09 Why Toyota Cars Rarely Fail the Same Way Twice • 10 Is Your Car Clicking Instead of Cranking? It Might Be the S… •

DTC codes / Subaru codes / P1540

P1540 · SubaruVehicle Speed Sensor Malfunction

P1540 on a Subaru means the engine control module (ECM) has detected an implausible or missing signal from the vehicle speed sensor circuit. The ECM compares vehicle speed data from the speed sensor against other inputs such as engine speed and throttle position, and when the expected relationship is not seen, it stores this code and illuminates the check engine light.

SystemPowertrain
Code typeSubaru specific
SeverityMedium
Fix difficultyIntermediate
AreaVehicle speed, idle control and auxiliary inputs

Symptoms you may notice

  • Check engine light illuminated on the dashboard
  • Speedometer needle may fluctuate, drop to zero, or read incorrectly
  • Transmission may shift erratically or stay in a single gear (limp mode)
  • Cruise control may be inoperative or disengage unexpectedly
  • Anti-lock braking system (ABS) warning light may also illuminate
  • Often no symptoms besides the warning light, especially if the fault is intermittent

Common causes, most likely first

  1. Faulty vehicle speed sensor (VSS) or damaged sensor wiring/connector
  2. Dirty or damaged sensor reluctor ring or tone wheel
  3. Wiring harness damage (open, short, or chafed wires) between the sensor and ECM
  4. Poor electrical connection at the ECM or sensor connector
  5. Failed or failing ECM (less common)
  6. Aftermarket modifications or incorrect tire size affecting speed signal
  7. Internal transmission issue affecting the speed sensor signal (on models where the sensor is transmission-mounted)

How to diagnose and fix it

  1. Scan all modules for stored codes and freeze-frame data to confirm P1540 is the primary fault
  2. Visually inspect the speed sensor, its connector, and wiring for damage, corrosion, or looseness
  3. Check tire size and condition for any mismatch that could affect speed readings
  4. Measure sensor resistance and compare to factory specifications; replace if out of range
  5. Perform a voltage drop test on the sensor circuit while wiggling the harness to check for intermittent opens
  6. Inspect the reluctor ring or tone wheel for debris, cracks, or missing teeth
  7. If all else checks out, test the ECM signal output and wiring continuity to rule out an internal ECM fault

Speed sensor faults that fool technicians

  • A common misdiagnosis is replacing the speed sensor when the real problem is a chafed wire in the harness near the transmission or firewall, so always perform a wiggle test and continuity check before condemning the sensor.
  • On some Subaru models, the vehicle speed sensor signal is shared with the ABS and cruise control systems, so a fault in the ABS wheel speed sensor circuit can set P1540 even though the transmission-mounted sensor is fine.
  • Aftermarket wheels or tires with a different overall diameter can cause the ECM to see an implausible speed signal and set P1540, so verify the vehicle has the correct tire size before diving into electrical diagnostics.
  • A weak or failing battery or poor ground connection can cause intermittent speed sensor codes, so check battery health and ground straps as part of a thorough diagnosis.
  • The speed sensor reluctor ring can accumulate metallic debris from normal wear, causing a dropout in the signal that sets P1540 without any visible sensor damage.

Can I keep driving with P1540?

You can usually drive with P1540 set, but be aware that the transmission may shift erratically and the speedometer may be inaccurate, which affects cruise control and ABS operation. Avoid sustained high-speed driving or heavy towing until the fault is repaired, and have the vehicle diagnosed promptly to prevent secondary issues.

Guidance is general and written for Subaru vehicles. Exact tests and values vary by model, so confirm the fault before replacing parts.

Running on fumes Free guides aren't free to make. Top up the tank. Any amount, one time. Fuel the Garage