Help trouble shooting Nema 34 (Hardware issue?)

Hi, I have a nema 34 stepper , an Arduino Mega, DM860T version 3 Driver, and Drok 200570 power supply.

stepper:

  • Manufacturer Part Number: 34HS59-6204S
  • Step Angle: 1.8°
  • Holding Torque: 12Nm (1700oz.in)
  • Rated Current/phase: 6.2A
  • Rated voltage: 36V/48V
  • Resistance/phase: 0.8ohms
  • Inductance/phase: 9mH±20%(1KHz)
  • Insulation Resistant 100 MOhm Min 500V DC
  • Control Cable: 4

I have wired it common anode like this, except without the reisistors:
opto_common-anode

and my code is simply this:

//defin pins
int enaPin = 7;
int dirPin = 8;
int pulPin = 9;

void setup() {
  pinMode(enaPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
  pinMode(pulPin, OUTPUT);
  digitalWrite(enaPin, HIGH); 
  digitalWrite(dirPin, LOW); 
}

void loop() {
  digitalWrite(pulPin, LOW);
  delay(2000);
  digitalWrite(pulPin, HIGH);
  delay(2000);
}

simple troubleshooting:

  1. I have checked all low voltage pin with the code above and Dir, Pul, and Ena gets the 5v for 2 seconds and 0v for 2 seconds.
  2. I have tried a second power supply.
  3. Tripple checked that the phase wires are correct with the meter and also match the wire and tried to turn the shaft.
  4. Pin on driver is set to 6A ref and 400 pulse/rev but I've messed with the switches and no motor movement.

When I turn the voltage on the PSU to 36, the motor has resistance with the code (enaPin, HIGH). The PSU is plug to an American 120v plug.

There's got to be a miss in the code / wiring / bad motor unit? Hopefully stepper/arduino veteran can spot my newb mistake. Is not having resistors on the pins my problem? I looked around and I'm assuming it should work without resistors?

Thank you!

My guess is it is because your pulse width of 2 seconds is far to long. It should be closer to ~20-30 milliseconds.
At 4 seconds per step and 400 steps per rev. That's ~27 seconds per rev. Are you waiting long enough to see the stepper move?

Try this:

void loop() {
  digitalWrite(pulPin, HIGH);  // start of pulse
  delay(25);   // duration of pulse
  digitalWrite(pulPin, LOW);  // end of pulse
  delay(3975);   // time between pulses
}

Here is a good tutorial:

Thank you for your input. I forgot to mention that I have tried a delayMicroseconds(60) between high and low pulse. I'm reading that it may be more related to the stepper than code. Apparently pretty common, as I'm seeing a lot of post titled "stepper vibrating but not turning". I will give your code a try anyways and do the reading as suggested.

If the stepper doesn't move, test and disconnect the Ena. Some drivers use the Ena as a disabling function.

The step pulse length is usually some 10 - 20 microseconds long. Using, as a first try, a delay of 10 to 20 milliseconds between pulses might be successful.

What stepper winding current is set in the driver?
What's the data of the stepper power supply?

Did anyone see the grounds are NOT connected, so there is no CIRCUIT for any of the controls.

1 Like

The psu:

  • Parameters:
  • Input voltage: AC 110-220V ± 15%
  • Output: DC 0-48V 10A
  • Rated power: 480W
  • Product Dimension: 21511550mm (lengthwidthheight)
  • Wiring:
  • 〨: Ground
  • N: Null wire
  • L: Live wire
  • V+: DC output +
  • V-: DC output -
  • Instructions for use:
  • The current is unregulated and maximum is 10A. The actual current is determined by load.
  • Any devices below 10A current can use this product. Any devices above 10A current cannot use this product.

Sorry I’m new to this, when you say winding current set on the driver, are you referring to the dip switch or the 5v vs 24v switch? I set it to the 24v, set the current to max (dip 1, 2, 3 to off)

According to the driver spec, this is an enable on driver. When I code enaPin high, motor seems to react and I cannot turn the shaft. When set to low, shaft turns easily.

The optocouplers look like they have circuits between whatever "5VEXT" and the OUTPUT-configured STEP,DIR,ENABLE pins.

No problem. everybody is born "new to this".

No. Can You provide a link to the datasheet of the driver?

Good test! As Ena + is connected to +5 volt You can drop Ena minus as no current is flowing. Ena is not active this way, and the stepper is powered. Ena being active is a disable function! Not unusual by some reason.

Sorry, it tells nothing at this point. Datasheet, please.

Coming right up:

There are some sections here that I’m eyeing now that I have given it a deeper scrutiny.

Particularly:

Remark :
Full Digital Stepper Drive DM860T
Figure 11: Sequence chart of control signals
a)t1: ENA must be ahead of DIR by at least 5s. Usually, ENA+ and ENA- are NC (not connected). See “Connector P1 Configurations” for more information.
b)t2: DIR must be ahead of PUL effective edge by 5s to ensure correct direction;
c)t3: Pulse width not less than 2.5us;
d)t4: Low level width not less than 2.5us.

Which right now is mumble jumble for me

Hi,
Do you have a DMM?
Have you identified and confirmed the two windings of the stepper motor?
image

Can you tell us the dip switch settings on the driver?

Can you please post some images of your project, so we can see your component layout.

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

[/quote]

Hi Tom,

Since I'm a new member, I can only have one embedded media which I did above posting that anode common schema. I checked the common phase lines with the DMM and also the diagram of the stepper is correct. This is the stepper I'm using:

I can't even share the amazon link but if you search B077XHBTZ9 on amazon, it's that stepper.

the stepper driver has all dip switched up (off) so the current is max, and the pulse/rev is 400. dip 4 is up because it's not really holding a load when not running (motor to open a bottle cap, 800 caps / day). I have 9 off because it says off = control for pul/dir. but I also tried it on too. I have 10 off, not sure what smoothing is but doesn't seem like it matters now, just trying to turn the darn thing.

Tom, I was able to post the picture of the project in the below post.

Thanks!

Good test! As Ena + is connected to +5 volt You can drop Ena minus as no current is flowing. Ena is not active this way, and the stepper is powered. Ena being active is a disable function! Not unusual by some reason.
[/quote]

You're right, the ena pin can help code a disable condition, when I remove the pin from the breadboard and write ena out, motor still reacts to the code and vibrates.

ignore grey jumper top left of breadboard, and also this is when I switched to digital pins 22 and 24 and of course changed it in the code as well.

One other thing I noticed is that: if the only modules connected are the power supply, driver and motor (no Arduino), the shaft locks when 36v is applied. So it seems to me that while arduino is supplying 5v to the pul/dir/ena pins (confirmed with DMM), there’s no translation to the high voltage section of the driver? How can I test that? Maybe it does need the resistors like suggested in the driver manual? Aren’t I using the first line so no resistor needed?

Also the driver has a toggle for 24v and 5v. I’m assuming I am not using the 5v (don’t want to test and toast a driver).

Hi , I'm working with a similar set up (a smaller version) , ( Stepper motor NEMA17, DM542 driver, Arduino UNO).
In my case writting the Enable pin to high , disables the motor, and writting LOW on the enable pin enables them. You can try to test this with a simple code but since you are using a big motor it will be harder to notice.

On the loop try changing between high and low states every few seconds. It will be almost impossible to rotate the tip of the Stepper Motor. If its high you can rotate it a little bit at least.
You can also notice the motor doing some noise if you pay attention if its enabled, also it gets a little bit hot after some time its enabled.
Also, these drivers usually come with a green and red led, if the red led is on , it means the motors are not enabled.(At least in my case).

My wiring is a little bit different but I can provide some photos if it helps.

Hope you can solve it.

Absolutely! I feel like I’ve tried a lot and watched so many tutorials, maybe I’m missing that one little silver bullet. I’ve tried the enable pins connected, turned on, turned off, not connected, so many combinations of anode common and cathode common wiring. I’m willing to try anything that doesn’t blow up or give my veins a good jolt of electricity. I’ve love to see your project.

This is all the photos I have right now on me but these are the connections:

The stepper motor I'm controlling is something like this but with end stops:

The controllers:

I ended up breaking a stepper motor and this helped me figure it out:

Maybe yours is broken.

The motor behaves wierdly if it has the wrong voltage,( it doesn't change direction, vibrates a lot ...)
My driver has an auto tune feature that adapts the driver to the motor connected, but I think yours doesn't have it or I didin't see it in the documentation.

Hope this helps you.

Some testing code:

//Pins
const int Step// your pin
const int Dir= //your pin
const int Enable = //your pin
.....
int tdelay = 500; // test with your motor, the more delay the slower it goes.
void performSteps(int steps) {
  for (int x = 0; x < steps ; x++) {
    digitalWrite(Step, HIGH);
    digitalWrite(Step, LOW);
    delayMicroseconds(tdelay);
    }
  }


void setUp(){
pinMode(Step,OUTPUT);
pinMode(Dir,OUTPUT);
pinMode(Enable,OUTPUT);

digitalWrite(Enable,LOW);

}
void loop(){
digitalWrite(Enable,LOW);
delayMicroseconds(10); // As specified by the driver.

digitalWrite(Dir,HIGH);
delayMicroseconds(10); // As specified by the driver.
simpleSteps(100);
delay(1000);

digitalWrite(Dir,LOW);
delayMicroseconds(10); // As specified by the driver.
simpleSteps(100);
delay(1000);

//Stepper turned off 5 seconds.
digitalWrite(Enable, HIGH);
delay(5000);

}

Your schematic looks like the driver has built-in 270 ohm resistors, which would limit the current to 5V/270ohm=18mA,

How can you test it?Power it up to where the shaft locks and use a pushbutton to step manually: 5V->pushbutton->PUL+ and PUL- -> Rx-> GND If you If the resistor is built in, With an Rx of 0, no more than 18mA will go through. If you suspect there's no resistor, an external resistor of 270 ohms won't hurt anything, limiting the current to 18mA if theres no internal resistor, or to 5V/(2*270)= 9mA if there is an internal resistor. You could also put a meter in-line with the circuit to measure how much current is going through the driver's optocoupler's LED when you push the button to confirm it is working, and to give you data to measure the internal resistance.

If manually pulsing doesn't work when you push current through the step pin, then the problem is on the driver side.

welp, because this is all online, and I can be anonymous...The driver was not set to 5v. face-palm...Thanks everyone for attempting to help.

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.