danielnilsson9
1 W
- Joined
- Jan 5, 2021
- Messages
- 61
This open source project is finally ready for release!
This firmware is intended to replace the original Bafang firmware on BBSHD/BBS02 motor controllers and can be flashed using the standard programming cable. Almost all functionality of original firmware has been reimplemented and additional features
have been added.
This firmware is compatible with all displays that works with the original firmware. A custom configuration tool is provided since BafangConfigTool is not compatible due to a different set of supported parameters.
Supported Hardware (v1.1.0)
BBSHD:
Controller revision 1.4 and 1.5:
BBS02:
Controllers with any of below MCU:s
Do not flash on any other revision/microcontroller without access to the original firmware (for that revision) to restore or you may brick your controller. If you have a bricked controller of an older revision, please proceed and let me know of the outcome.
It is a good idea to have access to the bafang original firmware files in case you want to roll back for any reason.
Download & Install
https://github.com/danielnilsson9/bbs-fw
v.1.0.0
v1.1.0
v1.1.1
Limitations (v1.1.1)
Since this is an open source firmware alternative the possibilities for future improvements are endless, if you have any suggestions, just let me know.
Configuration Tool
To give you a hint of available options.
This firmware is intended to replace the original Bafang firmware on BBSHD/BBS02 motor controllers and can be flashed using the standard programming cable. Almost all functionality of original firmware has been reimplemented and additional features
have been added.
This firmware is compatible with all displays that works with the original firmware. A custom configuration tool is provided since BafangConfigTool is not compatible due to a different set of supported parameters.
Supported Hardware (v1.1.0)
BBSHD:
Controller revision 1.4 and 1.5:
- STC15W4K56S4 (1.4)
- IAP15W4K61S4 (1.5)
BBS02:
Controllers with any of below MCU:s
- STC15F2K60S2
- IAP15F2K61S2
Do not flash on any other revision/microcontroller without access to the original firmware (for that revision) to restore or you may brick your controller. If you have a bricked controller of an older revision, please proceed and let me know of the outcome.
It is a good idea to have access to the bafang original firmware files in case you want to roll back for any reason.
Download & Install
https://github.com/danielnilsson9/bbs-fw
v.1.0.0
- A bit more power without hardware modifications! (max 32A).
- No upper voltage limit in software, can by default run up to 63V (maximum rating of components).
- Support lower voltage cutoff for use with e.g. 36V battery.
- Smooth Throttle/PAS override.
- Optional separate set of street legal & offroad assist levels which can be toggled by a key combination.
- Support setting road speed limit per assist level.
- Support setting cadence limit per assist level.
- Support cruise assist levels (i.e. motor power without pedal or throttle input).
- Display motor/controller temperature (shown in range field on display).
- Use of speed sensor is optional.
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).
v1.1.1
- Fix wrong status code reported for normal operation to display causing issues with some display models.
- Fix low voltage ramp down not working correctly if LVC was set above 25V.
- Add log print for battery voltage reading.
Limitations (v1.1.1)
- "Keep Current" option available in original firmware not yet implemented.
Since this is an open source firmware alternative the possibilities for future improvements are endless, if you have any suggestions, just let me know.
Configuration Tool
To give you a hint of available options.