Adrian's Bafang BPM Hardtail MTB

adrian_sm

1 MW
Joined
Feb 22, 2009
Messages
2,429
Location
Melbourne, Australia
Post Index:
_________________________________

Here is a quick all purpose bike I am putting together.

Reason for build:
I wanted an all weather go anywhere type bike. I currently ride a friction drive road bike most of the time. This is great for commuting style riding on the roads and in fair weather, but not ideal for wet weather or off road. Previously I did have a high powered/high speed full suspensions direct drive hub motor bike, but it was a pig to pedal when the juice ran out. So ....... since I only want 40-45 kph cruise speeds I am happy to loss the rear suspension. I want to be able to take it off-road, handle any weather, and still pedal well so the geared hub was the answer for me. Settling on the Bafang BPM based on the positive experience of fellow Melbournite's full-throttle and Kepler.

Ingredients:
- Hardtail Mountain Bike
- Avid BB7 disc brakes
- Bafang BPM Code 12 (supplied by Ben Moore a local suplier in Melbourne)
- EB306 - 6 fet sensorless Xie Chang/E-crazyman/Infineon controller with IRFB3006 fets [EDIT: Corrected fet type]
- LiPo 15s using 5s5Ah 20C Turnigy packs
- Left Hand half-twist throttle - to free up right hand for front brake and rear derailleur duties

Final Product:
~ 21kg
~ 30km range
~ 40kph cruise speed
~ 1500w

DSC_5207.JPG

DSC_5283.JPG
DSC_5251.JPG
 
First step was to build the wheel, from a bare motor, rim and spokes supplied by Ben Moore a local in Melbourne.

This was the first time I have built a wheel, so I just methodically followed Sheldon Brown's excellent wheel building instructions. With the only difference being placing all the spokes on the freewheel side of the flanges to help centre the wheel.

I just used the bike upsidedown as a truing stand, blue tacking a couple of nails on the chain stays to check for wobble.

It wasn't hard, but it was time consuming. If you value money more than time give it a go.

Here are a couple of pics.

Weights:
Wheel being replaced = 1.7 kg
Bafang BPM (Motor only) = 4.0 kg
Bafang BPM (Fuly laced) = 5.4 kg
Weight added to bike = 3.7 kg
View attachment 4fr_1040_size640.jpgfr_1052_size640.jpgfr_1053_size640.jpgfr_1054_size640.jpg
 
This time I was keen to have disc brakes front and back, but my Avid BB7s didn’t quite fit, with the rear adjustment knob not having enough clearance to the motor. Removing the red adjustment knob gave the required clearance, but also removed the detent for the inner brake pad adjustment. So now I just add a drop of loctite to the thread when I adjust the pads. No big deal.

DSC_5212.JPGDSC_5213.JPGDSC_5245.JPG
 
I wanted the cockpit to be clean and simple so:
- No Cycle Analyst
- Left hand throttle so right hand can concentrate on front brake and rear derailleur
- Trim the quick trigger front shifter down shift arm, to clear the throttle body
- Clamp on grips, trimmed on left hand side to suit half twist throttle

I modified the controllers phase wires to be just the right length, so I don’t have any excess, and used 4mm bullets, with overlapping shrink wrap to avoid water ingress. A couple of reusable cable ties secured them to the seat stay making sure there is a drip loop at the motor entry.

Controller was mounted at the top of the seat stays, using the mud guard screw mount, and a cable tie. Throttle cable was secured in two points on the top tube.
View attachment 5DSC_5230.JPGDSC_5231.JPG

The phase wires and battery wires also exit the bottom. They are strain relieved, and routed to the right to avoid the tire using another couple of cable tie.

DSC_5283.JPGDSC_5281.JPG

Here is a photo of the three phase wire connections, and the overlapping heat shrink trick I used to stop water ingress, or potential shorts between phases.
DSC_5241.JPG

Finaly the all important drip loop, so any water running down the phase wires, drips away, rather than running into the motor. I also make sure I use a reusable cable tie down here to hold the motor phase wires to the seat stays, as when I remove the rear wheel I need to undo this cable tie.
DSC_5221.JPG

Finally the handlebars. I prefer a left hand half twist throttle. Left hand throttles leave the right hand free for the more important front brake, and the rear derailleur duties. Half twist I prefer as I find it easier to maintain partial throttle.

I chopped a clamp on handle bar grip for the left which matches the right side. This nicely smooths the grip diameter up to the throttle.
I also cut down the down shift lever for the front derailleur so that it clears the throttle.
DSC_5201.JPGDSC_5232.JPG
 
Most of my rides are short <20km so I’l make pack to suit, then have a second battery I can swap in if needed. This keeps the bike light most of the time, and simplifies the battery. I already have a bunch of LiPo laying around, the controller is currently only good for ~60V with 63V caps and IRF3006 fets.

A simple series connection of three 5s5Ah LiPo packs gives me ~300wh in a 15s5Ah pack that easily fits in a saddle bag, making for easy mounting, off bike charging, and easy swapping if necessary. Later if I decide to make a more permanent bigger pack, I’ll double up in parallel and mount it to the down tube.

This is what it looks like.

DSC_5249.JPGView attachment 1DSC_5256.JPG

As you can see the series connection of the three pack just uses the existing connectors, then I have an adapter the coneverts to Anderson PP45 connects that I like to use for the main connection to the controller.

For charging I’ll bulk charge most of the time, as these packs have always stayed pretty balanced.
The bulk charger will be a 240w BMSBattery charger.
alloy-shell-240w-lifepo4li-ionlead-acid-battery-ebike-charger.jpg


For balancing I have just order one of these little guys, which automatically correct any imbalance greater than 0.02V. Then plan is to occassionally throw these on the balance leads of each pack once charged to check and correct any imbalance.
26136-main.jpg


Low voltage control will be handled at a pack level by the controller.
 
I have previously used the 6 fet controllers and loved them, pushing 30Amps at 80v into a direct drive hub. The three speed switch was really useful for taming the bike when you give the bike to newbies, or when you just want to take it easy, but I hated how it not only restricted the power but also the top speed.

What I want is to only restrict the power, but not the speed. Unfortunately the controller doesn’t do this. But having a look at the schematic for the current sensing circuit there is an op amp with negative feedback circuit. By tweaking the resistors R46/R40 in the feedback circuit I should be able to change the gain, and therefore change the current limit. Idea is to put a three speed switch on the handlebars that can optionally switch in two different resistors in parallel to R46, giving two lower current limits selectable on the fly.

EB306 - Current Sense Circuit.JPG

Here are the settings I have on the controller for now. These will be tweaked over time.
EB306 - Bafang BPM v1.PNG
 
Nice work, time to update your sig. :wink:
 
Now that winter has hit Australia, I'll need some serious lights. Little rear blinky lights don’t take much power, but the headlights tend to suck juice. I hate having to recharge a separate pack just for the lights, so I want them powered off the main pack.

I currently have one of these lights, ~800 lumen from 2S battery. Amazing value at US$35.
sku_202663_1.jpg


The light is happy running from down near 5v up to 8.4V posibly more. My first option to drive them is...
I have a Hitron HDM30-48D-T060312(E) DC-DC that inputs 18-72V DC, and outputs 12V@1A, 6V@3, 3.3V@0.5A. This is enough to push two front lights, and rear red blinky, but it is quite bulky @ 65x65x10mm. I start off using this.

The alternative would be to see if the charger that comes with the light will output 8.4V@1Amp when run directly off the ~60V 15s LiPo pack. I have done this before on a slightly higher voltage pack, using the SMPS to convert DC to DC. I lost my old one, so I have order a new light & charger to ty it out.
 
...I hated how it not only restricted the power but also the top speed...What I want is to only restrict the power, but not the speed...

I hadn't realized this was the way it worked, since I had planned to get a 3-speed switch but I haven't used one yet. Thanks for posting this! Were you using the Lyen 6-FET Xie-Chang based controller?
 
Yes that type of controller.

They basically remap the max throttle to a lower value. So if the switch is set to 50%, full throttle is now 50% throttle. So the maximum PWM is 50 %, effectively giving you half the power and half the speed.
 
Nicely done! Took you a while to finally get the BPM, a couple of years? :lol:

30km out of a 5Ah pack is very good. I must be more throttle happy. How wide are the tyres, 40mm?
 
:lol: Yeah finally got around to getting the BPM. Got the amps on full at the moment, but will likely tame it down to help get rid of my holiday gut. Did you see my theory on making an adjustable current limit? Any glaring faults in my approach?

The Michelin City tires are pretty crappy, with the rear being out of round a fair way. Making my beautifully trued wheel, look like a POS. They were cheap, claim to be puncture resistant, and I like the reflective strip on the side wall for being seen at night, but will probably change them if I can't get rid of the hop.

Oh, and you need your eyes checked, the rear is 49mm wide, not 50mm. Geeze. :lol:
 
adrian_sm said:
Got the amps on full at the moment

Did you see my theory on making an adjustable current limit? Any glaring faults in my approach?
I'm happy with 16A limit. 8)

The simplest way of adjusting the limit is to cut the trace from the shunt to the controller and solder a pot across the shunt with the wiper going to the controller. You might want to limit the range by inserting a fixed res on the ground leg of the pot. The pot has to be as close to the shunt as possible - side panel of the controller case would do. And any weather proofing would make it more reliable.

Opams introduce delays, so got to be careful there.
 
adrian_sm said:
-Bafang BPM Code 12
- EB306 - 6 fet sensorless Xie Chang/E-crazyman/Infineon controller with IRFB3077 fets
Nice build!

Where did you source your code 12 BPM? I ordered a 36V BPM from greenbikekit and got a code 10 which is faster than I wanted. Code 11 or 12 would have been better.

Also, did you change the FETs, or did it come that way? I'd like something similar, did it come from Keywin?
 
I bought the Code 12 off of a local forum member BenMoore.

As for the controllers I bought three bare controllers from Keywin, installed my own FETs, and soldered in the wires. The FETs I just bought from Digikey. Actually they are IRFB3006 fets, I'll have to correct that above. These were some of the lowest RDSon fets I could find, but have slightly higher total gate charge than others, so not sure if they are the best option. If I was planning to go faster, I would swap in higher voltage caps and fets.
 
Here are the notes I jotted down when searching the forum on how to do an adjustable current limit mod.

http://www.endless-sphere.com/forums/viewtopic.php?f=2&t=37068&start=30#p646517
• reducing the value of R45 will reduce the battery current limit
• harder pull up will reduce the current limit

http://www.endless-sphere.com/forums/viewtopic.php?f=2&t=44277&start=15#p645302
• Jeremy Harris KU90 mod, pull down on current sense MCU pin causes an increase in current limit

http://www.endless-sphere.com/forums/viewtopic.php?f=2&t=31643#p494749
• Big Moose voltage divider across the shunt, will increase current limit
 
Nice solid and practical build Adrian. A geared hub motor is hard to beat for this type of application. Not a bad move going senseless too with less to go wrong. How is it off the mark? I see you are using Michelin City tires. They are a tough tire and great for puncture protection. Being so thick, they make a great friction drive tire just a bit on the heavy side at about 900g each.
 
I have been riding pedal first friction drives exclusively for so long now, anything off the line feels weird, so hard to compare.

What phase amps did you settle down on for your BPM? I think I remember reading 35 Battery Amps killed it, 25 Battery Amps was okay, @ 20s.
 
On the Fighter i am running 40A 18s these days with about 2:1 on phase current to calm down the throttle response a bit. The code 12 seems to handle this fine and rarely hits the CA thermal limiter. The code 10 BPM died on about 30A 18s but only because I rode it like an idiot :lol:
 
No fancy thermal roll backs for me, so I'll keep it a bit more modest.

I think you were trying the oil bath to help keep things cool. Did you end up keeping the oil, or decide against it?
 
I had so much trouble stopping oil leaks, I decided it wasn't worth the effort. I may have used too much oil though. I was using 150ml. It has been suggested that 80ml is all you should use. Maybe that would be OK
 
Just found your thread Adrian. Diggin' the build.

I think Melb has gone full circle - we're all going geared again :mrgreen:
I blame Kepler and his persistence :D That fighter speaks volumes.

My Code 10 is starting to complain a bit I think - time for a code 12 I suspect.

It'd be nice for a ride soon but at least we all get winter to build something new and catch up when the sun comes back later in the year...
 
Cheers Sam. I built it mainly as a comparison for my friction drives. A geared hub is the obvious alternative that people consider, but I have never really had one to bash around on. I was surprised how heavy the bike ended up being at 21kg. My road bike friction drive with a bigger battery is about 13kg. Guess it just shows how old, shitty and heavy my MTB is. :lol:

Yeah keen for a ride, but not loving this weather. I just got back from 3 weeks in Europe, with the bulk of it being on a yacht island hopping in Croatia, so finding it hard to adjust back to dreary Melbourne drizzle. Ah bugger, I just shattered the endless blue sky myth for our International friends...
 
Back
Top