slow and precise motor velocity control

Hi,
I'm Claudia from Italy.
I'm not really an expert on motor and such.
For an art project I need to drive a motor at very precise low (continuous) speeds.

Specifically:
from 1 complete turn in 10 seconds - to 1 complete turn in 1 second. (6 rpm to 60 rpm, right?)

Right now I have a setup with an arduino, a potentiometer, and an oled mini screen, and a continuous servo.
I started with this continuous servo.
Everything works fine, and the code flows. I can set the speed with the potentiometer, the oled shows the values and the motor runs.

BUT although the motor is rated from 0 to 120 rpm... it simply does not reliable work under 60 rmp.
It does not have enough power to turn the gears :
I can hear it crying, but it does not move.

I can maybe need a stepper, but the following is rated as 15 rmp... this means (if I understand correctly) 4 seconds for a complete turn, at max speed. Too slow.

So, here I am :slight_smile:
Can you suggest the motor for my needs?
I do not need high torque. It just have to spin some cardboard, but I need to set a precise speed and be sure the speed is correct.
The application need to be small and portable (I'm using a nano, to give you a suggestion).
I have not power problem, the setup will be powered by an usb cable + charger (2A).

Thank you very much :slight_smile:

Claudia

Hi Claudia,
Yes a stepper motor is a good solution. Some low cost ones have a gear reduction and that would even be better.

See about them here: http://arduino-info.wikispaces.com/SmallSteppers You can get these on Ebay, DX.com, YourDuino.com etc. for less than $5

Information about stepper motors is HERE.

Tell us how it works out..

First a note about naming - a "continuous rotation servo" is not a servo at all, its a DC motor with
integrated motor controller (made by hacking out the feedback from a hobby servo).

For precise position control (which is what you need, as you talk about 1 turn) there are two
approachs:

  1. Open-loop control using a stepper motor.

  2. A servomotor (ie a motor, encoder and PID feedback loop, in some form)

[ For a single fixed speed there are synchronous AC motors with gear-reduction, but they
don't do position control, just lock the speed of rotation to the mains frequency. ]

terryking228:
Hi Claudia,
Yes a stepper motor is a good solution.
Tell us how it works out..

Thank you terry! I studied some very similar links.
I figured out these 5 dollars steppers and they will per perfect for my application (price and dimension) but adafruit tells that they are around 25 rpm. Quite slow :
Adafruit overdrives the stepper to 50rpm ( Small Reduction Stepper Motor - 5VDC 32-Step 1/16 Gearing : ID 858 : $4.95 : Adafruit Industries, Unique & fun DIY electronics and kits ) with 9v. But - if possible - I'd like to stick to 5v, otherwise I'll have to put a dc boost, and I have really little space :\

MarkT:
First a note about naming - a "continuous rotation servo" is not a servo at all, its a DC motor with
integrated motor controller (made by hacking out the feedback from a hobby servo).

Hi Mark :slight_smile:
I apologize if I was confusing, I'm not an expert at all, I was using the name on the product page :\

For precise position control (which is what you need, as you talk about 1 turn) there are two
approaches:

Actually, I have to apologize again. I expressed myself poorly.
I do not need precise position control. I only need precise speed control.
The cardboard will spin continuously. Like a fan. But slow :slight_smile:
No position info needed. I only need to set the velocity, range from 1 turn per second to 1 turn every 10 seconds.

[ For a single fixed speed there are synchronous AC motors with gear-reduction, but they
don't do position control, just lock the speed of rotation to the mains frequency. ]

I'm looking in these "synchronous AC motors" but they requires 220v, if I understand correctly.
Is there something that can work for my purpose and can be powered in dc (by an arduino will be even better)?
It's something the children will play to. In the final version it will be powered by a battery pack (the same we use for mobile phones).

Thank you all :slight_smile:

synchronous motors only do one speed.

If only speed control is needed you can use a DC gearmotor and a motor shield - for a ten-to-one
speed ratio a larger motor would be needed (where friction is less important) and the right
decay-mode is needed for the PWM control, namely synchronous rectification, not slow decay mode.

A stepper motor is perhaps simpler to get right first time and you won't need gears.

MarkT:
A stepper motor is perhaps simpler to get right first time and you won't need gears.

Thank you Mark :slight_smile:
I'll follow your advice and I'll go for a stepper.
May I ask one last question?

How do I calculate the max rpm of a stepper?

I'm looking on aliexpress, and there are litteraly a ton of steppers.
This one Here will be perfect, for size and voltage (small and 5v). Or also this on ebay.

But I do not know if they can max out at 60 rpm.
Usually steppers' datasheet do not report rpm :
I looked for a calculator online, but I fail to find in the stepper datasheet all the variables needed for the math.

Thank you!

These links may be helpful
Stepper Motor Basics
Simple Stepper Code

...R

Max stepper speed depends on a lot of factors including the mechanical load, but 60rpm isn't
usually a problem.

Claudia_:
But I do not know if they can max out at 60 rpm.

The problem with stepper motors is... they step, thus only the average speed is constant. The motor in the link has an 18 degree step size, thus even if you microstep it, you will find that at slow RPM the jump between "steps" is noticeable. Thus a stepper without gearing may not suit your needs if you need a smooth constant speed.

I use motors like this where a constant speed is needed. They are small, low current, quiet and available with a range of RPM and voltages.

DC motor with Proportional-Integral velocity controller :slight_smile: I can help you design the controller.

I don't think a stepper motor would work, unless you have some reduction ratio (gears, bands and pulley, etc) that makes the "steps" unnoticeable.

Good News!
After some search, and a long shipping I found a motor able to perform at my need.
Small Reduction Stepper Motor - 12VDC 32-Step 1/16 Gearing

http://www.ebay.it/itm/232004477688?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

The auction says 513 step per revolution but I found this to be an error.
It has 1026 step per revolution.

The stepper library does not drive the motor very well, but with Accelstepper I managed to have a very precise control of speed, and rotation time.

#include <AccelStepper.h>
// Define some steppers and the pins the will use
AccelStepper stepper1(AccelStepper::HALF4WIRE, 8, 10, 9, 11);


void setup(){  
}

void loop() {
    stepper1.setMaxSpeed(1026.0); //513 step per second = 30 rpm (1r 2sec) // 1026 60rpm 
    stepper1.setAcceleration(100.0);
    stepper1.moveTo(51300); // time to run (1026steps x n° s) || 10 second overhead
    stepper1.run();
}

Now I have to integrate the final parts of my project, a rotary encoder to set the speed and a lcd to visualize the data.

I'll keep you posted if you like :slight_smile: