Issues - Digital Stepper Driver with Arduino UNO

Hello, my name is Tom :wave:

Today, I have a question for you: why it doesn't work ? :frowning:

Let my explain... I tried to control a stepper motor with a digital stepper driver and an Arduino board. The problem is: it doesn't work!

Electrical part :zap:



Software part :computer:

int x;
int speed_inv = 1000;

void setup() {
pinMode(9,OUTPUT); // 9 as PUL
pinMode(8,OUTPUT); // 8 as DIR
pinMode(3, OUTPUT); // 3 as LED
digitalWrite(8,HIGH); // rotation +
}

void loop() {
digitalWrite(3,HIGH); // LED ON

// repeat 400 times a revolution when setting 400 on driver
for(x = 0; x < 400; x++){
digitalWrite(9,HIGH); // Output high
delayMicroseconds(speed_inv);
digitalWrite(9,LOW); // Output low
delayMicroseconds(speed_inv);
}

digitalWrite(3,LOW); // LED OFF
delay(1000);
}

:white_flower:
Board : Arduino UNO R3
Digital Stepper Driver : DM556T
PSU : 24V/DC, 2.5A, 60W
Stepper Motor : NEMA 23
:white_flower:

More information :thought_balloon:
The motor works, I have already tried the same configuration (but in "common-anode") with a PLC (Zelio) and the ACE 11 from Velocio.net and it worked.
I have already tried also replacing the stepper driver, and it still doesn't work.
I tried both config' for the stepper driver: "common-anode" and "common-cathode".
With an ammeter, between PUL+ and PUL- there are pulses of 0 to 5V and 5V between DIR+ and DIR-.
I tried several wiring several codes found on the internet but nothing worked.

Thank you to those who take the time to read and respond in advance.
Have a good day :upside_down_face:

Hello Tom, at first it would be good to know wich part of your project does not work?
Is the Code correct?
Does the LED work?

Greetings Simon slight_smile:

Hello, thank you for the response.
I did not give all the information, sorry !

  • The motor is supposed to run but it does not, this is the part of the project that does not work (but the motor is running, as indicated above, on another project)
  • The code is correct (from what I have seen on the internet, it seems to be good and it is compilable).
  • The LED works well, it's a way for me to see the status of the program.

Okay, thank you for your informations. I'll answer later, because i have to think about it :sweat_smile: :grimacing:

No worries, thank you :melting_face:

A question: Is the Digital Stepper Driver supplied with 20-50VDC?

This is the power supply I'm using for the project (it powers the stepper driver) :

I have already done this kind of project and the motor was running well (same power supply, same stepper driver, same motor but a PLC)
(and I just redid it it still works)

Sorry, than I don't know the problem. I'm actually a Beginner (I have been doing arduino for 6months). I will think about this and give you as soon as possible an answer. But at the moment...
I hope your project will work one day.
I'm sorry to say these sentences. But I don't know the problem or the soloution.
But you should looking forward to hearing from me soon :wink:

Thank you, I appreciate your involvement in my issue, even if it is not solved yet.
I also hope that this project will succeed (I'm also a beginner) !
I will wait for your news or those of someone else, who knows.

Have a nice day :stuck_out_tongue:

Thanks. Have a nice day too :blush:

Is the GND from the driver connected the the UNO GND?
I don't see a connection.

I think it is.
Because of the two wires, next to the ground of the LED-Pin


The black wire is connected with two wires from the stepper. These three wires are in the breadbord at the -port. I think thats's GND. But please correct me, if I'm wrong

Please provide a new photo showing all the wires.

I am fairly certain that you do not have the ground of the servo driver connected to the UNO. connect a jumper from the terminal on the servo driver marked ground to the breadboard rail where you have the black wire from the UNO inserted and try running your code.

Mike

okay, but I'm actually not @meedved , so cannot post a new photo. I apologize for the mistakes

Hi everyone, thanks for taking the time to respond!
I'm sorry, I got home early and won't have a chance to review the system until Monday (I'm really sorry).

But what I can tell you is that the GND from the driver isn't connected to the UNO GND but to the - of the PSU. Is it a problem ?

Yes it's a problem.
The driver GND, UNO GND and power supply ground all need to be connected together.

Ok i see, this is probably the error causing the motor not to spin...
I will come back to the project on Monday and I will let you know if the problem is solved or not.

Thanks for your answers (very fast) :saluting_face: