[Solved] Servo highest speed

Hi, the servo i am using has a max rated rpm of 3000. It is set to 10,000 pulses per revolution.
Using the sample code with STEP and DIR, i am able to control speed and number of revolutions etc. and it works fine. We know that cnc softwares are able to have servos reach their rated max rpm. Question is, using Arduino, how can i reach a maximum rated speed of 3000 rpm using the sample code? so far using the following looping code, driver showing an rpm of around 653. Unfortunately it doesnt go lower than 1 microsecond. What method can i use in the code to achieve my goal?

/* Example sketch to control a stepper motor with TB6600 stepper motor driver and Arduino without a library: continuous rotation. More info: https://www.makerguides.com */

// Define stepper motor connections:
#define dirPin 4
#define stepPin 5

void setup() {
  // Declare pins as output:
  pinMode(stepPin, OUTPUT);
  pinMode(dirPin, OUTPUT);

  // Set the spinning direction CW/CCW:
  digitalWrite(dirPin, HIGH);


}

void loop() {
  for (int i = 0 ; i <= 10000; i++) {
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(1);
    digitalWrite(stepPin, LOW);
    delayMicroseconds(1);
  }  
}

It can depend what servo you are using, some have a higher speed than others, but the average is around 60 rpm

Link, please.

Which one?

Arduino uno

There is no link for the driver, but these are the pages from the driver manual that mention something about rpm parameters....




But your title says servo.

What stepper can go from a dead stop to 500,000 steps per second? None.

To achieve that kind of speed you will need acceleration like the AccelStepper or MobaTools stepper libraries provide.

I am surprised that the stepper even moves with that code.

Post a schematic of your setup. Post technical data for the stepper and driver.

it works because driver has STEP and DIR as you can see in the attachement


pins

Please mark the topic "solved"

Can you post a picture of your driver?

solved what? have you read the question!

forget going 3000rpm, does anyone know how to make this AC servo move only one loop?

i tried accelStepper, it doesnt move it:

// ConstantSpeed.pde
// -*- mode: C++ -*-
//
// Shows how to run AccelStepper in the simplest,
// fixed speed mode with no accelerations
/// \author  Mike McCauley (mikem@airspayce.com)
// Copyright (C) 2009 Mike McCauley
// $Id: ConstantSpeed.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $

#include <AccelStepper.h>

AccelStepper stepper(1,4,5); // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5

void setup()
{  
   stepper.setMaxSpeed(1000);
   stepper.setSpeed(500);	
}

void loop()
{  
   stepper.runSpeed();
}

I tried looking that module up…
It’s going to be hard with Turkish / Chinese origins…

See if you can get a manual for it or you may need to find someone with direct experience.

Do you have a photo of the terminals and their designations ?

there is a manual, i posted the terminals....

pins

Maybe scan it again and repost, so we can read it.

do you have a servo or stepper motor? step and dir suggest a stepper motor

i've found the steppers motors can't be stepped faster the ~1msec/step.

don't know how many steps/revolution your motors have, but if there were 32 step/rev, 3000 rpm would correspond to 50 steps/sec, 1600 steps/sec or 1 step every 625 usec which may not be achievable

its an AC servo motor, it has PUL + - and DIR + - and it has 10,000 pul per revolution

pulse/revolution suggests stepper motor

an AC motor typically turns in only one direction

a more typical RC servo is simply provided a 1-2 msec pulse that rotates it to a position

a "servo" typically uses a DC motor driven in either direction with a controller that measures position and often just drives the motor to that position.

the code you posted generates a step pulse, again suggesting a stepper motor.

what is the model # of the controller board?

its not a stepper, its an AC servo, it has an incremental encoder see images....