V2 Motor Shield + Nema 17 speed control issues

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Cloud999
 
Posts: 1
Joined: Mon Sep 26, 2016 5:58 pm

V2 Motor Shield + Nema 17 speed control issues

Post by Cloud999 »

Hello!


I have an arduino uno soldered to a V2 motor shield connected to a Nema 17 stepper motor (https://cdn-shop.adafruit.com/product-f ... asheet.jpg). We're using this system to power a peristaltic pump for cell culture applications. We can get the motor to work but we're having issues with the torque. We need higher torque to pump fluid through some PVC tubing. Our understanding is we need to decrease the speed in order to increase the torque for the motor (see torque vs pps graph in stepper motor datasheet). Here is the code we're using:

Code: Select all

Adafruit_StepperMotor *myMotor = AFMS.getStepper(200, 2);

void setup() {
  Serial.begin(9600);
  Serial.println("Stepper test!");

  AFMS.begin(); 
  
  myMotor->setSpeed(10); 
}

void loop() {
  Serial.println("Double coil steps Mercer 12");
  myMotor->step(100, FORWARD, DOUBLE);
}
We can change the speed from 10, but we can't seem to slow it down below 10rpm.... If we go below 10, let's say 6rpm or 3rpm, the motor stepper actually speeds up. If we go above 10rpm, the motor speeds up again. It seems like 10rpm is the baseline. Why is there a non-linear relationship with the rpm setting? The goal is to slow down the speed to increase the torque but we can't seem to slow down the rpm.


Thank you for your feedback!
Last edited by adafruit_support_bill on Mon Sep 26, 2016 7:15 pm, edited 1 time in total.
Reason: please use the </> button when submitting code. press </>, then paste your code between the [code] [/code] tags.

User avatar
adafruit_support_bill
 
Posts: 88091
Joined: Sat Feb 07, 2009 10:11 am

Re: V2 Motor Shield + Nema 17 speed control issues

Post by adafruit_support_bill »

The timing is done in microseconds, and with very slow speeds, the number of microseconds is too large and you get an integer overflow in the library. For slower speeds you can either use the AccelStepper library or do your own step timing.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”