I Void Warranties : Hacking The Bafang Ultra Max Mid-Drive Ebike Drive

There is half a dozen low power torque sensing mid drives on the market right now that advertise themselves as being between 250 and 750 Watts. The one thing that all these ‘low power’ drive units have in common is that there is absolutely no way to program the drive unit to do anything much other than what it is set to do from the factory. The most frustrating part is that often they have built-in speed limiters that you have to install special defeat-devices to overcome. Many of these defeat devices plug-in between the speedo and the main drive unit and halve the speed that the drive unit thinks you are going at (so when you are going 20mph the drive thinks it is only 10mph). With the 1000W nominal Bafang Ultra Max drive unit all that has changed. Bafang has released a new beefy drive unit that can run at a variety of voltages with no speed limits and that programs using a similar cable and software as the BBS02 and BBSHD. This article is about understanding the programming for the Ultra Max and understanding how to change your programming to get the most fun factor out of your drive unit.

The Bafang Ultra Max is the only Torque sensing mid-drive that I know of that is user-programmable

I tested a prototype 1000W Ultra Max about 8 months ago and found it a little too heavy and a little underpowered for my taste. That drive unit was several pounds heavier than the BBSHD and yet it still only seemed to produce about the same amount of peak power as a BBS02 (about 1400W). Although I liked the concept of a high power torque sensing mid-drive, I wasn’t crazy about the implementation. It felt too much like the BBS02 which is half the cost and half the weight of the stock 1000W Ultra Max.

When Luna got their first batch of production Ultra Max drives the first thing they did was hack the controller to put out 2500W of peak power. This turns the ho-hum 1000W  Ultra Max into a real 40mph drive unit to be reckoned with.

The Ultra Max comes with everything you need to get rolling except a custom bike frame

To program the Ultra Max you simply need the same programming cable as you would use for the BBSxx series drive. Before you keep reading this article, you should reference this article on programming the BBSxx as there is lots of information on the cable and the quirks of the programming software. In order to program the Ultra Max, you will need the latest version of the Bafang programming software which you can download here. Thanks to Roshan from Biktrix for sending me these files. Biktrix is a Bafang mid drive focused dealer out of Canada that is selling an Ultra Max with their Juggernaut Ultra FS sold here for $3599. Biktrix has a very good reputation and the Ultra FS is sold with three different tire sizes and several fork options as well as numerous custom battery options 11.6Ah, 17AH & 20Ah that snap right into the frame. Programming your Ultra Max voids whatever warranty you think you might have on this drive. Do it at your own risk and don’t come crying to me when you break it (this is why we can’t have nice things).

I spent about 4 hours messing with the torque sensing variables on the Ultra Max drive as Lunacycle was having trouble with the drive unit producing way too much power from a standstill at the higher power levels. The settings I am showing in this article I’m going to call ‘Karl’s special sauce’ for the Ultra Max. It’s been trail tested and approved, even at the highest power levels with a 2500W peak Ludicrous controller. You can certainly program it differently so that it will put out a lot more power from a standstill, but it will feel pretty lurchy and not smooth and refined like I think that a torque sensing mid drive should feel. The best part of programming the Ultra Max yourself is that you can fine-tune the torque sensing system to get exactly what you want out of it.

The standard $20 programming cable is all you need to customize your Ultra Max programming

This article is going to just breeze over the first 3 pages of the programming menu as most of the variables have the same effect as the BBSxx programming and are already outlined in this article. The only thing to pay attention to is on the first page the Limited Current(A) should be set to 30 amps if you have a Non-Ludicrous 1000W Ultra Max to get maximum power. With the Ludicrous controller the amps are doubled and it ships from the factory with Limited Current(A) set to 25 amps which really delivers about 50 amps to the drive. If you want to set the Ultra Max to 60Amps you can set the Limited Current(A) to 30, but you void your non-existent warranty with the Ludicrous controller and all bets are off (the drive is already pretty scary at 50Amps). If you like living on the edge then don’t let me stop you, but I tested this drive extensively at 50Amps and I can say that it is plenty powerful at that power level.

In order to access the program with the torque setting, you need to run the executable Controllerst_torque.exe inside the zip file. If you want to download Karl’s special sauce instead of entering in all the data manually then you can download this file and rename it from .doc to .el and then select FILE->LOAD from the Controllerst_torque.exe and then browse to find the .el file.

The first page of Karls special sauce, At 25Amps the drive unit really means that it’s running at 50 amps (the power setting is halved on the Ludicrous controller)

Pedal Assist Screen

On page 2 you will need to select the Pedal Type as “BB-Sensor-32” for the PAS to work properly. If you want more explanation on what these settings do, then you can check out the hacking guide which outlines each setting individually. I spent a lot of time messing with these settings and as near as I can tell the Ultra Max seems to ignore most of the settings on the Pedal Assist screen.

The sensor on the PAS page should be set to BB-Sensor-32

Throttle Handle Screen

This screen is the same as with the BBSxx drives

The throttle screen seems very similar to the settings for the other Bafang mid drive units. To check what the settings do then check out this document. I didn’t spend much time messing with this screen’s settings. One of the issues with the Ultra Max is that if the speedo magnet stops working then the drive AND the throttle both stop working. This means that if you are miles from home you’re going to be stuck with cycling the power on your ebike so you can get 1 minute of riding then continually cycling your drive unit every minute the entire way home. I messed with some of the settings to keep this from happening, but I could not fix the problem. Luckily the Ultra Max has a much more powerful magnet that can be several centimeters away from the sensor instead of just a few millimeters. Incidentally, the prototype version of the Ultra Max did not have this problem and continued to function even with a non-functional speedo, go figure.

The Torque Screen

The page you have all been waiting for, this screen has all the new goodies on it. So many numbers, what do I change first?

Keep in mind I am by no means an expert in Bafang Ultra Max programming, I’m just some guy who got my hands on the tools and spent a couple hours messing around to see what happens when you change variables. Before I get into this a note on safety.


The Bafang Ultra Max is an extremely high power torque sensing drive unit which means that if you mess with the programming wrong and then put even the slightest amount of pressure on the pedals then you can suddenly get a 4hp motor with a chain that will chew through your fingers like a hot knife through play-dough. I say this in all seriousness, as I have seen at least 5 gruesome pictures on facebook of fingers that have been mostly chewed off and then sewn back on from people not being careful enough with their high power mid-drives. Treat your ebike like it’s a chainsaw and you’ll probably be OK (assuming you aren’t a chainsaw juggler). Normally I’m a funny guy, but I’m not being funny about this, your fingers belong on your hand, not stuck in between your chain and your chainring. *ouch* Remember, safety fourth.

Before you start messing with the settings you should click on the CONTINUOUS GET button on the bottom left and then push down on the pedal. It’s interesting to see what the TqVoltate(Mv) shows depending on how hard you push. As near as I can tell the torque sensor on the Ultra Max is pretty accurate and seems to sample at a pretty high rate (although not as high as the Bosch mid drive system which samples several thousand times a minute). What the software does is takes this mV (millivolt) input and maps it to kilograms and then the rest of the settings use the kg variable NOT the mV input. The mapping of mV ranges to kg is what happens on the top 1/3 of this page.

Base Voltage: I don’t know what this does, I would leave it alone

Error Voltage Min \ Max: I suspect that these numbers are what will throw an error code if the torque sensor for whatever reason falls below or above these numbers. You can see when using the CONTINUOUS GET button at the bottom that the range of numbers from the torque sensor stays between these numbers. I would not change them.

Delta Voltage: I messed around a bit with these numbers and they are a way to change the sensitivity of the torque sensing unit along ALL the speed ranges of the motor. I believe the way it works is that the program splits up the incoming voltage so that is it changes by a certain amount then it assumes that there is that amount of pressure on the pedal. By lowering these numbers you make the torque sensor more sensitive and responsive to foot pressure, by raising them you make it less sensitive to pressure (so you have to push harder to get the same results).

0 Speed Boost time: Unknown, I wouldn’t mess with it.

SPD0-SPD100: These columns represent the % of the highest RPM ability of the motor that it is currently spinning. Do not think that it has ANYTHING to do with the speed that the wheel is turning because it just doesn’t.

According to Bafang’s website, the Ultra Max spins at 150RPM (with torque only, no throttle) max at 52v

The Ultra Max spins at different speeds based on what voltage you’re driving it at. I tested the drive at 52v but according to Bafang’s website, it will work between 48v and 60v nominal (I have not tested it with a 60v nominal pack). There are two different RPMs listed on the website n0 RPM which I assume is the max RPM using throttle only and nT RPM which I assume is the max RPM using the torque sensing only (no throttle). Since the optimal pedal cadence is around 90 RPM for human beings, these numbers make sense. The pedals and the chain wheel on the Ultra Max are ‘locked’ and spin at the same speed. This is unlike other lower powered mid drives like the Bosch & Yamaha where you can have a slow pedal cadence and the tiny chainring can spin very fast.

To program ‘Karl’s Special Sauce’ the ONLY numbers I modified from factory settings were MinCur%, MaxCur% and KeepCur% in the Spd0% and Spd20% columns. The changes I made corrected some very lurchy startup behavior with the 2500W peak Ludicrous controller (the stock Bafang controller is only 1000W nominal and 1500W peak). At the factory, the MaxCur% was set to 100 across the board and the MinCur% and KeepCur% for the first two-speed settings were much higher. Although these settings are probably fine with the stock 1000W Ultra Max, they were set way too high for the Ludicrous controller. This is what I suspect these settings do based on several hours of testing.

The Juggernaut Ultra FS is the latest in the lineup of Juggernaut ebikes from the Canadian company Biktrix

Start(Kg) : When this amount of pressure is on the pedal the power will start to flow in and you will get the MinCur% amount of power (based on the Limit Current% variable from the first page based on your current power level) to the drive unit which will steadily be increased based on the amount of pressure until it hits Full(Kg) as shown below.

Full(Kg) : When this amount of pressure is on the pedal you will get the MaxCur% of total power based on the speed that the crank is rotating.

Return(Kg) : No idea, but my guess is once the bike is moving and you stop pedaling it takes far less pedal pressure to get it moving again. It certainly feels that way. This variable could be a replacement for the Start(Kg) when pedaling is briefly interrupted and then restarted again.

MinCur(%) : This number must be less than MaxCur(%). This is a percentage of the Limit Current% from page one based on the current power level setting on the PAS display that will be applied when the Start(Kg) pressure is applied to the bike based on the speed that the crank is currently turning (Spd0-100). I lowered the numbers from the stock Bafang programming on this variable in both the Spd0 and Spd20 column.

MaxCur(%) : This is a percentage of Limit Current% from page one based on the current power level setting on the PAS display that will be applied when Full(Kg) pressure is applied to the bike based on the speed that the crank is currently turning (Spd0-100). This is the number I changed most drastically from factory settings. I changed the setting from the Spd0 column from 100 down to 6 which greatly reduced the jerkiness of start in the highest power levels. This variable is very finicky if I set it higher than 6 it was noticeably worse (even at 7 and 8) and if I set it lower than 6 it didn’t start out as powerfully as I thought it should. I set the MaxCur% in the Spd20 column down to 50 (from 100) because once you started moving there was a noticeable bump in power at about 3-4mph instead of a smooth transition like I thought there should be.

KeepCur(%) : This number must be equal or less than MinCur or the software throws an error. I suspect that this is the amount of power that the drive unit will put out if you clown pedal along (turn the pedals without pushing at all on them). I lowered this slightly in the Spd0 and Spd20 columns from the factory defaults but only because it threw an error when I dropped the MinCur% below this variable.

CurDecy : I didn’t mess with this setting but it is probably Current Decay which is how fast the power drops off as you start pedaling faster and the crank spins faster.

StarDegree : I messed with this variable pretty extensively and I could not find that it really changed anything.

About Tq : This box allows you to get the settings from the torque sensor one time using the Get button or use the Continuous Get to keep a constant sampling. This is a good way to get an idea of what kind of power the Torque sensor is putting out at different pressure levels. It works best if the ebike is on the ground or if it is on the stand then you should secure the back wheel so it doesn’t turn when you push on the pedal. You need the back pressure in order for the torques sensor to properly register voltage.


Stock Torque

These are the ‘stock’ Bafang settings and you should use settings similar to this if you have a non-Ludicrous controller. Your settings might be slightly different from the factory.

The Ultra Max drive unit with the Ludicrous controller is simply put one of the most amazing drive units ever built. When you start pedaling it you feel like Superman and as you go faster and faster the power just keeps coming till you hit about 40mph. Going over 40 mph on a bicycle is pretty terrifying, but this is the first and only torque sensing mid-drive on the market right now that will put out this kind of power that I know of. It sucks that you have to build a custom frame for it or buy an expensive custom frame for it like the Apex, but such is the price of this kind of awesomeness. If it was easy then everyone would be doing it, right?

This custom mounting plate can be welded to any aluminum bike frame

Although Lunacycle guards their 2500W BBSHD Ludicrous controllers pretty closely (gotta buy a whole damn bike), they have decided to offer the Ultra Max Ludicrous controller and drive unit to the public and it is available right now here for $750 + $250 for the Ludicrous upgrade. You can also get the aluminum mounting bracket for $40 which you can weld to any aluminum bicycle frame like I did with my old Sniper frame. It will be a little extra work, but I can assure you that the results are worth it. The pride of ownership of something that you built and programmed yourself is something that you will never get with anything you just purchase outright.

Do the work, make something awesome.

Ride On.

If you want more power than the stock 1500W Ultra Max, the only factory-built bike currently available is the Lunacycle Apex with the 50amp 2500W peak ludicrous controller although the 3″ tired Apollo is coming soon



45 thoughts on “I Void Warranties : Hacking The Bafang Ultra Max Mid-Drive Ebike Drive

    • The Pinion is really interesting and something I might buy-into but much like a Rohloff hub that I also would like to have and while I’m at-it belt drives, where can you get it serviced in your country?
      For 2020 I went with a Bafang Ultra and a tol KMS ebike chain, worst-case scenario I can just buy another motor and slap it in while I easily fix or upgrade the old one…


  1. Karl, the product description for the Luna Ultra Max mid drive kit says “…utilizing larger and more robust components, including it’s motor core”. Does this mean that the steel gear comes with it by default?


  2. Thanks for the article, finally some of the parameters makes sense to me. If i am correct, the special sauce file is to both standard and Ludicrous version, besides the 30 amp current? Pretty much same settings as i have but nice to test new settings. Cheers!


    • No that is not correct. I added an image of the default Torque settings for the Ultra Max without the Ludicrous controller. The settings are quite different than Karl’s Special Sauce. With the lower power controller, you don’t need to neuter it as much from a standstill.


  3. Pingback: Choppy Shloppy : Build Your Own Ultra Max Specific Frame And Get Riding Already | ElectricBike-Blog.com

  4. Pingback: Rebel Scum II : 2500W Ultra Max Ludicrous DIY Torque Sensing Full Susp 10sp Ebike ~$2805 w/out Battery | ElectricBike-Blog.com

  5. Could you please provide the source code files for the Software with Torque tab? The files contained inside your folder are the same of the old Software, without the Torque page in the source code.


      • I know that, what I wanted to point out is that the source code files present inside the folder are just for the normal Controllerst.exe, you can try compile those yourself and you will see there is no Torque tab… I was interested in having the source code files for the Controllerst_torque.exe to make my own program interface.


      • Hi Karl,
        I received Controllerst_torque software from the dealer for my bike but the port is blank when I open the program and I cannot access the controller. They tell me that this is the only software they have and I am wondering if there is anything I can do.
        Is it my computer that is the problem or is it a software issue?


  6. I just bought frey am 1000 ebike (with ultra motor) and I already have little bit higher settings:

    Basic settings: Low battery protect 41 and limited current (A) 30.
    Also basic throttle handle is set “Start voltage (x100mv): 15” and “End Voltage(x100V) 35

    Should I change this settings or keep this..? This bike came for me with this settings. I just opened that program and noticed this things…


  7. So i have reprogrammed this ultra max a lot and nothing works… The only thing I haven’t gotten into is the torque settings..I’ve changed a few things but not a lot…. so this is what it does, its hard pedaling uphill, I just end up going to a higher pedal assist to get moving and the once you get the rpms or cadence I don’t know which up to speed the motor suddenly kicks in!! its like make it hard when you are struggling but then give you a boost when you are not!! I really hate this motor…does anyone have any idea how to reverse this torque sensing motor so it does the opposite of what it does now before I throw the bike in the trash!! Plus my battery life sucks too, the bike weighs like 40 pounds its not my BBS02 on my hardtail that I loved…PLEASE HELP!!


  8. Hey Karl, great article. Im considering applying most of your tweaks to my MS2 All Terrain Ultra which is using the Bagang Ultra 510.1000 mid drive kit. A few comments/questions. One problem Im having with my Ultra is while pedaling on level 3-5 eco or sport mode on flat street roads power will start to degrade from 1400ish watts down to around 500-600 watts after only roughly 2 miles. I can feel the power drop off noticeably and also see it on the watt output monitor. If I coast or stop and wait…power will come back a bit and then fall off again. Also, the pedelec assist is quite dismal. Very much an on/off experience. No smooth variable application of power…and at times significant delays in applying any power assist why pedaling reasonably vigorously. The throttle is the same way…on/off. Frankly Im pretty disappointed and the MS2 folks dont seem to know what to do. So, I’ve been talking to Luna Cycle whereby he mentioned your article and potential to improve my situation through your tuning parameters. But, they also indicated the Ultra motor is still really a beta platform that they dont consider as strong or reliable as the BBSHD. Its clear the Bafang Ultra programming is subpar and maybe even the stock controller itself. MS2 talked to their Bafang rep who told them Bafang recently updated their heat and power mgt algorithms to reduce motor failures…which may be whats causing my issues. But all seems like guesswork. Do you think your tuning parameters can help? Just wondering if there are other firmware controls handling the heat and power mgt that can’t be adjusted…which Luna suggested might be an issue. Im starting to wonder if I need to ditch my current motor setup and go with the Luna Ultra Magnesium drive kit and maybe add the Ludicrous controller as well..although I just want a reliable 1500 watts. Thoughts?


  9. Hi Karl, that is a great article on the Ultra. I, like Matt (above) have the M2S Ultra Fat FS bike with the new Ultra motor. This motor behaves oddly and I was wondering if I could get your opinion on what you may think is wrong. When I am pedaling in PAS 1,2,3 or even 4 or 5, the motor seems to very quickly cut off and on. If I increase pedal pressure it stays on. I am on flat road at those times and if I go up in gearing to 4 or higher (the bike has 9 speeds) the motor stays on, probably because I have to pedal harder. Could that problem be eliminated with a torque adjustment. Also, would you consider the Ultra motor noisy. Any other comments or thoughts on this motor would be greatly appreciated. It does not seem to have great power going up hill either.
    Thank you,



  10. Pingback: Bafang Ultra Max, the new big dog on the porch | ELECTRICBIKE.COM

  11. Just got my Bafang Ultra 1000W bike, and I really like it. I only have one issue. In my country the maximum speed allowed is 25 km/h with pedal assist.
    Is it possible to make the Eco mode pedal assist only go up to 25km/h and the Sport mode work like it does (no limit)?

    Thank you for the great guide!


    • I swapped out that controller for an 850c… It is way better and allows you to adjust the PAS for levels 1-9..also in the setting set the min cur% to 3 in the torque settings


  12. Pingback: Everything I Own Is Now Obsolete : Christini AWD Fat-E Ultra Max 2XL Snowshoe Ebike | ElectricBike-Blog.com

  13. Hello Karl I have hills where i live pretty good size ones, what battery would you suggest to handle hills so i can climb as well as get range. My weight is 200 lbs 6ft1 tall. Voltage and Ah please. I do have the G620 ultra drive but its stock at the moment. Thank you


  14. I am a little confused. I bought the Bafang Ultra with no upgrades. Can I still use use the suggested programming in this article or do I have to actually upgrade the hardware as well (controller, motor, etc.)


  15. Hi Mike I didn’t upgrade a thing, I reprogrammed the software. Its responding very well. no issues climbing very steep hills. and i can reach 55 km on the flats. Really I cant see going any faster . I programmed 5 levels assist. Don’t worry about sport mode. Sport mode made no difference so i never go into it .


  16. Hello together, i bought an frey am1000 ebike with the ultra max. I like to drive very compfortable, so i dont need more then 250 watt and more then 80 Nm. For me its importend to have a silent motor. So what you
    think, is for me the nylon gear better, or is there no Difference in acoustic between nylon and metal gear ?


  17. Hello I have a stock Ultra bafang motor. I am trying to program this and the program shows levels zero through nine. But my display shows level 0 and then eco 1-5 and sport 1-5. When programming, which level is what? Thank you


  18. Hi there, Greaqt article,
    I have a question, recently bought a third m620 motor From CNEBikes (Huge Mistake! Terrible Customer service and they lie about warrenty and never take responsibilty for any mistakes they make) Huge Buyer Beware there. They mistakenly sent me a 48v version instead of a 52v version. they said it is impossible to convert it up to the 52v version on my end, I don’t get this as my first Ultra has no issues as was stock and worked on all my 52v battery packs, she claims it is why it is slow and sluggish making a huge whining sound because it is the wrong voltage. None of this makes any sense and never had these issues on my other two.
    Any thoughts or suggestions?


  19. Hi there, Great article,
    I have a question, recently bought a third m620 motor From Changzhou CNEBikes (Huge Mistake! Terrible Customer service and they lie about warrenty and never take responsibilty for any mistakes they make, Huge Buyer Beware there. They mistakenly sent me a 48v version instead of a 52v version, so they claim.) They said it is impossible to convert it up to the 52v version on my end and it’s my fault more or less. I don’t get this as my first Ultra has no issues as was stock and worked on all my 52v battery packs, she claims it is why it is slow and sluggish making a huge whining sound because it is the wrong voltage. None of this makes any sense and never had these issues on my other two.
    Any thoughts or suggestions?

    Do you believe these tweaks will improve the situation any?


    • I have not heard this. As far as I know the High voltage cutoff is still 60v on the Ultra which a 52v pack should be fine with.

      Never heard of more voltage producing less power. Sounds like hogwash. Most dealers 100% don’t want people running their ebikes with higher voltage batteries and generally that will void the ‘warranty’.


  20. Well, we’ve received our Frey ebike, & I can confirm that 
    the Base Voltage value should NOT be at zero! 

    Bafang ships these motor controllers with the torque sensing uncalibrated. 

    ​​​​​The minimum value, at zero pedal force, which these torque sensors can output, is around 732 milliVolts. 

    Anything below 730 mV in the Base Voltage field, is *WRONG*.
    Far from a matter of preference, this is literally crippling the torque sensor: 
    Set at 0 mV, the first 20% of torque sensing range, is thrown in the garbage; 
    Under any pedal rotation at all, ~”12 Kg” of pedal force is detected! 

    Of course the torque sensing won’t work well that way! 

    To fix this:
    Get a reading from the “TqVoltate” field, with no force on the pedals.
    Add at least +1 or +2 to that value, & apply that total to the Base Voltage. 
    Congratulations! You have just calibrated the base Voltage of your torque sensor. 

    Setting the Base Voltage mV to 757 or higher, should prevent any baseline sensor jitter from being detected as pedal torque. (Unless your torque sensor is unusually erratic. If so, seek replacement as this is a safety issue!) ​​​​​


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s