Programming the Bafang Middrive BBS01+BBS02

jpo said:
will the programming cable work on all of the bbso1 and 2"s.
if yes please sign me up for one too
thanks
Joe
Yes. What you are buying is an extension cable for the controller. You then need to buy the appropriate USB cable to make the programming cable as shown in this thread.
I'm ready to place the order. Please PP ASAP.




pexio said:
fingret said:
... 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:

View attachment 5
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:

View attachment 4
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:

View attachment 3
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:

View attachment 2
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. I soldered the connections and used heatshrink tubing but use whatever splicing/insulation techniques you prefer. Here's a pic:

View attachment 1
Here's a pic of the completed cable:


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!
 
Hi tomjasz,

Add me to the list. I got a BBS02 on the way from cellman. :) I sent you a PM for ordering.

What I'd like to do is chop that extension cable in half and buffer all I/O on the serial lines through a microcontroller hooked up to my PC.

Then I can see what the controller and the display are talking about, decipher it and perhaps modify the communications on the fly and
make the controller do things it's currently reluctant to do :)
 
Extension cables ordered. 1-3 days to ship and then DHL. Not sure how long but orders from Chine, these are from the EU, come in 3-5 days.

Thanks ALL!!! I like saving $25! Hope you do too! I'll PM any updates. I guess I should have started a new thread. My apologies for junking up another thread. :oops:

Tom
 
teslanv said:
lazy_mosquito said:
lazy_mosquito said:
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.

Em3ev.com has confirmed that the newly released BBS02 750W units have changed programming software. Hopefully someone will leak the new software... 8)
 
tomjasz said:
Extension cables ordered. 1-3 days to ship and then DHL. Not sure how long but orders from Chine, these are from the EU, come in 3-5 days.

Thanks ALL!!! I like saving $25! Hope you do too! I'll PM any updates. I guess I should have started a new thread. My apologies for junking up another thread. :oops:

Tom


New thread to free up the noise here,

https://endless-sphere.com/forums/viewtopic.php?f=31&t=61410&p=917430#p917430
 
mclark999 said:
Can't tell from reading all the posts. Does pedal cadence have any effect on pas output? If so, which setting adjusts it?
I have BBS01, C961, 36V 14.5Ah.
It's hard to describe. Using PAS, in each assist level (say 4 of 9), there appears to be an optimum cadence/gear combination. To go faster, pedaling harder will work, but shifting into a higher gear and just keeping the pedals moving without much pressure will move you even faster. This feels odd, because pedaling easier makes you go faster if you are in the proper rear gear. This is especially apparent going up moderate slopes when you automatically want to start pedaling harder to maintain speed. It's counter intuitive to shift to a higher gear going uphill, but that works. My setup so far is stock from LectricCycles, except that I changed to 9 PAS levels from 5, using the LCD setup. The change from 5 to 9 made an enormous difference. 5 PAS levels severely limit the flexibility, enjoyment, and efficiency of the ride.
 
The PAS system has a certain crank speed for which it will assist, and then drops off once it's programmed crank speed (RPM) is reached. Each time you shift to a higher gear, you suddenly decrease the crank speed. Thus the PAS system picks up again to help with the assist. In the programming you can change the amount of assist relative to the crank speed for a more "natural" feel. The better way to have the PAS provide more assist is not to shift to a higher gear, but to slow down your pedaling and/or increase the PAS level. - Or do like I do and just ride the throttle in 1st gear and clown pedal so you don't get strange looks. 8)
 
UpRider said:
mclark999 said:
Can't tell from reading all the posts. Does pedal cadence have any effect on pas output? If so, which setting adjusts it?
I have BBS01, C961, 26V 14.5Ah.
It's hard to describe. Using PAS, in each assist level (say 4 of 9), there appears to be an optimum cadence/gear combination. To go faster, pedaling harder will work, but shifting into a higher gear and just keeping the pedals moving without much pressure will move you even faster. This feels odd, because pedaling easier makes you go faster if you are in the proper rear gear. This is especially apparent going up moderate slopes when you automatically want to start pedaling harder. It's counter intuitive to shift to a higher hear going uphill, but that works. On my setup, in PAS 4, the assist cuts out at 15MPH, but is higher in higher PAS. My setup so far is stock from LectricCycles, except that I changed to 9 PAS levels from 5, using the LCD setup. The change from 5 to 9 made an enormous difference. 5 PAS levels severely limit the flexibility, enjoyment, and efficiency of the ride.

The default settings of PAS has the Keep Current setting set at 20% this means that the amount of assist drops right back to 20% as you reach the cadence. Where it drops off at is set by the Current Decay, this setting determins how high in the cadence range the assist goes 8 is the highest rpm.
I have found the best setting for me is just to disable this and set the Keep Current to 100% so the assist constant at any point in the cadence range.
 
pjgold said:
UpRider said:
mclark999 said:
Can't tell from reading all the posts. Does pedal cadence have any effect on pas output? If so, which setting adjusts it?
I have BBS01, C961, 26V 14.5Ah.
It's hard to describe. Using PAS, in each assist level (say 4 of 9), there appears to be an optimum cadence/gear combination. To go faster, pedaling harder will work, but shifting into a higher gear and just keeping the pedals moving without much pressure will move you even faster. This feels odd, because pedaling easier makes you go faster if you are in the proper rear gear. This is especially apparent going up moderate slopes when you automatically want to start pedaling harder. It's counter intuitive to shift to a higher hear going uphill, but that works. On my setup, in PAS 4, the assist cuts out at 15MPH, but is higher in higher PAS. My setup so far is stock from LectricCycles, except that I changed to 9 PAS levels from 5, using the LCD setup. The change from 5 to 9 made an enormous difference. 5 PAS levels severely limit the flexibility, enjoyment, and efficiency of the ride.

The default settings of PAS has the Keep Current setting set at 20% this means that the amount of assist drops right back to 20% as you reach the cadence. Where it drops off at is set by the Current Decay, this setting determins how high in the cadence range the assist goes 8 is the highest rpm.
I have found the best setting for me is just to disable this and set the Keep Current to 100% so the assist constant at any point in the cadence range.
On the BBS01 36V I have the same problem as UpRider. It can not be fixed by adjusting settings as maximum motor cadence is too low due to the motor design. With the BBS02 based on this datasheet it can be fixed as described by pjgold but whether it can be fixed on the BBS01 24V depends on the motor wind. This graph, based on Bafang data and my own testing illustrates the problem. View attachment 1
These curves show maximum possible power input and show that, down to 70 rpm, the slower you pedal the higher the power the motor can produce. Fortunately the test data gives a better result than the Bafang data but the maximum motor cadence is still too low. With a fully charged battery, enough power can be produced for most purposes up to 90 rpm but the roll off is very steep and there is more than double the power available at 85 rpm. A practical upper limit cadence to maintain is 85 rpm as +/-5 rpm is within natural variation. As UpRider says, change up rather than the usual down if you need to pedal harder because normal behaviour will make a bad situation worse.

The Bafang data was scaled from this graph.
file.php
 

Attachments

  • BafangMid36VPerformanceCurve.jpg
    BafangMid36VPerformanceCurve.jpg
    103.7 KB · Views: 2,524
Em3ev.com has confirmed that the newly released BBS02 750W units have changed programming software. Hopefully someone will leak the new software... 8)

Has anyone here heard if the new programming software exists at this point? I am about to order a new 9-FET BBS02 from EM3, but it sounds like they're pretty much going out stock. And without access to the software, I'm a little gun-shy about possibly purchasing a non-programmable drive.
 
I use this USB TTL converter. It works perfectly. win7 did you install the driver automatically over the internet
http://www.ebay.com/itm/171359939118?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649
 
I use only PAS so I used the throttle connector for programming connector.

Drill holes for Txd and RxD female connectors.
Use “multi wire cable” for the connectors in the holes, like the blue one.

P_connector.jpg

-Ilpo
 
Still having my problem with my seperately ordered controller.

I burnt my stock controller (18A, 350W, 36V - it was my fault), ordered a new one via em3ev (same specs) and now the throttle works with an enourmous delay.

The stock one gives throttle nearly instantly when you pull the thumbthrottle.
The new takes up to 4 or 5 seconds to reach full throttle/speed.
It speeds up in 4 or 5 "levels", you feel it when you drive, the old stock controller boosted without these levels.
When you lift the wheel its the same, 4 to 5 levels and each goes a little bit faster, so i think its not just a current limitation, cause with the rear wheels free, it dont speed up smooth.
In different situations combined with the PAS its even worse.
The thumbthrottle cuts off the PAS power, but it takes ages to speed up again.

Does anyone have an idea, which field i have to change in the software?
 
Question: Has anyone attempted to monitor the COM port traffic while the programming software is running? I got one of the new 750 W models with the unobtanium software, but I'm wondering if it's just a matter of uploading and downloading the configuration files, or if there's a set of human-readable commands that would allow a workaround based on a terminal program or some simple programming.

Not saying I'd necessarily be willing to brick my drive For Science, but this might be a line of inquiry for us to pursue. If it's apparent from the hackable drives that there's a predictable command set or file upload/download for those drives, this might be extensible to the not-yet-hacked.

Thoughts?
 
I'll have a look this weekend (i'm rebuilding my laptop at the moment) but if anyone wants to try beforehand this software will do it: http://www.serial-port-monitor.com/
 
I bought a cable here. I cut the green and merged with USB.Price 20 USD includes transportation. :wink: :p
http://www.evbike.cz/Nahradni-dily/NAHRADNI-DIL-Hlavni-kabelovy-svazek-s-vodotesnou-kabelazi.html
 
cycborg said:
Question: Has anyone attempted to monitor the COM port traffic while the programming software is running?

Here's a file containing a serial dump of the Bafang software read request using the software serial port monitor I posted earlier: https://dl.dropboxusercontent.com/u/8508052/bafang%20read.txt

The important lines are:

The Bafang software requesting information:

00000060 26.07.2014 13:58:14.147 +0.093 IRP_MJ_WRITE DOWN 0x00000000 11 51 04 b0 05 .Q...

The reply from the controller:

00000062 26.07.2014 13:58:14.584 +0.436 IRP_MJ_READ UP 0x00000102 51 10 48 5a 58 54 53 5a 5a 36 32 32 32 41 4d 74 02 14 8c Q.HZXTSZZ6222AMt...

The bold parts are the raw hexadecimal data. As you can see it is not in any human readable ASCII format (the characters following the hex data are decoded ASCII).

I don't have time to vary each parameter one at a time and reverse engineer the serial data but it is possible if you have the skill.
 
Tom L said:
Here's a file containing a serial dump of the Bafang software read request

Thanks, Tom. So just 19 bytes to represent 42 config fields, if I'm counting correctly. Very efficient, but rather hard to decode.

Some day if I'm feeling brave I might try sending that read request to my controller and see what comes back, although I doubt I'll be able to interpret it, much less change anything.
 
Yeah we have a working GUI for the older controller and I guess the updated one will eventually find its way out into the light. Not really worth the effort.

Someone suggested earlier that they had to read each tab in the software but I did not find that was the case. I got all fields in all tabs populated with values when I read from the first page. I'm not sure how they're compressing each field into less than a nibble even allowing for them all being positive integers less than 128.

Edit: it's even more compressed than that. There's the read only "Controller info" fields as well (model, version, batt volts, etc...)
 
tomjasz said:
tomjasz said:
Extension cables ordered. 1-3 days to ship and then DHL. Not sure how long but orders from Chine, these are from the EU, come in 3-5 days.

Thanks ALL!!! I like saving $25! Hope you do too! I'll PM any updates. I guess I should have started a new thread. My apologies for junking up another thread. :oops:

Tom


New thread to free up the noise here,

https://endless-sphere.com/forums/viewtopic.php?f=31&t=61410&p=917430#p917430

Ready to ship...
http://endless-sphere.com/forums/viewtopic.php?f=31&t=61410&p=924855#p924855
 
cycborg said:
Question: Has anyone attempted to monitor the COM port traffic while the programming software is running? I got one of the new 750 W models with the unobtanium software, but I'm wondering if it's just a matter of uploading and downloading the configuration files, or if there's a set of human-readable commands that would allow a workaround based on a terminal program or some simple programming.

Not saying I'd necessarily be willing to brick my drive For Science, but this might be a line of inquiry for us to pursue. If it's apparent from the hackable drives that there's a predictable command set or file upload/download for those drives, this might be extensible to the not-yet-hacked.

Thoughts?

When I get my cable, I'm going to intercept the com traffic between the display unit and the controller with the Mega Arduino board which has four UARTs.

Unfortunately I have one of the newer firmware controllers and I don't think I could be able use the old software.
 
Back
Top