-->
Page 1 of 1

Driving a big Step Motor with DM860A Drive and AccelStepper

PostPosted: Wed Apr 12, 2017 1:14 pm
by Frank63
Hi All, Can anybody help.

I am currently setting up a carriage positioning system using a Nema 34 1600oz/in with a DM860A driver at 60 volts.

I am using an ESP8266 (Wemos D1 r2) to operate the DM860A

When using th2 Wemos the stepper is not running smoothly at all it seems to be skipping steps or having an harmonic like beat at regular intervals.

Since we just received this drive, I suspected that It might be faulty.

I then verified it using the breakout board and Mach3

With mach3 i have no problem at all I can run the motor a any reasonable speeds

Questions:
1- (Given the DM860A has its interface inputs rated for 5 volts)
and since I am using the pulse - and dir - as opposed of pul+ and dir+
thus syncing voltage.
Is it necessary to use a logic level shifter to interface my esp8266 to the driver
(I am assuming not)
2- I have tried to adjust the minPulseWidth (no change)
3- I have tried to setPinsInverted(true,true) and false, false (no change)
4- Can i expect my stepper driver & motor to run as smoothly as when paired to mach3 through the breakout board

References
DM860A same as DM860h from leadshine (http://www.leadshine.com/UploadFile/Down/MA860Hm.pdf)
The esp8266 was used to achieve 37kHz here https://groups.google.com/forum/#!topic ... FS0ZowR3WE

here is the very simple code I am testing with
/*
Stepper Motor Control - speed control

/*
microstep driver DM860A
Pul+ goes to +5V
Pul- goes to Arduino Pin 9 D7 on Wemos D1
Dir+ goes to +5V
Dir- goes to to Arduino Pin 8 D6 on Wemos D1
Enable+ to nothing
Enable- to nothing
*/

byte direcPin = D6;
byte pulsePin = D7;

#include <AccelStepper.h>

// Define a stepper and the pins it will use
AccelStepper stepper(1, pulsePin, direcPin);

void setup()
{
stepper.setMinPulseWidth(3);
stepper.setMaxSpeed(5000.0);
stepper.setAcceleration(1000.0);
stepper.setPinsInverted(false,false);
stepper.setPinsInverted(true,true);
stepper.moveTo(100000);
}
void loop()
{

// Change direction at the limits
if (stepper.distanceToGo() == 0)
stepper.moveTo(-stepper.currentPosition());
stepper.run();
}


Best regards

Re: Driving a big Step Motor with DM860A Drive and AccelStep

PostPosted: Thu Apr 13, 2017 8:21 am
by Frank63
Here are some pictures of the hardware

DSCN0744-1.JPG

DSCN0742-1.JPG

DSCN0743-1.JPG

Re: Driving a big Step Motor with DM860A Drive and AccelStep

PostPosted: Wed Sep 05, 2018 3:22 pm
by b.poc
Dear Frank,

have you any solution for this problem?
i also have it, but didnĀ“t reallly had the time to look for a solution yet.
I use the PWM library (https://forum.arduino.cc/index.php?topic=117425.0)
and if i raise the frequency for the motor to accelerate, there is a jump in the signal at 32769 Mhz (2^16) wich sometimes under load can get the motor to stall.

The same controllers/motors work much smoother with external controllers, or mach3 controllers.
Any idea somebody?

Thanks and best regards!
T