Bafang Error 21

chashb

100 mW
Joined
Jan 22, 2007
Messages
36
I posted this on the general ebike discussion by mistake. (moderator please remove from there)

I recently received my Tripod velomobile from Columbia Cycle Works. Something has gone wrong in that I get an error 21 when I try to ride it. This is a speedometer error. Sure enough, my speedometer stays at 0 mph now all of a sudden. The Bafang controller won't run with any error messages, so I'm dead in the water...

Out of the Bafang controller there's a three conductor cable. There's a red, black, and a white wire. I believe that the red wire is the positive bias supply for the sensor, the black wire is the return, and the white wire is the output of the speedometer hall sensor. Is this correct? I'm getting no voltage between the red and the black wire but am getting 5V between the white and the black wire. I suspect that this is because the sensor input to the Bafang controller has a pull-up resistor. This also suggests that the 5V sensor supply in the Bafang controller is still working. I'm thinking that perhaps the red wire is open somewhere in the cable between the Bafang controller in the front of the velomobile and the back end where the sensor is mounted to the rear wheel dropout. Does this sound right? If any of you have a functioning Bafang controller, I'd greatly appreciate it if you could check and see if you're getting a voltage between your red and black wire coming out of the controller. Is it easy to get inside the Bafang controller should I have to re-establish a connection at that point?

Thanks!

Charlie
 
Error 21 doesn't make it unrideable. It just will cut out the display - limit your ability to change pas level and it won't show your speed. I've ridden mine like that for the past year, since the cable got cut when my frame broke.
Is the red light going on and off when you spin the wheel? If the magnet isn't installed correctly the speedometer won't register anything. IIRC the light goes red when the magnet hits it.
 
You are correct. The motor will still run with the display only displaying "ERROR 21". Power to the display unit would have to be cycled without pedaling in order to see information like battery level and to adjust the assist level. This is real bad programming on the part of Bafang! Imagine loosing all of your vehicle information like gas gauge, odometer, etc. when you get a check engine light in your car and that's essentially what I've got here... I've attached a drawing that shows the female connector end of the cable that plugs into the speedometer hall effect sensor near the rear wheel. If anyone with either a 350W, 500W, or 750W Bafang mid-drive could unscrew this cable from the speedometer hall sensor and measure the voltages indicated on the attached drawing I'd greatly appreciate it!

Oh and yes, I'm not getting the red LED lighting when I manually spin the wheel. This isn't due to the sensor/magnet gap though... I believe I've lost power to the speedometer hall effect sensor....

Thanks!

Charlie
 

Attachments

  • Bafang speedometer hall sensor source cable.pdf
    17.5 KB · Views: 1,721
I have a vague recollection of someone asking this before in another thread, and the fix being to take off the controller, unplug one of the small plugs that has the sensor wires and plug it in again.

Was a long time ago when i was researching what kit to get. sorry cant be more specific. :(
 
Thanks for your reply astmacca.

I tested the speedometer hall sensor by itself on a bench with a scope and a magnet. When I apply 5V to the red wire, ground to the black wire, and look at the white wire with a meter, I get 0V on the meter when the magnet passes over the sensor along with the sensor red LED turning on and when I remove the magnet I get 5V on the meter and the sensor red LED turns off. I know it's not the sensor that has failed.

Charlie
 
Can anyone please make the voltage measurements I'm asking for in the enclosed drawing on their working Bafang 350w/500w/750w mid-drive? It's the only way I can be 100% certain that I have a real issue with my Bafang motor controller. Thanks!

Charlie
 

Attachments

  • Bafang speedometer hall sensor source cable.pdf
    17.5 KB · Views: 1,141
Ok, from the drawing you linked to, on my bike:

Voltage between Black and Red: 4.94V
Voltage between Black and White: 4.78V

Had to cut some short wires and shove down the holes in the connector as my cheap meter probes were too thick so not sure how good the connection was??
Would that affect the reading? Anyhow, spitting distance of 5V on both.
 
Thanks astmacca! I think your readings are accurate. I had to do the same thing to measure mine. This is exactly what I was looking for, but hoping wasn't the case... :( This means that my Bafang motor controller has a failed speedometer hall sensor drive supply output... :(

Charlie
 
this means that my Bafang motor controller has a failed speedometer hall sensor drive supply output... :(

Bummer. :( Did you pull off the controller yet and check the wires/plug where the sensor actually connects into the controller??

You could check for continuity on that wire then as well. Hopefully its something simple like that and not a dud controller.

Good luck.
 
How do I get at the controller?

Its built into the motor section. Not opened it myself but reputedly easy to get to.

Try this thread as it has some tear-down vids and pics.

http://endless-sphere.com/forums/viewtopic.php?f=28&t=58898

And this is the "main" thread that also has some discussions where people have ripped out controllers.

http://endless-sphere.com/forums/viewtopic.php?f=28&t=50104
 
Ha... I was just in one of those threads! :) The cables including the speedometer cable goes inside the motor housing and directly into the potting, so there's no way to get at the board itself to effect a repair. It does, however, look like the potted controller itself may be replaceable based on a picture I saw in one of the links you gave me. At worse, I'd have to get the potted controller with a new cover and new cables coming out to wire into my Tripod. Thanks a bunch astmacca! You've been really helpful and I appreciate it!!

Charlie
 
The cables including the speedometer cable goes inside the motor housing and directly into the potting,

Ah....those plugs i thought of are for something different.

New controller maybe??

http://em3ev.com/store/index.php?route=product/product&path=46&product_id=188
 
Nope! No need for a new controller! I got to thinking and it occurred to me that a lot of the bicycle speedometers on the market use reed-type sensors instead of hall effect sensors. The advantage to this is that the reed-type sensor doesn't require a bias supply to switch on/off when a magnet is passed over it. Perfect, as I no longer have a bias supply on the red wire... Since the ground and the sensor input signal wire looked like it was still okay, I tried a reed-type sensor from an old speedometer I had laying around and wallah! My speedometer is working again! I'll test it more thoroughly this weekend to make sure I'm not getting any accuracy errors due to any switch bounce from the reed-switch, but from what I saw in the work shop, I think it's going to be fine.. It would appear that there's some digital filtering going on in the Bafang speedometer software..

Thanks again for all of your help astmacca! Thanks for the link to a new controller as well! That's very handy to know!

Charlie
 
The advantage to this is that the reed-type sensor doesn't require a bias supply to switch on/off when a magnet is passed over it.

Very Cool! :) A good fix into the knowledge base.
 
I had a chance this past weekend to thoroughly test out the reed-switch type speedometer sensor. It works fine. :mrgreen:

Charlie
 
CdnE90 said:
Does anyone know if the Filzer uses a reed sensor? (http://www.mec.ca/product/5005-085/filzer-db-wiring-kit/)

That does look like a reed sensor.

Andrew
 
I just installed my Bafang 750 on my single-speed to test it out for a bit.
Got this same error, but like the previous posters stated, the motor still functioned just fine without the display up and about.
In the meantime, I still have my Cateye computer mounted on the front wheel to keep an eye on speed and such.

Shakedown cruises.
 
Guys, I have a BBSHD with the same problem now (Display C965). Could anyone explain me step by step what do to solve this annoying problem PLEASE? Im really new about e-bikes and electronics so don't know exactly what you were talking about before. Please anyone help me !!
 
I tinkered with my speed sensor yesterday, just re-routing some cables and 'improving' the mount of the sensor. I then had an issue. The red light on the sensor was lighting up when the magnet passed it, but then stayed on and was not recording any speed, so I too had the error 21 on trying to ride. Also, after a minute or two, the system powered down itself, presumably as a safety measure. I thought it was a magnet issue and messed around, trying to get the sensor to pick up on the magnet and function properly. Then I change the sensor to a horizontal position – it had been upright – and hey presto! it worked fine. Have I discovered something which is common knowledge to all the Bafang vets?
 
chashb said:
I had a chance this past weekend to thoroughly test out the reed-switch type speedometer sensor. It works fine. :mrgreen:

Charlie
How did it go after that. Controller still working fine? I'm about to apply the reed sensor fix, but if the sensor problem is indicative of a controller that is about to fail I may be better of swapping the controller.
Sensor is fine, tested it on another bike, so it must be the cabling or controller.
 
Back
Top