Stepper Motor 0-1200 rpm advice... please

Hi

I've just joined the forum (is there an introductions page?) as I am looking to make a guitar pickup winder. I discussed the idea with a mate and he suggested that stepper motors are the way to go and under normal circumstances my mate (Chris) would help me out but his wife is seriously ill.

Chris wrote:

Sorry for the delay in replying. I have been consumed by hospital visits etc.

The perfect approach would indeed be to use 'stepper motor'. They are what I use on the Wonker. But they require drivers and programmable interface control PIC) and then write a program to run it.

I would under normal circumstances make one for you.

Wonker is the name he has given to a cnc foam wing cutter he designed and made to produce model airplane wings.

I've had a look around the internet and have come across several videos which shows smotors, arduino and potentiometers controlling the stepper motor.

I'm aiming to control the speed of a motor from 0-1000rpm (preferably 1200rpm), torque needs are low.

The videos I have seen showing setups don't appear to get anywhere need the speed I'd like.

I am an absolute beginner here so a couple of questions:

  • Is what I describe achievable?
  • Has it been done before and is there any information which I could look at?
  • If it hasn't been done before, can you point me in the right direction!?

Thanks in anticipation.

Simon

Stepper motors are not normally used at high speeds - their purpose is precise positioning.

I suspect you just need to turn something quickly and count the turns. I would use a suitable DC motor for that with some simple means to detect a pulse every revolution. I have done this for a small motor using a QRE1113 reflective optical sensor to detect a blob of white paint on a black disc on the motor shaft. But that's not the only option.

...R
Stepper Motor Basics
Simple Stepper Code

Robin2:
Stepper motors are not normally used at high speeds - their purpose is precise positioning.

I suspect you just need to turn something quickly and count the turns. I would use a suitable DC motor for that with some simple means to detect a pulse every revolution. I have done this for a small motor using a QRE1113 reflective optical sensor to detect a blob of white paint on a black disc on the motor shaft. But that's not the only option.

...R
Stepper Motor Basics
Simple Stepper Code

Hi

Thanks for the reply.

Are all DC motors suitable for variable speed control? Could you point me in the direction of what sort of DC motor you would consider suitable just as a starting point for me?

What I ask may seem blindingly obvious to you but this sort of thing is a first for me though I am keen to read and learn: )

Thanks again and apologies if what I'm asking is very basic.

Simon

Just trying to find information on the internet and came across:

This

Does this basically fit my need if I find a suitable DC motor?

This piece of code from your link is not very reassuring

sensorValue = analogRead(analogInPin)/4;
outputValue = map(sensorValue, 0, 1023, 0, 255);
analogWrite(transistorPin, sensorValue);

The variable outputValue does not seem to be used.

The bigger problem is that the project has no means for the Arduino to measure the speed of the motor or to count revolutions.

I don't know if you need to keep the motor speed constant within a few percent of some speed value.

Really, the first thing you need to do is identify a motor that has adequate torque and speed for your project.

Then when you know how much current the motor needs (and the voltage it will be working at) you can select a suitable transistor or motor driver board to control it with your Arduino. The Pololu website might be a good place to get some ideas about what is available. If the motor will only need to rotate in one direction a transistor (preferably an efficient Mosfet) will be sufficient - but a motor driver might actually make life simpler.

After that you need to figure out how you are going to detect revolutions so you can count them.

You can get motors with built-in rotary encoders and you can get separate rotary encoders. I would not be inclined to choose either because they usually produce a lot of pulses per revolution and at high motor speeds that can swamp the Arduino. I don't think you need more than 1 pulse per revolution.

...R

I've had a look around the internet and have come across several videos which shows smotors, arduino and potentiometers controlling the stepper motor.
I'm aiming to control the speed of a motor from 0-1000rpm (preferably 1200rpm), torque needs are low.

With low torque requirements 1200 rpm are certainly possible with good steppers and a reasonable driver. Here a quick video showing two steppers using TeensyStep to run in sync at 160'000 stp/sec (=3000 rpm @3200stp/rev)

And here some code showing you how to use the library for changing the motor speed between 0 and 1200rmp with a potentiometer (note: you need a Teensy board (Arduino compatible, cheaper, much faster and smaller than a UNO) for that.

#include "Arduino.h"
#include "TeensyStep.h"

constexpr unsigned stepFreq = 32000;  // Assuming 8 microsteps we get: 200 stp/rev * 8 *1200 rev/min / 60s/min = 32000 stp/s
constexpr unsigned acc = 64000;       // This will accelerate the motor to 64000 stp/rev in 1s. I.e. it takes 0.5s to reach the maximum speed

Stepper m1(0, 1);                     // STEP : pin 0, DIR : pin 1
RotateControl controller;             // Controller to move the stepper

void setup()
{    
  m1.setMaxSpeed(stepFreq);           // set motor parameters
  m1.setAcceleration(acc);

  controller.rotateAsync(m1);         // start the motor. This function will return imediately, motor runs in the background
}

float curSpeedFac = 0.0; 

void loop()
{
  float newSpeedFac = analogRead(2) / 1024.0; // Read the pot value from pin2 and transform to float factor [0.0 ... 1.0]

  if(newSpeedFac != curSpeedFac)              // Pot changed 
  {
    controller.overrideSpeed(newSpeedFac);    // This sets the new speed to maxSpeed * newSpeedFac
    curSpeedFac = newSpeedFac;                
  } 
}

Here a video showing a simular movement with 2 synced motors:

Hope that helps

SlopeSoarer:
Hi

I've just joined the forum (is there an introductions page?) as I am looking to make a guitar pickup winder. I discussed the idea with a mate and he suggested that stepper motors are the way to go.

I disagree, stepper is the wrong tool for this job, you ideally want a motor which can have torque and
speed control, and a turns counter (perhaps a hall switch). Steppers have no torque control at all
and are likely to snap the magnet wire every time it starts to jam - a torque limited motor would just
stall and allow recovery.

Ordinary DC motors can be torque controlled using current limiting, fairly independently of speed.

... you ideally want a motor which can have torque and
speed control, and a turns counter (perhaps a hall switch). Steppers have no torque control at all
and are likely to snap the magnet wire every time it starts to jam - a torque limited motor would just
stall and allow recovery.

This is certainly all true but as usual, a lot of roads lead to Rome.

I am an absolute beginner here so a couple of questions:

So, implementing a Hall sensor, PID regulator and optimizing the parameters, doing some current limit circuitry which does not interfere with the PID might be a little bit too involved for a beginner?
I think the OP is not looking for a high end machine but for something he can implement and have fun with right away. Here a nice example Automated Guitar Pickup Winding | Hackaday A lot of others are available on the net. Using both, steppers and dc motors.
Just my 2 cents.