0
\$\begingroup\$

I have an Arduino controlling a NEMA 23 motor using a digital stepping driver (DM542T).

I am trying to have it go a a given speed in RPM (60), but when I try it results in a very jerky movement of the motor that does not go at the expected RMP

Here is my Arduino code:

int driverPUL = 7; // Pulse pin
int driverDIR = 7; // Direection pin
int stepsPerTurn = 200;
int RPM = 60;
float stepsPerSecond = (stepsPerTurn*RPM)/60;
float waitInMilliseconds = (1/stepsneededPerSecond)*1000;
void setup() {
 pinMode (driverPUL, OUTPUT);
 pinMode (driverDIR, OUTPUT);
}
void loop() {
 digitalWrite(driverPUL,HIGH);
 delay(wait);
 digitalWrite(driverPUL,LOW);
}

In the motor documentation I have the following table but I'm not sure what impulse/turn means.

Nema23

EDIT

Here is the DM542T settings, it is configured to the 4.20 A and 400 Pulse/rec settings.

DM542T

Any help would be welcome,

asked Feb 18, 2020 at 11:23
\$\endgroup\$
0

3 Answers 3

1
\$\begingroup\$

I remember these drives need a comparatively long pulse width. Checking the datasheet (page 9) of this drive confirmes this. The minimum low time is specified to be 2.5 microseconds. In your code you set the pulse immediately high after setting low. This might explain the jerky operation, every now and then it misses pulses, resulting in inconsistent driving.

Caveat to my assumptions: I think your code is not the actual code, the posted version will not compile! (Missing/inconsistent variable names.)

answered Feb 18, 2020 at 15:23
\$\endgroup\$
0
\$\begingroup\$

Acceleration may be limited by;

  • current limiting,
  • lack of low ESR bulk cap on supply.
  • excess load, friction
  • or lack of software control to prevent skipping with controlled acceleration or rate of change of velocity.

Verify these are not the problem.

Show all settings on DM542T.

answered Feb 18, 2020 at 11:40
\$\endgroup\$
3
  • \$\begingroup\$ Thanks for your help, I've added an image showing the DM542T settings. As for the other points, it is not excess load or friction as the motor is not attached to anything at the moment. For the current the driver should deliver 4.2A and the NEMA 23 nominal current is 4.2A. I will look into the other two points. \$\endgroup\$ Commented Feb 18, 2020 at 11:59
  • \$\begingroup\$ I have had some success by reducing the current settings to 1A but I don't know why, The nominal current of the motor is 4,2 A \$\endgroup\$ Commented Feb 18, 2020 at 12:57
  • \$\begingroup\$ Unless current is reduced during hold or idle, something may be overheating at 4.2A \$\endgroup\$ Commented Feb 18, 2020 at 14:35
0
\$\begingroup\$

The next two signals are on the same digital pin.
They should be separated as seen below.

int driverPUL = 7; // Pulse pin
int driverDIR = 8; // Direction pin 
Mike
2,6192 gold badges17 silver badges31 bronze badges
answered Dec 9, 2020 at 20:58
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.