BBSHD 21h error code and its "5 minute ride"....

Discussions related to motors other than hub motors.
This includes R/C motors, botttom bracket, roller and geared drives.
Post Reply
doubledipsoon   100 W

100 W
Posts: 133
Joined: Feb 22 2013 8:31pm

BBSHD 21h error code and its "5 minute ride"....

Post by doubledipsoon » Oct 01 2017 2:19pm

I already know that the infamous 21h error code means a dysfunctional speed sensor and no mph/odometer readout on my Bafang DPC-14 display, but why the 5 minute ride before the motor and display shut down. I turn it back on, and it's good for another 5 minutes, and then shuts off again. This is what I love about the googlization of electric bikes- maybe next year their come out with a BBSHD with just an on-off switch and no other high tech BS to go wrong, but I've already gone through that in a previous thread......

User avatar
fechter   100 GW

100 GW
Posts: 14173
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: BBSHD 21h error code and its "5 minute ride"....

Post by fechter » Oct 01 2017 3:29pm

The speed sensor on mine has a LED that blinks when the magnet passes by. Does the LED blink?

I can't answer why it would run for 5 minutes then shut off.
"One test is worth a thousand opinions"

doubledipsoon   100 W

100 W
Posts: 133
Joined: Feb 22 2013 8:31pm

Re: BBSHD 21h error code and its "5 minute ride"....

Post by doubledipsoon » Oct 01 2017 5:19pm

Fechter, nice to hear from you. OK, I turn on the display, and the sensor lights up- after the initial pass by the spoke magnet, it goes out, but then doesn't come back on after the magnet moves on. In other words, does a half a blink (goes from on to off) and stays out. I just returned from a wonderful 10 mile round trip through the apple orchards of San Juan Bautista, and the bike operated great, except for the cut out after exactly 5 minutes of riding. This "5 minute cutout" is consistent and happens like clockwork, almost as if the hardwiring of the controller is intending it to do so. Whether this is a warning, a slow burnout, or a fluke, I don't know, but I do have 200 miles on this fantastic machine, and ride everyday, so I'll keep you posted. (this incident, error code happened after mile 185. By the way, nothing extraordinary has happened during my rides. I typically, draw about 10-15 amps on the flats, and 20-27 amps on the steep hills, on a 42T Bling Ring chainring, and a 11-34T Sunrace rear cassette. I only use the 4 highest gears. My chainline is perfectly matched up to the 4th gear, and my 1st gear has never tripped the chain, even tho the chainline is 3 cogs away from the chainline. The motor does get warm to warm-hot on the steepest hills, but my daily ride has only 4 or 5 block-long steep hills. See, this Bafang software seems to have plenty of bugs in it, and no where to go to find out why, yes?

Voltron   10 MW

10 MW
Posts: 2039
Joined: May 02 2013 4:53pm
Location: Santa Barbara CA

Re: BBSHD 21h error code and its "5 minute ride"....

Post by Voltron » Oct 01 2017 5:48pm

It draws all the info from the speed sensor, so if that's not triggering, the bike thinks it's been turned on and sitting still, even thought the motor is going. I went thru a few test rides on a customer's bike when the hub motor internal speed sensor wasnt hooked up, and it had the same 5 min run problem.

doubledipsoon   100 W

100 W
Posts: 133
Joined: Feb 22 2013 8:31pm

Re: BBSHD 21h error code and its "5 minute ride"....

Post by doubledipsoon » Oct 01 2017 8:39pm

Voltron, so if I choose to run this baby in this inconvenient manner, and keep re-turning it on, over and over and over again, am I doing it any harm?

User avatar
Ykick   100 GW

100 GW
Posts: 5558
Joined: Nov 26 2009 6:10pm
Location: San Diego, California

Re: BBSHD 21h error code and its "5 minute ride"....

Post by Ykick » Oct 01 2017 9:05pm

doubledipsoon wrote:Voltron, so if I choose to run this baby in this inconvenient manner, and keep re-turning it on, over and over and over again, am I doing it any harm?
No harm and if you want to prevent it from powering OFF disable the "auto-off" feature under display/dash settings.
Talent must not be wasted.... Those who have talent must hug it, embrace it, nurture it and share it lest it be taken away from you as fast as it was loaned to you.

- Frank Sinatra

dustNbone   10 kW

10 kW
Posts: 903
Joined: Mar 13 2016 9:59pm
Location: Vancouver, BC

Re: BBSHD 21h error code and its "5 minute ride"....

Post by dustNbone » Oct 01 2017 10:02pm

You can run the BBSHD without a display. Connect a switch to 2 wires in the display connector and you have your power switch with no display. I forget which 2 pins but the pinout is readily available.

User avatar
fechter   100 GW

100 GW
Posts: 14173
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: BBSHD 21h error code and its "5 minute ride"....

Post by fechter » Oct 02 2017 8:32am

Ah, the auto off feature makes sense. Easy enough to disable that.

If you want to run without the display, you won't have any way to change the PAS setting. It will default to speed 1, but you can program speed 1 to be whatever you want.
"One test is worth a thousand opinions"

pmack   1 µW

1 µW
Posts: 3
Joined: Apr 12 2018 7:47pm

Re: BBSHD 21h error code and its "5 minute ride"....

Post by pmack » Jul 06 2018 3:56pm

I have a similar problem except the motor cuts out after 30 seconds without the speed sensor. I disabled the auto off. Any suggestions on how to use the bike with the speed sensor?

User avatar
fechter   100 GW

100 GW
Posts: 14173
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: BBSHD 21h error code and its "5 minute ride"....

Post by fechter » Jul 06 2018 7:24pm

Are you missing the speed sensor?
"One test is worth a thousand opinions"

pmack   1 µW

1 µW
Posts: 3
Joined: Apr 12 2018 7:47pm

Re: BBSHD 21h error code and its "5 minute ride"....

Post by pmack » Jul 06 2018 7:51pm

I am missing the speed sensor cable. I just ordered one. I get a speed sensor error 21h after about 30 seconds of use of the throttle. The motor will no longer function until I turn it off and on again. I tried PAS and the same behavior. I was hoping to be able to ride the bike without the speed sensor.

User avatar
fechter   100 GW

100 GW
Posts: 14173
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: BBSHD 21h error code and its "5 minute ride"....

Post by fechter » Jul 07 2018 1:18pm

I'm not aware of a way to work around not having the speed sensor or at least having some signal going to it.
"One test is worth a thousand opinions"

pmack   1 µW

1 µW
Posts: 3
Joined: Apr 12 2018 7:47pm

Re: BBSHD 21h error code and its "5 minute ride"....

Post by pmack » Jul 07 2018 3:16pm

I have the speed sensor installed but it can't read magnets until I get the cable. The throttle or PAS won't work once I get the 21h error after about 30 seconds. The guy that I purchased it from said the BBSHD have gone through some firmware changes.

gburb   100 µW

100 µW
Posts: 7
Joined: Jul 27 2015 7:01pm

Re: BBSHD 21h error code and its "5 minute ride"....

Post by gburb » Aug 27 2018 12:46am

Ykick wrote:
Oct 01 2017 9:05pm
doubledipsoon wrote:Voltron, so if I choose to run this baby in this inconvenient manner, and keep re-turning it on, over and over and over again, am I doing it any harm?
No harm and if you want to prevent it from powering OFF disable the "auto-off" feature under display/dash settings.
Could you provide more details about the "auto-off" feature? Are you talking about on the display or programming the controller?

gburb   100 µW

100 µW
Posts: 7
Joined: Jul 27 2015 7:01pm

Re: BBSHD 21h error code and its "5 minute ride"....

Post by gburb » Aug 27 2018 12:50am

Ykick wrote:
Oct 01 2017 9:05pm
doubledipsoon wrote:Voltron, so if I choose to run this baby in this inconvenient manner, and keep re-turning it on, over and over and over again, am I doing it any harm?
No harm and if you want to prevent it from powering OFF disable the "auto-off" feature under display/dash settings.
Could you provide more details about the "auto-off" feature? Are you talking about on the display or programming the controller?
fechter wrote:
Jul 07 2018 1:18pm
I'm not aware of a way to work around not having the speed sensor or at least having some signal going to it.
It's always worked for me unitl the last couple of controllers I've purchased. I've always run no speed sensor and no display. That no longer works because the motor now shuts down when it has an error 21. I really wish Bafang hadn't changed that.

gburb   100 µW

100 µW
Posts: 7
Joined: Jul 27 2015 7:01pm

Re: BBSHD 21h error code and its "5 minute ride"....

Post by gburb » Aug 27 2018 12:52am

pmack wrote:
Jul 07 2018 3:16pm
I have the speed sensor installed but it can't read magnets until I get the cable. The throttle or PAS won't work once I get the 21h error after about 30 seconds. The guy that I purchased it from said the BBSHD have gone through some firmware changes.
This has been experience lately as well. Does anyone know how to bypass the speed sensor either within the controller or by programming the controller? I wish there were something that could be done.

User avatar
fechter   100 GW

100 GW
Posts: 14173
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: BBSHD 21h error code and its "5 minute ride"....

Post by fechter » Aug 27 2018 8:28am

In the manual, it says:
BBSHD Time out.JPG
BBSHD Time out.JPG (36.31 KiB) Viewed 2029 times
You have to be in the programming mode to get to this screen.
I wonder if entering 0 would disable it?

Otherwise, about all you can do is provide a signal for the speed sensor. The speed sensor uses a hall effect switch so there are 3 wires, 5V, Ground, and signal. A mechanical switch, like a magnetic reed switch, will work if placed from signal to ground. If there is no way to get a sensor on the wheel, you might get away with mounting one on the chain ring. This would still fail if you coast downhill without pedaling for too long.

Another option would be to make a little pulse generator circuit using a 555 timer or similar. This could be small enough to stuff inside the controller possibly. This would be pretty easy to build by hand, or you can get them cheap enough on a small board.
Here is an example
https://www.ebay.com/itm/New-Adjustable ... s&LH_BIN=1
This would just connect to the speed sensor cable and get powered off the 5v line. Frequency would be set at a fixed value, around 1Hz.
"One test is worth a thousand opinions"

gburb   100 µW

100 µW
Posts: 7
Joined: Jul 27 2015 7:01pm

Re: BBSHD 21h error code and its "5 minute ride"....

Post by gburb » Aug 27 2018 3:13pm

Just ordered a few pulse generators. Thanks for the idea! I'll try messing with the display settings tonight but I doubt that will help the error 21 shutdown. Maybe I'll get lucky :)

gburb   100 µW

100 µW
Posts: 7
Joined: Jul 27 2015 7:01pm

Re: BBSHD 21h error code and its "5 minute ride"....

Post by gburb » Aug 27 2018 7:38pm

Just went into the programming interface of the display. No option for 0. Only 1-9. Looks like I've got to go the pulse generator route.

ichiban   10 W

10 W
Posts: 87
Joined: Aug 19 2018 10:41am
Location: Bangkok, Thailand

Re: BBSHD 21h error code and its "5 minute ride"....

Post by ichiban » Sep 02 2018 12:14am

My tablet crashed on me while finishing typing the reply for this.

I found that we have to install the speed sensor with the plus sign "+" marking on the sensor pointing towards the magnet NOT upward. Otherwise it will report a 21h error code as I found on my system during the installation of this BBSHD.

Below is that useful link regarding this issue that helped to fix mine...

https://aushiker.com/bafang-bbs-error-21-fix/

I did not time it exactly but it worked fine at first after turned on then that 21H error came up and stopped functioning in about a couple of minutes every time. Very similar to your problem.

Hope this help :D
1535864888281.jpg

Post Reply