Bafang USB Programming Adapter

Converting (“programming”) the (*10*)Bafang BBS02 motor controller parameters calls for a USB-to-serial adapter with a connector matching the top of the cable from the motor to the show. Whilst you’ll purchase such issues without delay from the same old randomly named Amazon dealers, I occur to have a (*8*)vast number of naked adapter forums, so I simply purchased a (*13*)show extender cable and reduce it in part to get the connector; you’ll it seems that purchase pigtailed connectors (for greater than the cost of an extender) in the event you dislike reducing cables in part.

More than a few paperwork supply variations of the canonical representation of the motor finish of the show cable, as ripped from (*12*)Penoff’s unique documentation:

Bafang BBS02 display cable pinout
Bafang BBS02 show cable pinout

The pin colours correspond to the wiring throughout the motor cable, however the extender makes use of other colours, as a result of no one will ever know:

Bafang programmer – twine colours

Just a little of labor with a continuity meter gave the pinout:

Bafang BBS02 display extender - wire colors
Bafang BBS02 show extender – twine colours

Don’t accept as true with belongings you learn at the Intertubes: make your personal measurements and draw your personal diagrams!

You need the cable finish wearing the sockets to mate with the pins at the motor cable (coming in from the left):

Bafang programmer – cable ends

Soldering the cable to a (*8*)known-counterfeit FTDI USB adapter went swimmingly:

Bafang programmer – USB adapter wiring

Notice that the yellow-blue connection carries the total 48 V from the battery and would possibly or won’t have any present proscribing / fusing / coverage, so be somewhat extra cautious than same old for your wiring format.

The pink jumper from DTR to CTS, proven in the entire Amazon and eBay listIngs, seems to be pointless.

A snappy and grimy case (ultimately held along with beneficiant hot-melt glue blobs) protects the PCB and armors the cables:

Bafang USB-serial adapter internal

The cast type over at the proper seems about such as you’d be expecting:

Bafang Battery Mount – entire construct view

Many of the directions will let you know to hot-plug the cable to the motor with the battery hooked up, which moves me as foolhardy; now not all of the ones pins make touch in the proper order, because of this you’ll slap 50-odd volts around the improper portions of the circuitry.

As a substitute:

  • Disconnect the battery
  • Unplug the show
  • Plug the adapter cable into the motor connector
  • Plug the USB cable into the Token Home windows Computer
  • Reconnect the battery
  • Fan the flames of the “programming” regimen
  • Ship the brand new configuration to the motor controller
  • Disconnect the battery
  • Unplug the adapter cable
  • Reconnect the show cable
  • Reconnect the battery

Makes extra sense to me, even though it’s extra tedious.

Tuck this OpenSCAD supply code for the case into the unique program that produces the battery mounts:


Format = "Construct"; // [Frame,Block,Show,Build,Bushing,Cateye,Case] … snippage … // Programming cable case ProgCavity = [70.0,19.0,10.0];
ProgBlock = [85.0,25.0,15.0];
ProgCableOD = 4.0; module ProgrammerCase() { distinction() { hull() { for (i=[-1,1], j=[-1,1]) translate((*15*)) cylinder(r=CornerRadius,h=ProgBlock.z,$fn=12); } translate([-ProgBlock.x,0,0]) rotate([0,90,0]) PolyCyl(ProgCableOD,3*ProgBlock.x,6); dice(ProgCavity,middle=true); }
} // Part case sections for printing module HalfCase(Segment = "Higher") { intersection() { translate([0,0,ProgBlock.z/4]) dice((*19*),middle=true); if (Segment == "Higher") translate([0,0,-Kerf/2]) ProgrammerCase(); else translate([0,0,ProgBlock.z/2]) ProgrammerCase(); }
} … snippage … // tuck this into the Construct conditional translate([0,3*Block.x,0]) { translate([gap*ProgBlock.x/2,0,ProgBlock.z/2]) rotate([180,0,0]) HalfCase("Higher"); translate([-gap*ProgBlock.x/2,0,0]) HalfCase("Decrease");