Problems with AccelStepper on ESP8266 with DM860A and Nema 34 1600oz/in

Hi All,

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 url=http://www.leadshine.com/UploadFile/Down/MA860Hm.pdf
The esp8266 was used to achieve 37kHz here Google Groups

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

Here are some pictures of the used hardware

I will be posting a youtube video shortly, showing the issue I’m having

Best regards

Ok I have my answer.

This morning I borrowed an arduino uno from a friend and tried my setup and everything is fine and working great.

So I’m now guessing that I can answer my question about the fact that the Wemos / esp-8266 is 3.3 volts vs 5 makes a big difference.

I have ordered some logic level shifters and will report back with more results from the wemos when they come in.

Also I would like to thank mikem for his great accelstepper library.

Best regards