BBS-FW: Open Source Firmware for BBSHD/BBS02 Controller

Mines is locked to 5 levels only... It will be either one of the following:

This seems to be the most common mapping:
Code:
PAS 0 -> PAS 0
PAS 1 -> PAS 1
PAS 2 -> PAS 3
PAS 3 -> PAS 5
PAS 4 -> PAS 7
PAS 5 -> PAS 9

Mines maps like this:
Code:
PAS 0 -> PAS 0
PAS 1 -> PAS 2
PAS 2 -> PAS 4
PAS 3 -> PAS 6
PAS 4 -> PAS 8
PAS 5 -> PAS 9

You will need to test for yourself, or if you say what display you have, someone else might already know.
THANKS i got the 500c display i will try this out
 
quick update: after switching to 5 pas level on 500c display, i am unable to switch between normal and sport MODE with the light button. switching back to 9 pas levels makes fixes this...
 
quick update: after switching to 5 pas level on 500c display, i am unable to switch between normal and sport MODE with the light button. switching back to 9 pas levels makes fixes this...

From my limited testing, 'PAS 0 or PAS 9 + Lights On' to switch to Sport mode, seems to work regardless of number of PAS levels on display by using your lowest and highest PAS levels on display, but trying to use the other 'PAS ? + Lights On' when you have only 3 or 5 levels on display seems to cause issues.
 
From my limited testing, 'PAS 0 or PAS 9 + Lights On' to switch to Sport mode, seems to work regardless of number of PAS levels on display by using your lowest and highest PAS levels on display, but trying to use the other 'PAS ? + Lights On' when you have only 3 or 5 levels on display seems to cause issues.
thanks, i had it set to pas 1.
 
Is it possible to backup the original firmware and settings before flashing?
Settings yes, firmware no. There are some copies of the original firmware floating around this forum and others. I haven't felt the need to attempt it yet since flashing this.

Edit: The backed up original settings would not work on this firmware, only when once flashed back to original.
 
I went from stock to bbs-fw, back to stock for a few months and now I use bbs-fw again with my bbs02. So no, you cannot backup the original firmware but you can download it from the internet and flash it back.
 
I don't understand the "Max Cadence (%)" setting (Assist Levels).
What is the "Max Cadence" for the BBSHD 52V?

And another question: In the config tool for the original fw you can set "Start Current" in "Pedal Assist" for a smoother start. Is there an equivalent setting where i can set this value for the bbs-fw?
 
Max cadence is all about how fast the motor is spinning. It also technically lowers as your battery depletes... but the idea is that on a full 52V battery (so 58.8V), with no resistance, the BBSHD (after reduction-gear) will spin the crank somewhere around 150 to 160 rpm.

So when you set a max cadence % of 50(%), you're basically saying that, at that assistance level, you don't want the motor to spin any faster than about 80 rpm (50% of 160rpm).

This is actually the fundamental basis of my programming, where I prioritize being able to spin your legs with the motor by capping the motor's cadence speed. Worth a read there!

RE "Start Current" (and really, Slow Start Mode) — you probably want to use "Current Ramp" with the open source firmware. A low value there will yield a softer acceleration curve, essentially — that 'softer PAS kick-in'.
 
Max cadence is all about how fast the motor is spinning. It also technically lowers as your battery depletes... but the idea is that on a full 52V battery (so 58.8V), with no resistance, the BBSHD (after reduction-gear) will spin the crank somewhere around 150 to 160 rpm.

So when you set a max cadence % of 50(%), you're basically saying that, at that assistance level, you don't want the motor to spin any faster than about 80 rpm (50% of 160rpm).

This is actually the fundamental basis of my programming, where I prioritize being able to spin your legs with the motor by capping the motor's cadence speed. Worth a read there!

RE "Start Current" (and really, Slow Start Mode) — you probably want to use "Current Ramp" with the open source firmware. A low value there will yield a softer acceleration curve, essentially — that 'softer PAS kick-in'.
I read your blog. Very interesting.
Can you post your configuration file for the bbs-fw Firmware?
 
In the source code (fwconfig.h) i found:
// Size of speed limit ramp down interval.
// If max speed is 50 and this is set to 3 then the
// target current will start ramping down when passing 47
// and be at 50% of assist target current when reaching 50.
#define SPEED_LIMIT_RAMP_DOWN_INTERVAL_KPH 3​

When I reach the speed limit e.g. 25 kph then the assist current will be 50%. When reaches the current 0%? Is it at 28 kph (+3 kph)?

If it is so (linear ramp down), I have to configure 22 kph to get 0% assist at 25 kph.

Am I right or wrong?
 
Last edited:
Hello. Maybe someone can explain why the minimum value of the battery should be 42v? Li-ion batteries can be discharged up to 2.5v, so 2.5×14=35. With a little reserve, you should do 36-37v. Maybe I'm not counting that way. I use Samsung INR21700-50S 5000mAh - 35A
 
The farther you discharge the cells, the harder it is on them and the less lifespan you'll get from them.

Additionally, the majority of packs are made from unmatched cells, so the closer you charge them to full and the closer you discharge them to empty, the further out of balance they get, and the worst cell will probably be empty even by the 2.5v definition before most of them get near that.


The BMS LVC is usually set down to 2.8v or less, but it is an emergency shutoff meant to prevent cell damage in case of the above imbalance condition, or failure of the system LVC, etc.

The controller LVC should be set closer to 3.1-3.3v per cell as an everyday shutoff, to lessen pack aging and stress.

(all these voltages presume Li-ion types taht are not LiTi or LiFePO4, etc).
 
I flashed my 52V 1000W BBSHD with the v1.4 firmware on this thread. The max voltage was set at 54.6v (for a 48v controller?) and since I have a 52v controller I changed it to 58.8v with 43v cut-off- am I correct in doing this? I also lowered it to 25a output just to keep the heat down and stretch some battery life. I originally followed this
to get rid of the dreaded Error 30 which rendered my bike useless but found my way onto this thread. I really don't pedal my bike and the BBSHD in my experience gets super-hot, and I believe that's what caused the Error 30 in the first place; I was doing 45mph downhill and you could've fried an egg on the motor. I did get a new controller from the seller but will save that for if/when it's needed since I was able to reflash the bricked one and get it working again.
 
Last edited:
This thread hasn't died out, it's been running fairly actively since it started back in July of '22. It's just not necessarily a response-in-a-day kind of thread.

Regarding your first post above, what is your question/problem/concern?
 
This thread hasn't died out, it's been running fairly actively since it started back in July of '22. It's just not necessarily a response-in-a-day kind of thread.

Regarding your first post above, what is your question/problem/concern?
The max voltage was set to 54.6v and cut-off at 42v by default with this firmware (I'm guessing that's for 48v). I set max to 58.8v & cut-off at 43v since I have a 52v controller & battery. I'm pretty sure I have the max set correctly but not sure about the cut-off voltage; that's my main question. There seems to be a lot of settings that I don't have any idea how to configure. I did lower max output to 25a for longer range and less heat on the motor. Yeah I guess I was expecting a quick response, but it's not exactly the riding season for a lot of us.
 
The max voltage was set to 54.6v and cut-off at 42v by default with this firmware (I'm guessing that's for 48v). I set max to 58.8v & cut-off at 43v since I have a 52v controller & battery. I'm pretty sure I have the max set correctly but not sure about the cut-off voltage; that's my main question. There seems to be a lot of settings that I don't have any idea how to configure. I did lower max output to 25a for longer range and less heat on the motor. Yeah I guess I was expecting a quick response, but it's not exactly the riding season for a lot of us.
43v seems a bit low for a 14s battery, if you search online for lipo discharge curves you'll find that the cells generally have little useful charge below around 3.3v and some may start to 'fall off the cliff' if you push them much below this. I'd be inclined to start at 46v LVC and then road test to check it's not pushing individual cell voltages too low when riding at very low SOC - you can always tinker with this setting later if necessary.

My experience with running Daniel's fw at low SOC is pretty limited, but it seemed to limit the assist in a very mild and progressive manner with no sudden cutback, you just find yourself having to pedal progressively harder.
 
43v seems a bit low for a 14s battery, if you search online for lipo discharge curves you'll find that the cells generally have little useful charge below around 3.3v and some may start to 'fall off the cliff' if you push them much below this. I'd be inclined to start at 46v LVC and then road test to check it's not pushing individual cell voltages too low when riding at very low SOC - you can always tinker with this setting later if necessary.

My experience with running Daniel's fw at low SOC is pretty limited, but it seemed to limit the assist in a very mild and progressive manner with no sudden cutback, you just find yourself having to pedal progressively harder.
I'm limited on electrical knowledge, just dangerous enough to follow directions. My battery is a 52v 28.8ah UPP triangle pack. Not too impressed with it tbh.
 
I'm limited on electrical knowledge, just dangerous enough to follow directions. My battery is a 52v 28.8ah UPP triangle pack. Not too impressed with it tbh.
Ok, I was presuming from your mention of 58.8v in a previous post that your battery was 14s (i.e. 14 cell groups in series) - now I'm not sure. Do you know the configuration of your battery? (probably 13s or 14s) If you're not sure, what's the measured battery voltage when fully charged?
 
Ah right, that battery has a 58.8v charger which confirms it as 14s (14 x 4.2v). So as you were, use 58.8v as the max voltage and 46v for LVC. That's a fairly 'safe' LVC, 43v was likely to push the cells down near 3v which is getting into dangerous territory....:)
 
Ah right, that battery has a 58.8v charger which confirms it as 14s (14 x 4.2v). So as you were, use 58.8v as the max voltage and 46v for LVC. That's a fairly 'safe' LVC, 43v was likely to push the cells down near 3v which is getting into dangerous territory....:)
Thanks for the heads up; I read somewhere that 43v was a safe setting. 46v sounds more like it.
 
Maybe that was referring to a 13s battery - 43v LVC would be ok for that but is a bit low for 14s.
 
Back
Top