BBSHD Programming For The Pedaling Cyclist (2023 Update)

After a few years of incremental refinements, lets re-visit BBSHD programming for pedal assist settings that give you a workout, and are also gentle to the drivetrain.

After A Lot Of Tinkering…

I have written in years past about efforts to develop BBSHD settings idealized for cyclists who want to pedal, and even get a workout. I’ve followed up with revisions here and there as I continued to poke at things.

Things have progressed to the point it is worthwhile to revisit this subject, supplement the original article and share what I think is some progress.

What is here was originally part of my Bullitt hill climber build series, mixed in with stuff about that bike. After a while it became clear I needed a dedicated post, where these settings aren’t buried inside something else so nobody knows they exist.

So. Here we are.


The screenshots below are taken from the widely-used, open source Bafang Configuration Tool originated by Stefan Penov. His software (still perfectly usable) can be downloaded here. My screenshots use Version 2.2b, which was taken up by Laurent V. His later version can be found here. I only use it for screen shots.

To do the actual work, I have long owned a Black Box from Lunacycle which has served me very well. In more recent times I have purchased a cheap ‘programming’ cable, a USB-C adapter and use the Speeed app on my Android phone. This lets me stash the cable on the bike somewhere so I can adjust the BBSHD whenever needed.


There are no perfect BBSHD settings for everyone. I am just showing you mine. Hopefully you will see something useful for your own journey. These are my goals:

GOAL 1: (COMPLETELY) Eliminate Excess Drivetrain Wear

On the internet you hear stories about how a powerful mid drive tears up your drivetrain. It doesn’t have to be this way. When I see reports like this I know someone did something wrong.

In separate articles I make the case that on the one hand, a builder needs to use the right components for the bike to work right:

How to Build A Mid Drive Ebike That Doesn’t Break

On the other hand, making it work right long-term is also a function of the cyclist following a few simple rules.

How To Ride A Mid Drive Ebike Without Breaking It

But on the gripping hand, the third essential ingredient for a 100% reliable BBSHD-powered ebike is to adjust motor settings so it doesn’t behave anything like it did when it came from the factory.

Many of the settings described below are exclusive to Goal 1.

GOAL 2: Set Pedal Assist So The Bike Won’t Run Away From You

A cyclist wants to get a workout while riding. This is difficult with a stock BBSHD, because factory-set pedal assist is so powerful. We want PAS to not overpower us … but preserve the option to do that if we want to take a break.

This is crucial to eliminate the complaint against cadence-based pedal assist from people who think they must have torque-based assist to get a natural cycling experience.

Taken together as a whole, settings as described here mean you can set the BBSHD (or BBS02!) motor to a low pedal assist value that provides only a small bump in power when you pedal. This means when you want to accelerate or cope with a hill, you have to put some muscle into it just like on an analog bicycle. Want to put in less muscle? Fine click up what is now a gentler increment of power.

The settings taken together kiss goodbye stuff like unnaturally strong initial power application, shutdown lag and other bits that detract from a more natural cycling experience.

Goal 3: Easily Shift The Power Curve Up or Down Without Screwing Everything Else Up

This entire settings package – taken together – makes for a refined system. We’ll see how you can easily increase or decrease PAS power output levels across its entire scale, so all of that fine tuning stays in place.

Got all that? Here we go, then.

Fraternal Twins

In line with Goal 3, we will look at two configurations that provide very different levels of pedal-assist power.

One is a low-power setup – developed for use mostly on flat land – for high-cadence, high speed cruising. This setup gives a max sustained output of 400-450 watts on Pedal Assist Setting #9. That is not a lot considering I am using a 30a BBSHD on a 52v battery. With that much power behind it, a BBSHD can easily hold 1750 watts. This is a significant reduction with big implications to range and running the motor well below its redline.

We’re limiting PAS power, not throttle power. If you want to put down 1500w to the ground, use your thumb. Current Limit on the Basic Screen is usually the tool for limiting power output, but that cuts everything across the board. We won’t do that.

I said this config was developed for flat land, but it works on hills if you have the right gears. My Apostate uses this setup and it is a light, short-wheelbase mountain bike with a 40T front ring and an 11-46T cluster.

Small and nimble with a pie plate rear cluster, The 26″ Apostate (a rescued 1999 Intense Tracer) doesn’t need big PAS power.

The other configuration is a high-output setup made for high-cadence, slow-speed riding up the steepest of hills. Its maximum sustained PAS output is in the 950-1000 watt range. This config also works great when you are on flat land: just stay down at PAS 1 or PAS 2. Save the big settings for a rainy day (not literally :D). I use this on my hill-climber Bullitt.

You don’t have to use the high output config on an alpine cargo bike, but it certainly works well with one.

Here’s The Rub

These two configurations are arrived at by changing only one setting. Otherwise they are the same. We’ll talk about the one change at the end.

The Throttle Screen

Start And End Voltage

I am using a commonly-known enhanced range of 11 and 42 (standard factory setting is 11 and 35). This wider range makes it easy to smoothly modulate power in small increments (as low as 50 watts based on what my displays tell me). It eliminates the jerky on/off switch that is usually a BBSHD throttle.

Designated Assist Level

By setting this to 9, we tell the controller to treat throttle peak output as if we are on PAS9. Skipping ahead a little, that setting is unlimited at 100% for speed and current limits, so the throttle has access to full motor power. If you are setting a bike up for your 4-year-old, or Grandma, maybe don’t do that.

(Throttle) Start Current

Start Current for the throttle is reduced to 2%, which is really low. The throttle starts laying on power very gently. You hear a lot about how Bafang motors bang and jerk on the chain. 2% on throttle Start Current ends that. If you find 2% is too gentle, try 5%.

The Basic Screen

What I did with the Speed Limit percentages was simply start at 100% on Level 9, and work my way back in 5% increments down to Level 1. Doesn’t look very scientific, does it?

Some people are looking for Speed and Current Limit settings to give them exactly X output at Y setting based on Z input. My take on this: attempts at precision are wasted effort. These settings are ranges with somewhat fluid boundaries, and will not yield hard limits.

For example: the Speed Limit percentage value is not the percentage of your ground speed. Its of motor speed. As in the percentage of max motor rpms. And those max motor rpms are affected by battery voltage, which is on a curve as the battery runs down.

Thus you see basic increments in my various Limit settings: Over time I have decided these increments give me enough change in performance from one to the next to make them worthwhile, while at the same time not emasculating the low PAS settings with limits too small to be useful.

Lots of room here for changes based on personal preference.

The Assist 0 limits of 1 and 1 are there to preserve the normal function of throttle when you set the screen to Level 0, which disables Pedal Assist. This lets you pedal with no motor support without turning the motor off. Throttle remains available in case of an unexpected need.

The Pedal Assist Screen

This is where the magic happens (click an image to enlarge).

ABOVE LEFT: the high power config. RIGHT: The low-power config. Only Current Decay and Keep Current are changed, and changing Keep Current is not necessary.

NOTE: The screen shots above have a graph that does a decent job of trying to explain how the settings interact and affect performance. Want to know what all these settings do? Look at the graph.

Start Current

Set very low at 2% for the same reason it is at 2% on the throttle screen: kinder/gentler initial engagement (5% is a good Plan B).

Slow Start Mode

Set as gentle as is known safe for the BBSHD controller. Lower numbers here = slower starting and 3 gives me the gentlest motor-safe slope to that curve.

Start Degree Signal

Set to a fairly prompt 4. The problem to solve: starting from a stop at an intersection, while on a steep hill. Specifying a lower number of signals before the motor kicks in makes it start up sooner. Start Current and Slow-Start Mode also figure into this equation so this relatively fast engagement doesn’t cause any drivetrain strain.

Stop Delay

Remains as small as is safely possible to preserve the motor controller. Setting it low like this means when you stop pedaling, the motor stops promptly.

HILL MODE: Current Decay Set To 8

This is the one setting that causes the big changes.

In conjunction with the other settings/screens as shown, changing ONLY Current Decay changes the maximum sustained output of the motor while on pedal assist. A setting of 8 gives maximum output to the drivetrain. Current Decay acts, effectively, as a volume control that goes from 1 to 8.

If it is set to the maximum of 8, Current Decay is minimized almost to the point of eliminating it entirely. This makes sense when riding in steep hills.

Setting Current Decay to a low number to increase its effect makes sense on flat ground. You need less power to maintain cruising speed. But in a granny gear, pedaling like mad and crawling up a steep hill? The last thing you need is for the motor to cut back power. So for hills we set it to 8.

As such, when grinding up a hill at 60+ rpm cadence, and 4-9 mph (7-15 km/h) the motor stays consistently strong.


I said earlier setting Current Decay to 8 almost eliminates its effect. Here’s what that means: As you slowly honk your way up a slope, you get strong, consistent power assist. As you crest the hill and transition to flatter ground, or the hill decreases in slope for a segment, typically you stay in the same gear and spin the crankarms faster (before you think to upshift to a smaller rear cog). That is when Current Decay eases back in again. As you start spinning and speed increases the motor will back off the power.

I am describing Crawling up hills like this one (click for interactive street level Google Maps view)

This will also happen if you just upshift on flat ground and start pedaling furiously. Part of this effect may be due to the low gear you are in and the upper rpm limit of the motor. Since Bafang documents nothing and we are left to guess at everything, its hard to say. But I like it this way as it gives a more natural pedal assist behavior.

What I do on that climb up Hoffman Avenue pictured above: You can see if you follow the Google Maps link, it has many different slope angles from bottom to top. I set my gear to a single generous ratio – one cog lower than I’d need on an analog bike. Then I vary my PAS setting up and down as the hill changes slope, never shifting gears. Varying the PAS assist up or down lets me ride like a cyclist, working hard on the pedals as I choose, and maintain my cadence regardless of slope. Thus I am using my PAS panel to take the place of a gear shifter.

Its a technique not possible with an analog bike if you don’t want to pop a blood vessel, and one of the reasons ebikes should be recognized as a different system to master with different rules than old-school bicycles.

FLAT MODE: Current Decay Set To 2

We have taken the same configuration and done nothing more than just turn the volume down.

With the “volume turned down”, pedal assist is still pretty strong at slower speeds with low cadence… exactly what you’d expect coming off a dead stop. But its not so fast you are giggling and leaving people in the dust. You’re starting off only a bit faster than a normal bicycle.

Want more power off the line? Let the throttle help. Don’t do it from a dead stop because thats what kills drivetrains. Give yourself a pedal revolution or two before hitting the juice for, say, 2 seconds.

You’ll know for sure Current Decay is limiting power when you look down on PAS 9 at full speed and see only 400w and maybe 6 or 7 amps on your display.

Stop Decay

This setting is at zero. Once the motor’s assist shutdown is initiated, this setting dictates the slope of the shutdown curve.

I ran some experiments recently as part of an internet discussion. A suggested setting of a whopping 1100 ms (i.e. set it to 110) produced nothing negative. The cutoff happened so fast I couldn’t argue it hurt anything, and I tried to create a problem. It was still a shutdown that happened so fast I couldn’t find a way to screw up.

Keep Current

This is the second of two changed settings, but it is just personal preference, and not necessary to make the big change that Current Decay provides.

I like a strong current reduction when Current Decay kicks in. I have found at high cadence I like the motor to let me work harder than it does with 40% assist. So I kick Keep Current down, get a little more exercise and claw back some efficiency in the process.

(Not) The End

As noted above, there is no ideal suite of settings for any BBSHD. There are also different ways to try and get the same end result (witness how many leave all Speed Limit % settings at 100). I think doing it this way is simpler, and preserves desirable nuances in motor behavior, rather than just zero’ing them out.

Author: m@Robertson

I'm responsible for the day-to-day operations at my place of business: Leland-West Insurance Brokers, Inc. We do classic and exotic car insurance all across these United States. I'm also an avid auto enthusiast, a born again cyclist (i.e. an ebiker) and participate in medium and long range CMP and NRA sanctioned rifle competitions.

5 thoughts on “BBSHD Programming For The Pedaling Cyclist (2023 Update)”

  1. Another great one, Matt! I had to chuckle that it turned out we both released a programming post the same day 😁

    I continue to be fascinated by our different approaches to pedelec’ing. I think we’re both accomplishing similar things in two different ways via programming — the goal being to pedal _with_ the motor but still have strong pedal assistance.

    I feel like you’ve found a way to set a higher Speed% (cadence) than what you actually desire to ride, but to use the Current Decay along with a lower Keep Current to taper that cadence down. So the Speed% may be loosely more targeted toward a cadence of something like 120rpm but your Current Decay being set to 2 + a Keep Current of 30 means that the motor will taper off / pull-back power before it ever hits 120rpm and you’ll meet it somewhere in the middle with your human cadence?

    1. m@Robertson – Pacific Grove, CA – I'm responsible for the day-to-day operations at my place of business: Leland-West Insurance Brokers, Inc. We do classic and exotic car insurance all across these United States. I'm also an avid auto enthusiast, a born again cyclist (i.e. an ebiker) and participate in medium and long range CMP and NRA sanctioned rifle competitions.
      m@Robertson says:

      That sounds pretty close. I am demonstrating I don’t need so much assist since I can spin the crankarms. As the assist melts away I work harder, but its a gentle increase thanks to the motor’s method of dialing back the power. I either reach a happy equilibrium, or maybe its time to shift to a higher gear. This naturally slows my cadence, increases my effort but also is counteracted to a degree when the motor senses slower cadence and bumps up the assist a notch. I end up working towards a happy equilibrium again, but in a higher gear. Or a lower one as terrain dictates. Its all a similar effect to riding an analog bike and training via a spinning technique. Something I’m familiar with from my youth on road bikes, so I take right to it.

  2. Thanks for this, it’s helpful. I Just got my Bafang mid drive installed and am loving it, but am really excited to tune it and I think I have similar goals as you (For my bike to ride like a bike instead of a moped).

    One thing I’m having trouble wrapping my head around is how everyone has linear spaced current limits at the different assist levels, but the power to cycle at different speeds is actually a cubic function(e.g., non linear). Sheldon Brown has a nice graph in Figure 3.

    Why not calculate the current you require for various speeds, and try to match that cubic function with the current limits? This would give you more granularity at low power and less granularity at high power, and as you click thru your assist levels you wouldn’t have as big of a jump when you’re going at low speeds.

    Something like
    Would be really interesting to try. It would equate to a more linearly spaced speed pattern on the bike.

    1. m@Robertson – Pacific Grove, CA – I'm responsible for the day-to-day operations at my place of business: Leland-West Insurance Brokers, Inc. We do classic and exotic car insurance all across these United States. I'm also an avid auto enthusiast, a born again cyclist (i.e. an ebiker) and participate in medium and long range CMP and NRA sanctioned rifle competitions.
      m@Robertson says:

      I’m not trying to solve for speed, and speed typically has no bearing on my perception of a good ride (unless I am in a hurry in which case I simply hammer it). I think those calculations are best served on an analog cycling platform, unless your interest is more academic than practical – and I’m saying that as someone who loves projects for their own sake, so there’s nothing wrong with that.

      For example, I have used scales rooted in the optimal use of the motor’s gearing and power output, so an assist level increase goes entirely to increased rpms and forward motion; not wasted as heat generated inside a bogged motor casing. They were wonderfully efficient but they benefitted the motor, not the ride experience, which suffered due to that change in focus (I’m skipping the details for the sake of at least paying lip service to brevity).

      My scales’ purpose came about to provide a better ride experience. On flat ground on a shared use path, I can ride with PAS of 1 or 2 and keep a high cadence which, coupled to the choice of a lower gear, keeps my speed safe/sane, and my effort level reasonable without ghost pedaling. If I want to go a little faster, I leave PAS alone and upshift. Maybe after a bit I upshift again, but now effort has increased to the point where its time to increase PAS one level to bring the exertion down to where its more comfortable. Here comes a hill and I let experience decide for me whether I click up PAS a notch, or downshift a couple gears, or maybe both. At all times my goal is to keep that cadence and acceptable effort level. Maybe I want to work hard for an interval so I leave the assist alone and just downshift. Or something. This is a different process than what you are looking into, and it only works when you add an ‘e’ to ‘bike’.

      I noticed you mentioned granularity and lower changes at higher assist levels. As someone who rides a bike as an auto replacement and lives with steep hills, decreased change between high assist levels is the opposite of what I want. When you hit a hard increase in grade and have a load of groceries on the bike, its no time for subtlety. If its too much you can click back down a notch after you know you’re in the right gear, have yourself situated on a good line with no traffic encroaching etc.

      By all means explore this avenue, but keep an open mind. After a lifetime of cycling I found ebikes are bicycle-shaped objects only. They oftentimes are better served by taking a fresh approach.

Leave a ReplyCancel reply

Exit mobile version