Ultra Tuning: Where other guides go wrong

smorgasbord

Well-Known Member
Region
USA
For the past few weeks I've been on a mission to finally get our Bafang Ultra motors (UART) tuned. I've learned a lot along the way, thanks to some posters here and to some reverse engineering. There have been several guides posted on the interwebs (old joke, sorry), which surprisingly have incorrect information. So, here's my attempt to note where these guides are wrong.

1. Karl Gesslein's I Void Warranties: Hacking The Bafang Ultra Max Mid-Drive EBike Drive
This is the first guide published, and it's been the basis for every other guide since - with its good and bad information repeated. Note that Gesslein first published a BBSxx guide that was based on a long Endless Sphere thread that contained a lot of top-notch reverse engineering. Gesslein himself did a bunch of reverse engineering for his Ultra guide, but appears to have run out of steam by the time he hit the Torque Tab. Here's where I believe he goes wrong:
  • Basic Tab: Limit Spd(%)
    • LimitedCurrent(A) value shown is halved in the Luna Ludicrous controller. This may have been true at the time but is no longer the case as my 2019 and 2020 (repaired/replaced by Luna in 2023) Ultra motors demonstrate.
  • Torque Tab: Base Voltage
    • Admits he doesn’t know what this does, but it's important for pedal torque response.
  • Torque Tab: Delta Voltage
    • Doesn’t mention calibrating for max voltage, which is important for pedal torque response.
  • Torque Tab: 0 Speed Boost time
    • Admits he doesn’t know what this does (It provides a power boost for when the pedal/wheels haven't turned (or turned much) yet.
  • Torque Tab: Spd0-Spd100:
    • Not only gets it wrong by claiming these are percents of the highest motor RPM, actually says that what is really is (bike speed/wheel rpm) is wrong!
  • Torque Tab: MaxCur(%)
    • Lowered these in an attempt to have a smooth take-off when he should have changed Delta Voltage table instead. A lower MaxCur won't make take-off smooth, it'll make it underpowered.
  • Torque Tab: StarDegree
    • Admits couldn’t find what changes to this affected. It's probably Start Degree and uses the hall effect system to know when the pedals have moved.
Note, however, that while Gesslein correctly determined and documented that almost none of the Pedal Tab settings affect the Ultra, none of the other guides published, which were obviously based on his work (either by direct reference or by word for word quotes), document that! I think what happened is that Gesslein referenced his earlier BBSxx guide from this Ultra guide. Gesslein's purpose was for "information on the cable and the quirks of the programming software," but people looked at his tab/parameter descriptions and incorrectly carried them over. At any rate, it's crazy that Gesslein's correct information on the Ultra Pedal Tab got lost for so long.

2. Biktrix's Bafang Controller/PAS Programming Guide

It's perplexing to me that bicycle OEM Biktrix claims to have a "secret sauce" for Bafang Ultra firmware "hex codes" that they claim makes their Ultra motors better than any other Ultra motors, yet Biktrix's guide for user programming still contains several demonstrable errors:
  • Basic Tab: Limit Spd(%)
    • This is not bicycle speed. For BBSXX motors it’s motor rpm, and that may be true for Ultra motors as well, but at any rate my testing ruled out road speed.
  • Pedal Tab: Bottom 8 Parameters
    • As Gesslein documented, these are almost certainly not used by the Ultra, yet values are given and described as having an effect on the Ultra. It’s not harmful to use their recommended values, but you don’t need to think about changing them.
  • Throttle Handle Tab: Mode
    • The description for Speed and Current Modes are exactly backwards!
  • Torque Tab: Base Voltage
    • Incorrect to suggest setting to 0. Should be set to the throttle voltage output when no pressure is put on the pedals.
  • Torque Tab: Delta Voltage
    • Has confusing wording, such as: "This value equals the increase from base voltage and lower values to equal force.” Although after thinking about it some more, I think it's right in concept with this example: "For example, if the base=700mV, 0-5kg=200mV and 5-10kg=200mV when tqVoltage=1100mV the controller will read 10kg of force on the pedal." At least if you interpret "read 10kg of force" as "output 10kg to the Spdxx table."
  • Torque Tab: Spd0-Spd100
    • Incorrect that the steps are percentage of full motor speed. They are Wheel RPM ranges.
  • Torque Tab: MaxCur(%)
    • Incorrect reference to RPM range of the motor.
3. Mike/Frey's Bafang Ultra Programming / Bafang Ultra “Smooth” tune

In an EBR thread it is implied that Michael works for/at Frey, but that's not actually claimed in the guide. Furthermore, there's a couple of reviews of Frey bikes in other blog posts from Michael, which would seem to exclude that relationship. This is a popular EBR thread, and for years people have followed this guide and claimed wondrous results. However, it was my frustration with this guide that kept me searching for more and better information. Anyway, here's where I believe Michael gets it wrong:
  • Basic Tab: Limit Current(%)
    • Is not based on road speed, but on Motor rpm
  • Basic Tab: Wheel Diameter (Inch)
    • Will NOT affect speedo read-out as Ultra-compatible displays use their own wheel diameter/circumference settings
  • Basic Tab: SpdMeterSignal
    • Does not explain this correlates to number of magnets on the wheel with the external wheel rpm sensor
    • Is probably incorrect that this “removes some lag in PA start up procedure.” To be fair, I don’t yet have proof of this yet, but if it were true then you might have to travel 2 meters before motor assist starts in some situations (depending on magnet location relative to sensor) and I've not experienced that myself.
  • Pedal Tab: Bottom 8 Parameters
    • As Gesslein documented, these are almost certainly not used by the Ultra, yet values are given and described as having an effect on the Ultra. It’s not harmful to use their recommended values, but you don’t need to think about changing them.
  • Torque Tab: Base Voltage
    • No explanation of what this should be set to, nor how to figure it out. The 740mV value shown is reasonable, however, and will give far better results than the 0 many bikes come with by default.
  • Torque Tab: MinCur(%))
    • Incorrectly describes that the values used are based on pedal cadence. They are based on Wheel RPM.
  • Torque Tab: MacCur(%))
    • Incorrectly describes that the values used are based on pedal cadence and/or motor RPM. They are based on Wheel rpm.
  • Torque Tab: Delta Voltage table
    • Does not describe what to do with the “load cell output” range.
    • Incorrectly describes that setting 0-5Kg to a larger value will allow for ‘ghost pedaling.’ If anything, a larger value will require more pressure than the default linear value. Ghost pedaling is likely enabled by a very low Full and/or Return value, but I haven’t verified this.
    • Has confusing explanations for how the Delta Voltage Table works, for instance: “For example, for the first 200mV load cell output, program will calculate as 0-5Kg load. If you are to change 200mV to 400mV, software will now calculate load of 0-5Kg over first 400mV. “
    • Includes a value for Base Voltage without explanation of what that represents or how it was obtained. It's actually a reasonably good value for the Ultra motors I've tested and read about others testing.
    • Overall, however, Michael's Delta Voltage Table values are reasonable and are probably why people like this tune. But, understanding this table is key to make the tune better for you.
  • Torque Tab: Spd Table
    • SPD0-SPD100: Representation of motor speed in percentage steps is incorrect. Again it's Wheel RPM and the numbers don't appear to correlate with anything I've found yet.
    • Discussion of pedaling force versus pedal cadence is accurate and informative, but does not apply as written since the SPD table does not incorporate cadence as an input at all.
    • Values Michael chose thinking they were pedal cadence are not necessarily valid for Wheel RPM.
4. EveryAmp's BAFANG ULTRA M620 PROGRAMMING AKA TAMING THE BEAST

This is a recent guide, which was originally based on Gesslein's guide (see above), but missed the Gesslein's Pedal Tab analysis (!), and then quickly revised after he received some comments pointing him at Michael's "Smooth" guide. Given his settings, it appears he didn't do much if any testing and so repeats the mistakes of those previous guides and then some. However, I should acknowledge that his advice on setting up the PAS Current %'s in the Basic tab is quite good and led me to a small variation of it for my post on the subject.
  • Basic Tab: Limit Spd(%)
    • This is NOT bicycle speed. For BBSXX motors it’s motor rpm, and that may be true for Ultra motors as well, but it’s definitely not bicycle speed per my testing.
  • Pedal Tab: Bottom 8 Parameters
    • As Gesslein documented, these are almost certainly not used by the Ultra, yet values are given and described as having an effect on the Ultra. It’s not harmful to use their recommended values, but you don’t need to think about changing them.
  • Torque Tab: Base Voltage
    • No explanation of what this should be set to, nor how to figure it out. The 740mV value cribbed from Michael’s value remains reasonable.
  • Torque Tab: Delta Voltage
    • Values shown sum up to exceed the maximum output of the Ultra’s torque sensor. This means that the maximum reported torque of 60Kg is reported at about a rider-applied 48Kg. So, the value he provides for 50-60Kg is actually ignored by the system!
    • Values shown decrease by 5 for each of the 8 ranges, but he fails to recognize/accommodate that the lowest 4 ranges cover a 5Kg span while the upper 4 ranges cover 10Kg. Thus, the values do not produce the kind of curve the author claims.
  • Torque Tab: Spd Table
    • Repeats the incorrect claim that the 6 ranges are motor speed ranges and not bike speed ranges. They are actually Wheel RPM ranges, but that’s closely correlated to bike speed.
  • Torque Tab: Full(Kg)
    • Incorrectly describes what reducing the setting does, claiming that “toning it back” by reducing the values reduces the power output. In fact, reducing the values means that maximum power is produced at lower pedal pressures!
  • Torque Tab: MaxCur(%)
    • Again repeats the incorrect claim that Spd columns are based on motor speed.

5. @ebikaholic's Youtube video How to Program Bafang Ultra Torque Settings

He references Gesslein's original guide, and the video does a good job showing how to setup the programming software and hardware.
  • Torque Tab: Delta Voltage Table
    • Says to leave this alone, which is non-optimal as without setting the Base Voltage you get a jump in perceived applied pedal torque right at startup, the default table values mean you don't get the full range and don't get a progressive torque curve.
  • Torque Tab: Spd Tab
    • Is incorrect that this represents Motor RPM or Pedal RPM. These are Wheel RPM.
    • This affects everything done in his table. His MinCur of 100 for fast bike speeds means he's basically at a abrupt On/Off throttle-like cadence sensing for any reasonable bike speeds (given he's on the road).

What's been intellectually interesting about this voyage for me is how many people have played with these settings for so long, and yet find that they've "improved" things when their assumptions about what the settings control have been wrong. Whether that's because of a coincidences in gear selection to correspond low pedal cadence with low bike speed, or simply that the Spd100 column controls everything above 13 MPH (!) so it doesn't matter what the other columns were except in getting up to that speed, or some human perception thing (take the Selection Attention Test, it's fun!), I don't know. But, it's something to ponder.

BTW, for anyone who doubts me, it's quite easy to setup a SPD Table to prove my assertion on Wheel RPM for yourself. Just make MaxCur = MinCur for all columns except SPD40, then go for a ride in bottom gear and note the bike speed at which the power kicks on and off. Then do the same ride in top gear and see that despite a much slower pedal cadence, the power kicks on and off at exactly the same bike speeds. Then change Wheel Diameter in Basic (not the Display) and note the same bike speeds. Finally, set the number of magnets to 2 instead of one and (now you need to use an external GPS for bike speed) note the bike speeds are doubled for power on and off. Hence, the proof that it's Wheel RPM, not pedal cadence that the SPD table keys off of. You can repeat this for the other SPD columns, too, as I did.

If you somehow get different results than I have gotten, get in touch and we'll see if we have firmware version differences or something.
 
Last edited:
Smorg
Thank you for this information, and waiting on the next installment.
I am slowly learning more about all this stuff. I know you are being serious about this tuning information, but I had to throw in some lighter thoughts...........
Hope you don't mind.

Questions for you, and to make sure I am on the same page as you,
when you refer to "Ultra", you are referring to the the Bafang Ultra G620/M510 Ultra motor?
I am NOT well versed with all the Bafang motors made.

When you refer to "Luna Ludicrous controller", would this same basic information pertain to the OEM ULTRA Bafang stock controller for tuning/settings?

All this tuning comes back to the Preferred RIDERS STYLE/CHOICE of biking,
does it not?
Can 1 set of tuning spec's do it all?

Riding styles, (to my way of thinking)
The Stink Bug = Butt in the air, flying down the road,
The Humming Bird = Zipping downhill fast as possible, trying not to crash,
The Cruiser = Not in a big hurry, just lookin at the sights going by,
The Eagle = See's all, misses nothing, laid back, can adapt to most environments,
The Road Runner = Blasts off, high speed, then stops and looks around, then Blasts off again,
The Tortoise = Low and slow, not much stops it, but gets where it's going,
The Coyote = Jack of all trades = Smart and can do any of the above, when required, but preferers the easiest path of travel slowly.

What Your style? Did I make you laugh?
What is the style of these people, in general, in your opinion?
Karl Gesslein
Biktrix's
Mike Frey's
EveryAmp's
ebikaholic's

I have never heard of some of these, have some reading to do.

Your thoughts and suggestions..........
Tia,
Don
 
Last edited:
when you refer to "Ultra", you are referring to the the Bafang Ultra G620/M510 Ultra motor?
Yes.

When you refer to "Luna Ludicrous controller", would this same basic information pertain to the OEM ULTRA Bafang stock controller for tuning/settings?
Yes, it was Gesslein whose post was on the Luna controller. I have a later version of that on my bikes, and all it is, really, is just some components on the board that can handle higher current/power and they have an internal max current set to 35 in the firmware instead of the stock 30. There may be other Luna controllers that go even higher, I don't know.

All this tuning comes back to the Preferred RIDERS STYLE/CHOICE of biking,
does it not?
Can 1 set of tuning spec's do it all?
Kind of like how gearing on a bicycle is chosen according to how and where you ride, so will the motor tuning. And, like gearing, you can have a compromise setting that does pretty well in a variety of situations but won't be ideal for all. But, since so many people have loved inaccurately determined Ultra settings for years, my guess is that many people just aren't that picky. We change PAS levels as the compromise, maybe even goose the throttle at times.

This is why I'm not just posting my settings. My goal isn't to say: "Here's the settings that you should have," but instead: "Here's how to figure out what settings are best for you."

Your thoughts and suggestions..........
I think the biggest differences are:
  • Pavement or trails
  • Flat land or Hills or Steep inclines/declines
  • The max speed at which you're comfortable riding
  • Your general fitness
  • What your bike's gearing is, and bike weight, suspension, etc.
  • What kind of experience you want on the bike (pedal hard with some assist to get up singletrack hills or ghost pedal to commute to work without breaking a sweat, etc.)
Given that last Spd column takes effect at just under 13MPH, it's clear that the Ultra was designed for off road riding, not high speed on pavement. So trail riders should find it straightforward to tune their Ultra to their liking.
And, you can also make it a very decent on-road powerhouse by doing the double-fake-magnet thing. But, even without going to that extreme (really requires an EggRider or being able to ignore the MPH/distance on your display), setting up the PAS levels as constant power percentage increases combined with a progressive Delta Voltage table and then accepting that all riding above 15 MPH will be in the Spd100 column, you can still do noticeably better than the stock settings.
 
I cannot wait to be a guinea pig to test settings. Bike is in transport from Frey now. I should join all this fun in the next 30-60 days.
 
I cannot wait to be a guinea pig to test settings. Bike is in transport from Frey now. I should join all this fun in the next 30-60 days.
When you connect up, your first step should be to go to each Tab, hit READ, then screen grab to save Frey's default settings. It would be interesting to know what Frey is using these days.
 
Will do before I make any changes. I will share what they have currently. The programming cable was pictured in my build photos. If there are any other things you'd like when I get it,let me know.
 
Thank you,
Smorg
Does your bike have the "walk assist" and has your tuning effected it at all?

Off road trail riding,
I like my speed to be 4-10 mph, depending on trail conditions', I quit using the display since I found out it was not accurate, compared to my Garmin GPS, it is very accurate.

Which of the Speed columns world have the greatest effect for 4-15 mph range,
for rough trail riding?

Thanks for your time and trouble, it is greatly appreciated...........
Your thoughts and suggestions....
Tia,
Don
 
Does your bike have the "walk assist" and has your tuning effected it at all?
I haven't tried walk mode with my EggRider, but my wife's bike, also tuned, has it and it works fine.


Off road trail riding,
I like my speed to be 4-10 mph, depending on trail conditions', I quit using the display since I found out it was not accurate, compared to my Garmin GPS, it is very accurate.
You probably need to choose a different Wheel Diameter/Circumference in your display (not Basic) settings.

Which of the Speed columns world have the greatest effect for 4-15 mph range, for rough trail riding?
From the Spd Table post (https://electricbikereview.com/foru...g-the-torque-tabs-spd-table.52505/post-594973 ):
Screen Shot 2023-04-10 at 3.53.41 PM.png

Multiply by 0.62 to convert KPH to MPH.
Note the speed columns overlap. I believe there's a feathering as speed moves between them.
 
Yes, it was Gesslein whose post was on the Luna controller. I have a later version of that on my bikes, and all it is, really, is just some components on the board that can handle higher current/power and they have an internal max current set to 35 in the firmware instead of the stock 30. There may be other Luna controllers that go even higher, I don't know.
Good info on the Ultra - glad someone is getting around to writing (correcting) a bunch of this!

RE: Luna controller, the v1 was as stated, but the Ludi v2 controller is quite a different beast with real programmability, mobile app, etc. and is VESC-based.
 
Good info on the Ultra - glad someone is getting around to writing (correcting) a bunch of this!

RE: Luna controller, the v1 was as stated, but the Ludi v2 controller is quite a different beast with real programmability, mobile app, etc. and is VESC-based.
Just note that the link is for the M600 motor, which is different than the M620 we're talking about here, and which Luna says they still sell a "ludicrous" version of, but it's been out of stock for months, as are the bikes (Apollo, Apex) that use them.
 
Just note that the link is for the M600 motor, which is different than the M620 we're talking about here, and which Luna says they still sell a "ludicrous" version of, but it's been out of stock for months, as are the bikes (Apollo, Apex) that use them.
Oops, apologies, you're right. There is a LudiV2 for BBHSD and for M600 but not Ultra currently.
 
If you believe different values for Stop Decay affect the Ultra motor, please post your thoughts and experiences. My interest in how Stop Decay affects BBS motors was to potentially help understand how it might affect Ultra motor performance. But, I've seen nothing to indicate that it does.
I totally understand that and I've been saying for a while that comparing settings for a torque sensor motor to the BBS doesn't make much sense to me.

But in the effort of understanding and growing the knowledge base it would be great to see this hard data gathered by the founding fathers on Stop Decay and compare it to my empirical data since Bafang isn't divulging what this setting actually is/does.
 
So do you see where you've gone wrong?
You hang your hat on data that you say you have confidence in... but tell the truth, you've actually never seen it.
If all you really have is this rambling..
"I tried a large value, I forget the upper limit but there is one, and it ran on upwards of a second (I forget exactly) but it seemed a long time. Run on time also seemed inconsistent but I didn't investigate why."
... that's pretty pathetic.
C'mon... Show me some data.
Heck even put it in a pretty little diagram if that helps you. I'm dying to see what ever it is you think you have.
 
You hang your hat on data that you say you have confidence in... but tell the truth, you've actually never seen it.
This is an Ultra Tuning thread, and I've been quite detailed in the descriptions of the data I've gathered on the Ultra motor, including precise instructions for anyone wishing to replicate/challenge the results I've seen firsthand.
 
Last edited:
I never said it was relevant to the Ultra. In fact that was my reason for posting hear as I felt it wasn't.
What I did say is that this is where you went wrong... and now, it's relevant to this thread.
You knock others but when pressed for info you say you have or have seen, you dance.
So please stop side stepping and provide some data to show that Stop Decay causes motor run on. I don't care if it's yours, from the 49 page Bible or just some crayon pictures you draw.
 
I never said it was relevant to the Ultra. In fact that was my reason for posting hear as I felt it wasn't.
I guess you didn't read that the title of this thread starts with: "Ultra Tuning."

What I did say is that this is where you went wrong... and now, it's relevant to this thread.
No, it's relevant to some BBS thread. I'm continuing this discussion there. Again.
 
Thank you Smorgasborg for sharing your mission !!!
Thank's to all other who write tuning guides for bafang BBS2 BBSHD. You help me a lot with these 2 motors.

Now, i'am soon ready to ride a Ultra motor.
I do some short run with a little battery (i build a perfect one for me).
I found that my torque sensor or my motor has sometimes a problem. Eggrider Tq sensor voltage monitoring do it well

But when i have no problem with Tq sensor, i have try a lot of setup to compare and understand Ultra motor settings
I found too, that somethings was wrong in what i read everywhere on the net
now i'm here, and i can soon helping
 
I was doing some testing on Pedal Tab's "Slow-Start Mode" setting, confirming that for my setup changing the value from "2" to "7" and back had no effect on start-up power.

In the Torque Tab thread, I postulated that Mike/Frey's Bafang Ultra Programming / Bafang Ultra “Smooth” tune claim that adding more magnets:
greatly improves speedo responsiveness as well as assist to remove some lag in PAS start up procedure.
is probably correct on speedo responsiveness, but is definitely incorrect on the relationship to lag in PAS start up . In all cases I tried, power was supplied by the motor once the crank had turned just a little bit with the wheel magnet nowhere near the sensor. If anything, having more magnets means you're more likely to overload the motor's sensor capabilities at high speeds, as reported here for BBS motors. But, the Bafang Ultra is probably using the internal hall sensor to detect crank rotation and using that to decide to start applying power from a standstill.
 
Torque Tab: Spd Table
  • Repeats the incorrect claim that the 6 ranges are motor speed ranges and not bike speed ranges. They are actually Wheel RPM ranges, but that’s closely correlated to bike speed.
In my opinion it's motor speed ranges. Have checked this - if i ride without magnet mounted in wheel, engine works as usual and controller has no information about wheel and bike speed.
I've been riding ultra with stock controller and 14s7p battery for only a few days and I'm trying to find the best settings for me. I'll check the rest of the information posted here and come back with conclusions. I tried to get some programming information from the bafang distributor but it seems impossible.

 
In my opinion it's motor speed ranges. Have checked this - if i ride without magnet mounted in wheel, engine works as usual and controller has no information about wheel and bike speed.
That's not a conclusive test. The test I ran is described here: https://forums.electricbikereview.com/threads/ultra-tuning-decoding-the-torque-tabs-spd-table.52505/

Essentially, I zeroed out MinCur & MaxCur in all the SPD columns except one and then rode the bike to see when power kicked in and out. Then I changed which column had non-zero values and rode again, seeing the differences. Then I changed wheel size, which had no effect. Then I changed how many magnets I said were present and that changed the in/out speed points. The only objective conclusion is that the columns index off of wheel rpm (which is essentially bike speed if you don't lie about your parameters).

The behavior you're likely seeing is that you're getting power as specified by the SPD0 column, since without a magnet there is zero wheel rpm reported to the motor controller. Change the MinCur and Max Cur values in the SPD0 column to zero in your bike without a wheel magnet and I bet you won't get any power. Better yet, try reproducing my test and I bet you'll be convinced.

I've been riding ultra with stock controller and 14s7p battery for only a few days and I'm trying to find the best settings for me. I'll check the rest of the information posted here and come back with conclusions. I tried to get some programming information from the bafang distributor but it seems impossible.
I recommend starting your Ultra Tuning journey here:
 
Last edited:
Back