Skip to content
Find my code

21

Speed sensor fault

Stop riding Last verified: pending review Reviewed by: editorial team

Quick answer

Error code 21 signifies a fault with the speed sensor, which measures the wheel speed for the e-bike's controller. When this error occurs, the motor will not operate, and the display will show the error code. The issue is typically related to mechanical problems such as a misaligned magnet or a damaged cable.

Stop riding Sensor Often DIY-friendly Beginner (15–30 min)

Does this apply to your bike?

H700 · Bafang · Common displays: DP E171

Heads-up: the same number can mean different things on other systems — always check your drive system first. Browse all drive systems →

What you’ll notice

The display shows error code 21, and the motor is non-functional.

Likely causes, ranked

Start at #1 — causes are ordered by how often they turn out to be the problem.

#1 Misaligned or Missing Magnet

How to check: Inspect the spoke magnet to ensure it is properly aligned and not missing.

#2 Loose or Disconnected Sensor Connector

How to check: Check the sensor connector for a secure fit and proper seating.

#3 Damaged Sensor Cable

How to check: Examine the sensor cable for any visible damage or pinching.

#4 Failed Speed Sensor

How to check: Test the speed sensor functionality by checking if the LED blinks when the magnet passes.

Troubleshooting steps

  1. Restart the System

    easy

    Turn off the e-bike and then turn it back on to see if the error clears.

    If it passes →Check the magnet position.
    If it fails →Proceed to check the speed sensor.
  2. Check Magnet Position

    easy

    Ensure the spoke magnet is aligned correctly and within 10-20mm of the sensor.

    If it passes →Check the sensor connector.
    If it fails →Adjust the magnet position.
  3. Inspect Sensor Connector

    easy

    Look for loose connections or corrosion on the sensor connector.

    If it passes →Check the sensor cable.
    If it fails →Clean or repair the connector.
  4. Examine Sensor Cable

    intermediate

    Inspect the cable for any signs of damage or wear.

    If it passes →Test the sensor functionality.
    If it fails →Replace the sensor cable.
  5. Test Speed Sensor Functionality

    easy

    Spin the wheel and observe if the sensor's LED blinks.

    If it passes →Error resolved.
    If it fails →Replace the speed sensor.

When to stop and get professional help

If the error persists after all checks and replacements, consult a professional.

Never open, puncture, or disassemble the battery pack, and never bypass the BMS. See our safety guide.

More codes for H700

Different number? Type it into the search box at the top of the page.

Did this fix your problem?

None% of riders reported this solved

Sources & verification

Last verified: pending review Reviewed by: editorial team

Missing a code or step? Tell us.

Spotted a code we don’t cover, or a step that didn’t match your bike? Send it in — submissions shape what we research next.

Only your optional email is stored to reply if we need details.