Announcement

Collapse
No announcement yet.

Bafang Ultra Drive programming

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    So I just went through programming my new Z1 and a test ride. Everything is working great and the smooth tune is an improvement. The throttle seems toned down though and I’d like to change some more settings but now once I connect to the motor and read flash for the first time, the read and write buttons grey out and I cannot write any new changes. I saw someone with the same problem on EBR forum just recently but no one responded there. I’ve tried a new download of the tool, different usb ports, and a different PC, the buttons still grey out after the first Read and I cannot write anything new.

    Comment


    • ProphetZarquon
      ProphetZarquon commented
      Editing a comment
      I have not experienced this issue, so I have no surefire fix to suggest...
      I take it you've tried rolling through each COM port, & changing the baudrate of the connection (default is 1200)?
      Can you upload a screenshot of what settings are shown, after you click Read?

    #32
    Firstly, everyone please note that BaseVoltage mV should never be left at zero.
    Zero is a blank uncalibrated default value; correct ranges are always above 730mV.
    (On our m620, a setting of 752 mV eliminates any remaining sensor jitter, & 5kg of pedal force now roughly equals 5Kg detected.)

    Secondly, bear in mind that any tuning for PAS 1, will always be detuned for PAS 5 & vice versa.
    So long as each of the twelve PAS modes (0-5 Eco, 0-5 Sport), have a different LimitCurrent% or LimitSpd% setting, any set of Pedal Assist & Torque settings, can only be optimized for one PAS mode at a time: The MaxCurrent%, MinCurrent%, KeepCurrent%, etc, all scale relative to the LimitCurrent% for whichever PAS mode you're in.
    As a result, only one PAS mode can ever be "optimally" tuned, by any given configuration.

    The config we've been riding for most of this year, is configured primarily for optimum pedal feel in PAS 4 Eco, but seems reasonably well calibrated in PAS 2 Eco as well.​

    Our Frey AM1000 v5, has 27.5" wheels with 2.8" wide Maxxis Rekon+ low pressure tires, with the motor driving a 40 tooth chainring, pulling a 1×11 cassette with 42 tooth first gear & 11 tooth last gear. At this 40-to-11 last gear ratio, top speed is limited to approximately 32 MPH by the very rapid pedal cadence. SpeedLimited is set to By Display's Command, & the display is set to a 48 MPH limit, in order to enable greater stability during steep downhills by maintaining steady pressure at the back wheel. In practice, with PAS 2 Eco limited under 188 Watts, top speed does not exceed 15 MPH on flat ground with motor power alone (well within Class 1 & 2 limits, except that the assist does not cut off at higher speeds as is technically required). In PAS 5 Sport, 28 MPH is never exceeded on flat ground unless I am the one riding & I'm pedaling like mad. (My 3×10 speed manual bike with 29er wheels, reaches the same top speeds, at lower cadence but much higher rider effort.

    Since sharing this config, I've also adjusted the spans of each detected torque range (0-5Kg, 50-60Kg, etc), but I consider my most updated settings a work in progress.

    Here is the config as we've used it most of the year:

    Click image for larger version

Name:	Frood - 2022-01-18 - Torque.png
Views:	618
Size:	40.6 KB
ID:	158518
    Click image for larger version

Name:	Frood - 2022-01-18 - Throttle Handle.png
Views:	692
Size:	32.8 KB
ID:	158519Click image for larger version

Name:	Frood - 2022-01-18 - Pedal Assist.png
Views:	712
Size:	35.3 KB
ID:	158520Click image for larger version

Name:	Frood - 2022-01-18 - Basic.png
Views:	696
Size:	35.6 KB
ID:	158521
    Again:
    Correct values for the BaseVoltage field, are between 730 & 760 mV.
    DO NOT bother tuning the other torque settings, before setting the BaseVoltage.

    Comment


      #33
      I have the Frey Am 1000 2021 model. The motor settings , when I received the bike were terrible. I have been using ebikeaholic’s settings with very good results. I ride single track 95 % of the time , and have no issues with the programming. I ride in Eco level 5. I used the Egg Rider to program the motor, and the motor responds well with the Egg Rider and the display that came with the bike. I use the Bafang display only because it is large and easy to read. I can not thank ebikeaholic enough for his setting. My bike would have been worthless as a emtb without his settings!

      Comment


        #34
        Originally posted by ProphetZarquon View Post
        Firstly, everyone please note that BaseVoltage mV should never be left at zero.
        Zero is a blank uncalibrated default value; correct ranges are always above 730mV.
        (On our m620, a setting of 752 mV eliminates any remaining sensor jitter, & 5kg of pedal force now roughly equals 5Kg detected.)
        ...
        DO NOT bother tuning the other torque settings, before setting the BaseVoltage.
        On my EggRider, I can go to the Live Setting page and see a base voltage. We have two Luna Apollos - one read 757mV and the other 752mV, so I used those as the Base Voltage values.

        I'm still confused on Eco vs Sport - it's not just which PAS level one is using as you can have different Pedal and Throttle parameter values for Eco versus Sport (or Road versus Off-Road). So, even if you're using all 9 PAS values there can still be a difference whether you're in Eco or Sport.

        I'm also very confused on Delta Voltage. It's conceptually easy enough to map:
        Start (Kg) -> Min Cur %
        Full (Kg) -> Max Cur %
        But I don't get how Delta Voltage plays into that. Edit: see my next post, but I don't understand why it should vary based on pedal force - the default Bafang/Luna values are linear with respect to Kg/mV.

        Separately, why would one want a different Min Current for the same Starting Force (Kg) just because the cadence is faster/slower?

        Return (Kg) seems like a way to stop assist as you let off on the pedal but are still moving it, right?
        Keep Current % is harder for me to understand. I don't know what "between pedal strokes" means. Is this related to Keep Current % in that as long as your apply Return Kg force to the pedal you'll get at least Keep Current % out?
        Last edited by smorgasbord; 03-15-2023, 02:01 PM.

        Comment


          #35
          Coming back to the Delta Voltage settings, this is what I read here:

          Delta Voltage: This is voltage SPAN in millivolts that program use to calculate load applied to pedals. 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. This is good instrument to manipulate sensitivity of the pedal assist. From linear to progressive or any other.
          and

          First is “Delta Voltage.” This is relationship between load cell that read rider input in form of pedal pressure applied to voltage system translate this into. Delta Voltage also tied up to the range/output voltage span of load cell. If you activate “Continuous Get’ function, position bike pedals parallel to the ground and put all your weight on one pedal, you will get a reading in mV something like 3,260mV. This number less static base voltage output of the load cell of 750mV equals to about 2,500mV. This means, load cell output when you ride will be within this range.
          In below Delta Voltage table you will find progressive relationship between Kg vs mV. This is done to allow rider to experience more natural and smooth assistance performance. 0-5Kg have a larger voltage span to allow for ‘ghost pedalling’ low assistance under very light pedal input. This is useful primarily when riding on pavement around town at speeds under 20Km/h. As rider increase pedal pressure, system will offer progressively more assistance. That will offer most natural feel, as human muscle is not very good in controlling force close to maximum loads.

          I must be dumb because I've read that first sentence more than a dozen times over the past several months and still don't understand it.


          Here's a Delta Voltage comparison of stock to Michael's to Prophet Zarquon's:
          Delta Voltage Stock Michael Prophet Zarquon
          0-5 Kg 200 900 207
          5-10 Kg 200 500 207
          10-15 Kg 200 300 207
          15-20 Kg 200 200 207
          20-30 Kg 400 200 415
          30-40 Kg 400 200 415
          40-50 Kg 400 100 415
          50-60 Kg 400 100 415
          Note that the stock values result in a completely linear translation of pedal pressure to mV. The numbers double from 200 to 400 only because the range being covered doubles (first 4 are 5Kg per range, last 4 are 10Kg per range). Prophet Zarquon apparently bumps the stock values so that a range of 2488 is covered, although his theoretical max is 2508.

          I haven't read anyone except Michael try to explain Delta Voltage, but I wonder about the feeling that a progressive decrease in output per Kg of pedal pressure and whether that is indeed more natural or not.

          Last edited by smorgasbord; 03-15-2023, 02:00 PM.

          Comment


            #36
            OK, the way I'm interpreting all this now is that:
            • The Ultra has a pedal pressure sensitivity range of 0Kg to 60Kg
            • Even at 0Kg of pressure, the controller puts out some voltage
            • The Delta Voltage values contain the additional voltage output for pressures in their ranges
            Therefore, one good way to start out is:
            1. Measure your motor's voltage using the "Continuous Get" button or the Live Setting page in EggRider with no pedal pressure.
            2. Add 1 to that value for Base Voltage.
            3. Apply brakes and put all your weight on a pedal and measure your motor's voltage. This is your Max Voltage.
            4. Take (Max Voltage - Base Voltage) and divide by 12.
            5. Use that value for the first four Delta Voltage Ranges, each of which cover 5Kg of range.
            6. Use double that value for the last four Delta Voltage Ranges, each of which cover 10Kg of range.
            This will give you a constant voltage/Kg multiplier across the entire range of pedal pressures, and enable sensing of that entire range.

            Now, if you want to have more of less boost at different pedal pressures, you can adjust the Delta Voltage values to ramp up or ramp down as you see fit. Do note that there are two ranges (5Kg for lower pressures and 10Kg at higher pressures). And, you need to be sure that the sum of the Base Voltage plus all of the Delta Voltages comes close to your Max Voltage.

            Comment


              #37
              Originally posted by stts
              But you probably don't want to chose Delta numbers that add up to the Max Voltage or you will not get the max assist until you peddle with all your might. That would be a drag. A small woman might need the factory deltas cut in half, where an athlete would go up 50%. As is, the factory numbers add up to max assist when only near the half way point of the sensors output. So likely not near as much max peddle pressure. Everybody will have to experiment a bit to get an assist reaction that they find suitable. Then program the modes for the performance they want from the sensor reaction.
              Yeah, I was actually thinking about that in the shower this morning. A light or weak rider could choose to reach max voltage at something lower than the top 60Kg cell, like the 30-50Kg cell. The default setup at 200/400 mV per cell only adds up to 2400mV, which when you add in something like a 740mV Base Voltage doesn't ever reach the typical Ultra max voltage of 3260mV! So, by default you can't ever get to "full power." Maybe that's a good thing considering how powerful these motors are?

              One other question I have is whether the voltage output scales inside each Delta Voltage cell or whether we just have 8 voltage output "steps." That is, at 7.5Kg of pedal pressure do you get the full output of that second cell (5-10Kg) or is the controller capable of scaling the output so you only get half of that cell's potential output?

              I now need to better understand the current per cadence (Spd) portion of the Torque tab. Part of me is thinking that I want output to scale with pedal pressure as the primary "torque multiplier" independent of crank cadence, but I get that it's difficult to reach high pedal pressures at high cadences. But, given the Delta Voltage table is cadence-independent and that the Spd table is pressure-independent I don't see how we can program our controllers to do BOTH of the following:
              • Reach maximum power at high pedal pressures (>55Kg) with low-medium crank cadences (Spd0 & Spd20).
              • Reach maximum power at low/moderate pedal pressures (say 20-25Kg) during high crank cadences (Spd80 & Spd100).
              Isn't this really the limiting factor for all our programming attempts? That if we program to reach max voltage at mid pedal pressures we have to live with that no matter what cadence we're pedaling at? I'm assuming, of course, that power is Voltage * Current, so modifying Voltage by pressure and Current by crank rpms (cadence) both serve as ways to limit power applied, but one can't override one over the other to get my bullet table, above. Right?

              I'd appreciate anything thoughts or guidance you have on this, and indeed, any information of the "Spd" portion of the Torque Tab. Do you know the cadence threshold to reach each of the Spd levels? For instance, what cadence gets us into Spd100? I was thinking of an experiment where I'd zero out MaxCur % for just one Spd column at a time and then go ride. I could then feel when the assistance drops away and when it comes back and at least get a "feel" for how fast I was turning the cranks. But, I'm hoping someone has this data or has run this experiment themselves already.

              It would have been nice if Bafang gave us different Torque Tab settings for Road vs Off-Road (Sport vs Eco). That way we could program "Off-Road" to be tuned for things like hill climbing and other situations where torque is the main power control, and program "Road" to be tuned for high speed riding where cadence is the main power control. Right now it looks like I'll have to give up the high end of torque ("pedal mashing") to get the high end of cadence. Or just have a low enough gear that I don't need to mash the pedal to climb a steep hill since the higher cadence will power me up it. And then use lower PAS levels to not go hog out crazy on level pavement.



              Last edited by smorgasbord; 03-16-2023, 10:17 AM.

              Comment


                #38
                Sorry if I wasn't clear about the "limiting factors" here. Let me try again:

                To oversimplify, Power is Voltage * Current:
                • The Delta Voltage table tells the controller how to scale Voltage based on pedal pressure.
                  • There's some additional flexibility in that you have 8 pressure ranges in which to specify the Voltage scaling factor.
                • The Spd table tells the controller how to scale Current based on pedal pressure.
                  • There's some additional flexibility in that you have 6 cadence ranges in which to specify the Current scaling factor.
                • There's one more Current scaling control, which is the PAS "Assist Level," which servers only to limit the ultimate Current that could be produced.
                So, in order to get maximum power out of the motor, you need ALL of the following at the same time:
                • Your Delta Voltage table values plus the Base Voltage must sum up to, or exceed, the maximum possible Voltage output, which is about 3,260mV.
                • You're applying enough pedal pressure such that the Voltage sum produced reaches that 3260mV.
                • Your cadence falls into one of the SpdXX ranges (0, 20, 40, 60, 80, 100)
                • Your SpdXX MaxCur(%) is 100
                • Your SpdXX Full(Kg) value that is less than or equal to your actual pedal pressure.
                • Your Assist Level in the current PAS is 100.
                For the sake of argument, let's ignore the PAS control, or just assume it's at the highest level (100). The problem is that I can only get to full power if BOTH the Delta Voltage table AND the Spd table produce their maximums. That's Max Voltage (3260mV) for Delta Voltage AND 100% Max Current (30 amps typically non-modified Ultras) for Spd. Which means that if I set the Spd Full(Kg) to a value less than the corresponding Delta Voltage max producing entry, I won't get both unless my pedal pressure really is that high.

                Perhaps an example:
                • PAS Assist Level: 100
                • Base Voltage: 780mV
                • Delta Voltages: 207mV for the first four, 414mV for the last four. (So at 60Kg the sum is 3260mV, the typical Ultra max)
                • All SpdXX columns have:
                  • Full(Kg) at 40
                  • MaxCur(%) at 100
                Now, I'm pedaling with a pressure of 40Kg. Cadence doesn't matter since all SpdXX columns are the same. While I will get full current from the Spd table, I won't get Max Voltage out of the Delta Voltage table (at 40Kg I'll only get 2436mV), so I won't be getting full power.

                The only way around this would be to reach Max Voltage in the Delta Voltage table at 40Kg of pressure, but having higher than 207/414 values. That's certainly do-able, but then I get no additional benefit from the motor when I pedal harder than 40Kg. In essence, I've restricted the torque range down. And the question then is how far down does one need to go? The issue is that humans can't put 60Kg of pressure on pedals that are turning at 120 rpm (or at whatever rpm triggers Spd100), but some can at 20 or even 30 rpm. If I want maximum power climbing hills at a 30 or even 60 rpm cadence with a 60Kg pressure, I can't then get maximum power on flat ground where I'm going really fast and have a fast 100-120 rpm cadence.

                So, if we want Max Power available, we need to reduce the torque sensing range such that the top mark is achievable at the fastest cadence in which we want Max Power. I want to climb a steep hill at, say, 30 rpm cadence and have the power scale as my pedal pressure increases up to my max (say 60Kg) to achieve Max Power. But, I also want Max Power when I'm on the flats in the highest gear and pedaling at 120 rpm cadence where I can not achieve 60Kg or pedal pressure. I have to give up one or the other.

                At best, the Spd table helps you compensate SOMEWHAT with higher current values at higher cadences, but doesn't help you reach the highest voltage values you need to achieve Max Power.

                I'm thinking I need to get more familiar with the "Torque Live Data" page in my EggRider. This not only gives me the current voltage, but also a "Speed Signal Level" and "Speed Signal ACC" as well as "Level High Time" and "Level Low Time." I'm wondering if there's a way to translate that page into actual Kg of pressure and which SpdXX range I'm currently in. Anyone know?


                Last edited by smorgasbord; 03-17-2023, 01:32 AM.

                Comment


                  #39
                  Originally posted by stts
                  ...you will have to use the manual and alter each setting to gain the understanding of how each parameter changes your motor performance.
                  Wait - you've got a manual for this? From where can I get a copy? Everything I've read is what people have determined from experimentation, not from any manuals Bafang or any OEM publishes.
                  Last edited by smorgasbord; 03-16-2023, 08:05 PM.

                  Comment


                    #40
                    Originally posted by stts
                    No no no no. You got the wrong idea what that 2436 is doing. You can get any power you want based on that voltage. What your doing in the Delta chart is telling the software 8 plus 2 endpoint voltages to watch out for. That's it. That's what the Delta chart is for. Its defining voltages that will be slightly different from motor to motor, and bike to bike.
                    Sorry, I don't know what "watch out for" means. Can you explain it further?

                    Originally posted by stts
                    And forget about Oms law. Its not going on here. The controller has a second processor running the mosfets, and its doing all the Ohms law work for you.
                    Yes, I do understand that the voltage from the Delta Voltage table isn't directly used to calculate the power output, but if I put higher values in the Delta Voltage table, then won't I get more power out of the motor at lower pedal torque? And conversely, if the pedal torque is such that the calculated voltage isn't close to 3260mV then I'm not close to getting maximum power output from the motor, no matter what the Spd table or PAS level say, right?

                    Why would Bafang use voltage for torque/pedal pressure and current for cadence & PAS? It can't be a coincidence that power = volts * amps.
                    EDIT: Well, it is a coincidence. The voltage comes out of the Torque sensor in the Ultra motor and the Delta Table converts that voltage to a Kg rating, which used by the appropriate Spd Table column to determine how much current to send on in this phase of the power pipeline.


                    Last edited by smorgasbord; 04-01-2023, 12:37 PM.

                    Comment


                      #41
                      Originally posted by stts
                      Heres another manual,
                      The Bafand Ultra is here. You might not know it by looking at it, but this 48V mid-drive is packing 1,500W peak of power at 160Nm of torque, more than any other PAS e-bike motor on the market. Here we look at it in detail.


                      It has much better details of very important PAS screen parameters. They have to have an impact unless it's been disabled. So you can study each parameter and watch for a specific behavior change to verify your access. These will help make the motor perform smoothly, so hope you get results from changes. But change carefully, as you can also make the motor performance rougher.

                      Now back to Torque screen and this is a much clearer manual. 0 Speed Boost time​ is interesting. Used when starting on a hill. It seems to give you a kick start of a half a second when starting from zero. Good on hills it says. But people have complained of sudden kick starts in postings. So this may be a confusion factor. Something to play with for you.

                      SPD chart. Oh this is an awesome bunch of parameters. I'm looking at all this and wondering why I got the motor I got. Hah.
                      Well, that's the "Michael" guide I referenced earlier, that has what I think are inappropriate values for the Delta Voltage table, essentially loading it up early in the pedal torque, and then reducing as torque increases. That all seems exactly backwards of what you'd want, which is an increasing increase (exponential?) in power out as pedal torque increases. Using the settings Michael references in that "manual" gave me a ride that would run out of steam early unless you downshifted to get pedal cadence up to pop you into one of the higher Spd bands that hit MaxCur early. I'm much happier with a small variation of ProphetZarquon 's settings.

                      But, still trying to understand how these settings interact. Seems pretty straightforward for PAS (and I've got a nice exponential increase happening there that feels great) and the Spd table, but I still don't get how Delta Voltage and Spd tables interact with each other, again especially since one is for voltage and one is for current.
                      Last edited by smorgasbord; 04-01-2023, 12:35 PM. Reason: Grey out stuff I no longer believe.

                      Comment


                        #42
                        The Torque sensor is a switch. The motor can't run till the switch is turned on. But the switch is not connected to the Motor. The switch is connected to the software. The switch is connected to Delta table. So if there is no Delta table, then the software can never turn the motor on. So we have the Delta table. with not one, but 8 different switches. And the SPD table looks at the Delta table to see if any switch is turned on. If it is, the software looks at the speed to see which SPD to turn on.
                        From what you're describing, the Delta table will ALWAYS return ON if we've set our Base Voltage correctly and there's ANY pressure on the pedal.

                        I think you're trying to say that ALL the torque scaling is derived from the Spd table, where it looks at applied Torque relative to START and FULL, and then scales Current to be the same relative amount between MinCur and MaxCur. But, if that were true, then what's the point of different values in the Delta Table? As long as applied Torque is above Base Voltage, won't the Delta Table "Switch" be ON?

                        And if so, what's the purpose of the 8 other entries in the Delta Table, and why are they scaled voltages instead of just ON/OFF (1/0) values?

                        Remember, the Spd Table doesn't reference anything in mV, so how is it connected to the Delta Table?

                        I definitely felt a change in power output when I changed values in the Delta Table. They weren't just on/off switches for power. Same Spd table values, but different power outputs at different pedal pressures.


                        Last edited by smorgasbord; 03-28-2023, 07:32 PM.

                        Comment


                          #43
                          Also I note that the Throttle page contains:

                          Start Voltage (x100mV)
                          End Voltage (x100mv)

                          And that Michael's page says to find the lowest Voltage the throttle will handle without errors and measure the highest voltage output from the throttle when pressed to max. Now, again, if this were just a switch then there would be no need to find both values.

                          And yes, Throttle also has Start Current%, presumable with max already hard-coded at 100%, modulo Speed Limit or Designated Assist level. It seems apparent that the throttle voltage output changes as you apply the throttle and that's how the throttle is not an On/Off switch, but an analog power ramping control. How that output voltage is interpreted by the controller into what is fed into the motor is not known, but I suspect the voltage output by the throttle is converted into some Percentage based on where it is relative to Start Voltage and End Voltage, and that Percentage is used to modulate the power (probably Via applied current and probably scaled between Start Current and Limited Current (Amps) as set on the Basic Tab.

                          So, it would therefore make logical sense that the Delta Voltage table output is used in a similar manner, and then the Spd table output is used to modulate that.
                          Last edited by smorgasbord; 03-17-2023, 08:22 AM.

                          Comment


                          • AZguy
                            AZguy commented
                            Editing a comment
                            The start current is the amount of power applied when the throttle is initially "cracked" so putting it at 100% would turn it into an on/off switch if the mode is current (not a fun one in a low gear for sure!)

                            Most "factory" tunes I've come across have it at 10% which I find too abrupt and most folks I know turn it down. I set mine at 1% (mode current) and really like the very smooth delivery like that

                          #44
                          After some offline communication with ProphetZarquon and some reverse engineering, I've started to get a better grasp on how Ultra programming actually works. You can read what I've determined here.
                          Last edited by smorgasbord; 03-28-2023, 07:30 PM.

                          Comment

                          Working...
                          X