Arduino and stepper motor driver

Hi Folks,

I have the following Stepper driver:
HY-DIV268N-5A

and this motor:
http://www.aliexpress.com/store/product/A110A-57BYGH56-401A-Nema23-Stepper-Motor-2-8A-12-6Kgcm-Hybrid-Stepping-Motor/407448_909489217.html

I'm trying to use an Arduino to drive the pulse necessary.

My cabling is as follow:

  • +36V to DC+ on Driver
  • COM to DC- on Driver
  • A+/A-/B+/B- to motor phase, between motor and Driver
  • EN-/PUL-/DIR- (on Driver) to GND on Arduino
  • EN+/DIR+ (on Driver) to +5V on Arduino
  • PUL+ (on Driver) to pin 13 on Arduino

I used the basic "AnalogInput" sketch for example: a potentiometer is read, and a pulse, variable in speed is generated to Pin 13

a separate +9V is connected to "VIN" of the Arduino, to provide enough power that the USB port might not be able to provide

I used a voltmeter, and EN- vs EN+ has +5V, DIR- vs DIR+ has +5V and PUL is flickering (which is expected)

the damn motor does not turn at all.... It's not even hard to manually turn. I have tried with another Driver, a CW-5045, with the same result, so I'm tempted not to blame the driver.

Linking the Com from the 36V power supply to the ground, did not change anything !

any ideas ???

Are you using the stepper librairy?
How many leads are used?
Have you shared the ground?

Hi !

not using any library: I'm just using a pulse out as an input for the Driver module .

Stepper motor is a 4 lead.

What do you mean by "have you shared the ground" ?

This Simple Stepper Program should be suitable for testing your setup.

The GND connection of the Arduino must be connected to the GND of the driver. PUL- etc are probably not the same as GND on the driver.

...R
Stepper Motor Basics

Hi,
Have you set up the dip switches in the stepper controller?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you please post a copy of your sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html
Also a picture of your project please..

Tom.... :slight_smile:

isolate the motor
spin it with your fingers, feel the steps..
tie all the wires together
spin it again. when you connect the wirs, the motor genarates braking equal to the motor power.
if there is no change of feel in your fingers, it is the motor.

double check the motor wiring make sure you have the coiuls identified.

tie any 2 wires together, then spin the motor, you can feel when you have the same wires on a coil.

"Offline enable signal is active, reset drive failure to prohibit any pulse, the output of the drive"

That MIGHT mean that the Enable signal is "active low". Try tying both sides to Ground to see if that enables the output.

@Robin2: Why should I use the "Simple STepper Program", if I'm using an external Stepper driver that is expecting pulse and direction ? Am I missing something here ?

Connecting both the COM and Arduino ground, didn't change anything !

@TomGeorge: DIP Switch seems fine...tried a few modification, without any success

I'll make a drawing this PM and add a picture... As for the sketch, it's the "AnalogInput" from Arduino's basic example, unmodified...

@Dave-in-nj: when power is not applied, I can turn the shaft with my finger, and it is a bit stiff. When powered, the behaviour is the same. Right now, my pulse rate is about 2-3 hertz. I checked with a VOM at A-/A+ and B-/B+ and no presence of voltage.

I also checked the resistance between my coils, and they both have 1.0-1.2 Ohms

@johnwasser: tried it, no change

I also checked: Enable is solid +5V (0V when I tried John's idea), Dir has +5V and Pul is flickering. Oscilloscope showed voltage going from 0 to +5V, sharp edge, but quite a bit of ripple on top of the +5V. I would says +/- 0.2V of fluctuation, still close to +5V

I have another driver, installed on something else. I will disconnect it and try it with my setup, and will let you know.

jasmino:
@Robin2: Why should I use the "Simple STepper Program", if I'm using an external Stepper driver that is expecting pulse and direction ? Am I missing something here ?

One of us is. :slight_smile:

The Simple Stepper Program is one way to generate the step and direction signals to send to the stepper driver. It is intended as a demo and test program.

...R

@Robin2: OK. I'll have a look at it. I thought it was a program intended to use with an H-bridge, that would driver the 4 "states" needed for the H-Bridge.

What do you have the microstepping and output current switches set to?

Update: used my 3rd driver that I had: it worked ....

looks like I had at least 1 x DOA. (the first unit had worked it the past, so its state is unclear)

@Robin2: used a slightly modified version of your sample code

Question:

Current: what if the DIP sw are set to a higher current ? Am I loosing only the protection of the motor ?

current motor value 2.8Amp, current DIP sw setting 3.2 amp (nearest one that is slightly higher than 2.8Amp)

also, the motor is turning:fastest speed I could achieve is approx 2-3 Revs/sec, in both direction, but when it turns, it's kind of "knocking"... I have tried to switch polarity of phases, but the result is the same. Motor also gets fairly hot...

right now microstepping is turned off (default is 400 pulse/rev)

BTW, Johnwasser, you were right: Enable had to be low, to run !

jasmino:
Current: what if the DIP sw are set to a higher current ? Am I loosing only the protection of the motor ?
current motor value 2.8Amp, current DIP sw setting 3.2 amp (nearest one that is slightly higher than 2.8Amp)

right now microstepping is turned off (default is 400 pulse/rev)

If you use a higher current than the motor is rated for the motor will tend to get hot and might burn.
When you say "turned off" do you mean "the rate is set to 1" (Switches 1/2/3=Off/On/On) or do you have all three switches turned off or on. Both of those settings are marked "NG" (whatever that means) in the documentation so I don't know what they do.

John: the 3rd driver that I used, is another model. I set the DIP switch to "Default' which is 400. The reason I called it "turned OFF" is because it does not seem to be a Microstep mode...

the new one is a CWD556

jasmino:
@Robin2: used a slightly modified version of your sample code

I can't comment without seeing your revised version.

Stepper motors normally run hot - uncomfortable to touch.

What is the next lower current limit setting ? I would start my testing with it.

I don't know what you mean by "knocking". Stepper motors are naturally a bit rough - they move in steps - but more like vibration than banging. They can also suffer from resonances. Are you getting that noise with or without a load on the motor?

If the problem persists can you make a short YouTube video (with sound) that illustrates the problem.

From Reply #9 ...

that would driver the 4 "states" needed for the H-Bridge

.
I don't know what question you had in mind but I have never driven a stepper with a H-Bridge so I may not have the answer.

...R

Jasmino,

what kind of driver do you use now which is working?
The driver, you mentioned in your first posting, seems to have some problems.
(see this thread: http://forum.planet-cnc.com/viewtopic.php?f=9&t=1107);
If your motor really gets hot, even, when it doesn't turn, then there is too much current involved.
Better you stay below the maximum, not to burn your coils. Normally the torque is still sufficient if you have considered a bit extra power in your application.

I have a TB6600 driver board running smoothly here with different NEMA 17 motors and using the Arduino Acceleration.stepper library. The 4988 drivers which I am currently testing, don't run that smoothly - no matter what current I send to the motor, no matter what microsteps I am using. Now I wait for a 8825 driver, which should hopefully run better than the 4988.

Seems that there are so many different driver designs out there and sometimes the cheap drivers work, sometimes they have issues.

My experience is that if you use microsteps, the motor is running more smoothly, but it looses torque.
So it is a matter of trade off, how smoothly the motor should run and how much torque is needed.

Raimund

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Also a picture of your project so we can see your layout.

Thanks.... Tom..... :slight_smile:

here's a quick drawing and a pic.

note that the picture was taken while debugging a defective module, and the EN+ was still HIGH, therefore disabling the driver.

BTW, the pot is there to vary the rate of pulse, therefore varying the speed

Currently using a CWD556

jasmino:
here's a quick drawing and a pic.

Also please post the latest code.

...R