Trouble with stepper motor

Hi,
I am fairly new to Arduino and I am currently trying to get a stepper motor that I found to spin. I am using a Darlington Array (ULN2004A) and the code supplied in the example on the Arduino web site. The motor will shake a bit and the chip heats up very quickly. Not sure what I am doing wrong. Any advice would be greatly appreciated. Thanks!

/*
  * MotorKnob
  *
  * A stepper motor follows the turns of a potentiometer
  * (or other sensor) on analog input 0.
  *
  * http://www.arduino.cc/en/Reference/Stepper
  * This example code is in the public domain.
  */

#include <Stepper.h>

// change this to the number of steps on your motor
#define STEPS 200

// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
 Stepper stepper(STEPS, 2, 3, 4, 5);

// the previous reading from the analog input
int previous = 0;

void setup()
{
   // set the speed of the motor to 30 RPMs
   stepper.setSpeed(30);
}

void loop()
{
   // get the sensor value
   int val = analogRead(0);

   // move a number of steps equal to the change in the
   // sensor reading
   stepper.step(100);
   delay(1000);

   // remember the previous value of the sensor
   previous = val;
}

You need to provide a link to the datasheet for your stepper motor. I wonder if the motor requires more current than that chip can provide.

A photo of a pencil drawing of the wiring connections would be easier to follow than a photo of the hardware - though I must say your hardware is 100 times neater than mine would be.

What power supply have you got for the motor?

The Thread stepper motor basics may be useful.

...R

http://www.moonsindustries.eu/index.php?option=com_content&view=article&id=64&Itemid=64

This is a link to the manufacturers website. I haven’t been able to find a datasheet and they don’t have the exact model number listed but it looks like it should be between .4 and .5 amps.

Here is a representation of the way the hardware is stet up.

I also noticed that I had my pins labeled backward in the code…but it still didn’t fix it.

/*
  * MotorKnob
  *
  * A stepper motor follows the turns of a potentiometer
  * (or other sensor) on analog input 0.
  *
  * http://www.arduino.cc/en/Reference/Stepper
  * This example code is in the public domain.
  */

#include <Stepper.h>

// change this to the number of steps on your motor
#define STEPS 200

// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
 Stepper stepper(STEPS, 5, 4, 3, 2);

// the previous reading from the analog input
int previous = 0;

void setup()
{
   // set the speed of the motor to 30 RPMs
   stepper.setSpeed(30);
}

void loop()
{
   // get the sensor value
   int val = analogRead(0);

   // move a number of steps equal to the change in the
   // sensor reading
   stepper.step(100);
   delay(1000);

   // remember the previous value of the sensor
   previous = val;
}

Darlington drivers always get hot, they are woeful performers. But there's hot
and there's HOT(*).

IIRC those chips are rated for 0.5A max per pin, but a total of about 1A for all the pins.

(*) Many semiconductor devices will function upto a die temperature of 125 to 150C,
but that means the package will burn your fingers badly. Reliability is reduced too.
Aim for 50C as a practical maximum if you can. Datasheets often give a guide
as to the temperature rise per watt for various packages.

they don't have the exact model number listed but it looks like it should be between .4 and .5 amps.

What leads you to that conclusion? Motors in that size package could easily draw 2 or 3 amps. What is the |D of the motor you have.

There is not a snowball's chance in hell of a PP3 9v battery driving your motor. Use a pack of AA NiMh batteries.

What are the wires connected to the far side of the Arduino for? You should not power the Arduino from the same power supply as the motor.

...R

The model of the stepper is 17HD2002-03N (Moons'). The Arduino is being powered by the USB and the 9V powers only the stepper.

On the manufacturers web site the list the other similar models rated at .4 or .5 amps. It was just a guess that the one I have would be the same. It has been very difficult to find information on this particular model. I have emailed them requesting a data sheet...but we will see if they respond.

Measure the resistance of the motor coils.

As I mentioned earlier those 9v batteries are useless for motors.
Also I suspect you need a much higher voltage. Looking at the 17HD1004-01 motor with a coil resistance of 25 ohms - that would require 12.5 volts to get the rated current of 0.5amps

I reckon you should be using a specialized stepper motor driver and maybe a 24v supply as explained in stepper motor basics.

...R

Coltonchristensen1:
The model of the stepper is 17HD2002-03N (Moons'). The Arduino is being powered by the USB and the 9V powers only the stepper.

On the manufacturers web site the list the other similar models rated at .4 or .5 amps. It was just a guess that the one I have would be the same.

No, you cannot make that assumption, the same motor frame is nearly always available with
different winding configurations, you need to match the full motor part number to the relevent
datasheet / catalog to see what the winding is (or much more easily measure it).

Hi.

I think I found your model:

17HC2002-02N
Conditions:
Driver: MS3ST10
Mode:10000 Step/Revolution
0 30000 60000 90000 120000 150000
Pulse rate [pps]
Pull out torque [mN.m]
0 180 360 540 720 900
Speed [r/min]
2.3A(Peak) 24V

More like this one.. only 03N to 02N change.. revision for sure.
So 24vts 2.3A ?? not for a 9v battery.

arssant:
I think I found your model:

17HC2002-02N

Have you a link to your source? I could not find the data.

...R

Robin2:
Have you a link to your source? I could not find the data.

...R

Hi.

Neither I.

Google lies to me
I was searching for a Teco 4H4018X0701.
And at same time for this user ones.
The search was for "17HD2002" the result link to some pdf with 17HC2002 spec.
Just realized now, when searching for this pdf again:

http://www.g2motion.com/5HB_MOTOR_ENG.pdf

Sorry for the miss-information.

arssant:
More like this one.. only 03N to 02N change.. revision for sure.

No, that part number difference could mean:

different shaft length or diameter or mechanical detail
different winding option (hence different current / resistance)
presence / absence of rear shaft for an encoder
different environmental rating (how water/dust proof).

Motors are not software, they seldom have revisions.

We need to know the winding resistance to judge what the
windings are, simple...

[ PS page 9 of that datasheet claims the last 2 digits are
mechanical variation, so perhaps we are talking a 2.3A
motor which explains the complete failure of a ULN2004! ]

Hi

Over moons Model Numbering System spec:

http://www.moonsindustries.com/Products/Hybrid_Stepper_Motors/HB2P_17HD/201012/W020101229841883126399.pdf

C: stand for : step angle 1.2°.
D: stand for : step angle 1.8°.

and for -03N, just found one with this code:

with these values:

2.8A(Peak) 24V
2.8A(Peak) 36V

So amps and volt... still guessing.

Coltonchristensen1:
The model of the stepper is 17HD2002-03N (Moons'). The Arduino is being powered by the USB and the 9V powers only the stepper.

On the manufacturers web site the list the other similar models rated at .4 or .5 amps. It was just a guess that the one I have would be the same. It has been very difficult to find information on this particular model. I have emailed them requesting a data sheet...but we will see if they respond.

Look the winding resistance is something you canjust measure with a multimeter, the
power is the same for all motors of the same frame since its a thermal limit, so its
easy to get a good estimate of the current rating from these data.

Finally found my multimeter. The coils are registering 21 ohms. Found a calculator that said at 12v i need .5 amps.

I've tried:

  • a bank of 4 AA batteries - Figured that was too small but i had the set up from an old RC - No change
  • A 12 v 350 mA DC power supply - No change
  • A 12 v 5 A DC power supply - Fried my on of my Darlington chips - thought that might happen, did it anyway. :slight_smile:

I am now hunting in my basement for a 12v .5 A power supply.

Coltonchristensen1:
Fried my on of my Darlington chips

That is a good reason to use a specialized stepper motor driver.

I am now hunting in my basement for a 12v .5 A power supply.

That won't solve the problem - the power supply will probably fry.

If you have measured the resistance properly then the 12v 5Amp power supply should be fine and the problem lies elsewhere.

...R

I officially have to admit defeat with these stepper motors. I just received my Adafruit motor shield, hooked it up to a 12v bank of AA batteries and i get the same result. It looks like the steppers just take more power than my current hardware can dish up. They are too big for the project i want to build anyway...it was just one of those things were i was fixated on making them work, just because i have them :-).

Coltonchristensen1:
I officially have to admit defeat with these stepper motors.

Have you tried using a specialized stepper motor driver such as a Pololu A4988 ?

…R