Hey there,
I am working on a Project where I want to rotate a big Stepper motor E Serie Nema 34 Schrittmotor Bipolar 1.8deg 8.2 Nm(1161.45oz.in) 6.0A 86x86x114mm 4 Drähte - 34HE45-6004S STEPPERONLINE (omc-stepperonline.com), which is driven by Digitaler Schrittantrieb 2.4-7.2A 18-80VAC oder 36-110VDC für Nema 34 Motor - DM860T STEPPERONLINE (omc-stepperonline.com). I want to use the AccelStepper.h library, because it seems quite easy to handle.
As I mentioned in the topic I was trying to use a ESP32 for that, as I plan on making it work with Bluetooth and also it has to communicate with other devices. So far I made an easy code with an Arduino Uno run the motor quite smooth:
#include <AccelStepper.h>
#define dirPin 9
#define stepPin 8
#define interface 1
AccelStepper stepper=AccelStepper(interface,stepPin,dirPin);
void setup()
{
stepper.setSpeed(150);
stepper.setMaxSpeed(2000); //20000 steps/second max
stepper.setAcceleration(500);
}
void loop()
{
stepper.moveTo(8000);
stepper.runToPosition();
delay (1000);
stepper.moveTo(0);
stepper.runToPosition();
delay (1000);
}
as I move it to the ESP32 Wroom
with the only change of the pins :
#define dirPin 5
#define stepPin 18
instead, the motor seems to work, but not that smooth as before.
I use a logic level converter from the Signal of the ESP to the DM860T, so the input Signal has 5 V, cause I thought this was the reason for the bad baviour. But this didn't change anything.
Has some one an idea, what could be the problem?
I attach the wiring as picure.
Thanks in advance,
Daniel
