Programming the Bafang Middrive BBS01+BBS02

Tom I think liketoride is saying he killed a computor not his controller?
 
tommie said:
No way programming your controller will have `killed` your PC,

maybe crashed it but certainly not killed it.

I can't turn them back on. I'm no computer expert... Maybe they're not dead, but they're like dead to me. Any idea what might have caused this phenomena?
 
tommie said:
No way programming your controller will have `killed` your PC,

maybe crashed it but certainly not killed it.
Not sure if that could happen indeed, although one of the wires has the full battery voltage on it. Not sure how an USB port would react to that.
 
opperpanter said:
tommie said:
No way programming your controller will have `killed` your PC,

maybe crashed it but certainly not killed it.
Not sure if that could happen indeed, although one of the wires has the full battery voltage on it. Not sure how an USB port would react to that.

I haven't taken them to a computer doctor, but it would probably be cheaper to buy a used pc with a later version of Windows on it than to repair those. Both of those PC's had windows 7. But my main concern is my controller. I fried it too. In this video, this man makes his own cable and warns that if you get your wires crossed, "things could go terribly wrong. Do you think my problem would be a faulty cable :?:

At about 3 minutes 30 seconds he says you could fry something:
https://www.youtube.com/watch?v=BYMdcSWnbBo
 
Hi, I have tried different USB to serial converter and now it read something, but motor version etc. is really wrong and after downloading current parameters, zeros are displayed in all fields. See picture. Does anyone have any clue what is wrong? Is the flashing application useful for all controller versions?

Printscreen:

Thanks
 

Attachments

  • bafangfailure.png
    bafangfailure.png
    43.6 KB · Views: 1,642
Has there ever been an update to the program software?

Which version is the latest?
 
Hi everyone! I just registered on the forum but I've been reading it since I decided to convert my bicycle to electric.

I see many people reporting about damaged controllers, USB to serial adapters and even PCs. I have some experience as well. I burned my USB to serial adapter on the second connection. Good it was original FTDI chip and it had good protection so my laptop was intact. My first thought was I killed my controller but I started thinking there is some protection in the newly produced controllers. So why does it happen and how to avoid it? If you are using USB adapter with original connector you won't get in trouble. Unfortunately those are sold as "programmers" and are quite overpriced. Therefore people use cheap adapters and some wires. That's where the issue lies. Using wires (even with some tiny connectors at the end) might lead to short circuit between neighboring wires. If the short circuit is to one of the high voltage pins you will kill your USB to serial adapter and possibly your PC and even the controller. There is one pin at the connector which is directly connected to the battery meaning you can have above 50V there (from a fully charged 13S battery). This is more than enough to kill the 5V USB to serial adapter and your PC as both are sate up to 6V and anything above that can be lethal for the device. The same applies for the controller itself. When I killed my adapter I thought the controller is also dead but it wasn't. There is no way of that happening if it didn't have some protection so I suppose something was changed or I was impossibly lucky. So when I changed the FTDI chip on my USB adapter I measured with multimeter for short circuit every time before connecting the battery to avoid further damage. I hope this will help someone else save his equipment.

I also saw the programming software is packed with the full source code so I decided to rewrite it because it was just terrible. I fixed numerous bugs, improved the interface and the English :) and added small help file. If you are interested you can find it here https://penoff.wordpress.com/2016/01/13/e-bike-conversion-software/
 
Do yourselves a favor and buy the proper item and have done with all the messin` -->http://www.empoweredcycles.com/collections/8fun-bafang-bbs02-accessories/products/usb-programming-cable-8fun-bbs02-mid-drive-motor

no more burnt out controllers, crashed laptops etc etc..
 
Thanks Penoff.Your "Help" file cuts through the previous translations that I have found very hard to understand. I look forward to studying it closer. AWESOME!
 
What you are missing is that some changes can fry the controller. I have controllers programmed by Cell_Man. Lectricycles, and now luna. There's nothing to improve. Most armchair programmers ought to leave well enough alone. Even the most astute here don't have a clue as to how Bafang has programmed. Show me a screwed up controller and I'll show you either a bad programming job, OR a crappy home made cable. Jeez! A 93 cents TTL to USB and you have a problem? DOH!!

electric fat bike has one of the best compilations. Karl like myself stays mostly with the EM3ev and reseller programing. It's conservative but will always work. Same with Luna. Over two years I've read dozens of fails. Please don't over simplify and encourage "playing" at programing.

As always YMMV
 
Penoff........below here is pasted from your help document. Which is awesome by the way and thanks for this. My question for you is The STOP DELAY & STOP DECAY sounds like they do one and the same thing. Can you add some more detail to how these two settings work differently from each other.......thanks wayne

Stop Delay [x10ms] – This is the delay after you stop pedaling before the motor stops.
Keep in mind the x10. If you set it to 100 this will lead to 1 second delay. Value of 25
(250ms) works well.
Current Decay (1-8) – This parameter sets how fast the current drops when you are
pedaling fasted and are reaching the maximum speed at the selected assist level. Lower
value means the current will start to drop at lower speed.
Stop Decay [x10ms] – The amount of time between the moment you stop pedaling and the
moment the motor stops.
 
I don't have a PC so I cannot open this file easily. Is it possible to increase the maximum speed associated with each level of PAS? I don't want to change any of the power settings, just the speed at which it dials back a given level of power. If it is going to function as a sort of cruise control via current settings, it would be nice to raise the speeds at the various settings. Now that I have the gearing dialed in I find I am riding around at PAS 1 most of the time, but it pulls out the power just as I get rolling in a given gear and then oscillates between power and coasting. It feels like surging and it would be nice if this could be alleviated or at least have the initiation speed raised.
 
I'm guess I'm going to need to buy a cheap PC Laptop just to program this thing...
...unless someone has a simple way to make it work on my Mac...?

Anything I need specifically for the laptop? ...just any with a usb port?
What kind of laptop would you buy, if it was pretty much for this purpose only?
I'm looking at options costing less than $50 if possible...
...it doesn't have to be awesome, just get the job done and not kill me with frustration.

Which operating system works best with the programing?
windows 7? ...or 8?
I have the cable coming and will be following the ElectricFatbike guide.
 
"Penoff" I am reading through the help file you created and it explains clearly a lot of things I was not sure about. Thanks again for that. I am looking at the text in red here from that Help file......

Start Voltage [x100mV] – This is the throttle handle output voltage at which the motor
will start. The minimum at which the controller responds is 1.1V so you should set this
parameter to 11 (11x100mV=1.1V).


I am not sure if this statement above in red is really correct but I may be wrong. You mention "The minimum at which the controller responds is 1.1V", are you sure about this? I was assuming it would be like the settings on the Version 3 ca from Grin tech where the start voltage setting is where you can ask the controller to kick in earlier or later depending on different throttle output voltages. Kind of a way to fine tune a dead spot in a throttle that uses up too much of its travel before it gets to the place of moving the motor.

One thing I have found and others also have reported , is if this setting is set too for throttle start voltage it will somehow effect your pas and make it super jerky. Weird but it does.
 
Wow! I didn't expect that much interest in what I did. I will try to answer all questions.

First the "original programmer" is nothing more than a cheap USB to serial adapter with a proper connector for the controller. You can see the heatshrink on the photos. I am sure my adapter is a lot better because I designed it (also it costs around 10 EUR). That's why I didn't kill my laptop like other people did. I am electronics engineer by the way. The expensive thing in this "programmer" is the connector. I found it for 5 EUR per piece which is insane.

It is true that you can kill your controller by programming wrong values that make it work in extreme modes. I started reprogramming my controller because the throttle wasn't set to work at PAS0 which I find useful for small uphill parts of the road when I don't use the motor on flat road. I did tune some other settings a little but tried to keep it on the safe side.

Now on the questions.
1) Stop Delay is a time parameter. If you set it to 100 your motor will stop rotating exactly 1 second after you stop pedaling.
Stop Decay is a little different parameter. It tells the controller when to start the stopping of the motor in the way set by Current Decay. So when you stop pedaling if you have set Stop delay to 25 and the Stop Decay to 20 like me, the controller will start to decrease the current through the motor after 50ms in the way set by Current Decay and will completely stop it after 250ms taking exactly 200ms. So if you set Decay > Delay it won't work properly but won't cause any damage.
I see I described this wrong and I should fix it.
P.S. Fixed that to say Stop Decay is the amount of time it takes the motor to stop. The link on my site from dropbox is updated and I am not sure if it's the same if someone saved it as a bookmark.
2) Maximum speed for each PAS level can be set on the Basic settings tab. It is configured as a percentage of the speed limit set in your LCD. The power shouldn't be reduced too much if you slow down the pedaling. This looks like the Keep Current parameter is set too low. I have experienced another firmware issue related to slow response also. When I am pedaling at PAS0 and switch to PAS1 the motor ramps up its speed very slowly in steps I can feel and hear when my speed was above the limit for PAS1. I do this when uphill section of the road comes. When the speed drops down the motor need some time to kick-in.
3) Any PC or laptop can be used. My version of the program was built under Windows 10 64bit (by a 32bit compiler) and will work fine on any Windows from XP to 10.
4) My throttle doesn't have a big dead spot. I tried setting this to 0 or 1 to see how it will respond. It was the same as setting it to 11 (1.1V). That dead spot is because the throttle can't start from 0V. It is basically a hall sensor and a long round magnet inside. This magnet is close even when the throttle is at lowest position so the sensor has some voltage at the output. That's why the controller starts working with voltage of 1.1V to avoid this effect. When the magnet gets close to the sensor and starts moving next to it the magnetic field is a lot stronger. You can play with that parameter and see how it works. If your throttle has higher starting voltage you should of course set this parameter higher than 11. Have in mind that in Current Control mode you will see no difference if you are not on the bike. If you lift the rear wheel in the air you will get maximum speed right away because there is no load and the current is very low.
 
Leebolectric said:
I'm guess I'm going to need to buy a cheap PC Laptop just to program this thing...
...unless someone has a simple way to make it work on my Mac...?

Anything I need specifically for the laptop? ...just any with a usb port?
What kind of laptop would you buy, if it was pretty much for this purpose only?
I'm looking at options costing less than $50 if possible...
...it doesn't have to be awesome, just get the job done and not kill me with frustration.

Which operating system works best with the programing?
windows 7? ...or 8?
I have the cable coming and will be following the ElectricFatbike guide.
works great on Mac with Virtual Box. I use and old XP disk I had. But if you're going to get into battery building and battery testing, a Windoze laptop make sit much easier. The only folks catering to Mac are Grin
 
That was quite painless.
For a Mac user like myself, trying a PC for the FIRST time ever...I expected much worse.
Thanks for all the tips everyone, you rock! \m/ :D \m/
 
Leebolectric said:
That was quite painless.
For a Mac user like myself, trying a PC for the FIRST time ever...I expected much worse.
Thanks for all the tips everyone, you rock! \m/ :D \m/
What did you end up doing?
 
I followed the em3ev settings mostly.
Full throttle in all PAS levels.
Slow ramp to go easy on the hub.
Nothing experimental on my end, just following instructions.
Seems to work perfect, lotta power now.
 
Leebolectric said:
I followed the em3ev settings mostly.
Full throttle in all PAS levels.
Slow ramp to go easy on the hub.
Nothing experimental on my end, just following instructions.
Seems to work perfect, lotta power now.
Which computer?
Exactly how I program.
 
Cheapass Walmart HP, nuthin special, cheapest I could find locally...and can return easily.
 
I thought of doing the same thing. And because everyone but Grin is Windoze I may give up. Someone gave me a windoze 8 all in one machine. I'll dedicate to my build area. I'm glad I made my cable out of 1 42" Bafang extended along with a Grin TTL/USB. more than 6" long.
 
Hello all ...

Thanks for this useful thread.

I just started programming my BBS-HD and there is one thing I don't understand.

I want to be able to use the throttle at all times - without pedal assist. On the basic page I can adjust the "limit current" and "limit speed" at PAS 0.

Sorry for asking but what exactly does these parameters define ? Some have set them both to 1 and others 0 and 100.

What setting do I use if I want 100% throttle at PAS 0?

Thanks in advance.

Michael, Copenhagen
 
Back
Top