Building with Bafang: Tips and pitfalls

Alvin Carpenter, PhD

Greetings and welcome to the page where we examine the many tips and pitfalls of building an electric bike with the Bafang mid drive system. Over the years we have seen just about everything. We have been saving pictures of those things we find interesting and have collected them for this page. We hope you find them educational and helpful. 


Thanks for visiting our site,

Alvin Carpenter, PhD

image4

Securing a motor 1

Securing a motor 1

Securing a motor 1

image5

The most common problem we see on Bafang self installed motors is they have come loose. There are a few different ways to install a motor  that insures it will stay put. Here you see the M33 lock nut being tightened by a Bafang spanner. It has been our experience this method is not sufficient. 

Securing a motor 2

Securing a motor 1

Securing a motor 1

image6

Here we have drilled and set a Rivnut in the bottom of the downtube in anticipation of using a motor brace to hold the motor in place. This brace should be used all all steel frames, and motors over 750 watts. 

Securing a motor 3

Securing a motor 1

Securing a motor 3

image7

This is a motor brace. It was invented by Doug Snider at California Ebike. Other companies, sad to say, have copied this part and sell them under their own brand. However, Doug's motor brace is made of better material and is a better machined part (in my opinion).

Securing a motor 4

Securing the motor 5

Securing a motor 3

image8

This is another tool invented by Doug Snyder at Californa EBike. It is a socket designed to fit the M33 nut. We attach the socket  with a device that threads into the spindle to hold the socket in place. Greater locking force can be applied using this method.


Please be careful if you use a cheater bar with this method. If the bar slips serious injury may occur.

Securing the motor 5

Securing the motor 5

Securing the motor 5

image9

We use none of the above methods. While they are all good methods we needed a method that we could warranty the motor for the life of the bike. We solved the problem of a motor working itself loose by using a method that is proprietary, for the time being. It is not rocket science but it is a method that has been worked out over long hours in the machine shop and considerable expense. As far as I know, we are the only builder that can say "Our motors will stay in place without moving for the life of the bike." We back that up with our warranty.

Securing the motor 6

Securing the motor 5

Securing the motor 5

image10

A bike came in the other day from another builder and the owner said the motor was loose. I looked at it and saw no visible means of having been secured. It was a 1000 watt motor on a steel frame.   I had a hunch how the builder thought he could install such a powerful motor without any attempt to secure it. I checked the programming in the controller and sure enough...instead of 30 amps the motor had been set at 15amps, effectively reducing the output of the motor by 50%. It still came loose.

Securing a battery wrong method

Securing a battery wrong method - 2

Securing a battery wrong method - 2

image11

This not how to secure a battery to a downtube. This builder drove machine screws into the downtube thinking it could hold a 10 pound battery in place. This bike was brought to us for repairs and the owner was very disappointed that someone had sold them a conversion bike that was not only poorly made but also very dangerous.

Securing a battery wrong method - 2

Securing a battery wrong method - 2

Securing a battery wrong method - 2

image12

Here is a picture of the downtube after we removed the battery base plate. There were more holes in the bottom of the downtube. 

A downtube battery is designed to attach to the water bottle inserts. Sometimes the inserts will not line up with the baseplate. In that case you drill a small hole and use Rivnuts. A Rivnut is the same thing as a water bottle insert.

Rivnut installation

Securing a battery wrong method - 2

Battery base place connection

image13

Here is a Rivnut we have set in the bottom of the downtube in anticipation of using a motor brace. Rivnuts are used in aviation, marine, auto, and other industries. Rivnut installation requires experience, the proper installation tools, and patience. 

Battery base place connection

Battery base place connection

Battery base place connection

image14

It is difficult to make a flat, hard, base plate fit securely on a round hard downtube. For a long time we would build our own base plate of aluminum and mount the battery to the plate and the plate on the frame. But...we were always troubled with the idea of a hard flat surface being attached to a hard round surface. Then we began to experiment with a rubber interface.

Battery Base plate success

Battery base place connection

Battery Base plate success

image15

We now use a proprietary flexible, compression insert between the battery baseplate, and the frame allowing for an incredibly strong bond between the two. There are some bike toptubes that are narrow at the top and wide at the bottom. Without using the method we use, it would not be possible to securely attach a 8-9 pound battery.

Battery base plate screws

Battery base place connection

Battery Base plate success

image16

When attaching the battery base plate it must be absolutely horizontal to the downtube. If not, the battery will not slide onto the base plate.  It sounds easy but it can be very difficult to attain both a secure baseplate and a level baseplate. Each battery type has its own baseplate and some of them are simple to install and others are very difficult. 

Cassette Cleaning Before

Cassette Cleaning Before

Cassette Cleaning Before

image17

This cassette needs cleaning. All cassette on all bikes we convert are removed from the bike and cleaned in an ultrasonic tank. This is included in our builds. The reason for this is when we finish a conversion it has to shift correctly. Therefore, the complete drivetrain must be in top shape.

Cassette Cleaning After

Cassette Cleaning Before

Cassette Cleaning Before

image18

A dirty drive train is not the sign of neglect...it is the sign of use. When you buy a bike you should ride that bike and enjoy it as much as you can, In the process you will get parts dirty and greasy. The chain lubricant contaminates the entire drivetrain and this, in turn, attracts dust, dirt, and everything imaginable. Bike become dirty and worn through use...but that is what we bout them for in the first place.

Broken Sram Powerlink

Cassette Cleaning Before

Broken Sram Powerlink

image19

I have never seen a Sram Powerlink, KMC quick link, or other removable link break. Notice...the pin fell out. This is an 11 speed chain and the link was not strong enough to support the power of a rider who is approximately 200 pounds.  There are many professional mechanics who believed the 9 speed cassette should be the maximum allowed on any bike and anything above 9 speeds causes the chain to be too thin and the cassette cogs to close together. This type of failure should never happen. Were we not able to discover this the owner of the bike would have snapped the chain on his next ride. Broken chains are more than a nuisance...they can be dangerous.

Bad rim tape

Dangerous wiring of battery

Broken Sram Powerlink

image20

This rim tape has to be replaced. Any time the spoke holes are exposed the rim tape has to be replaced. Failure to do so will result in a blow out. The weight of the rider while hitting a bump will compress the tube into the spoke hole and...blowout. A blowout at any speed can cause injury.  

Bad wiring of Bafang motor

Dangerous wiring of battery

Dangerous wiring of battery

image21

This bike was brought to our shop for repair. Motor was loose and this is what the wiring looked like. It gets a zero for esthetics and a zero minus for functionality. We cut the cables, added Anderson Powerpole connectors, and shrink wrapped them for moister protection.

Dangerous wiring of battery

Dangerous wiring of battery

Dangerous wiring of battery

image22

This battery was sold to a buyer who was told it was a $900 battery. One look and we know it was a home built battery being passed off as a legitimate battery. The wire in this picture has been twisted together then taped with electric tape. This battery is VERY, VERY, dangerous.

Please read my blog on "Who Built Your Electric Bike Battery."

Rim tape fail

Bottom bracket removal

The crooked stem

image23

This is another example of rim tape that needs to replaces as soon as possible. The tube will be forced into this hole at some point and the result will be a sudden blowout.  

The crooked stem

Bottom bracket removal

The crooked stem

image24

This is very common problem and one that we cannot ignore. Every bike we build that has a crooked stem will require removing the tire and tube to correct this problem. When the stem sits at an angle eventually a hole will wear in the stem and the result is a flat tire.

Bottom bracket removal

Bottom bracket removal

Self extracting crank arms

image25

We never attempt to remove a bottom bracket unless we can somehow make a device that will hold the socket firmly against the slotted interface. We have tools for this but sometimes we have to improvise. Sometimes it is best to leave the bottom bracket removal to your local bike shop. 

Self extracting crank arms

Remember the order of the spacers

Self extracting crank arms

image26

No special tool needed. Unless it is stuck...which it is about 70% of the time. Then your special tool might include a high powered cutting tool. 

Thread cleaner for crank arm

Remember the order of the spacers

Remember the order of the spacers

image27

This small "thread chaser" can save your hours of work. If you strip the threads in a crank arm (easily done) then you have to cut it free. This little tool cleans the threads before you begin to remove the crank arm. 

Remember the order of the spacers

Remember the order of the spacers

Remember the order of the spacers

image28

IMPORTANT: When dissembling a cogset make sure you make note where each spacer comes from and in what order. The spacers in some cassettes are of different thickness. Also, remember to check to see if there is a spacer behind the cassette.

Remember the spacers part 2

Is this BB5 disc caliper good?

Is this BB5 disc caliper good?

image29

These are spacers behind the cassette.Sometimes they are very thin (1-2mm) and can fall off unnoticed. Always check for spacers. If even one is lost the cassette will not go on properly.

Is this BB5 disc caliper good?

Is this BB5 disc caliper good?

Is this BB5 disc caliper good?

image30

I wanted to replace this Avid BB5 disc brake caliper for a client....looks bad but works perfect. Sometimes it is best to follow the old saying, :If it ain't broke don't fix it."

Broken tension spring

Is this BB5 disc caliper good?

Broken tooth on cassette

image31

This is the tension spring from a linear rim brake. Isabella was centering the brake when we heard a "twang." It does not happen often but these springs weaken with age. We replaced both front and rear brakes.

Broken tooth on cassette

Broken tooth on cassette

Broken tooth on cassette

image32

This is why we dissemble and clean everything. This bike never would have shifted correctly. 

Worst chain ever

Broken tooth on cassette

cable housing blow up

image33

Wow....we all got a good laugh at how worn out this chain was. It testifies how strong a 7 speed chain is. A 10 or 11 speed chain never would have lasted as long.

cable housing blow up

Broken tooth on cassette

cable housing blow up

image34

What the...the cable housing self destructed. I have only seen this once before. What staging for a race the guy next to me shifted and the cable blew right through the housing. Official saw it and pulled him from the start on the basis of a poorly maintained and unsafe bike.

Hydraulic line crushed

Hydraulic line crushed

Hydraulic line crushed

image35

When mounting a motor into the bottom bracket shell make sure that hydraulic line is not being pinched. If the motor moves it can crush the line causing the brakes to fail. Often, we will reroute the hydraulic line to insure it will never be impinged by the motor.

Is the tool crooked?

Hydraulic line crushed

Hydraulic line crushed

image36

No...it is correctly threaded into the crankarm. You have to be very careful you get the tool properly aligned as the crankarm is easily stripped. 

Missing stem adaptor

Hydraulic line crushed

Do not over crimp cables!

image37

No...not good. This is a presta tube being used in a schrader wheel. They make a small adaptor that can be used to allow a presta tube to fit a schrader rim. If you do not use the adaptor you will have a blowout when the tube is forced into that opening. 

Do not over crimp cables!

Do not over crimp cables!

Do not over crimp cables!

image38

When using Zip ties to secure cables do not over-tighten. There are very small wires inside the cable that can be damaged by crimping the cable to tight. Tighten just enough to hold them in place.

Bad rim tape

Do not over crimp cables!

Bad rim tape

image39

Very, very, bad rim tape. This is why we inspect every wheel on every bike before converting to an electric bike. The rim tape is used to cover the holes in the rim. If the holes are not covered the tube will be forced into the hole and a sudden blowout will be the result.

No rim tape

Do not over crimp cables!

Bad rim tape

image40

This is what a rim looks like with no rim take. The spoke nipples have to covered with rim tape to protect the tube. The constant rubbing of the tube on these spoke nubs will eventually cause a flat. 

Solar powered bike

Rusted cable housing

Solar powered bike

image41

One of our clients uses solar power to keep his batteries charged. Very clever young man.

Rust, rust, rust

Rusted cable housing

Solar powered bike

image42

Looks bad...but it came out like new when we finished. This bike drew a lot of attention when we took on the build. The rust was easy to remove and there was no damage to the frame. It made for a great conversion to an electric bike.

Rusted cable housing

Rusted cable housing

More rusty cable housing

image43

All cable housing that shows any age, kinks, rust, or any other contaminates has to be replaced. It does little good to put new cables in bad housing and expect shifting to improve.

More rusty cable housing

More rusty cable housing

More rusty cable housing

image44

It can show up anywhere is the cable housing. Yikes! 

Replace the brake pad

More rusty cable housing

Replace the brake pad

image45

Brake pads with this much wear will come into contact with the caliper. Replace as soon as possible.

Burnt up hub motor

More rusty cable housing

Replace the brake pad

image46

The wires should be gold colored...not black. This is not one of our motors as we do not build anything with a hub motor.