Bafang Error Code Error 21 Fix & Diagnostic Guide

Speed Sensor Pulse Missing — BBS01 / BBS02 / BBSHD / M500 / M510 / M620 / M820

Severity: Warning (Assistance Reduced) • Difficulty: 5-min Trailside • Voltage Target: 4.8V - 5.1V DC

Fault Symptoms & Root Cause

Symptoms: Speed reads 0.0 mph; motor cuts out after 5-10 seconds of pedaling.

Primary Cause: Chainstay magnetic speed sensor misaligned, or distance from spoke magnet exceeds 5mm.

Step-by-Step DIY Diagnostic & Repair Protocol

  1. Check main 1T4 wiring harness and green/yellow waterproof Julet connectors for Error 21.
  2. Separate connector, inspect for pushed-back gold pins, blow out water, and apply dielectric grease.
  3. Perform multimeter voltage check on 5V sensor power rail.
  4. For Hall sensor errors, test Hall signal pins using 5V pull-up bench test while spinning motor.

Multimeter Testing & Bench Specs

Multimeter Test Procedure: Measure DC voltage between Red (5V) and Black (GND) on throttle/sensor plug. Must read 4.3V to 5.0V. Test signal wire (0.8V to 4.2V variable).

Required Diagnostic Tools: Digital Multimeter & Precision Hex/Torx Set

Wiring Pinout & Expected DC Values

Pin Function Target Voltage / Signal Spec
Pin Pin 1 (Red) 5V Sensor Power 4.8V - 5.1V DC
Pin Pin 2 (Black) Ground Reference 0.0V Ground
Pin Pin 3 (White) Speed / Hall Signal 0V / 5V Pulse Toggle
Pin Pin 4 (Green) UART TX / CAN-H 2.5V - 3.3V Logic
Pin Pin 5 (Yellow) UART RX / CAN-L 2.5V - 3.3V Logic

Frequently Asked Questions

What does Bafang Error Error 21 mean?

Speed Sensor Pulse Missing on BBS01 / BBS02 / BBSHD / M500 / M510 / M620 / M820. Symptoms include Speed reads 0.0 mph; motor cuts out after 5-10 seconds of pedaling.. The root fault is: Chainstay magnetic speed sensor misaligned, or distance from spoke magnet exceeds 5mm.

How do I diagnose and fix Bafang Error Error 21?

Check main 1T4 wiring harness and green/yellow waterproof Julet connectors for Error 21. Separate connector, inspect for pushed-back gold pins, blow out water, and apply dielectric grease. Perform multimeter voltage check on 5V sensor power rail. For Hall sensor errors, test Hall signal pins using 5V pull-up bench test while spinning motor.

What multimeter voltage should I read during testing?

Target voltage is 4.8V - 5.1V DC. Follow the test procedure: Measure DC voltage between Red (5V) and Black (GND) on throttle/sensor plug. Must read 4.3V to 5.0V. Test signal wire (0.8V to 4.2V variable).

Other Bafang Error Codes

Bafang E30 / 30
Display to Controller Communication Loss
Bafang E21 / 21
Speed Sensor Cable Abnormality
Bafang E08 / 08
Motor Internal Hall Sensor Signal Abnormality
Bafang 07 / 007
High Voltage Protection / Battery Low Voltage Cutoff
Bafang Error 09 / E09 / 09H
Motor Phase Line Open Circuit or MOSFET Short
Bafang 06 / E06
Low Voltage Protection / Battery Discharged