Programming the Bafang Middrive BBS01+BBS02

Discussions related to motors other than hub motors.
This includes R/C motors, botttom bracket, roller and geared drives.
alfantastic
1 kW
1 kW
Posts: 493
Joined: Mar 29, 2011 10:34 pm
Location: UK
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by alfantastic » Jul 21, 2016 6:52 am

Reference the Start Current(%) setting on the Pedal Assist page of the controller software.
Does anyone know if this still gets applied while the bike is in motion?

For example, I'm riding at 20mph with the motor assisting via the PAS. If I stop pedaling, then start pedaling again, does the controller start the current at the percentage I've set it at, or does the controller know the bike is already moving from the speed sensor, and ignore the Start Current(%) setting?

tahustvedt
10 kW
10 kW
Posts: 595
Joined: May 26, 2014 9:31 am
Location: Northern Norway

Re: Programming the Bafang Middrive BBS01+BBS02

Post by tahustvedt » Jul 24, 2016 8:52 am

What setting do I change to make the motor stop spinning once I pedal faster than the max pedal assist speed?

Both my BBS01 250 W and BBS02 spin to eliminate the gear drag once I pedal faster than the assist speed of 25 km/h, and consume about 2 A at this unloaded mode. This is almost 80 W of waste.

Bombus
1 µW
1 µW
Posts: 3
Joined: Aug 03, 2016 4:46 am
Location: Wellington New Zealand

Re: Programming the Bafang Middrive BBS01+BBS02

Post by Bombus » Aug 03, 2016 4:58 am

tomjasz wrote:
opperpanter wrote:I think the unit is designed for this rpm, so I think you'll need higher voltage to get higher rpms.
Exactly. A 500W controller could bring some improvement. But otherwise it is what it is. No amount of programing will change it into a faster drive. IME.
Hi I'm New to ES but have had the same problem with the BBs01.
My fix, I put a 48v BBS02 controller on it and my cadence is now up to 120 RPM in stead of the 90 max on the BBS01.
You then have to put a 48v battery on it and lower the current, but 6 amps is low so my be leave it at 6 amps or higher. I wouldn't recommend going at the max amps of the old controller.

alfantastic
1 kW
1 kW
Posts: 493
Joined: Mar 29, 2011 10:34 pm
Location: UK
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by alfantastic » Aug 17, 2016 6:36 am

Does anyone know if the Low Battery Protect(V) setting in the Basic menu, actually shuts the controller off at the voltage shown, or just calibrates the battery display to flash empty when the voltage is reached?

dustNbone
1 kW
1 kW
Posts: 308
Joined: Mar 13, 2016 9:59 pm
Location: Vancouver, BC

Re: Programming the Bafang Middrive BBS01+BBS02

Post by dustNbone » Aug 17, 2016 12:31 pm

It seems to cut power to the motor "softly" when it bumps into the set LVC. It doesn't turn off and stay off like a BMS LVC usually will. But the LVC setting seems to have no effect on the battery gauge at all.

User avatar
Overclocker
1 kW
1 kW
Posts: 453
Joined: Mar 17, 2014 5:48 am
Location: Philippines

Re: Programming the Bafang Middrive BBS01+BBS02

Post by Overclocker » Aug 17, 2016 11:57 pm

yeah the battery gauge has a mind of its own :roll:

has anyone tried 36v LVC? sorry i don't have a programming cable right now so i can't test. i'm on 38v right now. 36v doesn't seem to be on the dropdown menu...

dustNbone
1 kW
1 kW
Posts: 308
Joined: Mar 13, 2016 9:59 pm
Location: Vancouver, BC

Re: Programming the Bafang Middrive BBS01+BBS02

Post by dustNbone » Aug 18, 2016 3:57 am

I wasn't able to set it lower than 38V

alfantastic
1 kW
1 kW
Posts: 493
Joined: Mar 29, 2011 10:34 pm
Location: UK
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by alfantastic » Aug 18, 2016 6:31 am

dustNbone wrote:It seems to cut power to the motor "softly" when it bumps into the set LVC. It doesn't turn off and stay off like a BMS LVC usually will. But the LVC setting seems to have no effect on the battery gauge at all.
Thanks for the info. My battery BMS will probably cut off before the Bafang does lol

NiallDarwin
100 µW
100 µW
Posts: 8
Joined: Mar 17, 2014 4:25 am
Location: Raglan, New Zealand
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by NiallDarwin » Aug 21, 2016 5:07 pm

If like me you have a 'Prolific 2303' programming lead and 'upgrade' to Windows 10 you may find that the two aren't compatible. Prolific's website claims that the older chips aren't supported so you may think you need to buy a new lead. Luckily not! Here's a procedure showing you how to make it work:

http://leftbraintinkering.blogspot.co.n ... evice.html

Worked great for me!

Now I've provided something of value (hopefully) please can I ask you guys to have a think about another old vs new BBS problem I posted about here:

https://endless-sphere.com/forums/viewt ... 28&t=82577

Thanks :)

alfantastic
1 kW
1 kW
Posts: 493
Joined: Mar 29, 2011 10:34 pm
Location: UK
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by alfantastic » Sep 09, 2016 10:03 am

Can anyone offer an explanation of the 'Slow-Start Mode(1-8)' on the 'Pedal Assist page' please.

I'm guessing it ramps up the current from 'Start Current(%)', until it reaches the level that the PAS is in. What do the numbers represent, a time period, or something else?

Also, which number ramps up faster, 1 or 8?

alfantastic
1 kW
1 kW
Posts: 493
Joined: Mar 29, 2011 10:34 pm
Location: UK
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by alfantastic » Sep 14, 2016 3:51 am

alfantastic wrote:Can anyone offer an explanation of the 'Slow-Start Mode(1-8)' on the 'Pedal Assist page' please.

I'm guessing it ramps up the current from 'Start Current(%)', until it reaches the level that the PAS is in. What do the numbers represent, a time period, or something else?

Also, which number ramps up faster, 1 or 8?
Apologies for bumping this again, but is there anyone out there that can explain to me in detail the correlation between these two settings?

I.e. Is it a good idea to have a low start current and a higher slow start mode setting or vice versa?

I wish Bafang would publish technical details about their controller settings, so we can get the best out of our BBSxx's :(

wez
1 mW
1 mW
Posts: 10
Joined: Mar 11, 2014 8:33 am

Re: Programming the Bafang Middrive BBS01+BBS02

Post by wez » Nov 23, 2016 5:41 am

Hi!

Just managed to connect to my Bafang BBS01 with a Arduino UNO microcontroller acting as a usb to serial converter.
I had a hard time finding a programming cable in Europe and had an extra Arduino at home so I tried this out.

I communicated with 5 volt TTL levels.

This is how I did:
1. Disconnect battery from BBS01.
2. Connect RESET to GND on the Arduino UNO (this will make the Arduino act as a usb to serial converter)
3. Connect TX-TX, RX-RX and GND-GND between Arduino and BBS01 motor side cable (I don´t know why TX is connected to TX and so on, but i tried swapping TX and RX several times and nothing bad happened).
4. Connect PL to P+ on the BBS01 connector.
5. Connect Arduino to computer with USB cable.
6. Connect battery to BBS01 system (power up the BBS01).
7. Connect with programming software.

I made a diy connector with parts from a IC-socket (see picture) and insulated with shrinking tube.
Make sure that the connectors are totally insulated, if any of the PL or P+ cables are shorted with anything else, it will fry the BBS01 controller.

The Arduino has two leds (RX and TX) that are blinking when serial communication is happening and that helps debugging a lot since it will show when the software is connected.

This is a risky way of connecting to the BBS so do this at your own risk.

All the best!
Attachments
Arduino1.jpg
(219.48 KiB) Downloaded 17 times
IC_socket.jpg
IC_socket.jpg (139.88 KiB) Viewed 404 times
connector.jpg
connector.jpg (51.1 KiB) Viewed 2938 times

borsuk
1 µW
1 µW
Posts: 4
Joined: Sep 20, 2013 11:52 am

Re: Programming the Bafang Middrive BBS01+BBS02

Post by borsuk » Nov 24, 2016 12:11 pm

I have BBS01 old type, which I would like to reprogram. Finding the cable is not a problem,
link
but how is it connected to the dispay?
I did not find this anywhere, so I had to open the display, it looks like this:
Image
Image

There is 6 wires (not 5 like the new plug has) green, red, yellow, grey, black and brown.
To make the programming cable you need cut the purchased cable and then connect display connector to Serial to USB adapter as follows:
green wire to TXD, yellow wire to RxD and black wire to GND,
and you need to connect to each other brown and gray wires (P + and PL).

oneoone
1 mW
1 mW
Posts: 10
Joined: Oct 29, 2015 8:41 pm

Re: Programming the Bafang Middrive BBS01+BBS02

Post by oneoone » Nov 27, 2016 1:15 am

Is it possible to disable PAS through the programming the controller? If so how?

Thanks

gogreenpower
100 mW
100 mW
Posts: 38
Joined: Dec 12, 2012 1:35 am
Location: Perth, WA, Australia

Re: Programming the Bafang Middrive BBS01+BBS02

Post by gogreenpower » Nov 27, 2016 8:22 pm

oneoone wrote:Is it possible to disable PAS through the programming the controller? If so how?

Thanks
I don't think there is a one click solution to disable it, but if you set all the PAS levels to 0, that should do the trick
Current build, 1000w BBSHD FS fat bike with 50.4v 20Ah battery
Third build, 500w 20" Gomer trike with 36v 20Ah battery
Second build, 350w vintage ladies bike with 36v 20Ah battery
First build, 350w beach cruiser with 36v 20Ah battery
https://endless-sphere.com/forums/viewt ... =6&t=46978

oneoone
1 mW
1 mW
Posts: 10
Joined: Oct 29, 2015 8:41 pm

Re: Programming the Bafang Middrive BBS01+BBS02

Post by oneoone » Nov 27, 2016 10:26 pm

gogreenpower wrote:
oneoone wrote:Is it possible to disable PAS through the programming the controller? If so how?

Thanks
I don't think there is a one click solution to disable it, but if you set all the PAS levels to 0, that should do the trick
I am trying to run my bbshd headless. What settings and in what tab do I set to 0?

Thanks

gogreenpower
100 mW
100 mW
Posts: 38
Joined: Dec 12, 2012 1:35 am
Location: Perth, WA, Australia

Re: Programming the Bafang Middrive BBS01+BBS02

Post by gogreenpower » Nov 28, 2016 8:12 am

oneoone wrote:
gogreenpower wrote:
oneoone wrote:Is it possible to disable PAS through the programming the controller? If so how?

Thanks
I don't think there is a one click solution to disable it, but if you set all the PAS levels to 0, that should do the trick
I am trying to run my bbshd headless. What settings and in what tab do I set to 0?

Thanks
Have a read of this

https://www.google.com.au/amp/s/electri ... telstra-au

It explains things pretty well
Current build, 1000w BBSHD FS fat bike with 50.4v 20Ah battery
Third build, 500w 20" Gomer trike with 36v 20Ah battery
Second build, 350w vintage ladies bike with 36v 20Ah battery
First build, 350w beach cruiser with 36v 20Ah battery
https://endless-sphere.com/forums/viewt ... =6&t=46978

User avatar
tomjasz
1.21 GW
1.21 GW
Posts: 3700
Joined: Mar 29, 2014 1:45 pm
Location: Out riding, MN USA
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by tomjasz » Nov 28, 2016 2:45 pm

oneoone wrote:Is it possible to disable PAS through the programming the controller? If so how?

Thanks

https://electricbike-blog.com/bbs02-installation/


"To disable the PAS take the controller off by pulling off the left crankarm and the chainwheel and then removing the plastic cover. Remove the 3 hex blots and wiggle the controller off carefully. Find the black connector and peel some of the silicone off of it. Find the thumb release tab, press it and pull the connector apart. Use a tiny screwdriver or screw to push the tab down on the female contact and carefully pull the wire out of the connector. Cover the end of the pin with electrical tape and reassemble the unit. Be careful screwing on the black plastic cover as it is very easy to crack the case from over tightening."
Thanks Justin_le we're here thanks to you. All the best to the mods for their tireless work keeping it on an even keel.

oneoone
1 mW
1 mW
Posts: 10
Joined: Oct 29, 2015 8:41 pm

Re: Programming the Bafang Middrive BBS01+BBS02

Post by oneoone » Nov 28, 2016 3:29 pm

tomjasz wrote:
oneoone wrote:Is it possible to disable PAS through the programming the controller? If so how?

Thanks

https://electricbike-blog.com/bbs02-installation/


"To disable the PAS take the controller off by pulling off the left crankarm and the chainwheel and then removing the plastic cover. Remove the 3 hex blots and wiggle the controller off carefully. Find the black connector and peel some of the silicone off of it. Find the thumb release tab, press it and pull the connector apart. Use a tiny screwdriver or screw to push the tab down on the female contact and carefully pull the wire out of the connector. Cover the end of the pin with electrical tape and reassemble the unit. Be careful screwing on the black plastic cover as it is very easy to crack the case from over tightening."
Thanks mate. I am a bit adverse to removing crank arms when I don't have too. I am probably overly paranoid about stripping them and was hoping to avoid the whole situation with programming.

Can I safely overwrite all of the numbers in Limit Current% and Limit spd% to 1?

Image

Thanks

elenhinan
1 µW
1 µW
Posts: 4
Joined: Nov 29, 2016 7:12 am

Re: Programming the Bafang Middrive BBS01+BBS02

Post by elenhinan » Nov 29, 2016 7:44 am

Hi

I just bought a bike with a Bafang Max middrive, and was just curious on what options I had to program this (mostly to get any sensor data out). But I found no information on the serial interface and if it's compatible with the software out there to program bbs01 and bbs02.

Then I found out that Bafang has their software that's used by the assembler/manufacturer/dealer freely available on their webpage under the download section. Using it after you install it however requires an account that one can get by requesting one from them, but I suspect this is only for registered dealers (duh).

Well, not anymore. I wrote a really small python script that spoofs the login response of their server, letting one access the programming tool in the BESST software (tested with v1.06). For this to work you need to add the line "127.0.0.1 besst-api.yuntick.com" to c:\windows\system32\drivers\etc\hosts . This will redirect all communication intended for the bafang servers to the local web-server run by the script. Any login will then automatically be accepted. Open notepad with administrative privileges to edit this file, or save it somewhere else and copy and overwrite it afterwards. Then start the spoof.py if you already have python installed, or spoof.exe if not. It might need some microsoft visual c++ redist package, but most computers already have this installed. Login with whatever email and password you want. After login click menu and then tool. Just to clarify, this does not give you access to any restricted Bafang servers or anything I would consider shady, it just let's you open the software that runs locally on your computer.

An diagnostics mode is also available if one modifies the python script (type from 4 to 3 on line 19), which should do some testing of the display and controller.

As I have no programming cable I have not tested this. Since the software comes straight from Bafang I wouldn't expect it to put your bike on fire, but then again don't blame me if it does. If anyone want to test it out it would be interesting if you could share your experience.
Attachments
besst-spoof.zip
Python script and stand-alone .exe
(4.43 MiB) Downloaded 123 times

User avatar
Overclocker
1 kW
1 kW
Posts: 453
Joined: Mar 17, 2014 5:48 am
Location: Philippines

Re: Programming the Bafang Middrive BBS01+BBS02

Post by Overclocker » Nov 29, 2016 7:59 am

oneoone wrote:
tomjasz wrote:
oneoone wrote:Is it possible to disable PAS through the programming the controller? If so how?

Thanks

https://electricbike-blog.com/bbs02-installation/


"To disable the PAS take the controller off by pulling off the left crankarm and the chainwheel and then removing the plastic cover. Remove the 3 hex blots and wiggle the controller off carefully. Find the black connector and peel some of the silicone off of it. Find the thumb release tab, press it and pull the connector apart. Use a tiny screwdriver or screw to push the tab down on the female contact and carefully pull the wire out of the connector. Cover the end of the pin with electrical tape and reassemble the unit. Be careful screwing on the black plastic cover as it is very easy to crack the case from over tightening."
Thanks mate. I am a bit adverse to removing crank arms when I don't have too. I am probably overly paranoid about stripping them and was hoping to avoid the whole situation with programming.

Can I safely overwrite all of the numbers in Limit Current% and Limit spd% to 1?

Image

Thanks


Image

these are my settings. bootup default is PAS1 so it's effectively disabled upon startup

User avatar
tomjasz
1.21 GW
1.21 GW
Posts: 3700
Joined: Mar 29, 2014 1:45 pm
Location: Out riding, MN USA
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by tomjasz » Nov 29, 2016 2:12 pm

Make your Grin USB TTL a BBS01, BBS02, and BBSHD programming cable! 10' with this extension. Perhaps the most reliable of programming cables used to make your own is the Grin. Now there's a no solder dup use version.

Unfortunately with the very high shipping rates, $37.50 insured, they will run $23

My favorite cable is the just over 9' Grin USB TTL. I sold a few and no one had any OS issues. I've always been frustrated that the plug need to be cut off and I had to source and extension cable to also cut and join the two.
Hopefully MODS will allow this since it's not a for profit sale.
https://www.e-bike-technologies.de/inde ... s-5-detail
NOW you can use the USB TTL cable use to program Grin's CA2, CA3, AND Satiator and just plug it into the cable made by the wizards at eBike Technologies.

Down side, price and shipping from Germany. Perfect for a group buy. You can poke around and discover when I first came to ES I organized a couple very successful group buys.
I need to have 9 interested BBSxx programmers and Grin users to make it work. If you're nervous about a group buy check out the previous. viewtopic.php?f=31&t=65890&p=997098&hilit=group+buy#p997098

No profit for me priced to simply pay for goods and envelops with postage in USA.

Vendor has agreed to a 10% discount, not much but nearly make the EU to USD 1 to 1.
These will ship in January.
Last edited by tomjasz on Nov 30, 2016 12:36 pm, edited 1 time in total.
Thanks Justin_le we're here thanks to you. All the best to the mods for their tireless work keeping it on an even keel.

wez
1 mW
1 mW
Posts: 10
Joined: Mar 11, 2014 8:33 am

Re: Programming the Bafang Middrive BBS01+BBS02

Post by wez » Dec 01, 2016 3:39 am

Hello,

I am planning to build a custom controller for my BBS01 based on a Raspberry PI.
Does anyone know if there is a way of reading the rpm of the motor or/and the cadence via the serial interface (Bafang protocol v.4.0)?

User avatar
tomjasz
1.21 GW
1.21 GW
Posts: 3700
Joined: Mar 29, 2014 1:45 pm
Location: Out riding, MN USA
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by tomjasz » Dec 01, 2016 2:17 pm

wez wrote:Hello,

I am planning to build a custom controller for my BBS01 based on a Raspberry PI.
Does anyone know if there is a way of reading the rpm of the motor or/and the cadence via the serial interface (Bafang protocol v.4.0)?
Poke around and look for some of the work Kepler has done. But many have threatened, so far no one has released any successful integration.
Thanks Justin_le we're here thanks to you. All the best to the mods for their tireless work keeping it on an even keel.

User avatar
waynebergman
10 kW
10 kW
Posts: 776
Joined: May 07, 2011 4:20 pm
Location: Pender Harbour British Columbia Canada

Re: Programming the Bafang Middrive BBS01+BBS02

Post by waynebergman » Feb 02, 2017 10:41 am

Has anyone heard of any Mac based solutions for Programming our Bafang controllers? I was given a PC that I was only going to use for reprogramming my controller but that PC laptop just quit working. I really dont want to buy a PC just for this purpose if I can somehow use my Mac for the job. Also, I am not interested in running the virtual PC options on my Mac.

Post Reply