Programming the Bafang Middrive BBS01+BBS02

crossbreak

1 MW
Joined
Aug 2, 2011
Messages
2,884
Location
Germany
I'd like to start a new thread about this... I had a hard time to find all of the info i need in the other thread.. so here is a start.

all i know is that: we need':

-A TTL converter (cheap off ebay)
-A special cable
-A computer and a software


any more? hope this is a start..

Don't forget to cross rx and tx such that tx (transmit) of your USB to serial go to rx (receive) on the controller.

programming software from BAFANG http://ulozto.cz/x1zej9PD/software8fun-zipp rename to *.zip

multi language programming software (english , español, french, german, italian, portuguese, swedish, turkish)
https://www.dropbox.com/s/2kloq1693e4n186/Bafang.zip?dl=0


from http://endless-sphere.com/forums/viewtopic.php?f=28&t=50104&start=1925#p876033
ben--b said:
I bought a similar USB to serial cheap (1.5$) converter and made my programing cable with a jst-xh 5pin plug.
file.php

I had to install a driver for the converter to work properly. You just have to know the chipset ref and it is easy to find online.
Rather than trying to find the same 5pin connector as on bafang wiring harness, I installed another plug (common jst-xh 5pin) in serial between the connector and the display.
file.php

I opened the display case (which is welded so the result isn't very clean ...). You can see on the pic the wire's color and function.
file.php

You need to connect GND, RX and TX of the controller to the converter (TX display = RX controller = TX converter) AND to connect the red and white wires (named D+ and Ds in the display) together.
D+ is the battery positive, Ds is the wire that awaken the controller when connected to +batt.
This way, the programming software is working fine.
All the controller parameters are not so easy to understand, so the more people will be able to have this software working, the sooner we'll be able to master it for fine tuning of this great litttle product.
 

Attachments

  • asfd.jpg
    asfd.jpg
    53.5 KB · Views: 128,977
Thanks for starting this Crossbreak. It can really use it's own thread.

Here is what I know about the BBS0X programming from lcrewse (http://www.lectriccycles.com):

We now have the software for reprogramming "some of the parameters" of the controller. However, there is also a firmware update for the controller to open up other programming options, which may or may not be needed on your unit, depending on where and when you purchased your BBS0X unit. (I ordered mine through lcrewse, so I would assume mine does have the alternate firmware loaded) I have not seen this file posted yet, nor do I know how to retrieve it from my unit.

There may be another connection point to the controller in the unit, instead of trying to go through the waterproof connector. After cracking open my drive to investigate a noise, I have a better understanding of the wiring and connectors inside the motor assembly. I will post pics tonight of the controller wiring harnesses and connectors.
 
Display side pinout (as marked on the C961 PCB):
7DaWbi3.jpg


Mirror the pinout for controller side.

P+ is the full battery voltage. PL is connected to P+ inside the display by a MOSFET when the display is turned on.
 
I tried connecting to my C961 display with the software without success tonight. I didn't really think this would work as while there is a backup battery on the PCB this does not power the whole circuit.

I used a 5V USB-Serial bridge connected as COM8 at 1200 baud. I had TX, RX and GND connected. I tried swapping TX and RX and I tried it both ways with P+ shorted to PL and without this short.

Unfortunately I have a faulty controller serial port and so trying to connect to my controller pointless. This is as far as I can go right now.

Interestingly shorting P+ and PL on the controller side turns the speed sensor LED on, indicating this is how the controller is powered up.

For those of you that are going to try to connect to the controller side of the cable please disconnect the battery first. The whole battery voltage is present on the P+ pin and it is very easy to short this to the other pins (Guess how my controller serial port became faulty!). Also remember that my photo above is of the Display connector. The Controller connector connections are mirrored like this:

3GaLDI1.jpg
 
from: http://endless-sphere.com/forums/viewtopic.php?f=28&t=50104&start=2025#p877770
jateureka said:
ziltoid81 said:
Plus, everybody tells another story......cable to display....cable to controller.......3 wires.......5 wires.....with batt....without. :cry:
That may be because there are at least 3 different versions of display, C950, C961, C963, and each is only compatible with a particaular version of firmware that has been installed in the motor controller. If you read the display user manuals you will see that Bafang state what version controller firmware, say V4, that display is compatible with.

So, for those that have the software cable connected and working, could you please state what display you have and what motor BBS01/02 and the first four digits of the motor serial number, which is the year and month of manufacture. Hopefully this will help sort out how the individual units need to be configured.
 
Some photos of the BBS02 750W drive unit opened up:

2014-04-09060432_zpsd18c1ef3.jpg

2014-04-09060356_zpsca83aa31.jpg

2014-04-09060405_zps63307c2c.jpg

2014-04-09060501_zpsa25e6d9a.jpg

2014-04-09060350_zps1b777312.jpg

2014-04-07214520_zps03c2ad5f.jpg


And this nylon gear has 500+ miles on it. Not bad, actually...
2014-04-07214633_zps44d408eb.jpg
 
FYI, tried connecting my USB > TTL lead - plugged into the controller lead (green plug) pins first - gnd, tx and rx (and also tried tx and rx reversed) nothing. Press connect and no info returned and the read/write to flash buttons remain greyed out..

However, when I connect to the gnd, tx and rx pins on the display lead, I click connect some info is returned - nominal voltage shows as 24v but the hardware and firmware revision just show a little "v" symbol and all of the other values are zero. This connection "ungreys" the read /write flash buttons - I click "read flash" and it says "read from flash successful" but the values all remain as zero. I've not tried writing to flash for obvious reasons.

Unit is a BBS02 500w with a C961 display. Purchased Feb 2014 and has the new style connectors.
 
hi, I also have a display C961 but with a different connector.
I have 6 holes, anyone know what it is he, where Tx, Rx and GND are, because I have a USB TTL, but how to connect?
C961 b.jpg
 
The connectors look like they maybe compatible with one of these http://www.altronics.com.au/index.asp?search=6+pin+waterproof&area=srch&Submit=SEARCH

Hopefully my drive will arrive tomorrow after a six week wait. When it arrives I will drop into Altronics and see if i can get a match. The six pin connectors may fit the five pin ones if the centre pin is removed or a hole is drilled in the 5 pin connector to fit the sixth pin.
 
bgraig said:
hi, I also have a display C961 but with a different connector.
I have 6 holes, anyone know what it is he, where Tx, Rx and GND are, because I have a USB TTL, but how to connect?

One of those 6 pins is dead, I did cut my connector and reconnected it with a standard 5pol. If you dont Want to do that I can post pictures if I find the thime or you better open Your display and peep through the plug to know what is what.

This is not going to work with any USB-TTL I had no sucsess jett.


step by step tutorial:
-disconnect the battery
-disconnect the display and only use the motor side of the plug or cut it and get a standard plug
-connect Batterie P+ to the grey PL (be carfull with that P+ is full battery voltage!)
-connect USB FDTI with the plug--> GND to GND, RX to TX and TX to RX
-connect the batterie
-start up the software(in Windows 7/8 with XP compatibili mode), select the right COM-Port and klick connect
 
amigafan2003 said:
FYI, tried connecting my USB > TTL lead - plugged into the controller lead (green plug) pins first - gnd, tx and rx (and also tried tx and rx reversed) nothing. Press connect and no info returned and the read/write to flash buttons remain greyed out..
...

Unit is a BBS02 500w with a C961 display. Purchased Feb 2014 and has the new style connectors.

You need to short the P+ and PL pins together as well. This is how the controller is turned on.
 
Tom L said:
amigafan2003 said:
FYI, tried connecting my USB > TTL lead - plugged into the controller lead (green plug) pins first - gnd, tx and rx (and also tried tx and rx reversed) nothing. Press connect and no info returned and the read/write to flash buttons remain greyed out..
...

Unit is a BBS02 500w with a C961 display. Purchased Feb 2014 and has the new style connectors.

You need to short the P+ and PL pins together as well. This is how the controller is turned on.

Ok, this is with the battery connected I presume? Would it be safer to connect all the pins (gnd, rx, tx and short p- + pl) then connect the battery?
 
Yep that's the safest way.

1) disconnect the battery.
2) make your serial connections and short P+ and PL
EDIT: 2a) double check your connections
3) connect the battery
4) try the software.
 
Tom L said:
Yep that's the safest way.

1) disconnect the battery.
2) make your serial connections and short P+ and PL
EDIT: 2a) double check your connections
3) connect the battery
4) try the software.

Thanks - I'll try that later :)
 
I've ordered one of these http://uk.farnell.com/cliff-electronic-components/fm686815/circular-connector-plug-5-way-cable/dp/2353926

Pins and notch looks like it'll line up - the diameter might be off a little but we'll see if it's possible to file the housing down a bit.

I'll report back when it arrives.
 
Someone posted a link for the controll system software, so I fired and up and thought I'd list out the options I see.
To aid discussion of the settings and provide a template for others to enter what settings their motor shipped with.

controllerst v1.00.01

BASIC

Low Battery Protect(V): [18,19,20,21,22 pulldown; can enter others]
Limited Current(A): [numeric entry field]
A 2 x 10 table of the pedassist settings -- Limit Current% & Limit Spd% for each of Assit0 through Assit9.
Wheel Diameter(Inch) [16-27, 700c, 28, 29]
Speed Meter Model [External Wheel Meter, Internal Motor Meter, by Motor Phase]
SpdMeter SIgnal [numeric]

PEDAL ASSIST

Pedal Type [DoubleSignal24, BB-Sensor-32, DH-Sensor-12, None]
Designated Assist [By Display's command, 0-9]
Speed Limited [By Display's command, 15-40 Km/h]
Start Current(%) [%]
Slow-Start mode(1-8) [1-8]
Startup Dgree(Signal No.) [numeric]
Work Mode (Angular speed of pedal/wheel x 10) [Undetermined, 10-80]
Time of Stop (x10ms) [numeric]
Current Decay(1-8) [1-8]
Stop Decay(x10ms) [numeric]
Keep Current(%) [%]

THROTTLE HANDLE

Start Voltage (x100mV) [numeric]
End Voltage (x100mV) [numeric]
Mode: [Speed, Current]
Designated Assist [By Display's Command, 0-9]
Speed Limited [By Display's Command, 15-40 Km/H]
Start Current(%)[%]

CONTROLLER INFO
Manufacturer:
Model:
Hardware Ver:
Firmware Ver:
Nominal Voltage:
Max. Current:
 
Software? A member responded and said he'd send me a link or copy but NO JOY!
 
Im getting frustrated......always got the same error, either the cables are connected or not, even when the usb interface is NOT plugged in.

'Error opening serial port"

Got this Interface "3V / 5.5V USB to RS232 Serial TTL PL2303 USB UART Board PL-2303HX CP12004 C54"
http://www.ebay.de/itm/281274548169?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

The LED on the interface indicated red all the time, when plugged in the laptop.
When i disconnect the battery from the bbs01, a blue LED will also light up for 2 seconds on the serial interface.......
This didnt happens when i change rx/tx........so something must happen.

Dont know where to start again......maybe its the wrong serial interface.

Need to reprogramm this little sucker to current control. :evil:

At least i didnt blow up my controller so far......

bbs01 350w with 961.
 
ziltoid81 said:
Im getting frustrated......always got the same error, either the cables are connected or not, even when the usb interface is NOT plugged in.

'Error opening serial port"

Got this Interface "3V / 5.5V USB to RS232 Serial TTL PL2303 USB UART Board PL-2303HX CP12004 C54"
http://www.ebay.de/itm/281274548169?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

The LED on the interface indicated red all the time, when plugged in the laptop.
Wh

Have you checked what port the serial device is using in the device manager? And did you select that port in the Bafang software before trying to connect?
 
Back
Top