Logarithmic random speed control- steppers or "servo"?

I started a new random halloween oriented project today- mostly in terms of hardware and physical design but for the motor element I have some early choices that will determine my program goals later on. I'm still very much a novice at programming so it's particularly important that I choose hardware that won't get me in over my head. With that in mind, here are two early drive choices:

  1. "Continuous rotation servo"- As you probably know you can buy these directly, or modify a servo to achieve the same thing. I'm pretty sure the end result is the same as simply joining a conventional ESC to any small DC motor- since there's no positional feedback I'm not sure why they even call it a "servo" but here we are.
  2. Stepper- This would be ok in theory, noticible steps and maximum speed might be detractors but it's just a fun halloween thing so I don't care too much.

My ideal program would vary the speed of this- possibly using some values generated randomly, but in any case I'd like my motor to slowly ramp up and down periodically, sometimes reverse to try to avoid the look of robotic motion. This also means that jumps between speeds would be undesirable.

The system will ultimately be automatic and there won't be any inputs other than maybe a limit switch or two.

So, I was hoping that somebody might nudge me toward some smart choices early on before I head down the wrong track on this one. Not asking anyone to write it for me but always looking for example code or useful libraries or even just keywords to research while building this out! Thanks for any help and happy halloween!

Download the AccelStepper library in the IDE and look at all the examples therein. They have lots of example of ramping up/down, etc. You can also control different types of motors with it depending on how you configure it. It would be a good starting point.

1 Like

I'd forget about continuous rotation servos. No positional control and usually very poor speed control. So something like a very bad ESC connected to a small geared DC motor.

Steve

Thanks! Yeah, I think by saying "continuous rotation servo" what we really are talking about is a gearmotor with an ESC. It's just that its consolidated to one little enclosure, which is handy sometimes. I have AccelStepper library now at blh64's advice. I found an old stepper board and am working on controlling a regular DC motor with it. This will probably give me a decent balance of speed and control- precision and positional feedback isn't criticial for this one.