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 of others on the road!

You can download the program HERE. The file keeps getting reported for violation, so it might get blocked again. I just reuploaded it again. I have no idea who and why is doing this. It can’t be shared on WordPress directly, so I might have to look for new sharing service again.

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.

375 thoughts on “E-Bike Conversion – Software

  1. Thank you very much for your work on this program Penoff. It works great in Windows 10, as you know.

    I am waiting for UPS to deliver my BBS02B and DP-C18 display. It is supposed to arrive today. Battery is a week away. That’s going to be a long week. 🙂
    My questions is, the DP-C18 I am getting is limited to 5 levels of Assist. Do I set levels 1-5 to 20% increments, 20, 40, 60, 80, 100, then set 6-9 to 100% also?

    Thanks

    1. It uses levels 1,3,5,7,9. Just set all modes with encreasing power from 1 to 9.

  2. This software wont run on windows 10. LOL DOH! get with the program (Pun intended). Its worthless if it cant run on win10. The GUI wont even load right. Its like some old opensource x11 GUI

    1. Funny! Then how will you explain tha fact many people run it on Windows 10. I have personally ran it on close to 10 different machines running Windows 10. It has an issue if you have your Windows scaled up for high resolution screen or a custom system font much larger than default one. Other than that it works fine.
      Also before writing rude comments, remember it is free software and comes with no guarantee. If you are unhappy, the source comes in the zip. Get newer Dephi and rebuild it for your taste.

  3. Hi,

    I can’t thank you enough for making the software available, I’ve just activated throttle on PAS 0 and it seems to have worked without a problem.

    The build is a brand new BBSHD motor with a 52v 34ah triangle frame battery on a Surly Big Fat Dummy cargo bike project.

    Thanks, Matt

  4. Hey Stefan,

    Your software is great! thank you.

    I am trying to use a 36v battery with my bbshd kit (I got a good battery for free) and was wondering how to lower the low battery protection (low voltage cutoff). I get back an error message when I lower it below 38 volts. I only know a bit about coding and haven’t used this program at all. What would i have to do to change the parameter limits for the cut off?

    Thanks, Evan.

    1. This error message comes from the controller of your motor, so you can’t do anything short of hacking the firmware and as you can imagine that is not easy even if you had a copy of it. You will need a battery compatible with your motor.

    2. I went through similar problem as I had a 36V battery, but mistakenly ordered and installed a 48V bafang. I came up with two options: get a 48V battery or a 36V controller. The controller was the cheaper option so I found one at alibaba I later found more affordable batteries at electricbikekit
      Joe W

  5. Hi Stefan and thank’s for your extraodinary iob. I have a problem with the Bafang Configuration tool program. After connecting the right Com port and connect, it doesn’t read the controller. In other word the windows Read and Flash doesn’t change in black color. I tried to change the com ports and the program recognise the right port. I tried to connect and disconnect, to use different pc. Can you help me with some advise? Thx Giorgio

    1. If you can’t even read, that means either incompatible firmware on your controller or incompatible US to Serial adapter. I have a few such adapters, which caused me a lot of headache trying to figure out what is wrong. For any serial communications I only use gwnuine FTDI ICs now.

  6. Hi Stefan,

    I just did my first e-Bike conversion. Bafang BBS01B, 250W, 36V, 15A. In the UK, so happy to operate only up to 25kph, but keen to find the settings that suit me best. We have a lot of hills round here, but I also want endurance.

    Just a couple of comments on your software. I find it really useful and, when following instructions, works great!

    Anyway, I downloaded v2.0 and v2.2b. I assume that 2.2b is the latest one? There seems to be a fault on my 2.2b, under Basic, Low Battery Protection. v2.2b only has “18” – “22” as dropdown options, whereas v2.0 has “18” – “55”. I needed 30, so I wrote it in v2.0, saved, then loaded into v2.2b.

    Sorry if you are already aware of this.
    Ian

    1. The version I have on my computer says 2.0, so I don’t know where you got this 2.2b, but it is not released by myself.

    1. There is no moderator. Only me. What is so important? You can also email me, but I don’t check my messages all the time, so it might be a few days before I respond.

  7. Hi There, When I click on your link above I get a 404 Error. Is your software no longer available?

    Thanks, Franny

    1. Looks like Dropbox made changes to their system. I will update the link.

  8. Thank you so much for supporting and meeting our needs to fine tune the Bafang Motors. Your tool and the USB Programming tool I just received from Amazon work very well. Very cool.
    One problem for me is on my work laptop which runs Windows 7 Professional does not open the programs window full size so the flash buttons and the disconnect button are not available. I brought my bike in the house and plugged into the home Windows 10 computer which does go big so the whole program is seen. Not sure if you had other versions or have a way for the window to go bigger. The maximize option is grayed out and not a selection. I have 2 bikes up at the mountain house and would like to program on the road.

    Thanks again.

    1. This is cause by crappy Windows scaling. I have seen it once. Windows 7 has terrible scaling functionality unfortunately. In some software it only scales fonts, but not buttons or any other GUI elements, which makes software impossible to use sometimes. I do not have a solution for that issue other than setting Windows scaling back to 100%.

    2. Also if your scaling is at 100%, but you set larger system font size than the default or different type of font entirely, you will have the same issue.

    3. Thank you the scaling back to 100% did the trick.
      I am interested to see how my BSSHD is programmed at my vacation home. It is much smoother through the lower PAS settings While my two BSSO2‘S were surging at low PAS settings. Your program now gives us the ability we need.

  9. Do you know if this software will work with a bafang m600 mid drive motor with CAN interface?

    1. There is no support for CAN. Maybe if you convert to COM, but I have no idea if it is the same type of firmware after the CAN or COM interface.

  10. witam mam problem z moim bafang 1000 hd polega on na tym ze nie pobiera wiecej amper jak 20 mimo ze jest ustawiony na 28 A ,bms jest ustawiony na 60 A ,kolejny problem to ze kiedy bateria dojdzie do 48w to moc silnika spada do piewszego biegu w skali 3 które mam ustawione czyli odcina drugi i trzeci bieg można je włączyć ale mocy nie przybywa do wartosci bateri 48w wszystko jest ok działaja trzy poziomy

  11. Hi, Thank you for making the program free.
    I wonder if there is a parameter to change the shift delay, when using a shift sensor(gear sensor) on my bbs02b 750w 48V? Or if you know how to change this. I need the delay to be longer on one of my bikes.

    1. No, there is no such parameter unfortunately. You just need to work on your shifting. I had to do the same. It is not very difficult, but you need to learn how to shift quick so you don’t damage your gears.

  12. Hi,

    It’s Stefan, but it’s OK. Bosch motors have torque sensor and this is the reason they make the feeling so natural. You can’t achive this with Bafang’s BBS series which don’t have such sensor.

    The original code was downloaded from some forum. I don’t remember which one. It was built by one of the old Delphi versions. You can rebuild in the latest ones too. I did it once. The only thing, which is a little tricky is to install the serial port component. The rest is easy. Then you can probably port it to Linux without too much trouble. System dependant are the file access and the COM port discovery. Everything else is just user interface and decoding/encoding of commands, which you don’t need to change.

    The latest Bafang software I haven’t used and I can’t comment on. People say it is for distributors and service shops, which pay for it and get newer motor controllers unlocked for tuning online.

  13. Hi Stephan,
    Thanks for making such a great app!
    It really helped me reduce the start speed so my wife wouldn’t be afraid to use her new e-bike conversion.
    The conversion went well but i wish it had the same type of peddle assist my Bosch powered Trek has which is super smooth. I really shouldn’t have bought the 750W motor with the massive battery.
    Now that i’ve reduced the rocket ship start, her only complaint is the weight of the battery.
    Do you know of a better solution for that. We have the rear carrier 48V model.

    Also, I checked out the source code but it’s in Delphi which is problematic for building for Linux unless the code can be built with the latest Delphi which i believe supports Linux.
    Is that what was released by Bafang or did you convert it based on your preference?
    Can you please share the link to the original Bafang source code if that wasn’t it?
    thanks!

    1. Gary, I downloaded and installed Embarcadero Delphi 10.3 community edition with 1 year license on a VirtualBox Windows 7 machine. I works like a charm. A couple of caveats I had:
      o To use your USB to Serial ports, do sudo adduser vboxusers
      o Read READ_ME.txt, and pay attention to “Build the SPComm as a package and install it in Delphi compiler” Delpi’s help can … well… help.
      Joe W

    1. I found it on some forum. My vesrion’s source code is in the zip file.

  14. My Bafang BBS02 controller has an 8 pin cable. Where can I find a pinout diagram similar to the one in the BafangConfigTool help file. That is where are pins GND, TXD, P+, RXD, PL?

    1. I honestly have no idea. I haven’t seen such cable before.

    2. I was looking at the wrong cable, the one directly off the motor controller that then plugs into the one going to the display (the correct connector), and the brake sensors, and throttle. I found a 5 pin Higo cable from a previous project, and made a cable. “Previous project” was an attempt to monitor signals on a Hollandia Evado ebike. When I got the Higos, the female socket cable was bad. I gave up on that project, then the bike was stolen. To make the Bafang cable, I had to cut the molded part off the 5 pin socket, where I found the wires weren’t even stripped, let alone connected. Some soldering and hot glue resulted in a good cable.

  15. Hi Stefan,

    I have programmed a total of three BBS01s and was very happy with the tool.
    Today I tried to program a 4th motor but I can only read from it.
    It is Hardware Version 5.1 and when read only returns 0s for the current percentages in the assist levels for example. Seems like the protocol was changed.
    Are you aware of this and is there a chance to get a working version of your tool for this new version of motor?

    Thanks a lot for the work you have put in so far – appreciate it greatly.

    Best,
    Daniel

    1. Hi Daniel,

      I don’t know if firmware has been changed. Doesn’t make sense for the protocol to change though. The display uses some of these commands and thateans you will need display with new firmware in order to support this change.

      I don’t have new version and I doubt I will make one. I sold my e-bike and I don’t plan on buying another one of this type.

    2. See posts from JOHOVE and myself from last year.
      Bafang have changed their firmware in the controllers at some point in time.
      You can connect/read values, but not write (aka flash).
      Which is just sad, but probably to avoid any law-suits/fines from EU-market.

      Br,
      Geir

    3. If they changed it, I am pretty sure someone alredy figured it out. I don’t have a motor to test it and find out how to do it.
      They might be playing a dangerous game if writing is not allowed as before. People are buying those motors for the ability to tune them. If this is taken away, there is no much sense in buying them anymore.
      By the way, there are ways to rmove the limit on Bosch motors as well. There is always a way. The question is is it woth the effort or is there another option requiring less effort? So Bafang should be carefull or they will lose quite some market.

    4. Totally agree.
      I felt so “cheated” when I got the BBS02 for my first e-bike conversion project.
      Same when I bought the BESST tool.
      Any Bafang product is locked to whoever bought the part originally and only possible to reprogram or use the (useless) BESST tool *if , and only if* you have an account at Bafang and originally bought the display, motor.
      You have to be “online” with their servers, and they log everything.
      It was also recently made a total “cleanup” of their userdb/sw, so everyone that will use Bafang must be a registered shop/service validated by Bafang.
      It sucks bigtime.
      But this is the way it is and have been for a long time with Yamaha, Bosch and others.
      Unfortunately.

    5. It’s their choice. Personally, if I get the same difficulty doing what I want with a motor from Bafang as with Bosch or Yamaha, I would not choose Bafang. They have proven they have worse quality control, there is no support if you are not a reseller and their motors are heavier and with worse control. Better spend a little more and get better motor.

  16. Hi,

    Thank you for making this tool.

    Is there any way to override the 57.5V upper limit on the Bafang BBSHD 1000W?

    Thanks 🙂

    1. I don’t know. I don’t have one to test and I am actually selling my electeic bicycle.

    2. You would need to re-flash the motor firmware and only Bafang have the source code for this.

Leave a reply to Gary Cancel reply

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