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.

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.

163 thoughts on “E-Bike Conversion – Software

  1. Hi Stefan,
    I have a question. There is something that I can’t understand. After reading the memory, I can modify the parameters of the “Basic” and the “PAS” menus with the WRITE button (single WRITE or WRITE FLASH). There is no problem. Unfortunatly the “start current” of the “Throttle handle” menu has been also modified and set to 100% (it was 10% the first time I read the flash) and can not be modify even if I validate with the write button 3 or 4 times. The software allways shows the value is modified but if I read again the memory the value is still set at 100%. Do yo have an idea of what happen? Because I think I can’t use the throttle with the start current set at 100%.
    Best Regards
    F.

    1. If you always read 100% no matter what you write, then you probably have a memory defect in your controller.

    2. I have a similar problem, I can read, but not change any values. This is a BBS01b
      G340.250
      Model 209E V 5.1
      Firmware VS.9.1.a
      I can read the settings in the firmware, but when I try to change a value it appear to be written, but when I read the settings again they are back to the original settings. The cable must be OK since I can read the data, the communicating is both ways.
      I bought this unit recently, and I assume there is a firmware lock on the settings in this version, has anyone experience this? I have also tried the original Bafang programmer.
      Regars J.O.

    3. Original Bafang software is no different communication wise. I don’t know why you have this problem as other said it is working. I don’t have this model and can’t test.

  2. Just got a new interest for eBike/convertion-kits.
    Bought the first kit from Bikeshop.no, which of course is a “legal kit”.
    Stumbled over this great site and have tried the software.
    Seems to have the same problem as reported by JOHOVE.
    It connects and reads, shows strange values for current limit (all zeros) and Speed limit (all 14%):
    Write probably fails as no confirmation is returned (unlike for read).
    Maybe read-only flash memory on this particual controller.
    Have contacted “support” at Bikeshop. No surprise that they do not want to help.
    The DP-C18 UART display they sell is “securly locked” by them (BESST) and they refuse to “open” it.
    So you Norwegians are warned. Do not buy a kit from Bikeshop. 🙂
    I found Fasterbikes.eu and used their “version”(same) of DP-C18 to “unlock” the controller (speed).
    But your great program do not work with this particular controller.
    Will test on a BBSHD kit and a 750w/48V spare controller (from Fasterbikes.eu) later.

    Regards
    Geir

    1. The display is locked with a password. Shouldn’t matter what software has been used for it. Still without it, it will take forever to giess it. I think it is 5 digit on this model, but even 4 is enough. Don’t know of another way to unlock the display.
      The motor controller is separate and I haven’t seen onr locked before. I guess they have new firmware allowing for that. Sad! This law is quite stupid. Similar to mopeds limited to 45 when limit on the street is 50.
      So a warning to everyone. Always ask if and to what extent an electronic bicycle is limited before you buy!

    2. Hi,
      It is correct that the display is locked, it is programed with at tool from Bafang, not via password inn the display The controller is also locked, it can not be changed via the old protocol.

      The settings from Bikeshop are very conservative, much less that legale req.
      Very low cadence.

      I changed to an other controler and display from China.
      Johove

    3. Cadence is not a parameter you have control over. It is the maximum speed and current for each PAS level that limit the cadence.
      The new tool from Baffang is online and only for dealers. If they have changed the firmware to allow locking of settings, then you should only buy from a seller who doesn’t lock or is willing to unlock for you.

    4. And if you are buyimg locked one, don’t buy anything over 250W! If it is locked to EU limits, then this is what you will get even from BBSHD if limited.

  3. I agree that cadence is not directly controlled, but it seems that Current Decay affects it, in Bikeshop’s firmware this value was set to 1, which gave a maximum cadence around 60, much to low use the low gears on the bike.

    1. Current decay is how fast the current drops to 0. Anyway, there are enough parameters to make the motor feel like a toy.

  4. Thanks guys for replies/following up my post. 🙂
    I am an impatient guy and even though I did some “googl’ing” before going for the kit from Bikeshop, I had a suspicion that it probably was not a good choice.
    Was not sure how fast I would get “stuff” from LunaCycle (tested OK now), nor Fasterbikes, but the latter delivered very fast. (Bikeshop is of course faster, and OK for other “stuff”.. but “unusable” for eBike kits as we now know).
    Have not given up on the BBS02/DP-C18 from Bikeshop/Bafang. The controller will be swapped and I have ordered the BESST tool (and believes it can be used via a hack). 🙂

  5. Just wanted to say thanks for taking the time to re write this software it has helped me a lot with sorting my ebike out.
    Gerry

  6. Hallo Stefan ich habe eine Frage und zwar habe ich dein Programm genutzt um mein e bike schneller zu machen aber ich finde nirgendswo eine Datei wo die Werks Einstellungen stehen weil ich es gerne wieder drosseln möchte mfg chris

    1. I don’t speak German. Luckily there is google translate. There is no factory file. Every seller uses theor own settings. You should have saved your initial settings to file, so you can restore them later.

  7. Hello Stefan ! Thanks a lot to have shared with us your work and your upgraded programmation tool. I used it succesfully to set a BBS01B motor bought in april 2019. Hardware V1.1 and firmware V2.2.1.1. So quite different references than JO ones above… Perhaps an older version ?
    I installed the motor on one of our tandem bikes that we are using to practise bicycle with blind people each week. The aim is to allow less powerful people (for other health reasons) to join the group of tandems. As our tandem bike will be drived by severall drivers of our club I wanted to be sure not to fry either controller or motor, following a too intensive use. So my needs in term of setting were quite unusual : reliable use, linear power from 50 rpm to 80 rpm pedal rotation. I finally obtained good results (175 W max) with 100 % speed limit at each one of the 10 levels, 9 A as current limit (instead of 15 A), 100 % keep current (instead of 20 %).
    I’d like to have some feedback of yourself and readers regarding :
    1) possible known risks of such settings (9 A limit and 100% keep)
    2) temperature limit for the outside surface of the controller to void problems. With 175 W continuous power in climbing for 6 km, I reached stable conditions : +3.5 °C and +4.5 °C above air ambiance temperature respectively at “front high” and “rear bottom” parts of the controller.
    3) temperature limit for the outside surface of the motor. With 175 W continuous power, I reached stable conditions : +8.5 °C above air ambiance temperature at the outside surface of the motor.
    Thanks a lot in advance for your feedback.
    Clouclou64

    1. Hi! Considering the temperatures you measured, there is nothing to worry about. Those transistors usually have a temperature limit over 100°C. Sure you are not measuring temperature inside the transistors, but it won’t be more than 20° over what you measured. The motor itself can also handle fairly high temperatures. As long as you can put your hand on the motor case and keep it there without getting a burn, you are fine. 🙂

  8. Hello Stefan ! Thanks a lot to have shared with us your work and your upgraded programmation tool. I used it succesfully to set a BBS01B motor bought in april 2019. Hardware V1.1 and firmware V2.2.1.1. So quite different references than JO ones above… Perhaps an older version ?
    I installed the motor on one of our tandem bikes that we are using to practise bicycle with blind people each week. The aim is to allow less powerful people (for other health reasons) to join the group of tandems. As our tandem bike will be drived by severall drivers of our club I wanted to be sure not to fry either controller or motor, following a too intensive use. So my needs in term of setting were quite unusual : reliable use, linear power from 50 rpm to 80 rpm pedal rotation. I finally obtained good results (175 W max) with 100 % speed limit at each one of the 10 levels, 9 A as current limit (instead of 15 A), 100 % keep current (instead of 20 %).
    I’d like to have some feedback of yourself and readers regarding :
    1) possible known risks of such settings (9 A limit and 100% keep)
    2) temperature limit for the outside surface of the controller to void problems. With 175 W continuous power in climbing for 6 km, I reached stable conditions : +3.5 °C and +4.5 °C above air ambiance temperature respectively at “front high” and “rear bottom” parts of the controller.
    3) temperature limit for the outside surface of the motor. With 175 W continuous power, I reached stable conditions : +8.5 °C above air ambiance temperature at the outside surface of the motor.
    Thanks a lot in advance for your feedback.
    Clavier

  9. HI,IN MY CASE (BAFANG BBS02B) HAS HAPPENED SOMETHING RARE, I HAVE PURCHASED THE NEW KIT WITH 750C LCD, TO IMPROVE THE SYSTEM ALREADY EXISTS ON MY BICYCLE.
    I DO NOT USE THE PASS IN THE CURRENT SYSTEM, BECAUSE I CONSIDER THAT IT IS NOT OPTIMIZED FOR AN EFFICIENT USE OF THE BATTERY, AND MY INTENTION IS TO DO THE SAME WITH THE “BBS02B” BY USING ONLY THE ACCELERATOR (IN 0 PASS) PROGRESSIVELY (THING IMPOSSIBLE) TO DO IN THE SERIAL PROGRAMMING OF THE BBS02B) SO THAT BEFORE INSTALLING IT ON MY BICYCLE I HAVE ACQUIRED THE USB ADAPTER CABLE ON EBAY, AND FOLLOWING THE STEPS INDICATED ON SEVERAL PAGES OF THE INTERNET, I DOWNLOADED THE SOFTWARE ON MY PC “WINDOWS 10” AND HERE IS THE PROBLEM …. AFTER CONNECTING THE BBS02B SYSTEM TO THE PC, HAS NOT BEEN COMMUNICATED, AND THE CONTROLLER OF THE BBS02B HAS BEEN COMPLETELY VOIDED AND CONNECTED. THE DISPLAY DOES NOT TURN ON OR DOES NOTHING ABSOLUTELY.
    I DO NOT KNOW THAT IT COULD HAPPEN SINCE BY NOT COMMUNICATING WITH THE PC I HAVE NOT BEEN ABLE TO MANIPULATE ANY ADJUSTMENT. I AM CONFUSED AND PLEASE ASK FOR THE HELP OF SOMEONE WHO CAN UNDERSTAND WHAT HAS HAPPENED.

    1. No need of CAPS LOCK.
      Did you buy a USB to serial adapter with the same connector as on the bike or you just used some jumper wires? Even if it has the HIGO green connector it is still possible that it wasn’t wired correctly. Connecting the high voltage wire to a signal wire can kill you controller and your USB port on your computer.
      The software cannot damage your controller. You said yourself that it didn’t even get a connection confirmation on your computer.

  10. Yes, I used an encapsulated USB cable with the green terminal (Ebay seller), I also suspect that the order of the cables inside the green connector may be wrong.
    The software I used is the normal bafang, luckily the pc has not suffered any damage.
    I am aware that the responsibility for this is mine at the time I make any changes to the BBS system, so even though I have not released the equipment yet, I have bought a new controller that is still on the way.
    But now I’m afraid to try again, I should definitely buy a more reliable usb adapter cable even if I do not know which …
    And I do not want to give up using a modular throttle and not an “on / off” switch as it comes from stock..
    I have written here looking for someone who can help me understand where the solution to this problem may be.
    Thank you

    1. Unfortunately you can never be sure of quality with ebay sellers. If you download my version of the software, you will find a help file (a pdf). In that file you will find the green connector and its pins explained. You can use this and a multimeter to verify if your cable is wired correctly. While I was working on the software I didn’t have a proper cable and used jumper wires, which at one moment made a short between 48V and signal. As a result my laptop rebooted (luckily with no damage to it) and the controller shut down (also no damage). I guess I was lucky. That’s why I added a big red message in that help file, that everyone takes their own responsibility when they start tuning their motors. Also sellers will void your warranty usually if you do that.
      Make sure your USB port on your PC is fine. Connect some other device that communicates with it to see if it still works. Also make sure that the USB to serial adapter is installed correctly in Windows and you can see it as a COM port. If not, then it won’t do you any good in the software for the bike.
      As for the throttle, I am on your side. Mine was set to work only on PAS levels 1-9 and it was limited in not very usable way.

  11. Thank you very much for the advice, while I await the arrival of the new controller, I researched the inside of the Ebay usb adapter cable, and there is surprise …
    I do not know if I can upload images so you can see it, but the order of the cables according to the colors are reversed, the red is connected in “GND”
    the green is connected in “TXD” and the black wire is connected in “RXD”.
    So I think it has shorted the controller of my BBS02B.

    1. You cannot be certain of wire colors and would be best to check connector pins with a multimeter according to the image in the help file.
      You can’t attach images to comments on WordPress.

  12. It is true, the colors of the wires are not reliable.
    After examining each of the contacts and their corresponding location, on the correct diagram, the USB adapter I bought was like this:
    Controller Side : Diagram of my USB adapter cable :
    – GND – – – welding to P+ wire ( out of usb )
    – TXD – – – connected to TXD ( usb board )
    – P+ – – – welding to GND wire ( out of usb )
    – RXD – – – connected to RXD ( usb board )
    – PL – – – connected to GND ( usb board )

    Now we can see exactly what has happened in my controller …
    I do not know if I can complain to the Ebay seller about the damages that this adapter cable has caused to my BBS controller, but at least sharing my experience could prevent another user from falling into this fatal error.
    Regards

  13. Hi,
    I have a Santroll controller (wzkd3615ka) using UART protocol, do you think that your software can work?

    Thanks

    1. I have idea. I wouldn’t try. Just because it also uses UART does not mean it is compatible in any way.

  14. Hi, finally I have been able to solve the problem !!
    A few days ago I received the new controller and putting the cables of the USB adapter in the correct order, and so establish the connection with the PC.
    At last I have been able to adjust the throttle so that it works as such, from the “0” position of the PAS.
    After testing the entire system mounted on the bike, everything works perfectly, less a detail, when I use the throttle in PAS position “0” and move the pedals, that interferes with the continuity of the engine torque, while I hold the pedals in a fixed position, there are no ups and downs in the power flow. Is there any parameter that I can adjust so that this does not happen?

    1. On PAS0 you should set the limits for current and speed to 1 and that will allow the throttle to work. On the Throttle tab you can configure how you want it to perform. Set speed limit if you want or leave it at maximum (make sure it is controlled by the program and not the display). You can limit the current, the ramp-up and ramp-down behaviour and other things.
      I haven’t experienced what you describe. The only thing I could sense is this 1% current when I try to move pedals very slowly. It actually works, but power is so low you can barely feel it at all.

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.