Dear all i hope my Mail reaches you at Best health.
I am Linda from germany and i have got a question about arduino code for 24v Stepper Motor with planetgearbox.
Next to the Stepper Motor, i have got a arduino Uno a Digital stepping driver dm542t and a 24v Power Adapter.
AT the Moment, the RPM at the end of the gearbox are ca. 8. It is too slow. At the driver, i take 400 pulse/rev. Smaller is Not possible.
The is my arduino code. I think it is a easy one:
Void setup
Pinmode 8 output
Pinmode 9 output
Void loop
Digitalwrite 8,high
For int =x, x=<10000,x++
Digitalwrite 9 high
Delaymicroseconds 200
Digitalwrite 9 low
Delaymicroseconds 200
Delay 1000
Is it possible to increase the speed with other arduino code?
Thank you for your help and all the best
Linda
The is my arduino code
That is not Arduino code. It is not any type of computer code. It is "pseudo code" which is half way between human language and computer language. It cannot be understood by computers, only by humans. Please post your Arduino code. Use code tags as described in the forum guide. Also post clickable links to the specs of your motor, motor driver and power supply.
Please also post a link to the datasheet for the stepper motor.
The speed of a stepper motor is determined by the interval between steps.
However the available torque from a stepper motor falls off rapidly with speed. A higher voltage stepper motor power supply (within the limit imposed by the stepper driver) will help to achieve higher speeds.
...R
Stepper Motor Basics
Simple Stepper Code
linda89:
Dear all i hope my Mail reaches you at Best health.
I am Linda from germany and i have got a question about arduino code for 24v Stepper Motor with planetgearbox.
Is it possible to increase the speed with other arduino code?
Have you tried decreasing the delay?
If you can't get enough speed with the current stepper, try one that does not have a gear reduction.
Here is your program in a form that will actually work:
const byte DirectionPin = 8;
const byte StepPin = 9;
const unsigned long StepDelay = 200; // Microseconds
void setup()
{
pinMode(DirectionPin, OUTPUT);
pinMode(StepPin, OUTPUT);
}
void loop()
{
digitalWrite(DirectionPin, HIGH);
for (int x = 0; x <= 10000; x++)
{
digitalWrite(StepPin, HIGH);
delayMicroseconds(StepDelay);
digitalWrite(StepPin, LOW);
delayMicroseconds(StepDelay);
}
delay(1000);
}