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

After updating the firmware, the motor seems to decrease in power after about 10 minutes (PAS 9 98% current). Could it be that the motor is too hot? It's weird because it goes back to full power once I turn off and on. Perhaps it's the battery protection?
 
are you trying to drive in the correct gear? that happens to me when im driving full speed for long time in a low gear with throttle only. i remember reading some complains from some people saying the temperature protection is set too low on this firmware, if you are running into this issue more often you can try to disable Temperature reading maybe then it will not cut off power (but the motor and or Controller could be damaged)
 
Hi everyone, I'm new in this forum, I subscribed when I saw that an alternative firmware was available. First of all, I would like to say a big thanks to Daniel for his incredible work and to all the contributors here.
I have electrified my full.suspended decathlon bike with a bbshd motor, a 52v battery and a varstrom T1 touch display.
My main issue is that I've set max amperes to 33A however my display shows a maximum of 28.5A so quite the same as stock firmware. Does anyone know for which reason ? Is it my display not showing the real current or for some reasons the max current is stuck to 28A?
I'm thinking about buying a new bafang display to support the 2 modes implemented in this new firmware from Daniel. Would it fix also the max current issue as well?
Thanks in advance
 
Chiming in to help others that flashed their bbs02 controller with Daniels latest v1.4 firmware and became stuck with seeing error 30h; bbs fw tool wont connect, throttle and pas levels dont work correctly and full send like on off trigger.

I too thought i bricked my 02 controller with the custom firmware, flashing to the supposedly original biktrix 52v firmware works... but the firmware is locked from making any changes, as well as glitchy compared to the original. Any attempt to change settings on biktrix firmware soft settings will instantly show PAS0 out of range error and corrupt; also causing error 30h but completely none responsive.

There is 2 settings that are different from BBSHD when flashing 02 that solved the problem. Now the 1.4 version firmware works very well!


Input IRC frequency needs to be 20.000 MHZ, and
P2.0 power-on reset state needs to be ENABLED.

from there same steps follows; check MCU, then download the firmware. I attached image and highlighted for others to have successful bbs02 custom firmware downloads.
 

Attachments

  • bbs02.jpg
    bbs02.jpg
    1,017.4 KB · Views: 35
Last edited:
Chiming in to help others that flashed their bbs02 controller with Daniels latest v1.4 firmware and became stuck with seeing error 30h; bbs fw tool wont connect, throttle and pas levels dont work correctly and full send like on off trigger.

I too thought i bricked my 02 controller with the custom firmware, flashing to the supposedly original biktrix 52v firmware works... but the firmware is locked from making any changes, as well as glitchy compared to the original. Any attempt to change settings on biktrix firmware soft settings will instantly show PAS0 out of range error and corrupt; also causing error 30h but completely none responsive.

There is 2 settings that are different from BBSHD when flashing 02 that solved the problem. Now the 1.4 version firmware works very well!


Input IRC frequency needs to be 20.000 MHZ, and
P2.0 power-on reset state needs to be ENABLED.

from there same steps follows; check MCU, then download the firmware. I attached image and highlighted for others to have successful bbs02 custom firmware downloads.
Hi power2rice, I'm slightly confused by your post, the two settings you mention seem to be the 'normal' settings for flashing Daniel's fw - or are you referring to flashing the biktrix fw?

Flashing guide
 
Last edited:
has anyone figured out a way so that the chain doesnt smack so hard on the drivetrain when you start using the throttle?
by that i mean that the power on the throttle is a little too much at begin
 
Ok here you go. This it the latest github master with last commit from Sep 30, 2024 and quadratic throttle code added. Use at your own risk. Works great with my BBS02.
 

Attachments

  • bbs-fw-quadratic-throttle.rar
    560.8 KB · Views: 45
Ok here you go. This it the latest github master with last commit from Sep 30, 2024 and quadratic throttle code added. Use at your own risk. Works great with my BBS02.
Thanks for this, just tried it and has definitely softened that initial lurch at low throttle settings, a useful upgrade...:)
 
Chiming in to help others that flashed their bbs02 controller with Daniels latest v1.4 firmware and became stuck with seeing error 30h; bbs fw tool wont connect, throttle and pas levels dont work correctly and full send like on off trigger.

I too thought i bricked my 02 controller with the custom firmware, flashing to the supposedly original biktrix 52v firmware works... but the firmware is locked from making any changes, as well as glitchy compared to the original. Any attempt to change settings on biktrix firmware soft settings will instantly show PAS0 out of range error and corrupt; also causing error 30h but completely none responsive.

There is 2 settings that are different from BBSHD when flashing 02 that solved the problem. Now the 1.4 version firmware works very well!


Input IRC frequency needs to be 20.000 MHZ, and
P2.0 power-on reset state needs to be ENABLED.

from there same steps follows; check MCU, then download the firmware. I attached image and highlighted for others to have successful bbs02 custom firmware downloads.
I Installed BBHD controller on my BBS02B. It's plug and play! Just match the colours of the phase wires and you have a lighter version of BBSHD. It does not overheat, and it is way more powerful than regular bbs02
 
Hello JeffNYC,
Did you ever get to solve the 28.5A issue ? I have the same problem with my 860C display. It shows 28.5 even if set to 30A or even 33A : / Thank you !
Hello @jeffNYC and @mychoui, I have the same issue with T1 touch display. I'm limited to 28.5 amps. Could it be related to the display used ? Could anyone suggest a display to use so I can change mine please ?
 
Are there any reports of unexpected motor activation when using USB port on DPC-18 display for charging?

Luckily PAS level ones had only 5% max current and 5% speed so the BBSHD motor was easily stalled.

It could be a part of first original problem which still persists (motor gets activated for one second in disabled mode). Never tried to use USB port with stock firmware.
 
Last edited:
Yes, Quadratic Throttle pretty much fixed this for me. I can even shift gears smoothly while walking with a bike Quadratic Throtle · danielnilsson9 bbs-fw · Discussion #226
Using 1% start current and 1A per second in global settings there is no chain slamming as long as throttle is applied slowly. With origin firmware throttle response was a lot more unpredictable.
As far as I understand judging from various contradictory replies on github quadratic throttle will apply freewheeling current to the motor?
 
Using 1% start current and 1A per second in global settings there is no chain slamming as long as throttle is applied slowly. With origin firmware throttle response was a lot more unpredictable.
As far as I understand judging from various contradictory replies on github quadratic throttle will apply freewheeling current to the motor?
Current Ramp does not apply to throttle according to wiki so it should not matter here. Quadratic throttle does not apply any current with 0% throttle. It just changes the throttle curve Quadratic Throtle · danielnilsson9 bbs-fw · Discussion #226
 
Well yes, there are less throttle steps available in mid to high throttle % zones when you have more throttle steps in low throttle zone. Most bafang users only have 1-2kW of power though. I imagine it could become a problem with something like 20+kW of power.
 
Well yes, there are less throttle steps available in mid to high throttle % zones when you have more throttle steps in low throttle zone. Most bafang users only have 1-2kW of power though. I imagine it could become a problem with something like 20+kW of power.
Ability to switch between different throttle profiles on display (might be possible in phone app only) might be another possibility to add to the existing firmware.
Chainbreaker app is probably not talked about due to inherent absence of simple PAS level adjustment at the handlebars.
 
I use only throttle, and it feels to be way better for the bike, as I rarely change the gear from 10tooth despite standstill.

tbh., I haven't tested again how it was before quadratic throttle ever since I applied the patch.
So it's either harmless placebo, or 5/5 improvement:cool:.
 
Just FYI,
1.5.0 was released 3 days ago by Daniel:

Works well on my BBS02B 36V.

Changelog

  • Fix sporadic torque sensor reading error on TSDZ2 causing temporary power loss #243 #245
  • Change behaviour of global throttle speed limit to not override configured assist level speed limit while pedaling #244
  • Add compile time firmware config for throttle curve map (linear/quadratic/custom) #241
  • Set default throttle map to CUSTOM (x^1.5)
  • Fix current ramp down issue during shift interrupt #184
  • Change sensitivity of backpedal cruise disengage to 180° #181
  • Improve LVC ramp down #209
  • Add compile time firmware config for data in range field of display #246
 
Just wondering, does bbs-fw have much linux-users here?

I began working on alternative(c+gtk3) for the original written for windows in c#:
bbsfwtool.png
So far it doesn't do more than connect to the controller, and activate the event log,
but the basics are mostly there, so i can start throwing in features soon.
For now(atleast) i'm going w/having it fake the orginal(i hate coding GUIs):p.
At some point i'm also going to look at having this work as a complete display
replacement for debugging/testing the firmware/settings at standstill next to a laptop.
 
Linux user here, thank you for the effort :)

FWIW, I use a few configurator projects that are based on PWA (I.E., web based). This generally leads to good cross platform development. If the configurator has to be updated separately for windows and other OS it's harder for things to stay updated.

For example:
 
Linux user here, thank you for the effort :)

FWIW, I use a few configurator projects that are based on PWA (I.E., web based). This generally leads to good cross platform development. If the configurator has to be updated separately for windows and other OS it's harder for things to stay updated.
Unfortunately developing anything "web based" is like cancer to me; no thanks:cool:.

Fixing what i've written to work with windows should be "one time only"-task:
just the listing of com ports, and (dis)connecting to it, otherwise the interface to
everything OS dependant is via gtk, and should not require anything(the part that
now needs fixing for windows is likely never to be touched again once working).

bbsfwtool.png bbs-fw_tool.png

Now it is still missing stuff to support touching assist levels, but changing settings
from the "System"-page does already work beside the event log shown above:sneaky:
 
Hi everyone. First, massive thanks to Daniel for this fantastic project; I successfully flashed the new firmware onto my BBS01B (which actually had a BBS02B MCU code, which was why I went ahead), and it unlocked it up to 25ah, with a notable increase in performance and the watts shown on my 850C screen - amazing.

I've recently bought a BBSHD (52v) to put on my cargo bike, which is really heavy, and I also live up a really steep hill, so I wanted the extra power. I've flashed the most recent version of the firmware onto the motor, but it seems to be stuck drawing around max 1450 watts, no matter what I set the max amps at between 28-33. The 850C controller tells me it's drawing max 28.5amps.

I've seen this mentioned a few times and wondered if there's a resolution to it? I saw one comment saying that they have a smart BMS which indicated that 33amps was being drawn - so is it just an issue with the display not giving a true reflection of the amps/watts being drawn? What's strange is that there was a notable increase in performance and wattage reading when I flashed my BBS01B, but I haven't had that with the BBSHD. 1450 watts is pretty decent, but the hill I live up is the steepest in the city and it's the road leading out of town too, so people drive pretty carelessly up it, so the reason I'm trying to push it further is because the more wattage the better! Cheers.
 
Back
Top