Strange problem - DM320T Stepper Drivers - GRBL -Arduino Uno

Hi there,

I have an Arduino Uno on to which I have loaded GRBL 1.1

I have two Nema 17 stepper motors, and two DM320T stepper drivers. I have calculated and set the dip switches on the steppers to 800 microsteps, and the corresponding parameters in GRBL to match. The steppers are being driven by a 24VDC power supply. I have connected+5VDC from the pin on the Arduino to the Opto terminal on the DM320T's. I have measured the voltage at 5.01VDC using a multi-meter.

Using Universal GCode Sender, I have successfully setup and run the X Axis one or more exact runs, varying the speeds with no problems. I have tested the parameters for inverting the direction and pulse signals. Once I got this one working I connected a second DM320T, set everything up exactly the same as the X_Axis, except for the pins of course. I connected them to the ones shown on the grbl github diagram.

For the life of me I cannot figure out why the Y axis will not work. I have connected another, brand new DM320T and a brand new stepper to the Y-axis. When I swap the pins from the Y-axis motor to run from the x-axis it works perfectly. But the motor that was working on the x-axis will not even budge on the Y OR the Z axis.

I have measured the voltage changes on the DIR pin on the X and Y axis and I can see that the voltage does indeed change on the Y axis when jogging the motor from UGS. I don't know the best way to check the pulse wires.

I thought I have blown up my Arduino Uno, so I bought two more, flashed them the same way, installed the wiring, but with the same result. I need to get this thing going for my CNC router and I am at my wits end. Any help would be greatly, greatly appreciated.

Regards, Craig

I would start with loading some other sketch on the Arduino.

Pulse the x axis pin 100 times, with the direction pin set HIGH. Then, set the direction pin low and pulse the x axis pin 100 times again. What, exactly, happens?

Revise the sketch to use the y direction pin and y step pin. Run again. What, exactly, happens?

Repeat for the z axis pins. What, exactly, happens?

PaulS:
I would start with loading some other sketch on the Arduino.

Pulse the x axis pin 100 times, with the direction pin set HIGH. Then, set the direction pin low and pulse the x axis pin 100 times again. What, exactly, happens?

Revise the sketch to use the y direction pin and y step pin. Run again. What, exactly, happens?

Repeat for the z axis pins. What, exactly, happens?

Thank you - I will get on to that right now. I will report back !!!

These links may be of interest
Stepper Motor Basics
Simple Stepper Code

Make sure to do all initial tests at very slow step rates.

...R

PaulS:
I would start with loading some other sketch on the Arduino.

Pulse the x axis pin 100 times, with the direction pin set HIGH. Then, set the direction pin low and pulse the x axis pin 100 times again. What, exactly, happens?

Revise the sketch to use the y direction pin and y step pin. Run again. What, exactly, happens?

Repeat for the z axis pins. What, exactly, happens?

Hello, and thanks Paul. Based on your advice I found a 'simple stepper sketch'here on the arduino forum, replaced the pin numbers and then started playing around with the parameters.

In short the problem was the step pulse time in microseconds. When running the sketch the motor wasn't advancing a single step when the pulse time was below 20 microseconds. So, I reloaded GRBL, changed the step pulse time parameter ($)=20), and VOILA !! it works.

Thank you for your clear thinking. I owe you a drink !!

Regards,

Craig

I owe you a drink !!

Make mine a Rum and Pepsi.

Glad you figured it out.

Robin2:
These links may be of interest
Stepper Motor Basics
Simple Stepper Code

Make sure to do all initial tests at very slow step rates.

...R

Thank you Robin - I used the simple stepper code link you provided, and with a little modification, found the issue and the resolution.

I have put my comments in another reply above.

Thank you for your reply - it was the right way to go.
Regards,
Craig