Bafang Error Codes Complete Guide: All Error Codes, Symptoms, Causes, and Fixes

If your Bafang display shows an error code, the motor will usually cut out or behave erratically. This guide covers all 32 Bafang error codes. Find your code in the lookup table first, then follow the detailed steps for the most common codes. For codes not featured, check the brief entries below. Always start by disconnecting and reconnecting the battery and display—about 20% of faults are loose connections.


Quick Lookup Table

CodeSymptomCauseFixCost (parts, DIY)
08Throttle no response or full powerThrottle signal voltage out of rangeCheck connector; replace throttle$10–$30
30Display shows “COM” or no communicationCommunication fault between controller and displayRe-seat cables; replace cable or display$5–$20
21Motor cuts out or jerksSpeed sensor misalignment or damageAdjust gap (1–3 mm); replace sensor$15–$40
36Battery gauge erratic, no assistBattery voltage sense wire brokenInspect BMS sense wire; replace BMS$30–$80
05Brake cut-off not workingBrake lever sensor stuck or shortedClean contacts; replace lever sensor$15–$30
04Pedal assist stops randomlyCadence sensor failureCheck magnet ring; replace PAS sensor$20–$50
37Motor runs rough under loadPhase wire short or hall sensor faultCheck phase connectors; replace hall$40–$100
11Controller overheatExcessive current or poor ventilationReduce load; improve airflow; replace controller$50–$120

Costs are ballpark estimates. Actual prices vary; verify locally.


Featured Error Codes (Detailed Diagnosis)

Each featured code includes a realistic branch—what to do if the first fix doesn’t work—and a failure mode that can still trip you up.

Error Code 08 – Throttle Error

Symptom: Throttle either does nothing or goes full power immediately. Motor assist cuts out and code 08 appears on the display.

Cause: The throttle’s output voltage is outside the 0.8–4.2 V range the controller expects. A damaged wire, corroded connector, or failed hall sensor inside the throttle is the usual culprit.

Fix:

1. Unplug the throttle from the controller. Inspect the pins for bent or corroded contacts. If pins look okay, plug in a known-good throttle to test. If the code clears, replace the original throttle. 2. Realistic branch: If the code clears with a replacement throttle but returns after a few rides, the real issue may be a partially broken wire inside the cable that only opens under vibration. Replace the entire throttle cable harness (not just the grip) or add a wire tie to relieve strain near the handlebar clamp.

3. If no change with a new throttle, measure the 5 V supply at the controller side. Red wire to black should read ~5 V DC. If it’s lower, the controller’s 5 V regulator is failing—that means a controller replacement is ahead. 4. Reconnect all wires, ensure the throttle cable isn’t pinched near the stem.

Failure mode: You replace the throttle, code disappears for a week, then returns. The problem is a wobbly connector at the controller side that only loses contact on big bumps. Next move: Add a dab of dielectric grease to the pins and secure the connector with a zip tie to keep it snug.

Cost: $10–$30 for replacement throttle.

Stop threshold: If you measure 5 V at the controller and a known-good throttle still fails, the controller’s throttle input port is damaged—stop and replace the controller. Do not try to solder onto the controller board yourself unless you’re experienced with SMD components.


Error Code 30 – Communication Error

Symptom: Display shows “30” or “COM,” motor assist cuts out, and battery/speed data may disappear.

Cause: The serial data line (usually the yellow wire) between display and controller is broken. Loose connectors, pin damage, or incompatible display firmware are common.

Fix:

1. Disconnect and reconnect the display cable at both ends (display and controller). Make sure pins fully seat. If the code clears and returns only on big bumps, the connector may need a small shim to hold it tight.

2. Inspect the cable for cuts, especially near the head tube where it bends. If you see any exposed copper, replace the cable.

3. Realistic branch: Try a different display from the same series (e.g., DPC-18, DPC-08). If the code goes away, the original display board has a bad UART chip—replace the display, not the controller.

4. If a known-good display still shows code 30, the controller’s UART port is likely dead. Replace the controller.

Failure mode: You replace the display cable and the code stays. The problem is actually a corroded pin inside the display itself that looks fine until you probe it. Next move: Clean both ends with contact cleaner and a toothbrush, then use a multimeter on continuity mode between the pin on the controller plug and the corresponding pin on the display plug (with both disconnected). If you get intermittent continuity, replace the cable or the display.

Cost: $5–$20 for cable; $50–$100 for controller.

Stop threshold: If you’ve confirmed good cables and a known-good display still errors, the controller board is the root cause. Stop buying display parts—order a controller matched to your motor (same voltage and phase count).


Error Code 21 – Speed Sensor Error

Symptom: Motor cuts out intermittently or jerks when pedaling. Display shows zero speed while riding.

Cause: The wheel magnet doesn’t pass close enough to the sensor (gap >5 mm), the magnet is loose, or the sensor wire is severed.

Fix:

1. Measure the gap between sensor face and magnet. It should be 1–3 mm. Bend the sensor bracket to adjust. The magnet must pass directly in front of the sensor’s marked face every rotation.

2. Check for loose spokes or a bent rim that moves the magnet out of alignment. Tighten or true as needed.

3. Realistic branch: If the gap is fine and the magnet passes correctly but the error persists, the sensor wire may have an intermittent break inside the insulation. Flex the cable gently while watching the display speed reading—if the number jumps to 0, replace the sensor.

4. Use a multimeter to check continuity in the sensor cable (black and green wires). If open, replace.

Failure mode: The speed sensor works fine on the bench but fails when installed. The brake disc is magnetized and passing close to the sensor can confuse it on hub-motor bikes. Next move: Move the sensor to a different spoke location at least 2 inches away from the brake rotor.

Cost: $15–$40 for replacement sensor.

Stop threshold: If you’ve replaced the sensor and the error still occurs, the controller’s speed sensor input circuit may be damaged. Professional diagnosis with a scope is needed; replace the controller if warranty allows.


Error Code 36 – Battery Voltage Sense Error

Symptom: Battery gauge shows erratic percentages or no reading. Motor may still run but with reduced power.

Cause: The voltage sense wire from the BMS to the controller is broken. This thin wire (often the center pin on the discharge connector) carries pack voltage for the display.

Fix:

1. Remove the battery and inspect the discharge connector for bent or missing pins. The center pin is often the voltage sense.

2. Measure between battery positive and the voltage sense pin with a multimeter. You should read full pack voltage. If zero, the BMS sense trace is open.

3. Realistic branch: If the pin reads voltage but the error persists, the sense wire may have high resistance from a corroded connection. Clean all contacts with isopropyl alcohol and retighten. If that doesn’t help, you may need to open the battery pack to resolder the sense wire near the BMS.

4. Stop threshold: Do not open a lithium battery pack unless you have experience and proper tools. A short can cause fire. If you cannot access the BMS safely, take the battery to a shop.

Failure mode: You open the pack, resolder the sense wire, and the error goes away for two rides. Then it returns. The BMS itself has a cracked voltage trace that re-broke under vibration. Next move: Replace the entire BMS (about $30) rather than attempt a second solder repair.

Cost: $30–$80 for replacement BMS.


Error Code 05 – Brake Sensor Error

Symptom: Motor does not cut out when braking, or assist is permanently off as if the brake is always applied.

Cause: Brake lever sensor (magnetic or reed type) stuck closed or open circuit.

Fix:

1. Unplug the brake sensor from the controller. If code clears, the sensor is faulty—replace the lever.

2. Test continuity: closed (conducting) when brake is pulled, open when released. If always closed, replace the sensor.

3. Realistic branch: If the sensor passes the continuity test but the error still occurs, the brake wire may be shorted to ground inside the cable. Inspect the full length for pinches or rub spots. Replace the brake lever assembly if the wire is molded in.

4. For magnetic sensors, clean the magnet and reed switch area with contact cleaner.

Failure mode: After replacing the brake lever, code 05 still appears. The real issue is that you unplugged the sensor but forgot to reconnect it after testing—the controller senses an open circuit as a fault. Next move: Always plug the brake sensor back in before final testing. If the sensor is physically removed, you may need to jumper the connector (two wires shorted together) to simulate a released brake, but only do this if you permanently disable the brake cut-off (not recommended).

Cost: $15–$30 for replacement lever sensor.

Stop threshold: If you’ve confirmed the sensor and wiring are good and the controller still shows code 05, the controller’s brake input circuit is damaged. Replace the controller.


Error Code 04 – Pedal Assist Sensor (PAS) Error

Symptom: Pedal assist works intermittently or not at all. Pedaling does not trigger the motor.

Cause: Cadence sensor (PAS) magnet disc loose on crank arm, sensor misaligned, or broken wire.

Fix:

1. Remove the left crank arm. Check that the magnet disc is securely fastened and not cracked. The magnets must pass within 5 mm of the sensor’s Hall element.

2. Ensure the sensor is mounted so the magnet disc rotates through its slot without rubbing.

3. Realistic branch: If the disc is tight and aligned but the error persists, the PAS wire may have a break inside the insulation where it exits the bottom bracket. Squeeze the wire along its length while watching the display for code 04—if it blinks, replace the PAS sensor.

4. Use a multimeter on resistance mode across the PAS signal wires (usually three wires: +5V, GND, signal). Rotate the cranks slowly. The signal wire should pulse.

Failure mode: You replace the PAS sensor and the code goes away, but after a long ride the error returns. The new sensor came with a magnet disc that had a slightly different diameter, so the magnets no longer align correctly after the crank was reinstalled. Next move: Use the original magnet disc if the spline pattern matches; otherwise measure and adjust the sensor bracket height.

Cost: $20–$50 for replacement PAS kit.

Stop threshold: If you’ve tested a known-good PAS sensor and the controller still shows code 04, the controller’s PAS input is faulty. Order a new controller.


Error Code 37 – Motor Hall Sensor or Phase Error

Symptom: Motor runs rough, vibrates, or stalls under load. Code 37 appears after a phase wire short or hall sensor failure.

Cause: One internal Hall sensor failed, or a phase wire is shorted to ground.

Fix:

1. Disconnect motor phase wires (thick colored wires). Measure resistance between each pair—should be 0.1–0.3 Ω and equal. Infinite resistance means an open phase (likely a broken motor winding).

2. Test Hall sensors: apply 5 V to red wire, ground to black, then measure the three signal wires while slowly turning the wheel. Each should pulse 0–5 V. A flat line = failed Hall.

3. Realistic branch: If one phase wire reads high resistance (>1 Ω), the problem may be a corroded bullet connector instead of a motor winding. Cut off the connector and solder directly, then retest.

4. If a Hall sensor is bad, replace it (requires opening the motor side cover). If the winding is shorted, replace the whole motor.

Failure mode: You replace the Hall sensor, reassemble the motor, and code 37 returns after a few miles. The new Hall sensor was installed with too much heat, damaging it, or the epoxy hardened and cracked the solder joint. Next move: Use a low-wattage iron and handle the sensor leads gently. Alternatively, have a motor repair shop do the replacement.

Cost: $40–$100 for hall repair; $150–$300 for new motor.

Stop threshold: If you don’t have a soldering iron, spare Hall sensors, and experience opening a motor, do not attempt this at home. A misaligned magnet ring or pinched wire inside the motor can cause a short. Professional repair is safer.


Error Code 11 – Controller Over-Temperature

Symptom: Motor power cuts out after climbing a steep hill or riding at full throttle for several minutes. Code 11 appears.

Cause: Controller internal temperature exceeds its limit (typically 100–120°C). The controller reduces current to protect itself.

Fix:

1. Stop riding and let the controller cool 15–20 minutes. If code clears, the system is working normally under heavy load.

2. Check controller mounting position—it needs airflow. If it’s wrapped in tape or buried in a frame bag, relocate it.

3. Realistic branch: If the code returns after a short, moderate climb, the controller may have a damaged MOSFET that causes it to run hot even at low current. Replace the controller—do not try to repair MOSFETs unless you can match the exact part.

4. Reduce load: shift to a lower gear, use lower PAS level on climbs. If you commute up long hills regularly, consider a controller with higher temperature rating or external cooling fins.

Failure mode: You install a new controller and the code still appears on the same hill. The new controller has the same thermal limits. Next move: Add an aluminum heat sink plate between the controller and frame, or mount it externally to get more airflow.

Cost: $50–$120 for replacement controller.

Stop threshold: If the controller is hot but the ambient temperature is mild and you’re not climbing, the controller may have an internal short that draws excessive standby current. If it gets hot even with the motor off, stop using it immediately—fire risk. Replace the controller.


Other Error Codes (Brief Entries)

CodeSymptom & CauseFix
27Motor over-current – controller detects too much drawReduce load; check for seized motor or shorted phase wires. Replace controller if persistent.
35Battery low voltage under load – sag below minimum thresholdCharge battery fully; test with a known-good battery. If OK, replace BMS.

Similar Posts