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

too expensive. i paid 500€ for my bbshd on pswpower. this new unit costs 600€+import duty+ shipping cost, so probably around 1000€, and then we dont even know if this new motor is customizable in terms of motor parameters and other stuff.
i got an offer for 640€ + import duty
 
sounds like a fair deal. keep us updated on this motor if you happen to buy it, this could be a good competition to other motors like toseven
ive got itchy fingers, but i have bought new bbshd for my build 2 months ago for 500€ and i also plan to do firmware mod to squeeze as much as possible from the controller. I will run 15s battery - 63V and 33A. And this is not possible on m635 Do anybodey know if C860 works on 63V
 
Does anyone have the motor push forward as if I'd given it a blip of the throttle when you turn the display on?
It ain't no real issue when I'm sat on the bike but I have had it wheelie away when turning it on while holding stood to the side.
 
Does it happen when the throttle is physicaly disconnected? If so, there may be a problem with the ground wire or pin between throttle and controller causing a higher voltage than "off" to show up on the signal wire during power on.
 
Does it happen when the throttle is physicaly disconnected? If so, there may be a problem with the ground wire or pin between throttle and controller causing a higher voltage than "off" to show up on the signal wire during power on.

Thank you, you've given me something to try in the morning. Hadn't even in thought of the throttle, its a cheap twist throttle rom amazon. I'll get back to you tomorrow. 👍
 
Thank you, you've given me something to try in the morning. Hadn't even in thought of the throttle, its a cheap twist throttle rom amazon. I'll get back to you tomorrow. 👍
Theoretically this shouldn't be the cause as the firmware has a safeguard to prevent the bike taking off with active throttle applied at power up. However this feature wasn't working correctly on earlier versions of the fw, it was corrected from 1.3.0 onwards. Which version are you using?
Either way it's definitely worth trying another throttle, you need to eliminate this.
 
I don't know about the display but be interested to see your battery build.
As I'm in the process of building a 15s6p for my bbshd. Gonna charge it to 4.1v a cell and it should work fine with this firmware.
i will just add one module to the existing 52V battery. they will be charged independed
 
Theoretically this shouldn't be the cause as the firmware has a safeguard to prevent the bike taking off with active throttle applied at power up. However this feature wasn't working correctly on earlier versions of the fw, it was corrected from 1.3.0 onwards. Which version are you using?
Either way it's definitely worth trying another throttle, you need to eliminate this.
I was trying to find the link but I'm usinga fork of this that included programming to keep the chain going at very low power above 10mph in order to reduce chain slap etc.
Ill reinstall the standard custom firmware later to see if it stops it, be a shame if it's the cause as was a handy feature.
 
i will just add one module to the existing 52V battery. they will be charged independed
Ah OK I used to do the same with my 48 battery to get it up to 52v.
I've changed to a full suspension now though so had to build a battery to fit in the frame so I've gone for a 15s6p. Just need to finish up the bus bars and charge it up.
 
Update after several months, loadsamiles on 02’s and new HD with this firmware
Absolutely solves all Bafangs weirdness with throttle/pas jerky transition, I like to ride in very low low peddle assistance 5% of 30A on hd and 7% of 25A on 02 simply add throttle (linear to 100%) for hills, headwinds etc.. I live at bottom of 1000’ hill so use it lots, far more economical than pressing buttons to get more go, actually truely torque sensitive, the torque of my right thumb determines the added power to my legs, minutely adjustable, sudden steep bit over tree roots, simple.

He’s actually added a feature for those who cannot have a throttle due to rules/policing or whatever
Variable throttle it’s called but is actually variable pas, you must be pedalling for it to work. This is, I think,totally legal anywhere in the world Once you’ve set current limit and speed limit to legal or desired, simply add “throttle” to get more pas, let it go for less.
So incredibly intuitive, no looking at display to see which # assistance you are in nor accidentally leaving it in high power.
Better than any factory ebike inho, uses power only when you need it, irrelevant to some but massive to those that do big miles and try to get most from their batteries.

Early pages had a lot on the thermal cutout and issues with sudden power loss
Both my 02 and my HD did it on first big climb (done many times on orig firmware with both motors
The 02 had to be turned off
The HD I noticed had the cold temperature several degrees higher than ambient so I tried “controller only”, Instant success, cold now reads ambient temperature as it should. I just tried my best to get it as hot as possible on a 30 deg C day up my steepest track. No worries at all, I pressed walk to check and was reading 68. Fixed
Sensor in motor was obviously lying, this is late model HD.
Perhaps the threshold could be user afjustable but personally I haven’t got near or even thought about cooking it before so maybe that’s really only an issue for those that run huge current through them.

I’ve been following the T07 progress and nearly bought one to test but their firmware issues have gone on and on, I hope that this firmware can be installed on them and the latest Tongshen TSD Z8. Both those motors have potential, this firmware could be the ticket for them. Proven
 
Daniel thank you so much for doing this treat work! As I'm running my BBSHD with a 12S pack, I've been desperate to find a solution to premature LVC cutoff - it's truly painful to be restricted to 11A towards the end of a ride when the battery pack still has 50% remaining (~43V).

So I just tried your new FW and hallelujah I was able to get full power at 43V, and the battery LED even correctly showed a single green bar instead of the red 'empty' sign...a tremendous improvement!

However, a couple odd things I noticed after a brief ride:

- Despite setting max amps at 33 in the BBS-FW Tool, I was only seeing 28.5A on my 860C, regardless of Throttle or PAS use. Previously I had routinely seen 30.0A on the old FW. Any idea why this may be? HW version is 1.5.

- Temp-driven power cuts are coming in FAR sooner than expected. I've never seen power reduced on the steep hills I regularly ride with the stock FW (though I'm not sure if the stock FW actually does that?). However now I was getting significant cuts after just a couple mins of low-speed steep climbs - not good! My guess is the 75C threshold is simply too low. Most magnets can handle 100-120C before demag becomes a risk (even 150C for the not uncommon SH type), though not sure what's in the BBSHD... But if the temp sensor is indeed inside the motor on the stator, even if it has Type M (100C) magnets, perhaps that 75C should be more like 90-95C?

Also, the power cuts when temps approached 75C were quite jittery - up/down, up/down, etc - so perhaps a longer hysteresis filter (smoothing) would improve this mechanism?

Any thoughts on the above would be most appreciated. Super excited to finally be able to use the full capacity of my pack. Thanks again!
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 !
 
Version 1.1.0 has been released which brings support for the BBS02 controller along with many other improvements.

v1.1.0
  • Support for BBS02 controller.
  • Single firmware binary for all supported BBSHD controller revisions.
  • Fix bug where an error was reported when trying to use firmware without throttle connected.
  • Support additional motor core temperature sensor available on BBSHD.
  • Add option to show current temperature in speed field on display while walk mode is active.
  • Support selecting which temperature sensors to use (for controllers with broken sensors).
  • Decrease motor power gradually when approaching max temperature (75C).
  • Decrease motor power gradually when approaching low voltage cutoff limit.
  • Improved shift sensor power interrupt.
  • Smoother power decrease when releasing throttle to avoid jerk from motor stopping abruptly.
  • Added forwarding for current sense resistor error code.
  • Implemented basic voltage based battery percentage calculation (not accurate).
The main thing is having smooth throttle response during acceleration. Is that also improved since the stock throttle response is inherently jerky even in current mode and 1% startup current?
 
What could be the reason for failure to connect to the configuration tool? The blue USB LED is flashing and green process bar is scrolling until timeout. I'm still able to connect to Speeed app so programming cable is still working.
 
Successfully installed the open source firmware. Everything works except for the shift sensor (the green light comes on). Even with a shift current threshold at 1%. The chain is off now though.

Edit.
The shift sensor started working all of a sudden.
 
Last edited:
@sysrq : can you confirm that it works with a DPC18 display? Or did yoy use another display instead?
Everything seems to work with DPC18 display except for PAS level lag. I have been told that open source firmware will resolve the throttle being operational at PAS 0 where the motor is disabled but the motor still kicks in for a second. Also there was a delay between all of the PAS levels with original firmware. Had to wait for about 5 seconds to see power increase. Haven't tested everything completely yet.

Probably will have to use cruise control on every PAS level to adjust acceleration in similar way to electronic cruise control seen on motorcycles.
It seemed like cruise control started working only when the throttle was in the medium position during initial testing for some reason.

There was also some intermittent cadence sensor failure with original firmware. The cadence sensor works with the open source firmware for now. There is probably no way to turn on the cruise control in case of cadence sensor failure.
 
Last edited:
I still need to order my BBSO2B and I'm in doubt whether I should order the DPC18 or 850C. Maybe I'll sleep on it.
Thanks anyway for your quick answer.

Do you think the problems you listed are related to the DPC18? Or are they rather some existing bugs in the firmware?
I like to be prepared when I flash the open firmware ;)
 
I still need to order my BBSO2B and I'm in doubt whether I should order the DPC18 or 850C. Maybe I'll sleep on it.
Thanks anyway for your quick answer.

Do you think the problems you listed are related to the DPC18? Or are they rather some existing bugs in the firmware?
I like to be prepared when I flash the open firmware ;)
Not sure if the DPC18 display sends delayed signals to the controller since the pushbottons are connected to it or it's nothing more than a screen.
The listed problems seem to be too rare/obscure in my case since nobody else has dealt with them or there are users who don't pay attention to them.
 
Are you guys getting the shift sensor to work? Seems to be some problems with it. Have BBS02.
 
Are you guys getting the shift sensor to work? Seems to be some problems with it. Have BBS02.
My shift sensor works just fine on my BBS02 setup.
I think there were some shift sensor issues with earlier BBS02 fw releases, but the current 1.4.0 version is ok.
 
The battery state of charge is usually detected by monitoring the battery voltage, this isn't ideal as the voltage sags significantly whilst under load which would show a falsely low soc.

The method often used to get round this issue is for the firmware to only update the soc display when there is no significant load on the battery. This generally works pretty well and I guess this is how Daniel has coded his fw, but does give the effect you describe in your post - like you say it's not a big problem.
Is this also applied to voltage mode? I thought seeing the sag during the load was useful to judge the battery health.
 
Is this also applied to voltage mode? I thought seeing the sag during the load was useful to judge the battery health.
I'm presuming by 'voltage mode' you're referring to displayed voltage. This is easily checked, if you have a voltage display and it drops under load then no, it does not apply to displayed voltage.
 
Back
Top