01 Understanding the Engine Block: A Comprehensive Guide • 02 This One Oil Filter Mistake Could Be Silently Destroying Yo… • 03 He Paid $900 for a Used Car, Fixed It in Minutes, and Now t… • 04 ECU Remapping: What It Is and How It Can Benefit Your Car • 05 The Latest Advances in 3D Printing: How This Technology is … • 06 P0025 B camshaft position - timing over retaded (Bank 2) • 07 Drivers Urged To Check Their Car Mirrors After Hidden Safet… • 08 After 66 Years, Someone Finally Fixed the Seatbelt's Bigges… • 09 Why Your Car Suddenly Feels Slower Even Though Nothing Seem… • 10 All-Wheel Drive vs. Four-Wheel Drive: Navigating Different … •

DTC codes / BMW codes / P1540

P1540 · BMWPedal Position Sensor

P1540 on BMW vehicles indicates that the engine control module (DME) has detected an implausible or missing signal from the pedal position sensor, which is part of the electronic accelerator pedal assembly. The computer compares the two redundant sensor tracks inside the pedal and flags the code when their voltages do not correlate as expected or when the signal falls outside the valid range.

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

Symptoms you may notice

  • The check engine light or electronic throttle control warning light illuminates on the dashboard.
  • The engine may enter limp mode, limiting power and engine speed to a fast idle.
  • The accelerator pedal may feel unresponsive or require excessive travel before the engine responds.
  • In some cases, the engine may idle erratically or stall when coming to a stop.
  • Often no symptoms besides the warning light, especially if the fault is intermittent.

Common causes, most likely first

  1. Worn or contaminated pedal position sensor tracks inside the accelerator pedal assembly.
  2. Corroded or loose electrical connector at the pedal sensor or throttle valve.
  3. Damaged wiring harness between the pedal sensor and the DME, often from chafing or rodent damage.
  4. Failed accelerator pedal module due to internal electronic failure.
  5. Software glitch or outdated DME programming causing false plausibility errors.
  6. Water ingress into the pedal sensor connector or footwell area.

How to diagnose and fix it

  1. Use a BMW-specific scan tool to read the live data from both pedal sensor tracks and compare their voltages through the full pedal travel.
  2. Visually inspect the pedal sensor connector and wiring for corrosion, loose pins, or damage, and clean or repair as needed.
  3. Check for water leaks into the driver footwell that could affect the pedal sensor or its connector.
  4. Perform a throttle adaptation reset with the scan tool after any repairs or if the pedal sensor is replaced.
  5. If live data shows erratic or non-correlating signals, replace the accelerator pedal assembly with a genuine BMW part.
  6. Check for and install any available DME software updates that address pedal sensor plausibility faults.
  7. Clear the fault memory and road test the vehicle to confirm the code does not return.

Pedal Sensor Faults That Mimic Other Issues

  • A weak or failing battery can cause voltage drops that trigger P1540 because the pedal sensor reference voltage becomes unstable, so always check battery health and charging system first.
  • The pedal position sensor is a dual-track potentiometer, and a single worn track can set P1540 without any driveability complaint, making live data comparison essential.
  • After replacing the accelerator pedal, a throttle adaptation reset is mandatory on many BMW models; skipping it can leave the engine in limp mode and falsely suggest the new part is faulty.
  • Corrosion in the pedal sensor connector often results from a clogged sunroof drain or windshield cowl leak, so fixing the water source prevents repeat failures.
  • P1540 can be set by a faulty throttle valve assembly even though the code points to the pedal, because the DME cross-checks both signals for plausibility.

Can I keep driving with P1540?

If the vehicle is in limp mode, drive only to a safe location or workshop at low speed and avoid highways. If the warning light is on but the car drives normally, you can continue driving cautiously, but have the fault diagnosed soon to prevent an unexpected loss of power.

Guidance is general and written for BMW 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