Programming the Bafang Middrive BBS01+BBS02

SO I downloaded the software and I happened to have a USB to Serial converter. So I ran over to Radio Shack and bought a few jumper wires.

I can get it to connect just fine.

However it will not read the current settings correctly. or write.

When I ask it to read it fills all fields in with 0's. when I put my wanted fields in it doesn't save them.

So, I'm thinking we do not have the correct software. (for the BBS02 750W C961 unit anyway)

Here are some screenshots of the software listed.
 

Attachments

  • Screenshot (5).png
    Screenshot (5).png
    42.6 KB · Views: 8,406
  • Screenshot (7).png
    Screenshot (7).png
    52 KB · Views: 8,406
crossbreak said:
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


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.


Here is a cheap converter most anyone can buy locally.
http://www.staples.com/usb+to+serial/directory_usb+to+serial?fids=4224917673&rpp=18&pn=1&sr=true
 
Somebodystopme!! said:
I can get it to connect just fine.

However it will not read the current settings correctly. or write.

When I ask it to read it fills all fields in with 0's. when I put my wanted fields in it doesn't save them.

So, I'm thinking we do not have the correct software. (for the BBS02 750W C961 unit anyway)

Are you using a 5V or 3V USB converter?

When you say "connect just fine" what do you mean? I don't see any evidence of a connection in your screen shots. Also you have not defined the com port for the connection.
 
Somebodystopme!! said:
Here is a cheap converter most anyone can buy locally.
http://www.staples.com/usb+to+serial/directory_usb+to+serial?fids=4224917673&rpp=18&pn=1&sr=true

No! This is an RS232 serial device (up to +/-15V). You need a 5V TTL level device.
 
Tom L said:
Somebodystopme!! said:
Here is a cheap converter most anyone can buy locally.
http://www.staples.com/usb+to+serial/directory_usb+to+serial?fids=4224917673&rpp=18&pn=1&sr=true

No! This is an RS232 serial device (up to +/-15V). You need a 5V TTL level device.

I didn't realize that would be an issue.
I will go buy one of these tomorrow and try it out.

http://www.frys.com/product/6997547

Once I get it done, I plan on making a YouTube video tutorial.
 
Tom L said:
Somebodystopme!! said:
I can get it to connect just fine.

However it will not read the current settings correctly. or write.

When I ask it to read it fills all fields in with 0's. when I put my wanted fields in it doesn't save them.

So, I'm thinking we do not have the correct software. (for the BBS02 750W C961 unit anyway)

Are you using a 5V or 3V USB converter?

When you say "connect just fine" what do you mean? I don't see any evidence of a connection in your screen shots. Also you have not defined the com port for the connection.

So I bought my TTL converter and it's doing the same thing that the standard USB-Serial adapter did. When it connects to the controller it states at the bottom that it see's 24V. I assume that's the voltage the controller runs on.

No Comm errors. serial port works fine.

Will not read my controller or write to it. I have set it to 3.3 & 5V and I have crossed the TX/RX cables.

I am wondering if the BBS02 needs to have jumper wires to the display as well as the controller so everything will be powered for it to work.

I have seen someone mention that the BBS01 has been successfully tapped into. Can anyone confirm this is possible with the BBS02?

I have hooked everything back up and powered it on and everything works as it did when stock. no error messages on the display module since I have been fiddling with it.
 
Somebodystopme!! said:
Tom L said:
Somebodystopme!! said:
I can get it to connect just fine.

However it will not read the current settings correctly. or write.

When I ask it to read it fills all fields in with 0's. when I put my wanted fields in it doesn't save them.

So, I'm thinking we do not have the correct software. (for the BBS02 750W C961 unit anyway)

Are you using a 5V or 3V USB converter?

When you say "connect just fine" what do you mean? I don't see any evidence of a connection in your screen shots. Also you have not defined the com port for the connection.

So I bought my TTL converter and it's doing the same thing that the standard USB-Serial adapter did. When it connects to the controller it states at the bottom that it see's 24V. I assume that's the voltage the controller runs on.

No Comm errors. serial port works fine.

Will not read my controller or write to it. I have set it to 3.3 & 5V and I have crossed the TX/RX cables.

I am wondering if the BBS02 needs to have jumper wires to the display as well as the controller so everything will be powered for it to work.

I have seen someone mention that the BBS01 has been successfully tapped into. Can anyone confirm this is possible with the BBS02?

I have hooked everything back up and powered it on and everything works as it did when stock. no error messages on the display module since I have been fiddling with it.

That's what mine did when I connected it to the cable that goes to the display.

Have you connected it to the cable to the controller? I haven't tried yet as I don't have a plug/cable to use.
 
Well the only thing left I can think of; did you have P+ and PL shorted together?

If so then it really looks like this software is not compatible with the BBS02.
 
Tom L said:
Well the only thing left I can think of; did you have P+ and PL shorted together?

If so then it really looks like this software is not compatible with the BBS02.

Yes, they are shorted together. I'm going to try making a jumper harness that will in effect join the connector together but give me the GRD/RX/TX connections I need just in case the display needs to be part of the system for programming.
 
I can confirm that this does indeed work on the BBS02 w/ C961 Display.

I used these two items from Fry's Electronics:
USB to TTL converter
http://www.frys.com/product/6997547


Jumper Wires
http://www.frys.com/product/6250820?site=sr:SEARCH:MAIN_RSLT_PG

The problems I had earlier with only 24V showing up was because one of the jumper wires was not connected to the pins inside the connector. (the power pins were in effect not shorted together like they should've been, hence only half the voltage) (it is extremely tight in there. Grab a flashlight to confirm your jumper wire is indeed on the right wire!)

Below are the screenshots of my current configuration.
Only changes from Stock are:
Changed Pass Level 0 to 100% current & 100% Limit instead of 0 & 0.
Wheel Diameter from 26" to 29". (I had this changed from the controller but apparently it didn't take.)


Now I have full throttle when Pass is set to zero and the Speed sensor states 41.5 MPH with no load and rear wheel off the ground. :mrgreen: :mrgreen: :mrgreen:

Below are some screenshots
 

Attachments

  • Screenshot 2014-04-23 07.40.38.png
    Screenshot 2014-04-23 07.40.38.png
    23.2 KB · Views: 36,639
  • Screenshot 2014-04-23 07.40.54.png
    Screenshot 2014-04-23 07.40.54.png
    23.5 KB · Views: 36,639
  • Screenshot 2014-04-23 07.41.14.png
    Screenshot 2014-04-23 07.41.14.png
    20.2 KB · Views: 36,640
  • Photo Apr 23, 7 44 26 AM.jpg
    Photo Apr 23, 7 44 26 AM.jpg
    17.1 KB · Views: 36,641
  • Photo Apr 23, 7 45 02 AM.jpg
    Photo Apr 23, 7 45 02 AM.jpg
    16.7 KB · Views: 36,640
Great work! Can you confirm it works when the interface is using 3V logic?

There are some extremely cheap 3V serial interfaces on ebay.
 
Tom L said:
Great work! Can you confirm it works when the interface is using 3V logic?

There are some extremely cheap 3V serial interfaces on ebay.

Ugg, I wish I would've known that while I had it hooked up.

I would have to guess maybe not. Since the throttle is basically a 0-5 volt variable resistor or rheostat.

The vast majority of electronic boards are powered by 5v.

Next time I have it hooked up I'll check it.

Now it's time to get a thread posted with what all the other settings will do! Let's unlock this bad boy now that the programming is out of the bag!
 
OK, great, but for the dead electronic brains, is someone going to put out a clear road map? Or perhaps make and sell? Is the cable made by Bafang for vendors?

Thanks!
 
Ok sweet thanks

So just to clarify the steps

Step 1 Disconnect power to your bbs01/2 controller

Step 2 Get the TTL adapter working and assigned a com port on your windows machine.

Step 3 Connect your TTL adapter to the Male connector (controller side not the display) in the following configuration using insulated jumper wires to prevent shorting of the pins.

USB-TTL. motor Controller plug
Ground -------------------Ground
TX --------------------------RX
RX --------------------------TX
Short PL and P+ together

Like this

CONNTR.jpg

Step 4 reconnect the power to the bbs01/2

Step 5 run the software and read your current configuration and back it up

Step 6 change and reprogram the controller


Mushy
 
mushymelon said:
Ok sweet thanks

So just to clarify the steps

Step 1 Disconnect power to your bbs01/2 controller

Step 2 Get the TTL adapter working and assigned a com port on your windows machine.

Step 3 Connect your TTL adapter to the Male connector (controller side not the display) in the following configuration

USB-TTL. motor Controller plug
Ground -------------------Ground
TX --------------------------RX
RX --------------------------TX
Short PL and P+ together

Like this



Step 4 reconnect the power to the bbs01/2

Step 5 run the software and read your current configuration and back it up

Step 6 change and reprogram the controller


Is this correct?

Thanks

Mushy

Great recap. You nailed it. The only thing I would add would be to make sure to utilize jumper wires that are insulated. That way you won't accidentally short any pins.
 
Had a little bit of luck today, I went to my local Jaycar store to get some jumper leads and found this plug that is almost the same as the green plug on the BBS02. It has a 7mm diameter but with a bit of careful filing it fits. So I now have a programming cable the works perfectly.

http://www.jaycar.com.au/productView.asp?ID=PS0545 The bag it came in says the manufacturer is LTW Technology http://www.ltw-tech.com

sdc11420-147443.jpg


No problems with getting connection as detailed above and I was able to change the basic settings, however it looks like the pedal assist and throttle handle setting tabs are not working. I confirmed this by changing some settings and then reading the controller the settings on these 2 tabs do not change.
 
I think using the term "male, motor side of the plug" will reduce the risk of confusion.

The controller is in the motor, but many call the display "controller"
 
Somebodystopme!! said:
I can confirm that this does indeed work on the BBS02 w/ C961 Display.

I used these two items from Fry's Electronics:
USB to TTL converter
http://www.frys.com/product/6997547


Jumper Wires
http://www.frys.com/product/6250820?sit ... IN_RSLT_PG
Purchased the same connectors from Fry's. The Local Fry's had both in stock. :D I was able to get the USB-TTL breakout board connected and talking to the software.
It's getting late, So I'll tinker with connecting to the Kit tomorrow hopefully.

We may need to take a survey now:
What is the manufacture date of your unit and what version of firmware is on your controller?

I suspect Firmware is not something we are yet able to update???
 
teslanv said:
Somebodystopme!! said:
I can confirm that this does indeed work on the BBS02 w/ C961 Display.

I used these two items from Fry's Electronics:
USB to TTL converter
http://www.frys.com/product/6997547


Jumper Wires
http://www.frys.com/product/6250820?sit ... IN_RSLT_PG
Purchased the same connectors from Fry's. The Local Fry's had both in stock. :D I was able to get the USB-TTL breakout board connected and talking to the software.
It's getting late, So I'll tinker with connecting to the Kit tomorrow hopefully.

We may need to take a survey now:
What is the manufacture date of your unit and what version of firmware is on your controller?

I suspect Firmware is not something we are yet able to update???

Something tells me this is going to be a hundred page thread before too long!

Here are the details of my BBS02:
S/N is 1401160248
Produced on (Jan 16 2014) Unit # 0248 (from beginning of production year)
Below info taken from firmware read
MFG - HZXT
Model - SZZ6
Hardware Version - V2.2
Firmware Version - V2.0.1.1
Voltage - 48v
Max Current - 20A

Firmware is one of those MFG things. We will have to wait and see what comes out next, but it may be a dealer only item.

Here are my current settings from the backup file after I changed my PAS 0 Values:
It will be interesting to decipher what each value means, What range each value has, and how it correlates with the operation of the drive.

[Basic]
LBP=41
LC=20
ALC0=100
ALC1=28
ALC2=37
ALC3=46
ALC4=55
ALC5=64
ALC6=73
ALC7=82
ALC8=91
ALC9=100
ALBP0=100
ALBP1=44
ALBP2=51
ALBP3=58
ALBP4=65
ALBP5=72
ALBP6=79
ALBP7=86
ALBP8=93
ALBP9=100
WD=14
SMM=0
SMS=1
[Pedal Assist]
PT=3
DA=0
SL=0
SSM=3
WM=1
SC=20
SDN=4
TS=25
CD=4
SD=0
KC=20
[Throttle Handle]
SV=11
EV=35
MODE=0
DA=0
SL=26
SC=10
 
Back
Top