• 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

danielnilsson9 said:
jayteee said:
Yep , Display still gave constant crazy readings and the motor just being intermittent. I tried giving it full power from a stop , it struggled so hard , it just stopped working for a second or 2 .

Ok, I got no clue really. Same thing if you do not plug in the programming cable in your phone but just leave it connected and run without display?

Ok . I've tried without display . Same symptoms . And then I suspected if the battery wouldn't be able to take the higher amperage. Which couldn't be the case as it's a 40amp peak.
 
jayteee said:
danielnilsson9 said:
jayteee said:
Yep , Display still gave constant crazy readings and the motor just being intermittent. I tried giving it full power from a stop , it struggled so hard , it just stopped working for a second or 2 .

Ok, I got no clue really. Same thing if you do not plug in the programming cable in your phone but just leave it connected and run without display?

Ok . I've tried without display . Same symptoms . And then I suspected if the battery wouldn't be able to take the higher amperage. Which couldn't be the case as it's a 40amp peak.

I decreased it to 25amps. Same thing , 20amps Also the same thing. Ohwell i guess it's not gonna work out afterall.

Is there a way to revert back to the original bafang firmware? BBS02b
 
There is one available for BBS02 on this page, I hope it works https://support.biktrix.com/kb/guide/en/52v-programming-for-bbs02-motor-K2gUq2nWAX/Steps/1132765
 
So I ran around today with no issues. There's definitely an improvement switching to the controller temperature sensor.

Ambient temperature was around 24C. According to the controller temps never rose much over 50C.

This is running at an effective 55A. The bike is slightly more "peppy" than running 50A but not a huge difference. Very happy, thanks Daniel. If anything changes I will update but I'm confident the motor temp sensor was reading high and causing the intermittency.

It's possible the stator side of my motor is simply hotter than the controller side. Or were it's located is picking up more direct heat. I'm not sure but I can say from experience I've had the motor much hotter without the stock firmware throwing a code.
 
Hello, thanks for all of your efforts! This is awesome. I donated some money. :) I mainly came across this because I was having issues with my throttle being at 9, when peddling in a lower pas setting, it caused the throttle to be on/off, which was really bad when in pas 1.

New install of BBSHD, v1.5 IAP15W4K61S4. I installed your FW 1.2.0 and it seems to have fixed my problem mentioned above where the throttle is on/off while peddling in a lower pas. :) I was first trying with Pedal Assist start delay being 0, then I upped it to 75, had the same problem.

I have a couple questions:

1. PAS doesn't seem to kick in unless I'm going at least 6mph. I would like it to kick in immediately from the start like it used to do.
2. I believe I have the newer DPC-18 display. When using the Operation Mode Toggle, set to light, do I have to hold down the light to have it act as though the light is on? I tried that and nothing seems to happen, the screen just goes dimmer and I see the headlight icon on the screen. How do I know what mode I'm in?

I've attached my config file for review if that helps.
 

Attachments

  • Start.xml
    3.8 KB · Views: 24
cdbrown said:
Hello, thanks for all of your efforts! This is awesome. I donated some money. :) I mainly came across this because I was having issues with my throttle being at 9, when peddling in a lower pas setting, it caused the throttle to be on/off, which was really bad when in pas 1.

New install of BBSHD, v1.5 IAP15W4K61S4. I installed your FW 1.2.0 and it seems to have fixed my problem mentioned above where the throttle is on/off while peddling in a lower pas. :) I was first trying with Pedal Assist start delay being 0, then I upped it to 75, had the same problem.

I have a couple questions:

1. PAS doesn't seem to kick in unless I'm going at least 6mph. I would like it to kick in immediately from the start like it used to do.
2. I believe I have the newer DPC-18 display. When using the Operation Mode Toggle, set to light, do I have to hold down the light to have it act as though the light is on? I tried that and nothing seems to happen, the screen just goes dimmer and I see the headlight icon on the screen. How do I know what mode I'm in?

I've attached my config file for review if that helps.

As a follow up, my PAS is now working. I set start delay to 75 and increased stop delay to 150. It feels pretty good, I think I would prefer the stop to be quicker, but I can live with that. When PAS wasn't working, I think my stop delay was at 50, so it must need to be higher than that.

I can also report that I'm having issues with the motor cutting out, it's related to the temp, only happens when pushing it up hills and it starts to cut and get jerky when the temp reaches 45, then it cuts out completely at 47 and displays Error Code: 11, Fault with the temperature sensor inside motor. I was able to repeat this 2 times. I thought the temp was allowed to go into the 60's?
 

Attachments

  • resized.jpg
    resized.jpg
    23.7 KB · Views: 1,857
furcifer said:
So I ran around today with no issues. There's definitely an improvement switching to the controller temperature sensor.

Ambient temperature was around 24C. According to the controller temps never rose much over 50C.

This is running at an effective 55A. The bike is slightly more "peppy" than running 50A but not a huge difference. Very happy, thanks Daniel. If anything changes I will update but I'm confident the motor temp sensor was reading high and causing the intermittency.

It's possible the stator side of my motor is simply hotter than the controller side. Or were it's located is picking up more direct heat. I'm not sure but I can say from experience I've had the motor much hotter without the stock firmware throwing a code.
I'm just running at 30amp, but looks like I need to change temperature sensor to monitor only the controller.
 
As another update, I think the gearshift sensor needs to have a greater delay. As someone else had mentioned, I am also noticing more of a clunk when shifting.
 
cdbrown said:
As a follow up, my PAS is now working. I set start delay to 75 and increased stop delay to 150. It feels pretty good, I think I would prefer the stop to be quicker, but I can live with that. When PAS wasn't working, I think my stop delay was at 50, so it must need to be higher than that.

I can also report that I'm having issues with the motor cutting out, it's related to the temp, only happens when pushing it up hills and it starts to cut and get jerky when the temp reaches 45, then it cuts out completely at 47 and displays Error Code: 11, Fault with the temperature sensor inside motor. I was able to repeat this 2 times. I thought the temp was allowed to go into the 60's?

I saw you issue on github and answered you there about the PAS stop delay, a side effect of setting a low delay will be that you will have to keep a high cadence for PAS to still be engaged. The default stop delay of 200ms corresponds to a minimum pedal cadence of 12.5rpm. This is due to there being only 24 pulses per revolution from the PAS sensor. It the time between two pulses is greater than the configured PAS stop delay then PAS will stop.

As for the temperature issue, looks like you have your display set on imperial units and the firmware configuration set on metric units because 47 is 75 * 0.62... (km -> miles conversion). So I think you have actually hit the 75C limit.

You can change units in the configuration tool in the top Menu -> Options -> Units.

Keep in mind that when you change to imperial units the temperature in the range field will then be in Fahrenheit.

But what is more interesting is that you says that it get jerky which is unexpected. Did you see large jumps in the temperature or was the increase up to 47 gradual?

When you say it cut out completely, did you have no power at all, the motor didn't spin?
 
New to the forum. Just finished a bbshd build and was looking to get a few more amps without going with an aftermarket controller. My new bbshd was programmed for 52v and was capped at 28a. Has anyone ran this firmware with 52v and set to 32a? I'm hoping that the 4 amp difference will wake up the slight power increase I'm looking for.

I do want to make sure I have the original 52v firmware just in case. As soon as I find it through the other thread on firmware, then I will flash this one to try out.

Thanks!
 
danielnilsson9 said:
cdbrown said:
As a follow up, my PAS is now working. I set start delay to 75 and increased stop delay to 150. It feels pretty good, I think I would prefer the stop to be quicker, but I can live with that. When PAS wasn't working, I think my stop delay was at 50, so it must need to be higher than that.

I can also report that I'm having issues with the motor cutting out, it's related to the temp, only happens when pushing it up hills and it starts to cut and get jerky when the temp reaches 45, then it cuts out completely at 47 and displays Error Code: 11, Fault with the temperature sensor inside motor. I was able to repeat this 2 times. I thought the temp was allowed to go into the 60's?

I saw you issue on github and answered you there about the PAS stop delay, a side effect of setting a low delay will be that you will have to keep a high cadence for PAS to still be engaged. The default stop delay of 200ms corresponds to a minimum pedal cadence of 12.5rpm. This is due to there being only 24 pulses per revolution from the PAS sensor. It the time between two pulses is greater than the configured PAS stop delay then PAS will stop.

As for the temperature issue, looks like you have your display set on imperial units and the firmware configuration set on metric units because 47 is 75 * 0.62... (km -> miles conversion). So I think you have actually hit the 75C limit.

You can change units in the configuration tool in the top Menu -> Options -> Units.

Keep in mind that when you change to imperial units the temperature in the range field will then be in Fahrenheit.

But what is more interesting is that you says that it get jerky which is unexpected. Did you see large jumps in the temperature or was the increase up to 47 gradual?

When you say it cut out completely, did you have no power at all, the motor didn't spin?

Thank you for following up in the additional information. I replied to you in GitHub, I’m not sure that I fully understand, I mainly want pas to kick in as soon as possible and stop as soon as possible.

Regarding the temperature, you are correct, I have configuration in metric, and my display is imperial. I think the temperature just slowly climbed, I don’t remember it, jumping. I don’t think I noticed the power ramping down, I may turn down the amperage to 28, I don’t want it getting ruined.
 
Just my luck this didn't work for me , but I was wondering. Since you've mentioned that the the amperage is just software limited as BBS02 could be raised to 33amps. Would it be possible to remove the limit on the stock firmware somehow ? As I was thinking to get a BBSHD controller instead of buying a whole different kit which is pricy but I was thinking if it was possible to flash the BBSHD firmware on to the BBS02 controller or removing the amp limit on the stock firmware.
 
jayteee said:
Just my luck this didn't work for me , but I was wondering. Since you've mentioned that the the amperage is just software limited as BBS02 could be raised to 33amps. Would it be possible to remove the limit on the stock firmware somehow ? As I was thinking to get a BBSHD controller instead of buying a whole different kit which is pricy but I was thinking if it was possible to flash the BBSHD firmware on to the BBS02 controller or removing the amp limit on the stock firmware.

Daniel’s documentation states his FW file works on both BBS02 & HD. You can set the amps to 33, however it is not recommended.
 
cdbrown said:
jayteee said:
Just my luck this didn't work for me , but I was wondering. Since you've mentioned that the the amperage is just software limited as BBS02 could be raised to 33amps. Would it be possible to remove the limit on the stock firmware somehow ? As I was thinking to get a BBSHD controller instead of buying a whole different kit which is pricy but I was thinking if it was possible to flash the BBSHD firmware on to the BBS02 controller or removing the amp limit on the stock firmware.

Daniel’s documentation states his FW file works on both BBS02 & HD. You can set the amps to 33, however it is not recommended.

Yep I know that , His custom firmware didn't work for me . It was juttery . You can read my previous replies above.
 
jayteee said:
And then I suspected if the battery wouldn't be able to take the higher amperage. Which couldn't be the case as it's a 40amp peak.

This could be your problem. 40A peak is extremely low for a BBSxx motor. You need a battery capable of running 30A continuously at a minimum.
 
jayteee said:
Just my luck this didn't work for me , but I was wondering. Since you've mentioned that the the amperage is just software limited as BBS02 could be raised to 33amps. Would it be possible to remove the limit on the stock firmware somehow ? As I was thinking to get a BBSHD controller instead of buying a whole different kit which is pricy but I was thinking if it was possible to flash the BBSHD firmware on to the BBS02 controller or removing the amp limit on the stock firmware.

You cannot flash BBSHD firmware on BBS02, they use different microcontrollers and different pin assignments so that will never work.

However yes, you can edit the stock firmware to increase amperage. The firmware is not encrypted or signed or anything so it possible to change a few bytes to do that. Can be a bit of work navigating through the disassembly to the correct spot though, I gave some information to a guy who wanted to do this for the BBSHD here: https://github.com/danielnilsson9/bbs-fw/discussions/19

But in my opinion, if you have the knowledge to do this it would be better to invest the time in finding the issue in the open firmware causing it to not behave correctly on some BBS02 controllers.
 
furcifer said:
jayteee said:
And then I suspected if the battery wouldn't be able to take the higher amperage. Which couldn't be the case as it's a 40amp peak.

This could be your problem. 40A peak is extremely low for a BBSxx motor. You need a battery capable of running 30A continuously at a minimum.

Lowering it 20amps didn't do the trick either so yea . If it did exceed the limit , the BMS would shut it off but it didn't
 
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!
 
Quick update. Changed Temp Sensor to 'Motor' from 'All' and was able to climb hills as before - no cutouts.

Temp display (Range) got to 125-130F at the same point as where it reached 165F previously - so I'm presuming that the controller temp was the one triggering the high readout before. Seems the controller heats up faster than the motor - perhaps it should have a higher temp threshold? IIRC, the Vesc controller FET temp limits start at 80C and end at 100C - i.e. max power cut is at 100C.

At the top of the hill, the temp (Motor only) touched 160F, but the motor casing was only warm to the touch, not hot. I've gotten it hot many times before on longer climbs. This reinforces my thinking that the 75C cutout is too low for the Motor temp. How can we bump this up?
Thanks!
 
ebuilder said:
Furcifer, I believe I read somewhere in this thread you are running 50a through the BBSHD.
Is this correct? May I ask what voltage?
Are you running a stock BBSHD controller with Daniel's firmware and 50a? I thought Daniel's firmware with stock BBSHD controller was capped at 32amps??

Could you explain please?
Thanks

I'm running a modded stock controller that pulls x1.6667 the current setting. With Danial's firmware at 33A that equates to 55A. With a 52V I'm now running over 3kW. So far no problems but time will tell.
 
ebuilder said:
Thanks. Is this the shunt mod? If you performed it, would you say its a hard modification to make?

Correct. I find the mod easy. Danial is running the 45A mod and I'm running the 50A with this firmware and so far no issues other than selecting the right temp sensor. The combination makes for a beast of a motor.
 
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
 

Attachments

  • bbsfw001.xml
    3.7 KB · Views: 28
Are you by chance using a setting other than 10 levels of PAS (which is configured on the display)?

This didn't work for me: Configuring only 1-3-5-7-9th levels in config tool and choosing 5 levels of PAS on display. Maybe I shouldn't have disabled 2, 4, 6 and 8; I don't know. I switched to 10 levels of PAS on the display (and configured only the first 5; to get only 5 levels) and no problems now.
 
caleb7 said:
Are you by chance using a setting other than 10 levels of PAS (which is configured on the display)?

This didn't work for me: Configuring only 1-3-5-7-9th levels in config tool and choosing 5 levels of PAS on display. Maybe I shouldn't have disabled 2, 4, 6 and 8; I don't know. I switched to 10 levels of PAS on the display (and configured only the first 5; to get only 5 levels) and no problems now.
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.
 
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?
 
Back
Top