E-Bike Conversion – Software

e-bike_conversion(pic21)

It’s been a while since I wrote the posts about my electric bicycle conversion project. The bicycle runs fine so far and I finally finished rewriting the software that configures its controller.

I will not make a long post for this so you won’t get bored. Basically I took the original software which also included all required source files and made it look better, fixed many bugs, improved its operation and added a small help file. Now you don’t need administrative rights under windows 8 and 10 to be able to see the available COM ports. The interface looks more tidy and well aligned and also uses better English. Numerous bugs were fixed, regarding error messages and error checking, communication, parameter limits and so on. I found this program as an open source (including all source files) I am providing it the same way.

Be advised! Doing any changes to your controller might lead to damage. I won’t be held responsible for any kind of damage you might induce to your controller, motor, gears, bicycle or yourself. Do what you like at your own risk! Cycle safe and take care for others on the road!

You can download the program HERE.

Link was updated and now uses different sharing service. Dropbox account deleted. Apparently they decided to block my sharing abilities for no apparent reason and without any warning. I can’t accept such terrible attitude towards their users and left them. Apologies to anyone who was trying to download the file. I hope it works now.

Latest version uploaded on 16.05.2017 with a few updates. Assist level labels now say Assist, not Assit 😀 The current limit is not active when bike is not connected. This allows you to work with your saved profiles even if you haven’t connected your bike.

Compatibility with BBS##B drives has been confirmed by many users now. Luckily for all, Bafang hasn’t changed the communication protocol.

240 thoughts on “E-Bike Conversion – Software

  1. Clear! Thank you for the quick and clear answer!
    I guess, it is not that easy to change the MaxCurrent in the controller firmware…

    1. It would be if there was source code available, but there isn’t. 🙂

  2. No one else has mentioned it, Assist is spelt Assit on the second tab. Not an issue but I am tempted to get my Delphi 7 compiler going just to change it! Great work by the way!

    1. Good find. I’ve seen that a few months ago and updated it, but I’m not sure I uploaded it. Will check and update if that’s the case.

    2. You are right. I updated the zip file in my dropbox, but I have forgotten to build the executable with the changes and I have uploaded the old one. I guess it was late night update and we know what happens when you work and feel sleepy. I am uploading it now. You can download it and it will say Assist now. 🙂

    1. No. Do you know what has changed? I have new firmware, but haven’t put it on my bike, because I use it everyday and don’t want to mess with it too much.

  3. Firstly, thanks for your great work. This is very user friendly.
    Have you ever played with changing the parameters for the BBSHD “P” mode?

    1. Thanks! No I haven’t done anything with BBSHD. As far as I know it is the same as BBS02, only having higher current limit at 30A.

  4. thanks for this one question when i launch the application it displays a window that is too small for all the content and it wont let me resize is there an easy fix for this?
    thank you in advance!

    1. This is Windows related issue and has been asked a few times already. It is either Windows scaling option or system font selection (type and size) that cause text to get out of the window and interface elements. I didn’t design any moving or resizing parts in my program and that is why there is no option for window resizing or full screen view. Apparently I shouldn’t have trusted Windows by using system font as many people had issues with that.

    2. I guess next version will be with fixed font that does not depend on system settings then. Thanks for the information. I guessed it had something to do with font if not windows scaling, but didn’t look into it.

  5. Hi,

    Thanks for writing this software.

    I’m having trouble getting it to work with my new BBS02. I can see the USB Serial Port in under “Ports (COM & LPT)” in Device Manager, but when I run the .exe and click “Connect”, the “Read”, “Write”, “Read Flash” and “Write Flash” buttons remain greyed out.

    I’m running a new installation of Windows 7 with nothing else installed. I also tried Windows 10 on a different computer and had the same problem. I’ve tried two different cables.

    Any ideas?

    Cheers,

    Tom

    1. reaction on an old post, I know, But same problem here. Anybody?

  6. Using the power button and +/- buttons, I can set various parameters like max assist speed, assist level etc.
    I play around with the idea of setting some of these parameters directly with a microcontroller, based on some criteria.
    I guess the system has a microcontroller, probably in the motor house.
    How do you think I would go about to achieve this ? Should my controller just emulate pushbutton clicks, or can some serial command be sent by the external micro controller ?
    Thanks 🙂

  7. Hi Stefan, just fyi… the new version still sais ‘ assit’ in the second tab 😉 looks like you skippe done

    1. I belive I fixed that. Might be a single label I missed. I will check it when I have time.

  8. Hi Penoff,
    nice work! Would it be possible to set the battery cut-off lower than minimum?
    I mean, I would like to use a 48v 750w BBS02 with a 36v battery, so I would need to set LVC to 30v.
    Thank you
    Marco

    1. Hi Marco,
      It is not possible. Also it won’t work as you expect. This motor is designed for 48V battery. If you power it up with 36V, you will get very little power even if the LVC is set to lower value.
      Stefan

  9. Hi,
    will the sofware work with a backmotor
    FISCHER E-Bike Herren Trekking 28″ Proline ETH 1722-S1

    1. Hi! I have no idea whether it will work or not. Never seen this bike. If it uses Bafang BBS01, BBS02 or BBSHD drive, it should work.

  10. i tryed it today
    the programm is not working with this controller
    i got no controllerinformation
    Cabel and PC driver are ok
    greetings from jörg

  11. Hi Penoff
    perhaps you are able to help me,i will give you 100 $ if you can solve my problem.

    greetings jörg

    1. Thanks for the offer, but I’m afraid it’s not that easy. I simply don’t have the information needed in order to develop another program that can configure your motor. I am not in contact with Bafang or anything. I don’t have internal information. I am sorry, but I can’t help you.
      I believe Bafang is following Bosch and Yamaha, which offer only street legal drives (max 250W, max 25km/h when pedaling only, no throttle). I hope they keep at least one model that is powerful and fun to use off-road or at your own discretion (ride smart and don’t cause trouble).

  12. Hi, what the el files in the program folder do, for what model are they? I have a bbs02 B version (v2), i am unsure about programming it, is it the same as a bbs02?, is there any el file precompiled for it?

    1. The el diles are profiles with settings. One is mine for BBS02 750W and the other came with the original version of the program. You can use them. I haven’t teied with the new motor version. Try just connecting to it and see what it reads from the motor. If it looks fine, you can try changing some value and see if you can read it back. I think it will work, bit can’t be 100% sure. I don’t think it can do any harm though. Just cheeck the last settings you programmed before you ride your bike.

  13. Thanks for the answer, I programmed it manually and looks ok, I have a question though, is it normal that my thumb throttle max power is limited by what pas level I am in? Shouldnt the throttle allow full power no matter what pas level I am in? (BBS02B 750W)

  14. Hello Stefan, thanks for all your time and patience for us mortal plebs,

    i just got my bbso2 and installed it on my bike. at first the bike would only go 25mph after reprograming it it now goes 30mph or 48km/h. I used someone’s .el file on the internet. it was karl’s special sause located here: https://electricbike-blog.com/2015/06/26/a-hackers-guide-to-programming-the-bbs02/ . what I wanted to ask is can i push it a little bit more than that as i’ve seen people go way faster on some videos or do you recommend staying where i’m at and not touch anything inb4 i fry the controller. I’m one of those adrenaline junkies and oh yeah am also bulgarian (:
    Thanks for your time
    Stoyan

    1. If current is set to maximum (25A) on throttle or PAS and speed limit is set to the maximum, that is what you can get. It also depends on gear ratio. My bike reaches around 45km/h and a bit more when pedaling. That’s more than enough for a bicycle I think. Street legal pedelec (e-bicycle) in Europe is limited to 25km/h and in USA around 30km/h anyway. Mopeds are limited to 45km/h in Europe. Anything faster is considered motorcycle. 🙂

  15. i see well then i’m happy with what i got and yeah i guess 45km/h is good enough. i am in the US so 30km/h would be the limit but we go faster if we can. Thanks for the advise and the program. you made it so much easier for people to access their controllers. Really good stuff

  16. Hi, thank you for the software!

    The more recent Bafang bike, the Bafang Max has a new function called Walk Assistance mode. The bike also does not have a throttle or a throttle connector on the wiring harness. It would be good to be able to configure the Walk Assistance mode to be a replacement for the throttle.

    In the Walk Assistance mode the bike motor is enabled but limited to ~4mph. You activate it by holding down the ‘-‘ button on the button controller. It would be good to increase this limit, so that holding down ‘-‘ would be a replacement for the throttle. Currently there is no GUI in your version of Bafang Configuration Tool to change the Walk Assistance speed limit.

    In your source code Controller.pas, as you are reading in the values from Flash, do you think it’s possible to modify to read additional values, like Walk Assistance speed limit, and then write them back to the Flash?

    Thanks again

    Alex

    1. Hi Alex,

      BBS series also have walking assistance, activated the same way and it helps up to 6km/h with limited power. There is no setting for that power or speed limit.
      If I don’t have access to the source code of the motor firmware or communication protocol, also without having the specific motor, it is impossible to make any software for it.

  17. Hello Stefan,
    Do you know something about pas/throttle issue on 2017 units ? It looks like serious problem. Throttle not responses when pedalling, exept 100% throttle, no matter which PAS was chosen. Please see this topic:
    https://endless-sphere.com/forums/viewtopic.php?f=28&t=91016
    Also, the problem is described in comments here:
    https://electricbike-blog.com/2015/06/26/a-hackers-guide-to-programming-the-bbs02/
    See at Rassy’s posts especially.

    I just ordered my BBS02B and i’m afraid about this issue 😦

  18. Just purchased the bb02 750w. Anyone know the default parameters out of the box with display which can set up general parameters. And are advanced adjustments required at all.

    1. Parameter values are set according to the requests of the merchant. I doubt you buy from Bafang directly. If the store asked for specific settings, then that’s what you would get. Try it before modifying it. You might like it. If not, then you can play aroind with settings. Just read and save the original ones in case you want to revert back to stock in future.

Your comment:

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.