• Howdy! we're looking for donations to finish custom knowledgebase software for this forum. Please see our Funding drive thread

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

Just an update on my issues with thermal limiting on my BBSHD:
So after a longer ride, I've discovered that not only is the Controller temp sensor far too restrictive, but the motor-only 'Temperature Sensor' option is also too limiting.
(the 'All' setting I tried at first kicked in almost immediately and made the bike almost unrideable - concluded this was because the Controller hit the limit very quickly, as when I changed it to 'Motor' I could ride for longer - but it turns out not long enough!)

When my display (860C) is reading 160-165 under 'Range' and the temp limiting is restricting power to 5-10 amps, the motor casing is only very warm to the touch - i.e. I can put my hand on it for extended periods without a problem. I've had my BBSHD much hotter than this many many times over 1,000+ miles with no issue. Perhaps I've been running it too hot before? But that seems unlikely as I am limited to 30A (no shunt mod) and others are running 45-50A or more..

Is anyone else having this issue? It seems to me that the 75C threshold used in the thermal limiting logic is much too low - not only for the Controller temp (should max out at 100C?) but also for the motor temp (probably should max at 90-100C as well).

If not, then there must be something wrong with my motor or my temp sensors! But I can ride at 30A continuous up long hills just fine (as long as I've set the 'Temperature Sensor:' option to 'Disabled'!). Would love to figure this out as I don't like riding with all the thermal protections disabled, not that the stock firmware made use of this (did it?). Thanks!
 
jeffNYC said:
Would love to figure this out as I don't like riding with all the thermal protections disabled, not that the stock firmware made use of this (did it?). Thanks!

That's why I was curious if he pulled the 75C from the firmware coding or was just using the 55C+ambient Bafang states in the manual.

It's odd how you could have a higher reading from your controller than I would considering I'm running 55A. I haven't been on long rides and it's cooled off here, but I pushed it hard the other day and I never got my controller above 45C. In the summer on 20km rides I was pulling 45A and the motor would get hot to the touch, but it never threw a code.

Long story short, if the original firmware made use of the thermistors I feel it must have been much higher than 75C. Or perhaps using a longer interval so brief temperature spikes don't register.
 
geofft said:
As with any firmware under development you expect some gremlins and I did spot a few issues.

I think there may be some communication issue between the controller and the display. The motor assist level seem to be fixed at something like 30% of full power and cannot be altered by changing assist levels on the display. However, if I select assist level zero, which is throttle only in my config, it responds correctly by cutting PAS, so there is some communication happening. Also, although assist level 3 is selected as the startup value it always powers up on level 1.

Although my battery voltage settings and calibration look correct the battery bars always show zero and the log states that Battery = 0 volts.

The throttle is very underpowered and again seems to be restricted to something like 30% of the expected max.
Just to add a little more info to this, I've now tried all versions that support BBS02, (i.e. v1.1.0, v1.1.1 and v1.2.0) and all give the same result, as above. I was starting to wonder if I have some sort of hardware anomaly but it all seems to meet the requirements listed on the wiki page.
 
geofft said:
The two displays have always worked with all 10 levels (0-9) with the Bafang fw, so I presume I must have configured them this way when I first received them. I will double check this though, next time I get a chance to play with it.

....just rechecked this, the displays are configured for the full 1-9 assist levels. Thanks for the suggestion though, tbh if this isn't a bug or two in the BBS02 fw version then I'm at a complete loss as to what is wrong with my setup.

It seems odd that nobody else has reported any issues with the BBS02 version - or maybe I'm the first to download and test it? Just wondered, anybody else tried the BBS02 (v1.2.0.hex) option as yet?

Mine's a BBS02 too , Didn't exactly get your issue . But mine was that it kept stuttering . Full power then turns down and over and over again . I've reverted to the original Bafang firmware.
 
jayteee said:
geofft said:
The two displays have always worked with all 10 levels (0-9) with the Bafang fw, so I presume I must have configured them this way when I first received them. I will double check this though, next time I get a chance to play with it.

....just rechecked this, the displays are configured for the full 1-9 assist levels. Thanks for the suggestion though, tbh if this isn't a bug or two in the BBS02 fw version then I'm at a complete loss as to what is wrong with my setup.

It seems odd that nobody else has reported any issues with the BBS02 version - or maybe I'm the first to download and test it? Just wondered, anybody else tried the BBS02 (v1.2.0.hex) option as yet?

Mine's a BBS02 too , Didn't exactly get your issue . But mine was that it kept stuttering . Full power then turns down and over and over again . I've reverted to the original Bafang firmware.

Ok thanks, I'm wondering if different original hardware/firmware versions are giving different results with Daniels fw. Mine were:-

Hardware vers. V1.1
Firmware vers. V2.0.1.1

...do you know what yours were? I'm struggling to find any original BBS02 firmware that works for me, the Biktrix version that Daniel linked to earlier flashes ok but gives no throttle or pas functionality and won't communicate with the Bafang config tool. Could I ask where you found yours?

EDIT: Just to add that my controller type is CROF0214.
 
geofft said:
the Biktrix version that Daniel linked to earlier flashes ok but gives no throttle or pas functionality and won't communicate with the Bafang config tool. Could I ask where you found yours?

EDIT: Just to add that my controller type is CROF0214.

Just a heads up, that's exactly how it behaves if you forget to change the IRC frequency clock.
 
furcifer said:
geofft said:
the Biktrix version that Daniel linked to earlier flashes ok but gives no throttle or pas functionality and won't communicate with the Bafang config tool. Could I ask where you found yours?

EDIT: Just to add that my controller type is CROF0214.

Just a heads up, that's exactly how it behaves if you forget to change the IRC frequency clock.

That's useful to know, thanks.
I'm fairly sure I had this right but I will surely be rechecking this later..... :wink:
 
geofft said:
furcifer said:
geofft said:
the Biktrix version that Daniel linked to earlier flashes ok but gives no throttle or pas functionality and won't communicate with the Bafang config tool. Could I ask where you found yours?

EDIT: Just to add that my controller type is CROF0214.

Just a heads up, that's exactly how it behaves if you forget to change the IRC frequency clock.

That's useful to know, thanks.
I'm fairly sure I had this right but I will surely be rechecking this later..... :wink:
Just rechecked this but all seems ok with the STC flashing tool settings, even tried a few 'wrong' settings but no change. Looks to flash back to Bafang fw ok but gives error 30 on display (no communication), no pas or throttle.

Everything is pointing to a loss of communication between display and controller after flashing the new fw. The fw actually works well but without being able to input from the display it's stuck on one fixed power level. I'm pretty sure that Daniel's fw is not the problem but something in my controller (a uart?) has either popped or become corrupted during the first flashing process. Have checked for bent pins, etc, but all looks good.

So unless anybody has any suggestions here it looks like a new controller is needed. Not a big deal, this bike is a 'spare' and wasn't getting much use nowadays so I'm happy to use it as a test mule.
 
Slight chance your display went bad. It would be worth checking with a known good display or swap the display to another known good motor and see if still gives codes.
 
fechter said:
Slight chance your display went bad. It would be worth checking with a known good display or swap the display to another known good motor and see if still gives codes.

A spare working C961 display I have gives the same results, so probably safe to say it's not a display issue. Time to order a new controller methinks.... :(
 
geofft said:
That's useful to know, thanks.
I'm fairly sure I had this right but I will surely be rechecking this later..... :wink:

Yah, I don't even know if it applies to the BBS02 or not, I just thought it might help. I did that once flashing back to the original firmware on my BBSHD. I made all the changes in the settings but I got the frequency backwards. It flashed fine, but when I turned it on and hooked it up to the config it wouldn't communicate. I tied to use it but there was no throttle and no PAS. I re-flashed it with the right settings and there was no problem. Too bad it didn't work for you.

I'm not sure what settings you used, but I also recall someone having a problem flashing the firmware and they had to change the Baud rate to get it to work. I don't know offhand what the usual setting is but I think they had to set it higher. I believe it's in the "How to 50A a BBSHD Controller" thread here. Hope that helps.
 
UPDATE:

It cooled off here recently, around 6C but it's extremely damp. I took the bike out for a run to the store but it was running extremely slow.

The highest I saw the watt meter go up to was about 333W. With my mod that works out to about 550W. My battery is a bit low, around 54V, so my battery is delivering about 2900W. My back of the envelope calculation means I was running at about 19% of full power.

Based on all of this I get the feeling I may have been put into "limp mode" because of hitting a low temperature cut-off. On the way back it returned to normal, but it essentially behaved like it was limiting power until the motor warmed up. I've never had this problem before and it could have something to do with how wet it is outside, but I suspect this also has something to do with the temperature sensors in the new firmware.

Anyways, this is just more observation, please don't take this like I'm complaining.
 
geofft said:
A spare working C961 display I have gives the same results, so probably safe to say it's not a display issue. Time to order a new controller methinks.... :(

Good test.
If the controller is bricked, you don't have anything to lose by attempting to re-flash other versions of firmware or with other settings to see if it can be revived. The programming cables can be finicky sometimes too, resulting in corrupted files. I had to modify the one I use to get the logic low signal low enough to communicate properly.
 
fechter said:
geofft said:
A spare working C961 display I have gives the same results, so probably safe to say it's not a display issue. Time to order a new controller methinks.... :(

Good test.
If the controller is bricked, you don't have anything to lose by attempting to re-flash other versions of firmware or with other settings to see if it can be revived. The programming cables can be finicky sometimes too, resulting in corrupted files. I had to modify the one I use to get the logic low signal low enough to communicate properly.

I know in the past I've inadvertently plugged/unplugged the Bafang display cable whilst powered up and always got away with it - I suspect I may have done this once too often, will be much more careful in future.

The Biktrix BBS02 firmware linked to earlier in the thread is for 52v - if anybody has a link to some 48v fw I'd be very grateful. Although I'm using a 44v (12S) battery I found the battery indicator and LVC always worked just fine with this.
 
geofft said:
I've recently installed Daniel's fw on my BBS02, all went well and once the config was set it seemed to work immediately. A small 'thankyou' has been sent to him for his efforts.

My setup is a BBS02 (STC15F2K60S2 MCU) with a 12S (44v) battery and a DPC14 (aka 850c) display. As stated it worked 'straight out of the box' PAS felt really smooth and progressive, throttle also working.

As with any firmware under development you expect some gremlins and I did spot a few issues.

I think there may be some communication issue between the controller and the display. The motor assist level seem to be fixed at something like 30% of full power and cannot be altered by changing assist levels on the display. However, if I select assist level zero, which is throttle only in my config, it responds correctly by cutting PAS, so there is some communication happening. Also, although assist level 3 is selected as the startup value it always powers up on level 1.

Although my battery voltage settings and calibration look correct the battery bars always show zero and the log states that Battery = 0 volts.

The throttle is very underpowered and again seems to be restricted to something like 30% of the expected max.

I'm guessing that most of this could just be down to a communication problem, although the throttle issue doesn't seem to quite fit with that.

I've also tested the fw with a spare C961 display I have, the results are the same. Both these displays worked normally with the Bafang fw.

I *think* my config looks ok, but I'm always capable of doing something daft, so I'll attach it to this post. Any help gratefully received.

Despite these gremlins, I'm pretty impressed with what I've seen so far, the entire package has a nice classy, professional feel to it and I'm looking forward to getting it fully up and running - nice work Daniel :)

EDIT: I should probably add that I'm using v1.2.0.hex

Sounds like the battery voltage reading is not working at all on your setup. I can only speculate in what may be the cause though, no one else has reported that. The voltage reading is done by the secondary microcontroller and communicated to the STC MCU.

There is a power ramp implemented to decrease power when approaching the LVC value. At LVC you will receive a maximum of 20% power, so that is likely why you are limited on power since you voltage reading is below LVC.
 
jeffNYC said:
Just an update on my issues with thermal limiting on my BBSHD:
So after a longer ride, I've discovered that not only is the Controller temp sensor far too restrictive, but the motor-only 'Temperature Sensor' option is also too limiting.
(the 'All' setting I tried at first kicked in almost immediately and made the bike almost unrideable - concluded this was because the Controller hit the limit very quickly, as when I changed it to 'Motor' I could ride for longer - but it turns out not long enough!)

When my display (860C) is reading 160-165 under 'Range' and the temp limiting is restricting power to 5-10 amps, the motor casing is only very warm to the touch - i.e. I can put my hand on it for extended periods without a problem. I've had my BBSHD much hotter than this many many times over 1,000+ miles with no issue. Perhaps I've been running it too hot before? But that seems unlikely as I am limited to 30A (no shunt mod) and others are running 45-50A or more..

Is anyone else having this issue? It seems to me that the 75C threshold used in the thermal limiting logic is much too low - not only for the Controller temp (should max out at 100C?) but also for the motor temp (probably should max at 90-100C as well).

If not, then there must be something wrong with my motor or my temp sensors! But I can ride at 30A continuous up long hills just fine (as long as I've set the 'Temperature Sensor:' option to 'Disabled'!). Would love to figure this out as I don't like riding with all the thermal protections disabled, not that the stock firmware made use of this (did it?). Thanks!


Yeah, it might be a bit on the low side, it was selected to be safe. I did some rides on my BBSHD (45A) and really tries to reach a max temperature but was just able to hit 65C after like 45min of constant high throttle usage so I figured it was an ok limit.

But sound like is may not be... How quickly did you hit the limit, like seconds or minutes? If so then it sounds more like there is some issue with the readings.
 
furcifer said:
UPDATE:

It cooled off here recently, around 6C but it's extremely damp. I took the bike out for a run to the store but it was running extremely slow.

The highest I saw the watt meter go up to was about 333W. With my mod that works out to about 550W. My battery is a bit low, around 54V, so my battery is delivering about 2900W. My back of the envelope calculation means I was running at about 19% of full power.

Based on all of this I get the feeling I may have been put into "limp mode" because of hitting a low temperature cut-off. On the way back it returned to normal, but it essentially behaved like it was limiting power until the motor warmed up. I've never had this problem before and it could have something to do with how wet it is outside, but I suspect this also has something to do with the temperature sensors in the new firmware.

Anyways, this is just more observation, please don't take this like I'm complaining.

Sounds like you did hit LVC briefly, possibly due to voltage drop in cold battery. A power ramp down is activated when getting really close to LVC ending at 20% of max power. The lowest battery voltage reading is remembered so if you have hit LVC you will be stuck on max 20% until you reboot controller.
 
geofft said:
fechter said:
geofft said:
A spare working C961 display I have gives the same results, so probably safe to say it's not a display issue. Time to order a new controller methinks.... :(

Good test.
If the controller is bricked, you don't have anything to lose by attempting to re-flash other versions of firmware or with other settings to see if it can be revived. The programming cables can be finicky sometimes too, resulting in corrupted files. I had to modify the one I use to get the logic low signal low enough to communicate properly.

I know in the past I've inadvertently plugged/unplugged the Bafang display cable whilst powered up and always got away with it - I suspect I may have done this once too often, will be much more careful in future.

The Biktrix BBS02 firmware linked to earlier in the thread is for 52v - if anybody has a link to some 48v fw I'd be very grateful. Although I'm using a 44v (12S) battery I found the battery indicator and LVC always worked just fine with this.

The green connectors are easily damaged if you pull on the cables when separating them (which can be very hard to avoid sometimes). A bricked controller from flashing is unlikely, entire memory is erased when flashing new firmware so nothing that can interfere with one another.

Are you able to communicate with BafangConfigTool now on the original firmware? If not then you might have broken the cable on the connector on the controller side.
 
danielnilsson9 said:
Sounds like the battery voltage reading is not working at all on your setup. I can only speculate in what may be the cause though, no one else has reported that. The voltage reading is done by the secondary microcontroller and communicated to the STC MCU.

There is a power ramp implemented to decrease power when approaching the LVC value. At LVC you will receive a maximum of 20% power, so that is likely why you are limited on power since you voltage reading is below LVC.

Ah...ok, I was wondering if LVC was playing a part here. So maybe the assist levels are changing but being masked by LVC being in operation.
The green connectors are easily damaged if you pull on the cables when separating them (which can be very hard to avoid sometimes). A bricked controller from flashing is unlikely, entire memory is erased when flashing new firmware so nothing that can interfere with one another.

Are you able to communicate with BafangConfigTool now on the original firmware? If not then you might have broken the cable on the connector on the controller side.

I've always been very careful to pull the green connectors by the ferrules, but I must have done this about a thousand times over the years when playing with different configs, etc, so maybe a break in this cable is a possibility. I've currently got the motor out on the bench so will be a good time to meter the cable continuity.

No, even when the Bafang fw appears to have loaded ok, it still won't communicate with the config tool.

Anyway, thanks for all the informed advice, much appreciated. I've just ordered a new controller, so knowing my luck it'll probably turn out to be the cable... :D

EDIT: Cable checks out all good.
 
danielnilsson9 said:
Sounds like you did hit LVC briefly, possibly due to voltage drop in cold battery. A power ramp down is activated when getting really close to LVC ending at 20% of max power. The lowest battery voltage reading is remembered so if you have hit LVC you will be stuck on max 20% until you reboot controller.

I use a backpack battery which is stored indoors. The battery was at room temperature, only the motor was cold. I didn't take my battery temp when this happened but the motor was showing 20C (not particularly cold).

It's possible the connections were wet. I have experienced the situation where the connection was degrading, unbeknownst to me, and the voltage was enough to power on the display but not enough to get it moving. Resoldering the XT90 connection remedied that.

I'll check my connections and keep an eye on it.
 
geofft said:
danielnilsson9 said:
Sounds like the battery voltage reading is not working at all on your setup. I can only speculate in what may be the cause though, no one else has reported that. The voltage reading is done by the secondary microcontroller and communicated to the STC MCU.

There is a power ramp implemented to decrease power when approaching the LVC value. At LVC you will receive a maximum of 20% power, so that is likely why you are limited on power since you voltage reading is below LVC.

Ah...ok, I was wondering if LVC was playing a part here. So maybe the assist levels are changing but being masked by LVC being in operation.
The green connectors are easily damaged if you pull on the cables when separating them (which can be very hard to avoid sometimes). A bricked controller from flashing is unlikely, entire memory is erased when flashing new firmware so nothing that can interfere with one another.

Are you able to communicate with BafangConfigTool now on the original firmware? If not then you might have broken the cable on the connector on the controller side.

I've always been very careful to pull the green connectors by the ferrules, but I must have done this about a thousand times over the years when playing with different configs, etc, so maybe a break in this cable is a possibility. I've currently got the motor out on the bench so will be a good time to meter the cable continuity.

No, even when the Bafang fw appears to have loaded ok, it still won't communicate with the config tool.

Anyway, thanks for all the informed advice, much appreciated. I've just ordered a new controller, so knowing my luck it'll probably turn out to be the cable... :D

EDIT: Cable checks out all good.

Just to add some closure to this, I've now replaced the controller and re-flashed and all is working well.

Just been out for a short test ride, very impressed with the smooth way this firmware works. Pas picks up very quickly from a standstill and throttle blends in with pas quite seamlessly, both noticeable improvements on the Bafang firmware. Also the battery indicator is accurate and stable and doesn't just jiggle around in response to the immediate voltage. I just need to play around with the assist levels in the config, it's currently a bit too strong at the lower assist levels, easily fixed.

It's still a bit of a mystery why the original controller 'disapproved' of being reflashed and refused to communicate the battery voltage, etc. Although I could still reflash it, this resulted any Bafang fw to show 'error 30' and Daniel's fw to operate in LVC mode only. I've reflashed Bafang configs with this controller many times in the past without issue. Strange, I guess I cocked up somewhere....

So, I'm now pretty happy, once again, nice work Daniel :D
 
danielnilsson9 said:
jeffNYC said:
Just an update on my issues with thermal limiting on my BBSHD:
So after a longer ride, I've discovered that not only is the Controller temp sensor far too restrictive, but the motor-only 'Temperature Sensor' option is also too limiting.
(the 'All' setting I tried at first kicked in almost immediately and made the bike almost unrideable - concluded this was because the Controller hit the limit very quickly, as when I changed it to 'Motor' I could ride for longer - but it turns out not long enough!)

When my display (860C) is reading 160-165 under 'Range' and the temp limiting is restricting power to 5-10 amps, the motor casing is only very warm to the touch - i.e. I can put my hand on it for extended periods without a problem. I've had my BBSHD much hotter than this many many times over 1,000+ miles with no issue. Perhaps I've been running it too hot before? But that seems unlikely as I am limited to 30A (no shunt mod) and others are running 45-50A or more..

Is anyone else having this issue? It seems to me that the 75C threshold used in the thermal limiting logic is much too low - not only for the Controller temp (should max out at 100C?) but also for the motor temp (probably should max at 90-100C as well).

If not, then there must be something wrong with my motor or my temp sensors! But I can ride at 30A continuous up long hills just fine (as long as I've set the 'Temperature Sensor:' option to 'Disabled'!). Would love to figure this out as I don't like riding with all the thermal protections disabled, not that the stock firmware made use of this (did it?). Thanks!


Yeah, it might be a bit on the low side, it was selected to be safe. I did some rides on my BBSHD (45A) and really tries to reach a max temperature but was just able to hit 65C after like 45min of constant high throttle usage so I figured it was an ok limit.

But sound like is may not be... How quickly did you hit the limit, like seconds or minutes? If so then it sounds more like there is some issue with the readings.

Hi Daniel, I have the same problem with my bbshd overheating when set to 33A. I just have to run it at full throttle for about 5-10 min before it overheats. When it does, the motor isn’t hot to the touch, just pretty warm. It’ll happen when going up a hill, maxed out at 15mph, and at slower speeds, up steeper hills in easier gears too.
 
Hi everyone,
I want to first thank Daniel for making a option for the Bafang midrive. I have made my donation to Daniel on github.
This is my first post, as I am having trouble with my BBSHD as follows:

BBS-HD 48V 1000W
2207270653

CONTROLLER
CR R10E. 1000W
0571-30-5086
2207 7150098

DISPLAY
800S RS10B48
MSO.32 V5.0
I am new to electric bikes after ridden gas powered bikes for many years. A few months ago I purchased a BBSHD, built a 58v 14s 16 ah battery out of SWM08 LI-PO CELLS. I also installed a voltage and amperage Guage. The factory current was set at 22 amps. I installed Daniel's 1.2 firmware. Flashing the hex files went well. The 800s display was mailed seperate from the BBSHD, from China. I don't think it's a Bafang product. The factory firmware was gutless. The problem I'm having now is the bike won't get over 22kph. It starts off at 33 amps and goes to a few amps as it reaches 22kph. It will increase to maintain speed going up hills. I have re flashed firmware. Battery can handle 200A peak draw. Wiring is 10g. Almost no voltage drop. I've changed wheel size. I have no trouble with overheating as it won't go, like others are having. I thought with Daniel's 33amp limit it would keep up with others. It's like the controler wants to go but the display is stopping it.
Can anyone shed some light on this.
Thanks for what you all do and Daniel for trying to make the product better.
 
tshiner said:
Hi everyone,
I want to first thank Daniel for making a option for the Bafang midrive. I have made my donation to Daniel on github.
This is my first post, as I am having trouble with my BBSHD as follows:

BBS-HD 48V 1000W
2207270653

CONTROLLER
CR R10E. 1000W
0571-30-5086
2207 7150098

DISPLAY
800S RS10B48
MSO.32 V5.0
I am new to electric bikes after ridden gas powered bikes for many years. A few months ago I purchased a BBSHD, built a 58v 14s 16 ah battery out of SWM08 LI-PO CELLS. I also installed a voltage and amperage Guage. The factory current was set at 22 amps. I installed Daniel's 1.2 firmware. Flashing the hex files went well. The 800s display was mailed seperate from the BBSHD, from China. I don't think it's a Bafang product. The factory firmware was gutless. The problem I'm having now is the bike won't get over 22kph. It starts off at 33 amps and goes to a few amps as it reaches 22kph. It will increase to maintain speed going up hills. I have re flashed firmware. Battery can handle 200A peak draw. Wiring is 10g. Almost no voltage drop. I've changed wheel size. I have no trouble with overheating as it won't go, like others are having. I thought with Daniel's 33amp limit it would keep up with others. It's like the controler wants to go but the display is stopping it.
Can anyone shed some light on this.
Thanks for what you all do and Daniel for trying to make the product better.

I would make sure the display isn't limiting your top speed like you mention. I found this user manual that I believe is for it, maybe give it a try and see if you can set it way higher? https://wooshbikes.co.uk/manuals/GSMkit-800S-lcd.pdf
 
Thank you Bengy22, that look promising. I'll try it in the AM and report back. Thank you for your assistance!!
 
Back
Top