Bafang Ultra "Smooth" tune by Mike at Frey

I was looking at the Bafang website today, and I think I know why the ultra comes with programing that most find needs to be tuned, Bafang programed this motor as an Ecargo motor not a Emtb motor;
Naw, it's not "tuned" from Bafang at all. The torque sensor cannot ever read below ~700mV, but the detection starts at 0mV by default. That's literally tossing the first 1/4 of the torque sensor's range in the garbage, & detecting any pedal movement as ~12 "Kg" of pedal force.

Additionally, the sanity checks on the Torque tab contain an error: Keep should be capped between Min & Max, but instead Keep is capped below Min. Not only is this obviously wrong logically, but it's actually capped correctly on the Pedal Assist tab. At first I thought perhaps I was wrong, but no, it really is a bug & a pretty annoying one at that. It is not possible to set the Keep current settings higher than the Min current settings in the Torque tab, even by loading a preset .el file & clicking Write.

Normally, I'd contact the manufacturer & request updated firmware...
 
I'm certainly not a programmer, but as I understand it the move to Can bus makes total sense and should be a benefit down the road as more third-party manufacturers build with Bafang components and integrate other smart parts. Can bus needs no central controller (Host) as each Canbus device on the network is it's own boss. Therefore Bafang doesn't need to provide the controller or create the software for each unique manufacturer. Can bus was developed for complex automotive systems as it is much better at managing multiple devices and automatically managing the priority of messages sent on the network to make sure the important ones don't get dropped (which in e-bike land means errors and faults). This also means less wires used in the build, and easier integration of new or third party components once Bafang shares the protocol with them (or it's hacked if they don't choose to go as open-source as they have in the past). It should natively work better over wifi, and allow the entire bike to become a true 'smart' device. Bosch actually developed the CAN Bus system for automotive, so it makes sense that it is running it already in Ebike systems and that's partly why so many 3rd party manufacturers can integrate Bosch into their own bikes so seamlessly with complex systems.

Today's simpler builds probably don't NEED it quite yet, but as more and more complex toys are developed and integrated on our rides, it should allow Bafang systems to be far more complex and integrated like say those Bosch builds. Adding things like 2-way detailed battery management, wireless displays, phone integration, wifi updates, multiple sensors, etc, all gets easier on a Can bus network.
I think you massively overestimate the ostensible improvements offered by a CANBus. Interoperability is in no way reliant on the (risky) centralization of all components to a single communications chain; in many ways UART signaling is the more open standard.

The primary motivations for CANBus integration have always been:
1) Material cost savings by wiring everything together. (Incidentally allowing the radio to interfere with stability control, & other great advancements in integration.)
2) Proprietary lockdown, blocking third party shops from performing modification or service unless they circumvent the "safeguards" in violation of terms of service.

For developers & consumers, CANBus really doesn't do anything a more modular system cannot do using open protocols. Additionally, hyper centralization & manufacturer's (typically) strident objection to peer-review, present literally immeasurable danger to users, by widening attack surfaces multiplicatively & by masking potentially buggy code to protect "industry secrets".

Also, a CANBus adapter is considerably more expensive than the UART adapters, which although hardly an ebike shop's greatest expense, is still pretty lame.
 
I was looking at the Bafang website today, and I think I know why the ultra comes with programing that most find needs to be tuned, Bafang programed this motor as an Ecargo motor not a Emtb motor; instead they recommend their less powerful M600 motor for that. Yet tons of Ebike companies have said lets get the most powerful motor Bafang makes and stick it on a Emtb style Ebike.
Then they tinker with the programing to make it better or stick another controller in there. If Bafang was smart they would make a V2 of this same motor programmed especially for Emtb.
I think Sondors and Luna got them to make custom changes to theirs, but then again they are buying a 100 motors or more so it makes it worth it for them.
I heard a rumor that they might be working on a generic version to sell to everybody in 2022.
Cargo is still the least utilized platform for Ultras! There are a few but the numbers don't compare to the number of Emtb,Fat Tire and Commuter bikes powered by this motor! Makes no sense for Bafang to tune the motor for Cargo bikes imo.
Bafang just keep doing weird stuff, they make great product but man lol..
 
Can anyone guide me on how to unlock speed and program an ultra motor with uart programming..newbie here purchased bike from steamoon
 
Can anyone guide me on how to unlock speed and program an ultra motor with uart programming..newbie here purchased bike from steamoon

Read the first to get started.
 
Can anyone guide me on how to unlock speed and program an ultra motor with uart programming..newbie here purchased bike from steamoon
Agree on the reference material above. I'd just like to add that the answer to your question covers a LOT of country, and there are a huge number of variables involved. Point being, to get specific answers, you're going to need to ask more specific questions. Shotgun approach isn't going to provide much in the way of useful info. -Al
 
Mostly looking to unlock the speed limit
I am surprised that there is a limit set on your bike? While it is possible to set limits in each mode usually the highest mode of assist will provide the highest amount of watt assist netting you the highest speed? Stock high gear ratio plays a part here also.
 
Loaded the 'Frey Smooth' tune and happy with how it allows more selection in PAS 1&2. Before I never had to change out of PAS 1 which suggests it was over powered when easy pedalling. My range has also increased lessening my range anxiety!

Noticed the 'calorie' mode on the dcp-18 constantly reads 0 now after the tune. Does anyone know if this tune disables this setting?
 
Loaded the 'Frey Smooth' tune and happy with how it allows more selection in PAS 1&2. Before I never had to change out of PAS 1 which suggests it was over powered when easy pedalling. My range has also increased lessening my range anxiety!

Noticed the 'calorie' mode on the dcp-18 constantly reads 0 now after the tune. Does anyone know if this tune disables this setting?
I'm pretty sure you're bike will be using less battery than it did. That might have something to do with the "calorie" count.

I'm in sort of a hilly area, and find myself running in PAS2 often as not recently. That gives me a usable wattage range of -0w- to nearly 400w. That's plenty for me normally - until I get to a bigger hill anyway. I mention this as if I'm cruising along in PAS1, using say 100-150w, that wattage doesn't increase much at all going to PAS2. Nothing changes!

Anyway, that's how I think torque sensing SHOULD work. Very happy with the Smooth settings.
 
Loaded the 'Frey Smooth' tune and happy with how it allows more selection in PAS 1&2. Before I never had to change out of PAS 1 which suggests it was over powered when easy pedalling. My range has also increased lessening my range anxiety!

Noticed the 'calorie' mode on the dcp-18 constantly reads 0 now after the tune. Does anyone know if this tune disables this setting?
I had 0KCal showing after the first test rides, even before altering any settings.

I'm not sure how that's calculated by the DPC18, but it's never moved from zero thousand calories...

Like the detailed per-cell battery info, perhaps that's a DPC18 "feature" that won't actually work on most builds?
 
Hm, I just noticed that I never posted my most recent tuning, here!
Rather rude of me, since this was one of the first places I ever saw the "Smooth" config linked!
Starting from the "Smooth" tune, test riding it a bit, tweaking a few settings very slightly, & testing+tweaking+testing+tweaking & so on...
Here's what I've come up with so far!
(I think it's a significant improvement over the "Smooth" config, but I'd like to know what others think!?)

electricbikereview.com/forums/threads/bafang-ultra-alternative-settings-for-basic-pedal-assist-throttle-handle.37440/post-502980

Frood.el file attached below, for use with Frey \ Bafang Config Tool: (Feedback appreciated!)

EDIT:

This config is for a 45 MPH max speed limit.

(As set by my display.)

If your speed limit is not set to 45 MPH, the Torque settings will be applied at different speeds, accordingly.

Any difference in max speed limit or gear ratios, results in different optimal values on the Torque tab!


Best results will always come from calibrating your torque sensor's Base Voltage, & then test riding any changes on the Torque tab, specifically for your bike.
 

Attachments

  • Frood_version_2022-01-18.0342pm.MST.el.zip
    600 bytes · Views: 270
Last edited:
Original default "config", WITH NO TORQUE SENSOR CALIBRATION:
(Do NOT use this! Also, do NOT tune your Bafang Ultra with Base Voltage set to 0!)
Default - Basic.png
Default - Pedal Assist.png
Default - Throttle.png
Default - Torque.png

^Note the Base Voltage is unconfigured, at 0 mV!
This will cause 0 Kg of pedal force to read as ~19 Kg!
Additionally, that's nearly 33% of sensor range, lost!
Correct mV values for Base Voltage are around 758 mV!


"Smooth" config, WITH BASE VOLTAGE SET, as posted at frey-bafang.patransformers.com by Michael:
Smooth-Basic-1024x779.png
Smooth-PAS-1024x771.png
Smooth-Throttle-1024x799.png
Smooth-Torque-1024x778.png

^Note the Base Voltage in "Smooth" tune, is set to 740 mV.
Base Voltage should never be left at zero!


My current "Frood" config, as of 2022-01-18: (based upon observations from the Smooth config)
Frood - 2022-01-18 - Basic.png
Frood - 2022-01-18 - Pedal Assist.png
Frood - 2022-01-18 - Throttle Handle.png
Frood - 2022-01-18 - Torque.png

^Note that Base Voltage calibration has produced a slightly different baseline sensor value. Your "TqVoltate(mV)" may vary!
Also note that the Delta Voltage spans have been widened slightly, to make fuller use of the sensor's available reporting range.


Additional configuration notes:

1) On the Basic tab, I have set the LimitCurrent% for "Assit0" PAS level, to 1%, instead of 0%.

This allows use of throttle, with PAS 0 selected.
This also effectively gives the user six PAS levels in Eco mode, & six Sport modes, instead of five.
If less than 1% assist level is desired, the ebike can be ridden while powered off! (Works great, "infinite" range! ; )

2) Any torque settings affect all PAS levels proportionally.
A percentile value set on the Torque tab, will be a percentage of the percentage specified for that PAS level.
My "Frood" config, is optimized around PAS 3 Eco. (& no, PAS does not cut off at low pedal torque!?)
The "Smooth" config, is optimized around PAS 5 Sport.
Whichever PAS level you optimize for; each level away from that, is progressively farther offset from those "optimal" values.

3) Due to a bug in the motor-controller firmware's sanity checks performed before storing a new configuration,
KeepCur% (on the Torque tab) cannot be set higher than MinCur%.

This is in error.
Correct implementation of the sanity check would ensure that KeepCur% is higher than MinCur%.
(MinCur% is intended to be the floor value; KeepCur% is intended to be a value between MinCur% & MaxCur%. Unfortunately, the sanity check is reversed.)
This affects ALL Bafang Ultra motors with UART controller. (No word on whether it's resolved in the CANBus controllers.)
This bug cannot be corrected without a firmware update (from Bafang, ideally).

For comparison to a correct implementation, refer to the sanity check for StartCurrent% & KeepCurrent%, on the Pedal Assist tab: StartCurrent% is the floor, & KeepCurrent% must be a value between StartCurrent% & 100% of the LimitCurrent% value for each PAS mode between "Assit0" & "assit9".

Fortunately, this is a relatively minor bug, which hinders fine tuning but does not entirely cripple it.
If you place orders with Bafang often, please request a firmware patch to resolve this bug!

That's it!

This current Frood config is adjusted to be much gentler than the Smooth config, & in my testing, gets more mileage, more appropriate response to my pedal effort, & still goes like a beast in PAS 5 Sport. If anyone is willing to try it & give feedback, I'd really appreciate it!
 
Last edited:
I had 0KCal showing after the first test rides, even before altering any settings.

I'm not sure how that's calculated by the DPC18, but it's never moved from zero thousand calories...

Like the detailed per-cell battery info, perhaps that's a DPC18 "feature" that won't actually work on most builds?
I agree... Seems the displays are made with greater capabilities and without using a full Bafang setup such as battery(and bms) we're left with some blank input to the display.
 
Interested as hell here. I want to compare your changes with what I have, and then make changes as appropriate. Will get back here with my thoughts/riding impressions as soon as I've had a chance. -Al
 
After finally getting a windows computer going I went from the stock Luna "Secret Sauce" settings, which were horrible IMHO to the FreyJon settings that @JonA was nice enough to share. I thought that his settings were biased a bit more towards torque sensing than was feeling right for me actually. It seems to me to get the pedal feel I want it is more a combo of torque sensing and cadence sensing?

So just because I can I decided to try the smooth settings and found them to be a bit better pedal feel wise across the board and smoother in general but with too much run on in all modes and too little sensitivity for use in modes 1/2 for trail riding on technical terrain.

Keep in mind that I am basically computer/electronic language illiterate and all the min/max, % values etc. are basically greek to me so I had little idea other than comparing values from change to change what was making a difference if any.

So then I found a one year old YouTube video of some guy in his garage showing his most recent tune here:
I copied them line for line and went for a ride and found them to be really good "for me". No run on at all and modes 1/2 very good for trail work, mostly because of the lack of overrun. But there was one problem in that the assist would cut out at low speed on an uphill slope for some reason? I could blip the throttle and it would come back on but wasn't very convenient for sure.

I did small adjustments where I thought it might help according to the limited understanding I was gleaning from doing all this but none seemed to help however I did get it to lessen some finally but haven't had a chance to fully test it yet.

One thing I don't understand with the above excellent effort by @ProphetZarquon is the eco/sport relationship? It is a feature that I am not familiar with and I just use the 1-5 mode settings?

Anyway just because its Sunday and due to the relative ease of doing so I am going to plug in PZ's tune and give it a whirl and will report back. After documenting my current settings of course....
 
JRA, sounds like we are on about the same page. I tried some of the original setups with the same results you had - terrible! After finding and trying the "Smooth" with just a few of my own tweaks (like having low power available in PAS 0), I now have a set of ground zero settings that I REALLY enjoy that I can come back to, or at least reference. By the sounds of it though, our friend the Prophet seems to have a handle on this. These changes will be made with a new degree of confidence.... Can't wait!!
 
  • Like
Reactions: JRA
Back