Hello,
before start excause me for my english. I dont a enginer, and english dont my natural language.
I have got motor shield v2,
I m changing set speed, but I checked maximum about 70 rpm.
My motor sheet is here.
https://www.sparkfun.com/datasheets/Rob ... 011-25.pdf
and my codes are :
""
unsigned long eski=0;
unsigned long an;
unsigned long eski1=0;
int sayac = 0;
int abc = 4800;
#include <Adafruit_MotorShield.h>
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
Adafruit_StepperMotor *myMotor = AFMS.getStepper(200, 1);
void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
while (!Serial);
if (!AFMS.begin()) { // create with the default frequency 1.6KHz
// if (!AFMS.begin(1000)) { // OR with a different frequency, say 1KHz
while (1);
}
myMotor->setSpeed(abc); // 10 rpm
}
void loop() {
an=millis();
eski1=an;
Serial.println("Single coil steps");
myMotor->step(200, FORWARD, SINGLE);
myMotor->step(200, BACKWARD, SINGLE);
eski=millis()-eski1;
Serial.println(abc);
Serial.println(eski);
eski=0;
// Serial.println("Double coil steps");
// myMotor->step(100, FORWARD, DOUBLE);
// myMotor->step(100, BACKWARD, DOUBLE);
sayac++;
}
""""""
and results are
setspeed value result(one forward,one backward time. milisecond)
1 3584
2 2560
3 2217
4 5342
5 5898
6 1875
7 5583
8 3437
9 1760
10 7014
11 5915
12 5001
13 4227
14 3563
15 2989
16 2486
17 2042
18 1647
19 7887
20 7569
21 7282
22 7020
23 6783
24 6564
25 6363
26 6177
27
28 5845
29 5695
30 5557
100 2741
200 2137
400 1835
500 1775
1000 1654
2000 1595
3000 1573
4000 1564
4800 1557
What is wrong in my codes, or system, And how can I see faster than 500-600 rpm.?
Thanks...
stepper motor rpm
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- ayzer
- Posts: 2
- Joined: Wed Mar 16, 2022 8:32 am
Re: stepper motor rpm
And I forgat power details.
My power suply 12 volt 5A
and connect to motor shield external..
My power suply 12 volt 5A
and connect to motor shield external..
- adafruit_support_bill
- Posts: 88151
- Joined: Sat Feb 07, 2009 10:11 am
Re: stepper motor rpm
The stepper motor timing for the Adafruit_MotorShield library uses the delay() function, so it is not very accurate. And the top speed is limited by the i2c bus communication to about 50 RPM - depending on the processor.
The AccelStepper library timing is more accurate. But the maximum speed is still limited. You can fine AccelStepper examples included with the library.
The AccelStepper library timing is more accurate. But the maximum speed is still limited. You can fine AccelStepper examples included with the library.
Please be positive and constructive with your questions and comments.