No announcement yet.

Cruise control for BBSHD - Programming a mode to keep a constant RPM

  • Filter
  • Time
  • Show
Clear All
new posts

    Cruise control for BBSHD - Programming a mode to keep a constant RPM

    New programmer here with what I hope is a simple question.

    I want to program my DPC18 to have a throttle-only mode that does the following:

    - add power slowly until 135 RPM is reached
    - keep adding / removing power to maintain 135 RPM, regardless of changes in pedaling, slope, etc.

    Is there a way to make a mode that does exactly this? The goal is that I could just peg the throttle and the bike would accelerate to 135 RPM and stay there as long as I hold the throttle down (or down enough to produce enough power to stay at 135 RPM.

    Note that this would be used in very low gear only, for a long climb. I've posted some calculations I've made about the power needed to complete this ride over in the BBSHD builder section.


    While I think it may be possible what your asking. I don't foresee any company leaving code in there controller or tell you how to add it. While your purposes sound pretty legit if this sort of thing were to go haywire while someone is on a park ride it would leave them open to lawsuit and its cheaper on that note for them to leave the ability to program it out of the controller in the first place. Not trying to shoot down your idea just being real with you. perhaps you may find a programmer willing to share that information with you...but they may not want to tell it to you on a public forum for similar reasons.


      I'm just saying that I want one of the constraints in the mode to be RPM. This does not seem that different from the way I understand the PAS modes to work. I just dont want to have to clown pedal to keep the motor working.


        I'll ask the question another way.

        What does the Speed Limit % do? I think it limits based on RPM of the motor, not miles per hour of the bike.

        Assuming its RPM, what is considered 100% RPM? Or if its MPH, what is considered MPH?


          according to Steve Penoff,

          "The speed limit sets at what speed (% of the maximum speed set from your LCD) the motor will reduce its power and just keep that speed instead of accelerating more."


            I'm very new to programming controllers so please check my response with someone more qualified, but since you aren't getting many replies I will try help. As far as I know the motor is approximately 150-ish RPM and the speed limit % is based on motor RPM. If you set a given pas level to 100% then it will give you power (how much power depends on what you set the current % to) until you reach 150-ish rpm. If you lower the speed limit % then the motor will cut back power at a lower rpm. I don't think it is based on the bike speed but on the pedal cadence.

            Question: why are you concerned about motor RPM when using throttle? I can understand the concern when using PAS (so you can pedal along with the bike, though 135 is a bit high for that), but with throttle only it hasn't clicked why you might want that, and I'm not sure how to limit it that way. However, if I have the right info about the 150 rpm, then it isn't far off to just use it at max throttle.

            Last edited by AndyZ; 12-29-2018, 06:15 PM.


              Speed limit percent is the [maximum] percent of battery voltage applied to the motor

              Motor speed is proportional to applied voltage

              The actual speed limited by the speed limit setting is dependent on battery voltage which changes with load current and state-of-charge


              • AndyZ
                AndyZ commented
                Editing a comment
                Thanks for that info AZguy. So in other words, is it correct to say that the only way Blbrand16 can maintain a constant rpm with a variable load/battery state is to manually adjust the gears, throttle, or pas? In other other words, he can't do what he is asking?

              He can't do exactly what he wants to since the speed limit will vary by battery voltage... since the cell voltage can range from a low of about 3.0 to a high of 4.2 the speed will be about 40% higher on a lightly loaded fully charged battery than a flat battery... but it may be close enough for a bike....

              There are other parameters that will need to be considered though. If the controller were set to have a "brick wall" limit - i.e. the power is either on or off when it is above or below the setpoint (think a thermostat) the operation around the setpoint would be very rough, inefficient and would likely oscillate so not so good. So that wall needs to be softened and there are parameters that appear to affect that that don't seem to be all that well characterized in the "documentation".

              I'm not entirely positive on some of the settings - all this "documentation" is a lot of reverse engineering by very savvy and tenacious folks, not from the manufacturer so it needs to be viewed from that perspective.

              Even when I say that the motor speed is proportional to the applied voltage, that is a truth about BLDC motors but when I say the speed limit % in the controller is the percent of battery I don't really "know" that. From plenty of experience with BLDC controllers and measurements I and others have made, it's almost certainly the case and I'm cozy with saying this is how it works. I'm very shy about saying something "is" without a very high degree of confidence but that's me.

              Point is there are other settings like "keep current" that folks aren't quite as certain about and will likely need to be explored in order to achieve his goal.

              Frankly I'm not sure why Blbrand16 want to limit it if he's not pedaling though. I understand it while pedaling but if you are just railing the throttle without any pedaling it would be better to just let her go 100%...


                I have wondered how well the speed-based, Bafang hub-powered Juiced bike cruise control works, and if it's something they came up with on their own.
                Last edited by ncrkd; 12-30-2018, 08:29 AM.
                2nd build, 2018 Crust Scapegoat, BBS02 or BBSHD, Rohloff IGH
                3rd build, 2018 Crust Evasion step-thru, BBS02, Shimano Nexus INTER-3 IGH
                4th build, 2016 Salsa Marrakesh flatbar frameset, BBSHD, Alfine 8 IGH

                Visit the forum knowledge base


                  Got it, thanks AZguy