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.
User avatar
teslanv   100 MW

100 MW
Posts: 2656
Joined: Nov 03 2013 8:42pm
Location: Bellevue, WA - USA
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by teslanv » Jul 01 2014 8:59pm

mclark999 wrote:Can't tell from reading all the posts. Does pedal cadence have any effect on pas output? If so, which setting adjusts it?

Pedal cadence doesn't really have any effect on motor RPM per se. If the sensor detects any movement by the rider the PAS system will kick in. Custom Programming will determine how much assist is given and at what RPM it tapers off. These would all be adjusted in the PAS tab.
DD Hubs, Batteries, Controllers & Custom Ebikes.
http://westcoastelectrics.com
West Coast Electric Cycles
Bellevue, WA
USA

User avatar
Aushiker   100 W

100 W
Posts: 170
Joined: Mar 08 2014 8:47am

Re: Programming the Bafang Middrive BBS01+BBS02

Post by Aushiker » Jul 02 2014 1:23am

fingret wrote:I'm searcing ebay for the suitable things with no luck at all. Could someone be kind and give me ebay-links to the things I need to make the connection? I bet there are more people than me who does not want to order things that dont work.

So I guess i'll need the following items:
1 usb to serial converter
Search for a USB To RS232 TTL UART PL2303HX on eBay. I got mine from the eBay seller, soccer-kids. The related drivers for the USB to RS-232 converter can be found at ProlificUSA.

Andrew

User avatar
tomjasz   1.21 GW

1.21 GW
Posts: 3944
Joined: Mar 29 2014 1:45pm
Location: Out riding, MN USA
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by tomjasz » Jul 02 2014 10:13am

Are there any optional devices that can run the software and program the unit? An android device for instance? Or do I need to go find a cheap used Windows notebook. Can a Chromebook run the software? I haven't configured a computer since we went all Apple 8 years ago. Setting up Windows on our Mac would cost as much or more than a used notebook, chrome book, or android device. I have no other use for Windoze.


T
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.

Masure   100 mW

100 mW
Posts: 42
Joined: Mar 08 2012 1:11pm

Re: Programming the Bafang Middrive BBS01+BBS02

Post by Masure » Jul 02 2014 12:52pm

What about a virtual machine ? I don't know if the driver would work with it but it is easy to setup and does not mess anything.

User avatar
mushymelon   1 kW

1 kW
Posts: 300
Joined: Mar 28 2010 3:46am
Location: Southern Ontario, Canada

Re: Programming the Bafang Middrive BBS01+BBS02

Post by mushymelon » Jul 02 2014 1:24pm

tomjasz wrote:Are there any optional devices that can run the software and program the unit? An android device for instance? Or do I need to go find a cheap used Windows notebook. Can a Chromebook run the software? I haven't configured a computer since we went all Apple 8 years ago. Setting up Windows on our Mac would cost as much or more than a used notebook, chrome book, or android device. I have no other use for Windoze.


T
Boot camp comes with macs already you just need a windows disk.

Setting up windows xp on a mac is free and easy as long as its an intel based mac.

User avatar
tomjasz   1.21 GW

1.21 GW
Posts: 3944
Joined: Mar 29 2014 1:45pm
Location: Out riding, MN USA
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by tomjasz » Jul 02 2014 1:59pm

mushymelon wrote:
tomjasz wrote:Are there any optional devices that can run the software and program the unit? An android device for instance? Or do I need to go find a cheap used Windows notebook. Can a Chromebook run the software? I haven't configured a computer since we went all Apple 8 years ago. Setting up Windows on our Mac would cost as much or more than a used notebook, chrome book, or android device. I have no other use for Windoze.


T
Boot camp comes with macs already you just need a windows disk.

Setting up windows xp on a mac is free and easy as long as its an intel based mac.
Almost true. My new Intel Mac won't run XP. I didn't like bootcamp on my previous Mac. I guess I'll look for a used Windoze notebook.
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
teslanv   100 MW

100 MW
Posts: 2656
Joined: Nov 03 2013 8:42pm
Location: Bellevue, WA - USA
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by teslanv » Jul 02 2014 2:22pm

If you get a Dell Mini 10V Netbook you could install Dual OS systems - Windows 7 & MacOS. Make yourself a nice little Hackintosh for about $100.
DD Hubs, Batteries, Controllers & Custom Ebikes.
http://westcoastelectrics.com
West Coast Electric Cycles
Bellevue, WA
USA

pexio   100 mW

100 mW
Posts: 42
Joined: Apr 08 2014 6:38am
Location: Western Massachusetts, USA

Re: Programming the Bafang Middrive BBS01+BBS02

Post by pexio » Jul 02 2014 3:57pm

fingret wrote:... Could someone be kind and give me ebay-links to the things I need to make the connection? I bet there are more people than me who does not want to order things that dont work....
Here's how I built a programming cable. It's probably not the cheapest but it's pretty easy and straightforward (meaning hard to mess up!). First, I ordered the genuine Bafang Display Extension Cable that satcamel posted about back on Page 8. This is the most expensive piece but ensures that the connectors will fit without having to modify or substitute or otherwise jury rig a connector. Here's what it looks like when it arrives from Germany (Update - the Bafang Extension Cable can now be purchased from several sources - check newer pages of this thread for the latest info):
IMG_0312 (Custom).JPG
Bafang Display Extension Cable
IMG_0312 (Custom).JPG (50.15 KiB) Viewed 8033 times
Next, I ordered this USB-to-TTL converter from Amazon. Others have used similar converters from eBay and other vendors. I like this one because the circuit board is built into the USB connector and it has a nice cable attached. This converter uses the PL2303HX chip which, as aushiker noted upthread, means you can download the ProlificUSA drivers for Windows. Here's what the converter looks like:
IMG_0311 (Custom).JPG
USB-to-TTL Converter
IMG_0311 (Custom).JPG (53.32 KiB) Viewed 8033 times
Now the fun begins. On the Bafang Display Extension Cable, you need to cut off the connector that you're not going to use. That is the MALE connector (the one with the pins). Then trim back the insulation to expose the individual wires. You will see 5 wires: Black (GND), Green (TXD), White (RXD), Brown (P+), and Orange (PL). Here's what the Bafang cable looks like now:
IMG_0313 (Custom).JPG
Modified Bafang Display Extension Cable
IMG_0313 (Custom).JPG (46.5 KiB) Viewed 8033 times
The USB-to-TTL converter has 4 exposed wires: Black (GND), Green (RXD), White(TXD), and Red(VCC). Cut off the individual TTL connectors and then cut off the Red wire completely as it will not be used. Here's what the USB-to-TTL Converter looks like now:
IMG_0314 (Custom).JPG
Modified USB-to-TTL Converter Cable
IMG_0314 (Custom).JPG (51.58 KiB) Viewed 8033 times
Now all you have to do is a little splicing. Between the Bafang Cable and the USB Cable, splice the Black to Black, Green to Green and White to White. Lastly, on the Bafang Cable, splice together the Brown and the Orange. This jumpers PL and P+ for power to the Motor Controller. (Update - cautionary note from Ken Taylor downthread: "If you connect Brown (P+) to anything other than Orange (PL) expect to wreck your controller in an instant. Maybe it matters if you connect the wrong thing to Black (GND). It doesn't do any harm if you get Green (TXD) and White (RXD) back to front but it will not work.") I soldered the connections and used heatshrink tubing but use whatever splicing/insulation techniques you prefer. Here's a pic:
IMG_0320 (Custom).JPG
Spliced cables
IMG_0320 (Custom).JPG (33.65 KiB) Viewed 8033 times
Here's a pic of the completed cable:
IMG_0319 (Custom).JPG
Completed Cable
IMG_0319 (Custom).JPG (47.97 KiB) Viewed 8033 times
That's it! Follow the instructions posted by others upthread to download and install the Bafang software and you're good to go. Have fun!
Last edited by pexio on Oct 16 2014 9:02am, edited 2 times in total.

User avatar
tomjasz   1.21 GW

1.21 GW
Posts: 3944
Joined: Mar 29 2014 1:45pm
Location: Out riding, MN USA
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by tomjasz » Jul 02 2014 6:15pm

So WTH can't, or isn't, this sold by other Bafang dealers. We invest in a system and can't get extension cables for this and other setups requiring a longer lead?

Goofy marketing and support!

T
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.

shanman3us   100 mW

100 mW
Posts: 44
Joined: Jul 20 2011 5:25pm

Re: Programming the Bafang Middrive BBS01+BBS02

Post by shanman3us » Jul 02 2014 6:58pm

Masure wrote:What about a virtual machine ? I don't know if the driver would work with it but it is easy to setup and does not mess anything.
That's what I do. I run Linux (in this case Arch) and then I use VirtualBox with XP running in there. It works perfectly. The USB adapter I got could only run in XP with the drivers that were available for it.

Shanman3us

lazy_mosquito   10 mW

10 mW
Posts: 28
Joined: Jan 27 2014 6:54am

Re: Programming the Bafang Middrive BBS01+BBS02

Post by lazy_mosquito » Jul 02 2014 7:21pm

Is it possible to throttle the 25A 750W BBS02 down to for example 18A with the software? I am using a Nuvinci 360 and i am afraid i am going to tear it apart when i use the full power of the engine. But on the other hand i think it would be silly to buy the "old" 500W BBS02 with only 6fets if there exists a better model.

User avatar
tomjasz   1.21 GW

1.21 GW
Posts: 3944
Joined: Mar 29 2014 1:45pm
Location: Out riding, MN USA
Contact:

Sony Clie? Type device?

Post by tomjasz » Jul 02 2014 9:26pm

shanman3us wrote:
Masure wrote:What about a virtual machine ? I don't know if the driver would work with it but it is easy to setup and does not mess anything.
That's what I do. I run Linux (in this case Arch) and then I use VirtualBox with XP running in there. It works perfectly. The USB adapter I got could only run in XP with the drivers that were available for it.

Shanman3us
It'd be simple if the file ran on anything Mac. I guess I'll have to resurrect a PC. I was really hoping someone new of or there was a convenient complete interface. I'm disappointed to not find some small screened device able to run the software. Maybe one of my old Sony Clie. Somewhere in the heap is one I ran a rs232 device for monitoring dissolved oxygen from a meter.
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
tomjasz   1.21 GW

1.21 GW
Posts: 3944
Joined: Mar 29 2014 1:45pm
Location: Out riding, MN USA
Contact:

Programming the Bafang Middrive With IPAQ?

Post by tomjasz » Jul 02 2014 9:58pm

Ok, an hour of googling and I find HP IPAQ has a USB port and Windows. Anyone? Will it run the Bafang file?
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
Supertux1   100 W

100 W
Posts: 183
Joined: Mar 18 2012 11:24am
Location: Wisconsin, USA

Re: Programming the Bafang Middrive BBS01+BBS02

Post by Supertux1 » Jul 02 2014 10:25pm

I'm thinking about getting one of these for my old neglected bike that I never ride because it isn't electric :)

I think the first think I would do is chop that goofy connector off and replace it with a single 6 conductor or two 3pin JST-SM connectors that the CAv3 uses.

Has anyone connected one of these USB-TTL cables to the display unit to see just what exactly is being sent to the controller from the display unit under various conditions?
I hate this display unit because it's not a CA. I'm thinking it could be replaced with an Arduino if a simple serial protocol is all that is happening.
My Commuter/Cargo eBike (MAC 10T): http://endless-sphere.com/forums/viewto ... =6&t=51147
My Off-Road eBike (Bafang BBS02 '750W'): http://endless-sphere.com/forums/viewto ... =6&t=61721

shanman3us   100 mW

100 mW
Posts: 44
Joined: Jul 20 2011 5:25pm

Re: Sony Clie? Type device?

Post by shanman3us » Jul 03 2014 1:10am

tomjasz wrote:
shanman3us wrote:
Masure wrote:What about a virtual machine ? I don't know if the driver would work with it but it is easy to setup and does not mess anything.
That's what I do. I run Linux (in this case Arch) and then I use VirtualBox with XP running in there. It works perfectly. The USB adapter I got could only run in XP with the drivers that were available for it.

Shanman3us
It'd be simple if the file ran on anything Mac. I guess I'll have to resurrect a PC. I was really hoping someone new of or there was a convenient complete interface. I'm disappointed to not find some small screened device able to run the software. Maybe one of my old Sony Clie. Somewhere in the heap is one I ran a rs232 device for monitoring dissolved oxygen from a meter.
I don't understand. VirtualBox by Oracle is available for the Mac. No dual booting or anything. It just runs in a window on your Mac and you choose to load it whenever you want. You can still be running all your Mac stuff at the same time! I'm assuming you already have a disc to install Windows XP (or Win 7 / Vista) on whatever computer you've been hinting at finding/purchasing/attaining.

https://www.virtualbox.org/

Am I missing something here???

Shanman3us

User avatar
tomjasz   1.21 GW

1.21 GW
Posts: 3944
Joined: Mar 29 2014 1:45pm
Location: Out riding, MN USA
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by tomjasz » Jul 03 2014 7:30am

Thanks very much for the lead. But, Um, this is why I'm asking and poking around. I hadn't read about this solution. I have XP but my current Macbook will not load XP with bootcamp or any other program available. The best and most frequently recommended solution seemed to be purchase a new oem copy of Windows and Parallels. $200 just to run a single file. Your solution, adding an open source program that likely has it's own set of problems to run a little utility doesn't excite me either. It appears I still need to buy another Windows OS. So I'm looking for a cheap and simple solution that won't put me into the position of having problems on my Mac. I'm now thinking this might be easily done with an HP IPAQ. I don't want to work on computers anymore. At this point I think I just want a little stand alone solution for my Bafang. Looking to see if your solution will work on one of the ancient mac laying around here.
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
tomjasz   1.21 GW

1.21 GW
Posts: 3944
Joined: Mar 29 2014 1:45pm
Location: Out riding, MN USA
Contact:

Pocket PC Programming the Bafang Middrive?

Post by tomjasz » Jul 03 2014 7:52am

tomjasz wrote:Ok, an hour of googling and I find HP IPAQ has a USB port and Windows. Anyone? Will it run the Bafang file?
I've found dozens of the POCKET PC units for sale. Anyone know if they will, or which version of Windows mobile, will run the Bafang utility? These are cheap enough and obviously very portable. Perfect for the tool kit.
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.

pexio   100 mW

100 mW
Posts: 42
Joined: Apr 08 2014 6:38am
Location: Western Massachusetts, USA

Re: Pocket PC Programming the Bafang Middrive?

Post by pexio » Jul 03 2014 8:39am

tomjasz wrote:
tomjasz wrote:Ok, an hour of googling and I find HP IPAQ has a USB port and Windows. Anyone? Will it run the Bafang file?
I've found dozens of the POCKET PC units for sale. Anyone know if they will, or which version of Windows mobile, will run the Bafang utility? These are cheap enough and obviously very portable. Perfect for the tool kit.
The Bafang software centers around a Windows executable, controllerst.exe. Therefore, it needs a real Windows machine to run on, or a machine that acts like a real Windows machine. It will not run on a Pocket PC, Palm Pilot, iPhone, Droid, or Radio Shack TRS-80. There is little point complaining about this fact, or the type of connector you'll need to buy/make to build a programming cable because, after all, Bafang does not want its customers to reprogram the unit. Don't do the crime if you can't do the time. :wink:

User avatar
teslanv   100 MW

100 MW
Posts: 2656
Joined: Nov 03 2013 8:42pm
Location: Bellevue, WA - USA
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by teslanv » Jul 03 2014 9:05am

A Dirty little secret with Dell PC's is that you can install windows on them with their factory supplied "Operating System Reinstallation Disc" and NOT HAVE TO provide an activation code, since all OEM Dell motherboards include firmware that automatically authenticates the installation. - So all you really need is a cheap <$100 Dell mini netbook, and a Dell OS reinstall disc (Which I can make you a copy of, Tom) and off you go. - You can even install window 7 Ultimate (the Best Windows OS, IMHO) on a Mini.
They are also handy if you have kids (or grandkids) for roadtrips (movie watching)
DD Hubs, Batteries, Controllers & Custom Ebikes.
http://westcoastelectrics.com
West Coast Electric Cycles
Bellevue, WA
USA

shanman3us   100 mW

100 mW
Posts: 44
Joined: Jul 20 2011 5:25pm

Re: Programming the Bafang Middrive BBS01+BBS02

Post by shanman3us » Jul 03 2014 12:35pm

tomjasz wrote:Thanks very much for the lead. But, Um, this is why I'm asking and poking around. I hadn't read about this solution. I have XP but my current Macbook will not load XP with bootcamp or any other program available. The best and most frequently recommended solution seemed to be purchase a new oem copy of Windows and Parallels. $200 just to run a single file. Your solution, adding an open source program that likely has it's own set of problems to run a little utility doesn't excite me either. It appears I still need to buy another Windows OS. So I'm looking for a cheap and simple solution that won't put me into the position of having problems on my Mac. I'm now thinking this might be easily done with an HP IPAQ. I don't want to work on computers anymore. At this point I think I just want a little stand alone solution for my Bafang. Looking to see if your solution will work on one of the ancient mac laying around here.
OK. I see where your coming from. I always tinker with my computers and have multi-boot etc. For me, VirtualBox works great since it is just a program that allows me to install a virtual computer. Regardless of it being XP, Windows 7, Mac OSX etc. Maybe it's different for a Mac as the host computer. I have never experienced any problems running VirualBox. There are other VM programs too. VMware comes to mind which I believe is even more popular then VirualBox.

I hope you find something reasonable and hopefully portable. It would be nice to change things while in the middle of a ride instead of the 'only changing parameters once you get home' scenario.

Shanman3us

mclark999   100 W

100 W
Posts: 110
Joined: Jun 12 2014 5:53pm
Location: Denver, CO, USA

Re: Programming the Bafang Middrive BBS01+BBS02

Post by mclark999 » Jul 03 2014 1:31pm

Maybe we start a loaner service. My 280Z forum started loaning out a custom made spindle tool. Would people be interred in paying like $10 plus postage to borrow/rent a cable and usb card?
-------------------------------------
Sikk Bikes cruiser with 66cc China girl
Trek FX 7.2 with Bafang BBS02 750W 20A
Trek 5500 with human power
Giant Trance with human power

lazy_mosquito   10 mW

10 mW
Posts: 28
Joined: Jan 27 2014 6:54am

Re: Programming the Bafang Middrive BBS01+BBS02

Post by lazy_mosquito » Jul 03 2014 1:35pm

lazy_mosquito wrote:Is it possible to throttle the 25A 750W BBS02 down to for example 18A with the software? I am using a Nuvinci 360 and i am afraid i am going to tear it apart when i use the full power of the engine. But on the other hand i think it would be silly to buy the "old" 500W BBS02 with only 6fets if there exists a better model.
anybody?

User avatar
teslanv   100 MW

100 MW
Posts: 2656
Joined: Nov 03 2013 8:42pm
Location: Bellevue, WA - USA
Contact:

Re: Programming the Bafang Middrive BBS01+BBS02

Post by teslanv » Jul 03 2014 2:26pm

lazy_mosquito wrote:
lazy_mosquito wrote:Is it possible to throttle the 25A 750W BBS02 down to for example 18A with the software? I am using a Nuvinci 360 and i am afraid i am going to tear it apart when i use the full power of the engine. But on the other hand i think it would be silly to buy the "old" 500W BBS02 with only 6fets if there exists a better model.
anybody?
Yes, you can De-rate the Current in the programming on the older BBS02 models. - Newly released model??? Hard to say. Bafang might have changed the Firmware.
DD Hubs, Batteries, Controllers & Custom Ebikes.
http://westcoastelectrics.com
West Coast Electric Cycles
Bellevue, WA
USA

User avatar
Aushiker   100 W

100 W
Posts: 170
Joined: Mar 08 2014 8:47am

Re: Programming the Bafang Middrive BBS01+BBS02

Post by Aushiker » Jul 04 2014 8:44am

pexio wrote:Here's how I built a programming cable. It's probably not the cheapest but it's pretty easy and straightforward (meaning hard to mess up!). First, I ordered the genuine Bafang Display Extension Cable that satcamel posted about back on Page 8. This is the most expensive piece but ensures that the connectors will fit without having to modify or substitute or otherwise jury rig a connector.
Thanks for this. This is really helpful.

Andrew

fingret   1 mW

1 mW
Posts: 17
Joined: Jun 25 2014 5:58pm

Re: Programming the Bafang Middrive BBS01+BBS02

Post by fingret » Jul 04 2014 9:11am

Aushiker wrote:
pexio wrote:Here's how I built a programming cable. It's probably not the cheapest but it's pretty easy and straightforward (meaning hard to mess up!). First, I ordered the genuine Bafang Display Extension Cable that satcamel posted about back on Page 8. This is the most expensive piece but ensures that the connectors will fit without having to modify or substitute or otherwise jury rig a connector.
Thanks for this. This is really helpful.

Andrew
Yep, thanks alot Aushiker.

Post Reply