Hi, I'm trying to run a NEMA 17 stepper motor (2.3 Amps/phase) using DM332T Stepper driver and CONTROLLINO MEGA board. I attach an schemattic of what I'm trying (it shows ARDUINO MEGA instead of CONTROLLINO MEGA, but I'm replicating it exactly the same) and the code that I'm using.
For the switches of the driver:
- As the motor runs with 2.3 Amps, I have switches 1, 2 & 3 on OFF, OFF, OFF position that refers 3.2 peak current | 2.29 RMS current. Is it correct??
- As you can see on the code, I'm trying to run it at 400 steps/rev, so the switches 4, 5 & 6 are in ON, ON, ON position. Is it correct?? (I think it is)
I'm using a 24DC V Power supply.
I've got very limited experience on ARDUINO and Stepper drivers, but I'think that I'm doing somethin wrong with CONTROLLINO MEGA. Nothing happens when I execute.
Thanks for the help!!
CODE:
int x;
void setup() {
pinMode(8,OUTPUT); //Set Pin 8 as PUL
pinMode (9,OUTPUT); //Set Pin 9 as DIR
}
void loop() {
digitalWrite(9,HIGH); //Set high level direction
for (x=0; x<400;x++) //Repeat 400 times a revolution when setting is 400 on driver
{
digitalWrite(8,HIGH); //Output high
delayMicroseconds(500); //Set rotate speed
digitalWrite(8,LOW); //Output low
delayMicroseconds(500); //Set rotate speed
}
digitalWrite(9,LOW); // Set high level direction
for(x=0;x<400;x++)
{
digitalWrite(8,HIGH);
delayMicroseconds(500);
digitalWrite(8,LOW);
delayMicroseconds(500);
}
delay(1000);
}