Author Options:

Help me wire CNC (stepper motor controller+driver)? Answered

Hello I just bought some stuff to begin building my 3axis(at first) CNC milling machine.
I can'r figure out thw wiring/ connecting between the stepper driver and controller?
It's connected to the computer with a DB25 connector ("plug") and the terminals are named:

Is there a way to know what is what?
(please take a look at pictures)

BTW. it's for running/controlling 3pcs. Nema23 stepper motors and I got a bigger driver to run a Nema34 stepper (supposed to be the spindle)

hope you can help me, I'm in no rush, but it could be nice to see the motors running and such so I can make that work while I'm designing/redesigning/build the actual machine...



Best Answer 5 years ago

IF you are writing the software then your software decides which output
is P1through P15 for motor direction phases and step clock times 3.


so I can completely choose by myself?
example: it doesn't make a difference if i connect x-axis to P7+P8 or connect it to P12+13 as long as i tell the software which it's connected to? (I asume I can't connect to GND's but the other ones are just "free"?)

You are writing the software to run three motors ?

It looks like each DQ542 drives a single motor and
requires an Enable, Direction and clock Pulse bit.

So, X-axis DQ545 you could use ;
  • P8=Enable
  • P7=Direction
  • P6=Pulse
Y-axis DQ545 you could use ;
  • P3=En
  • P2=Dir
  • P1=Clk
Z-axis DQ545 you could use ;
  • P11=En
  • P12=Dir
  • P13=Clk  or  P14=Clk  or  P4=Clk

I am surprised that the company that makes the electronics
you purchased does not also provide the software ?


I bought it from Ebay, I think that's why I didn't get anny instructions.
ok thanks for your help
yes I'm writing the program myself.

btw. what the differece between clck and dir??

DIR is the nomenclature for the direction bit in software lingo.
CLK is for the clock is for PUL is for the pulse rate line ( wire ).

Stepper motors need to start with a slow pulse rate
and accelerate ( speed up ) to the desired travel velocity.
Then stepper motors need to decelerate ( slow down )
before stopping.

Simply starting a stepper motor at the full speed rate ( if it runs at all )
will make it slip intended steps making a CNC distortion of the target.

The software must anticipate the desired distance of each motor travel
in clock pulses and use a portion for speed up and a portion for slow
to a stop.

This requirement really gets involved when a simple 2D circle is
to be cut starting and stopping, now think 3D !!

Good Sadw writing luck.

I see, thank you for you very great explanation :)

thank you!
is there an instructable/ guide to how thats done right somewhere?
thinking of using Mach3 haven't tried it yet, but looks like that's pretty common, so I'll go for that)

Several more items,

There must be a very good electrical ground wire connection
between the electronics.

The Nema23 ( a body size reference ) stepper motors come in
different torques, coil currents and voltages.

Your questions come off sounding like someone with no
machine language programming experience.

And I take back the z-axis because P10,P11,P12 & P15 are inputs
So z-axis can be P16=En, P9=Dir, P5=Clk and the Spindle=P17..