Running a motor intermittently based on input variables

I have a question for you guys. Having fun learning Arduino, but I haven't found anything to help me get going on this latest endeavor.

I am building a system that will dose a chemical for water treatment to a certain level based on 3 user inputted variables. The user input variables will be done via potentiometers and a simple LCD Readout. I'll then have a formula that will tell me how much fluid must be dosed by the motor driven pump.

The pump is most likely going to be a stepper, such that I can control exactly how much it is rotating for precise dosing. Spec sheet attached. (Note there is also a DC motor version, I'd prefer step). I could build an h-bridge driver, or use the attached off the shelf drive which takes a 0-5v input to run the motor. Low mode on the controller ranges from 0-150RPM.

The trick is that I will have a wide range of flowrates that will require me to run the motor from .65RPM to 28RPM continuously. Given how low these speeds are, the alternative to continuous operation is I run the motor at a duty cycle at a faster intantaneous flow rate to achieve my nominal average rate over time.

The problem with duty cycle is I only know how to do that with delay in the loop, which I assume will make user adjustment of the control variable vary glitchy as they will only update in the loop with the long motor cycle delay. Is there a better way to do that?

Alternatively, I could use microstepping, but I currently do not know how to do that.

Now.. to make this discussion even larger, I am actually trying to do something VERY similar, only with a simpler system that uses a brushed DC motor with encoder speed feedback and PWM. I cannot PWM it low enough, so trying to figure out how to output a PWM intermittently.

Boxer 9K 9QQ.pdf (342 KB)

UI Stepper Driver Assy.pdf (512 KB)

With a stepper motor, the resolution depends on how much fluid gets pumped with one step (ignoring the possibility of micro-stepping). You can step as slowly as you want so low RPMs aren't an issue.

Now.. to make this discussion even larger, I am actually trying to do something VERY similar, only with a simpler system that uses a brushed DC motor with encoder speed feedback and PWM. I cannot PWM it low enough, so trying to figure out how to output a PWM intermittently.

It's not practical to make a stepper motor from a DC motor, although you can make something that's servo-like.

Most real-world programs don't use delay(), but of course there are exceptions because sometimes you don't need the processor to do anything useful during the delay time.

The problem with duty cycle is I only know how to do that with delay in the loop, which I assume will make user adjustment of the control variable vary glitchy as they will only update in the loop with the long motor cycle delay. Is there a better way to do that?

Look at the Blink Without Delay example and the post at the top of the forum about doing "several things at the same time". The stepper library also works without delay().