Reprogramming the BBS02

culy30

Pedelecer
Feb 4, 2016
46
13
Hereford
So yesterday I downloaded the Bafang BBSxx controller programming zip file to my laptop and followed the instructions here:- https://electricbike-blog.com/2015/03/17/programming-the-bbs02-without-frying-your-controller-and-losing-your-sanity/ I found the com port and connected the green 5 pin/USB programming cable. BANG, the laptop crashed and wont power up. I’m guessing the laptop power supply received a high voltage spike, probably from the controller capacitor. (The 36v bike battery was connected but switched off at the battery) It also looks like the USB programming cable has blown as my PC doesn’t recognise that its plugged in to a USB port.


Does anyone have any thoughts/advice? (Not about the laptop! I’ll take it into PCWorld)
 
D

Deleted member 4366

Guest
You must have had a wrong connection in the harness. There's a 36v/48v pin in that connector that shouldn't be connected to the USB connector during programming. The three wires that are connected don't carry enough power to do any damage. There's no way your laptop can get a voltage spike from the controller.

There's 5 wires IIRC:
1. Battery voltage
2. Return battery voltage to the controller
3. Ground
4. Tx
5. Rx

1 and 2 would be joined together in the harness so that the controller gets power.
3 and 4 are 5v pulses of data.

In yours, 1 must have been connected to 3, 4 or 5 so that you had battery voltage on the USB connector.

Even if you have the battery switched off, the capacitor/s in the controller hold the battery voltage with enough charge to do serious damage.

Use a voltmeter to check which pin on the controller's connector has the battery voltage, then check continuity between the corresponding pin on the USB lead and each of the contacts on the USB connector to confirm the above. It's possible that the pin-outs on the connector changed to make your lead incompatible.
 

culy30

Pedelecer
Feb 4, 2016
46
13
Hereford
Thanks guys,

I'll have a play tonight. My guess is the programming cable was incorrectly configured. I bought it off ebay from a seller in France. I cant imagine the standard wiring harness is wired incorrectly. I made sure the arrows were lined up on the male/female green 5 pin, besides its almost impossible to push them together if they're not properly aligned.
 

culy30

Pedelecer
Feb 4, 2016
46
13
Hereford
OK. Looks like a faulty programming cable. It killed my work laptop! It wont do hard reset so its going back to HP supplier. I didn't misalign the pins on the 5 pin green connector either. I tried it again on a worthless old laptop I don't need anymore and while it didn't blow the laptop this time, the pcb and components on the usb connector got so hot it started to smoke! Awaiting a new meter to test the voltages to rule out the harness. BBS02 is undamaged.
 
D

Deleted member 4366

Guest
Just a longshot, try taking the battery out of the HP laptop, then put it back in to see if it comes back to life.
 

culy30

Pedelecer
Feb 4, 2016
46
13
Hereford
Friedusb.jpg Here is a pic of the programming cable. I stripped back the insulation from the USB end to have a look. It can be seen that the IC device has got very hot. Looking at the bottom row of connectors, the 4th from the left has gotten very hot. I've contacted the seller (in France) and await his response.
 

culy30

Pedelecer
Feb 4, 2016
46
13
Hereford
You must have had a wrong connection in the harness. There's a 36v/48v pin in that connector that shouldn't be connected to the USB connector during programming. The three wires that are connected don't carry enough power to do any damage. There's no way your laptop can get a voltage spike from the controller.

There's 5 wires IIRC:
1. Battery voltage
2. Return battery voltage to the controller
3. Ground
4. Tx
5. Rx

1 and 2 would be joined together in the harness so that the controller gets power.
3 and 4 are 5v pulses of data.

In yours, 1 must have been connected to 3, 4 or 5 so that you had battery voltage on the USB connector.

Even if you have the battery switched off, the capacitor/s in the controller hold the battery voltage with enough charge to do serious damage.

Use a voltmeter to check which pin on the controller's connector has the battery voltage, then check continuity between the corresponding pin on the USB lead and each of the contacts on the USB connector to confirm the above. It's possible that the pin-outs on the connector changed to make your lead incompatible.
I have now checked the programming cable and harness connections for continuity etc.


I can confirm that the harness P+ has battery power (pin 3). The USB connector is also wired according to this from endlesssphere. P+ and PL were also soldered together


But the RXD and TXD have continuity to ground. Is this correct?
 
D

Deleted member 4366

Guest
That's probably right because they'll both be zero volts when no data is being sent. I would guess there'll be a pull-down resistor attached to each.

Apart from a random fault on the pcb, the mot likely cause would be a wrong connection between the cable and the ttl. Have a look on the backside to see if it has the markings, otherwise this one looks similar. You could use it to repair your cable:
http://m.lightinthebox.com/en/usb-to-ttl-updating-board-module_p2742091.html?currency=GBP&litb_from=paid_adwords_shopping&utm_source=google_shopping&utm_medium=cpc&adword_mt=&adword_ct=84187195634&adword_kw=&adword_pos=1o10&adword_pl=&adword_net=g&adword_tar=&adw_src_id=1810908567_301579154_21687113474_pla-78632005276&gclid=Cj0KEQjwr5G5BRD_n-T0pf7x4ucBEiQAlxHOPwGJdVFqmstFZsIZcRzUOhOfuM1Yxi8kfLZymlYI64gaAmLU8P8HAQ
 

culy30

Pedelecer
Feb 4, 2016
46
13
Hereford
My Reprogrammed Settings-NOT guaranteed in any way!



BBS02 36v 500w 25A with 36v 18AH. Battery is 60 x 30Q Samsung cells. (10s6p)


The bike is a 2004 Gary Fisher 29er hardtail. Gross bike weight is 19 kilos. I weigh 72 kilos.

10 speed cassette 11-34. 42t chainring.

Display settings. PAS levels 5. Wheel diameter 700c. Max Speed 50kph

No Throttle fitted. Standard brake levers.

I found the standard controller settings felt very odd. The bike would give a massive push from a standing start and then the motor would back off once up to speed and pedal cadence above 70rpm or so. It felt over governed sometimes going too fast like it was on cruise control, other times I had to pedal very hard to maintain a given speed. With the standard settings I was getting around a 36 mile range from the battery before I noticed a drop off in performance. In PAS level 3, the bike would hack along at 25mph, but getting up to 26mph was nigh impossible. PAS Level 2 was more comfortable with the speed being around 18.5mph, but to go any faster I had to push very hard or change to PAS3 when it took off to 25mph again. The motor also kept spinning when I stopped pedalling which I found very disconcerting. (I don’t use the Bafang sensor brake levers)

I aim is to make the motor behave in a more predicable way, delivering power throughout the speed and cadence range. I read all of the stuff regarding reprogramming the controller on the internet and while most is good advice, I have arrived at a slightly different solution.

The reprogrammed settings I‘ve been running for the past week or so feel much better. The motor keeps delivering power even at high cadence. I have to use the gears more, just like riding a normal bike, except I’m putting in about half the effort (compared with a normal bike) for a given speed/gradient.

With 5PAS levels, I find that I use PAS level 2 most of the time, only using PAS3 if climbing a long hill or into a strong headwind. Used PAS 5 briefy on a fast flat section with a slight tailwind. I hit 38mph before the 120rpm + cadence was too high for my current fitness level to maintain. If I’d had a bigger gear I could have hit a higher speed. Not bad for a mountain bike! Based on guesswork the BBS02 was producing about 460 watts (assuming 80% efficiency) add my 300watts = 760watts, this sounds about right to me, given that power vs speed is not linear.

Based on my settings the motor will peak at 4.64 amps in PAS 2 and 7.68 amps in PAS 3. This seems to fit with my power (wattage) readings on a normal bike. I was able to push an average of 300 watts for 30 mins or so on my road bike. (Ok not quite up to the 500watts of professionals but average for a club cyclist)

Range has improved, alough its early days yet. I’ve done 32 miles on a charge so far. I’ll check the battery voltage before I go out again, but I’m hoping to manage a 20 mile ride this evening giving me range of 52 miles. I’d be interested to compare range with others experiences. Maybe we should use hours and minutes rather than range in miles to take into account different terrain on/off road etc? I’m hoping to get over 3hrs from the battery at an average speed of 17.5 mph on rolling roads with some single track.

I’m not overly worried about frying the controller since I’ve limited max current to 16 amps and in PAS 2 I’m only using 29% of the 16 amps and in PAS 3 only 48%. Remember I’m using 5 PAS levels. I also keep cadence above 75rpm by using the gears which minimises the load on the motor. . Maybe the controller and BMS allow more current for a short while, I’m not sure.


upload_2016-5-6_16-49-42.pngupload_2016-5-6_16-49-42.png
 

Fordulike

Esteemed Pedelecer
Feb 26, 2010
3,802
1,537
Has any one have experience of reducing current to 18A and Limit Speed to 100% for all levels?
I have reduced the overall current to 20A from 25A, in the setting just under the Low Battery Protect(V). I changed the 'Keep Current' to 100% too.

All other parameters are as per Bafang factory settings. I found that changing the individual limit speed to 100% in all PAS modes, produced unsatisfactory results.
 

Fordulike

Esteemed Pedelecer
Feb 26, 2010
3,802
1,537
(I don’t use the Bafang sensor brake levers)
You're a braver man than me. I would never operate a Bafang BBSxx without at least one brake cut-off fitted. The motor overrun on the pedal sensor is far too long, which the brake cut-off kills instantly.

How have you not destroyed your drivetrain when changing gears?
 

anotherkiwi

Esteemed Pedelecer
Jan 26, 2015
7,845
5,785
The European Union
Has anyone got a photo of the PAS in these motors?
How many magnets do they use?
Is the overrun controller dependant?
Is it just the clutch which is slow to disengage?

My current project is a GSM motor with external controller and if there is PAS dependant overrun I will switch to external PAS. I will also mount a cut-off button connected to a brake cut-off plug.

On my hub motor as soon as the PAS stops sending a signal the motor cuts (clutch disengages but motor continues to spin as it spins down) and as I am now using a 12 magnet PAS disk the distance between two signals is very short. The disadvantage of a 12 magnet PAS disk is that any slight forward pedal movement makes the motor kick in which means you need great discipline and have to turn off the bike before dismounting, manoeuvring in tight corners etc.
 

Fordulike

Esteemed Pedelecer
Feb 26, 2010
3,802
1,537
Is it just the clutch which is slow to disengage?
I can only answer this one. The clutch disengages instantly, the issue is with the motor carrying on after pedaling has ceased. It does seem to stop a bit quicker if one back pedals slightly, but that makes riding awkward.

I've learnt to slightly squeeze the brake cut-off, if I want the motor to stop instantly. This is essential for smooth gear changing in my case too.
 

culy30

Pedelecer
Feb 4, 2016
46
13
Hereford
You're a braver man than me. I would never operate a Bafang BBSxx without at least one brake cut-off fitted. The motor overrun on the pedal sensor is far too long, which the brake cut-off kills instantly.

How have you not destroyed your drivetrain when changing gears?
I've found by changing the stop decay to 0 this helps a little but I agree that changing down while climbing can be very clunky. I don't like the bafang levers so I'm in the process of fitting the micro switch from one of the bafang levers to the back stop drilling on the standard rear brake lever. I'll post a pic when done.
 
  • Like
Reactions: Fordulike

anotherkiwi

Esteemed Pedelecer
Jan 26, 2015
7,845
5,785
The European Union
Thanks! I think that a 12 magnet external PAS looks like a good option.
 

Fordulike

Esteemed Pedelecer
Feb 26, 2010
3,802
1,537
I've found by changing the stop decay to 0 this helps a little but I agree that changing down while climbing can be very clunky. I don't like the bafang levers so I'm in the process of fitting the micro switch from one of the bafang levers to the back stop drilling on the standard rear brake lever. I'll post a pic when done.
The hydraulic brake sensors can be a nice reliable alternative to using the micro switch from a Bafang lever. They'll work fine with other types of braking systems too.

OK, so it is extra cost, but it does mean you don't have to drill out your existing lever, plus may be more aesthetically pleasing to the eye.
 

KirstinS

Esteemed Pedelecer
Apr 5, 2011
3,224
899
Brighton
The hydraulic brake sensors can be a nice reliable alternative to using the micro switch from a Bafang lever. They'll work fine with other types of braking systems too.

OK, so it is extra cost, but it does mean you don't have to drill out your existing lever, plus may be more aesthetically pleasing to the eye.
Finding them in the UK is the tricky bit !
 

Advertisers