What is the bafang bbs pedal assist algorithm?

mr_ed

Pedelecer
Feb 15, 2022
116
18
I’ve been bench testing my BBSHD and I’m confused by the pedal assistance.

Is the crank output a fixed RPM for each pedal assist level, and pedalling is purely an on/off switch?

Or does the motor turn faster depending on how fast you’re pedalling?

I’d assumed the second, but it seems to be behaving as the first. I’m hoping this is just because I’m bench testing and the wheel speed is 0.
 

matthewslack

Esteemed Pedelecer
Nov 26, 2021
1,845
1,335
I’ve been bench testing my BBSHD and I’m confused by the pedal assistance.

Is the crank output a fixed RPM for each pedal assist level, and pedalling is purely an on/off switch?

Or does the motor turn faster depending on how fast you’re pedalling?

I’d assumed the second, but it seems to be behaving as the first. I’m hoping this is just because I’m bench testing and the wheel speed is 0.
If it is like the BBS01 and 02, the internal controller is a KT, and should be configurable via the LCD for basic things, and a programming lead to USB port for more in depth stuff.

There are I think two types of control algorithm, I'm not sure whether a particular controller is just one or the other, or both available in the one controller, but that knowledge is not far away on here!

The fixed speed in bench test, unloaded, indicates current control: each level provides a different current to the motor, and the no load speed is higher, the higher the current. On the road this translates to approximately a fixed amount of torque assistance, regardless of speed. Speed depends on gradient, gear and rider effort.

There is also cadence control, which I don't know enough about to describe, but is not the preferred option.
 

mr_ed

Pedelecer
Feb 15, 2022
116
18
Hmm, I think perhaps my bench test is invalid and unrepresentative. I’ll stop messing about and get on with the install.
 
  • Agree
Reactions: MontyPAS

Fordulike

Esteemed Pedelecer
Feb 26, 2010
3,802
1,538
I've dabbled with the programming software and IMHO, I think the PAS sensor just acts like an on/off switch.

Adjusting certain program parameters can give the bike the feel of a normal bike, but with assistance. Or it can be programmed to act like a moped.

It'll never be able to feel totally natural, like a torque sensor PAS though.
 

MontyPAS

Esteemed Pedelecer
May 16, 2020
390
148
I've dabbled with the programming software and IMHO, I think the PAS sensor just acts like an on/off switch.

Adjusting certain program parameters can give the bike the feel of a normal bike, but with assistance. Or it can be programmed to act like a moped.

It'll never be able to feel totally natural, like a torque sensor PAS though.
Agree the PAS is the switch! Tweaking the 1 - 9 levels / parameters will set your assistance for the terrain you are riding. Google Bafang settings, there is a lot of info out there,
Depends where the unit was purchased. A lot of UK suppliers have set the motors to work out of the box!
Fit and forget, get pedalling ....... Or not. Your choice!
 

Fordulike

Esteemed Pedelecer
Feb 26, 2010
3,802
1,538
A lot of UK suppliers have set the motors to work out of the box!
Fit and forget, get pedalling ....... Or not. Your choice!
Agreed that they work out of the box, but I found I needed to do a lot of tweaking to get the bike right. The programming cable and software is a must if you want to perfect the BBS series.

If it wasn't highly programmable, then I would have had to go for something else.
 

MontyPAS

Esteemed Pedelecer
May 16, 2020
390
148
Agreed that they work out of the box, but I found I needed to do a lot of tweaking to get the bike right. The programming cable and software is a must if you want to perfect the BBS series.

If it wasn't highly programmable, then I would have had to go for something else.
Agree. The Bafang series of motors is aimed at the enthusiast / perpetual tinkerer!
We have obviously both played with the programming S/W and cable, depends on our particular usage and local terrain as to parameters
 

mr_ed

Pedelecer
Feb 15, 2022
116
18
Yep I've got the cable and have set the current limit levels to 10/20/30/40/50/60/70/85/100 and the speed limit to 100 across the board. That made sense to me, but I'll try it.

Happy to experiment! I did this remapping the gearbox on my car when it was new, that made me sweat when its crashed mid-flash once.

I think I was expecting the chainwheel speed to be increased in proportion to the pedal speed. Now if only the open-source firmware project had continued...
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,882
8,517
61
West Sx RH
Simply the BBS PAS is the same as a generic hub motor PAS, rotate the pedals and the bike will whoosh along with little effort. All is counts is each magnet as it passes the sensor so a cadence type rotation system, it is irrelevant to how much pressure one puts on the pedals. One can ghost pedal and simply get a lot of power.
The motor RPM is static form the motor, it is the gearing of the cassette that increases or decreases real world riding rpm.
 

Fordulike

Esteemed Pedelecer
Feb 26, 2010
3,802
1,538
Yep I've got the cable and have set the current limit levels to 10/20/30/40/50/60/70/85/100 and the speed limit to 100 across the board. That made sense to me, but I'll try it.

Happy to experiment! I did this remapping the gearbox on my car when it was new, that made me sweat when its crashed mid-flash once.

I think I was expecting the chainwheel speed to be increased in proportion to the pedal speed. Now if only the open-source firmware project had continued...
I've done mine the other way round. Set 5 PAS levels with different speeds on each one and max current on all.

It means I can crawl along on PAS 1 and have full current for torque.

I guess that by having the speed set to 100 and PAS levels limiting current, it regulates speed because there's not enough current to make it go faster to 100% speed. I hope peeps get what I mean.

With my set-up, I can crawl, or speed, up steep hills, as I'm getting full current in all PAS levels.
 
Last edited:

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,882
8,517
61
West Sx RH
Like Ford when I had my BBS I tweaked 5 of the PAS for less torque but speed for flat terrain and had the last 4 tweaked for out right torque but less speed for slower hill climbing.
One can't have both speed and max torque, it is a trade off of one or the other. Just as a battery one can have either have max range with less current or more current at the exp of range.
 

matthewslack

Esteemed Pedelecer
Nov 26, 2021
1,845
1,335
Hmm, I think perhaps my bench test is invalid and unrepresentative. I’ll stop messing about and get on with the install.
How are your electronics and programming skills?

A pair of strain gauges on the sides of each crank arm, wireless of course, and micro powered by a tiny generator making use of the rotation of the crank, and an algorithm and you'll have your very own torque sensor system!
 
  • Like
Reactions: guerney

guerney

Esteemed Pedelecer
Sep 7, 2021
11,251
3,195
How are your electronics and programming skills?

A pair of strain gauges on the sides of each crank arm, wireless of course, and micro powered by a tiny generator making use of the rotation of the crank, and an algorithm and you'll have your very own torque sensor system!
A couple of the smaller Raspberry Pi variants on each crank arm, networked wirelessly to a third, which could calculate power required, and apply power by continuously adjusting the throttle signal via the loom cable, therefore no replacement/removal of the existing display and controller would be necessary. One would of course require a control mechanism to switch PAS levels - just a couple of buttons for UP/DOWN would do, with a numeric LED indicator or something. The cadence based assistance would have to be set to the lowest levels using the USB programming cable, luckily on the BBSXX the throttle acts independently, therefore it's possible.
 

Fordulike

Esteemed Pedelecer
Feb 26, 2010
3,802
1,538
A couple of the smaller Raspberry Pi variants on each crank arm, networked wirelessly to a third, which could calculate power required, and apply power by continuously adjusting the throttle signal via the loom cable, therefore no replacement/removal of the existing display and controller would be necessary. One would of course require a control mechanism to switch PAS levels - just a couple of buttons for UP/DOWN would do, with a numeric LED indicator or something. The cadence based assistance would have to be set to the lowest levels using the USB programming cable, luckily on the BBSXX the throttle acts independently, therefore it's possible.
Wow, I think you just blew my mind o_O
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,251
3,195
Wow, I think you just blew my mind o_O
I'm hoping someone has a go at this and produces such a product I can simply buy, if curious - I doubt there's much demand for torque sensor kits for Bafangs BBSXXs, and Bafang seem to be phasing out that series anyway, adopting CAN bus, so it might not be a viable proposition from a business point of view for very long (if at all). Plus I prefer my cadence sensored bbs01b, because it's basically operates as a moped without a throttle - ghost pedal a tiny bit and it zooms off with zero strain to my old damaged knees, and that's how I like it. Torque sensored pedalling sounds like actual physical effort is involved, which I avoid at all costs.
 
Last edited:

soundwave

Esteemed Pedelecer
May 23, 2015
16,751
6,445

matthewslack

Esteemed Pedelecer
Nov 26, 2021
1,845
1,335
Yep I've got the cable and have set the current limit levels to 10/20/30/40/50/60/70/85/100 and the speed limit to 100 across the board. That made sense to me, but I'll try it.

Happy to experiment! I did this remapping the gearbox on my car when it was new, that made me sweat when its crashed mid-flash once.

I think I was expecting the chainwheel speed to be increased in proportion to the pedal speed. Now if only the open-source firmware project had continued...
The hooks are there for experimenters, in that the controller in throttle mode does exactly what the throttle tells it to do. By constructing a throttle input, which is just a plain old voltage in a standard throttle voltage range, from whatever inputs you like, e.g. a home grown torque sensor, you can make it do whatever you want with no work to the inbuilt controller.
 
  • Agree
Reactions: guerney