How to use this driver

Hi all!

I've got this Stepper driver, it should rotate a NEMA34 stepper motor. The problem is, I don't know how to control it. I've only used those H-bridge motor IC-s, with L298n,L298P, etc. But there is dir+, dir-, CP+, CP-

Until now I used a L298p driver, with stepper library, or with AccelStepper.

So if someone can help me by sending a short sketch, example for a single rotation, I would be really happy.

Thanks in advance!

Hi,

the schematics of the driver are unclear where the crossing wires are connected; but I suspect that this driver is being connected to the controller (Arduino) as other drivers at that size.

I think you should be familiar with a) setting of microstepping (which has to be considered in your code (number of steps to get one revolution) b) wiring of motor power and motor to the driver c) setting the max. current of your motor d) NOT setting bipulse mode

To connect with the Arduino you don't need external resistors (5V output) Wiring should be as follows:

Arduino -> driver Step Pin -> CP+/CW+ Dir Pin -> DIR+/CCW+ Ena Pin -> EN+ GND -> CP- & DIR- & EN-

Accelstepper setup: AccelStepper mystepper(1, pinStep, pinDirection);

That's how my steppers are running using accelstepper. There is no guarantee that your driver really works the same way, my drivers work, but it is imho most likely with yours. If you don't use EN+, you have to connect it to +5V if it is not pulled high internally by the driver itself.

rpt007: If you don't use EN+, you have to connect it to +5V if it is not pulled high internally by the driver itself.

It's pulled high internally by the driver, I don't need enable.

Yes, It works with Accelstepper. Thank You So So So much!!!

All industrial stepper drive like this use an opto-isolated front-end - so you are basically driving an IR LED plus series resistor, which is why there are two inputs per signal - you can drive relative to ground, or to 5V, whatever you want - expect 10 to 20mA to flow.

Occassionally you'll see a unit without series resistors, in which case you have to include them at the sending end. Usually series resistors are provided suitable for 3.3 and 5V, if driving from 24V logic (standard for PLCs) you have to add larger series resistors. You'll notice this is discussed in the documentation for this drive.

This Simple Stepper Code can be used for testing. It does not need any library.

...R Stepper Motor Basics