Arduino UNO to Leadshine DM422C Stepper Drive

Hey, So I'm attempting to use a 24V stepping motor (https://oceancontrols.com.au/MOT-121.html) through an Arduino UNO board to a Leadshine Stepper Drive (Electronics & Automation Engineering T/A Ocean Controls > Stepper Drivers (Open Loop) > DM422C Anti-Resonance Stepper Motor Drive) though am seriously struggling to understand how to wire the connections between the ard and the motor drive. I also have no idea how to script this - currently I was using this script but with absolutely no luck

void setup(){
pinMode(7, OUTPUT);  //dir
pinMode(8, OUTPUT); //step pin (pul)
digitalWrite(7, LOW);
digitalWrite(8, LOW);
}

void loop(){
digitalWrite(8, HIGH);
delayMicroseconds(200);
digitalWrite(8, LOW);
delayMicroseconds(200);

}

Please help!!!

You need 5V to "OPTO" and a digital pin to "ENA"; that pin should be set to LOW to enable the driver.

You need to have a connection between the Arduino GND, and the stepper motor driver GND.

Without this connection you don't have a complete circuit, so the motor controller can't tell whether the Arduino outputs are high or low.

EDIT:

I now realise that this information is not correct, see next post.

Having now read the manual, I see that is the Arduino +5V that needs to be connected to "OPTO" as mentioned by Chagrin.

However, I disagree with him about the "ENA" enable input. On page 4 of the manual, it states that it needs to be high to enable the drive and low to disable it. It can also be left unconnected (permanently enabled).

With these connections made, no connection between the GNDs would be required, (as I had suggested in my previous post). Indeed such a connection would invalidate the benefits of the opto-isolated inputs.

I could have deleted my previous post, but I am willing to admit to my mistake.

bverzijl:
Hey, So I'm attempting to use a 24V stepping motor (https://oceancontrols.com.au/MOT-121.html) through an Arduino

details matter a whole lot.
you have a 2.8v motor and are driving it at 24v, or you are driving it at about 8.5:1 which is good.

I would say welcome to the list
but also invite you to read this http://forum.arduino.cc/index.php/topic,148850.0.html
scroll down to #7
then come back and edit your first post. the edit button is on the bottom right of the post.
highlight your code and hit the code tag button.

Have a look at Stepper Motor Basics.

You should be able to test your motor with this Simple Stepper Program

...R

JohnLincoln:
Having now read the manual, I see that is the Arduino +5V that needs to be connected to "OPTO" as mentioned by Chagrin.

However, I disagree with him about the "ENA" enable input. On page 4 of the manual, it states that it needs to be high to enable the drive and low to disable it. It can also be left unconnected (permanently enabled).

With these connections made, no connection between the GNDs would be required, (as I had suggested in my previous post). Indeed such a connection would invalidate the benefits of the opto-isolated inputs.

I could have deleted my previous post, but I am willing to admit to my mistake.

Yup this all got it working! Huge thanks to Chagrin and JohnLincoln for helping with the setup! as a beginner at this sort of stuff, I was struggling pretty bad.

Dave-in-nj, I changed the post as per your suggestion. Much easier to read now :slight_smile:

and that code works great - looks like i was on the right track at least! thanks Robin2