Arduino Forum

Using Arduino => Motors, Mechanics, Power and CNC => Topic started by: gc9n on Apr 28, 2015, 08:38 pm

Title: Stepper Motor is getting real warm...
Post by: gc9n on Apr 28, 2015, 08:38 pm
hello
i am using a stepper motor Mitsumi M42SP-6NK
http://www.mitsumi.co.jp/latest/Catalog/pdf/motor_m42sp_6nk_e.pdf

and a L298N Dual Motor Controller Module  with my arduino mega ...


any idea why is getting worm?



Code: [Select]

/*
 Stepper Motor Control - one revolution
 
 This program drives a unipolar or bipolar stepper motor.
 The motor is attached to digital pins 8 - 11 of the Arduino.
 
 The motor should revolve one revolution in one direction, then
 one revolution in the other direction. 
 
 
 Created 11 Mar. 2007
 Modified 30 Nov. 2009
 by Tom Igoe
 
 */

#include <Stepper.h>

const int stepsPerRevolution = 200;  // change this to fit the number of steps per revolution
                                     // for your motor

// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8,9,10,11);           

void setup() {
  // set the speed at 60 rpm:
  myStepper.setSpeed(30);
  // initialize the serial port:
  Serial.begin(9600);
}

void loop() {
  // step one revolution  in one direction:
   Serial.println("clockwise");
  myStepper.step(stepsPerRevolution);
  delay(500);
 
   // step one revolution in the other direction:
  Serial.println("counterclockwise");
  myStepper.step(-stepsPerRevolution);
  delay(500);
}
Title: Re: Stepper Motor is getting real warm...
Post by: jremington on Apr 28, 2015, 09:06 pm
Quote
any idea why is getting worm?
Assuming you mean "warm", heat is generated by current flowing through the windings. This is normal and unavoidable. Some motors are rated to operate normally at 80 degrees C or more -- check yours.
Title: Re: Stepper Motor is getting real warm...
Post by: gc9n on Apr 28, 2015, 09:37 pm
i guess so , datasheet dosent say much
i scavenge the motor from an old printer
Title: Re: Stepper Motor is getting real warm...
Post by: MarkT on Apr 28, 2015, 10:01 pm
What is the winding resistance, where is the datasheet and what supply voltage are you
using?
Title: Re: Stepper Motor is getting real warm...
Post by: MorganS on Apr 29, 2015, 01:38 am
If it's scavenged from a printer then it's only too hot when the smoke is released.  Warm is OK.
Title: Re: Stepper Motor is getting real warm...
Post by: yaafm on Apr 29, 2015, 11:37 am
the rated current is stated in the data sheet you linked to - are you sticking to it?
Title: Re: Stepper Motor is getting real warm...
Post by: MarkT on Apr 29, 2015, 12:08 pm
In general steppers are rated for 60 or 80C temperature rise above ambient, which is
a lot.  Most steppers are rated for heatsinking - ie being bolted to a metal frame that
helps take away the heat (since this is normal for motors).  If temperature is an
issue de-rate the current a bit.  Remember dissipation is proportional to current squared
so even a small reduction in current will make a difference.
Title: Re: Stepper Motor is getting real warm...
Post by: gc9n on Apr 29, 2015, 02:16 pm
this the datasheet
Rated Voltage DC 12V DC 24V
Working Voltage DC 10.8~13.2V DC 21.6~26.4V
Rated Current/Phase 400mA(PEAK)
No. of Phase 2 Phase
Coil DC Resistance 5Ω/phase±7%
Step Angle 7.5°/step
Excitation Method 2-2 Phase excitation (Bipolar driving)
Insulation Class Class E insulation
Holding Torque 39.2mN·m 39.2mN·m
Pull-out Torque 23.2mN·m/800pps 17.4mN·m/2,000pps
Pull-in Torque 27.1mN·m/200pps 26.2mN·m/200pps
Max. Pull-out Pulse Rate 2,000pps 3,900pps
Max. Pull-in Pulse Rate 700pps 700pps



I forgot it and it worked for 20 minutes. the damn thing melt my mouse pad....
the resistance in windings was fine though.....

The power source that i feed it was 12v 1.5Amp  , so i think was over kill the data sheet say Rated Current/Phase 400mA(PEAK)  , so i have to use small amount of current
Title: Re: Stepper Motor is getting real warm...
Post by: jremington on Apr 29, 2015, 04:48 pm
You are not allowed to exceed ANY rating. 12 volts into 5 ohms is 2.4 amps, which is far higher than the 400 mA current rating.

For stepper motors, the voltage rating is usually irrelevant. It is the current rating that you must not exceed (steady state current).

That particular motor is intended for use with a chopper-type motor driver, like the Pololu A4988 breakout.
Title: Re: Stepper Motor is getting real warm...
Post by: gc9n on Apr 30, 2015, 11:21 am
(http://i.ebayimg.com/00/s/MTIwMFgxNjAw/z/vCwAAOxy4fBTj8v1/$_57.JPG)

this is the motor ,

Title: Re: Stepper Motor is getting real warm...
Post by: gc9n on Apr 30, 2015, 11:30 am
Are you saying that the  L298N Dual Motor Controller Module   that i use is incompatible with this motor?
Title: Re: Stepper Motor is getting real warm...
Post by: gc9n on Apr 30, 2015, 11:53 am
this is a very similar situation...

http://forum.arduino.cc/index.php?topic=178114.0
Title: Re: Stepper Motor is getting real warm...
Post by: jremington on Apr 30, 2015, 04:54 pm
Quote
Are you saying that the  L298N Dual Motor Controller Module   that i use is incompatible with this motor?
Correct. That is a low impedance motor and is intended for a chopper driver.

The L298N motor controller will work if you use a high-wattage resistor in series with each motor winding to limit the current (say, 27 ohms, 10 watts, with 12V motor power supply), but that will waste a lot of power.
Title: Re: Stepper Motor is getting real warm...
Post by: MarkT on Apr 30, 2015, 07:54 pm
5 ohm is borderline low impedance, and it looks fairly small (rated current 0.4A suggests under 2W dissipation.

A4988 will run that sweetly from 12 or 24V.

But with 7.5 degree steps you may not need high speed.  L298 from 5V supply
might work (drops 2.5V or so, so about 0.5A to the windings) for low speeds
Title: Re: Stepper Motor is getting real warm...
Post by: Swmitchell on May 01, 2015, 03:34 am
Perhaps you could add a resistor between the driver and the motor to reduce the current.

Sure the stepper motor will not step as strong... but it may still fit your project without having to go and get a chopper driver.


Title: Re: Stepper Motor is getting real warm...
Post by: gc9n on May 01, 2015, 09:48 am
i ordered some A4988  , but i will test a resistor for each phase also , just to see if it works
Title: Re: Stepper Motor is getting real warm...
Post by: gc9n on May 30, 2015, 11:33 am
So i finally got the A4988 polulu drivers..


Unfortunately motor not spinning  , it is only a little bit vibrating and thats it.
my connections are like this

(http://forum.arduino.cc/index.php?action=dlattach;topic=133894.0;attach=57945)

except the capacitor i didnt use a capacitor for the external ac


this is the code

Code: [Select]

//simple A4988 connection
//jumper reset and sleep together
//connect  VDD to Arduino 3.3v or 5v
//connect  GND to Arduino GND (GND near VDD)
//connect  1A and 1B to stepper coil 1
//connect 2A and 2B to stepper coil 2
//connect VMOT to power source (9v battery + term)
//connect GRD to power source (9v battery - term)


int stp = 5;  //connect pin 13 to step
int dir = 3;  // connect pin 12 to dir
int a = 0;     //  gen counter

void setup()
{               
  pinMode(stp, OUTPUT);
  pinMode(dir, OUTPUT);       
}


void loop()
{
  if (a <  200)  //sweep 200 step in dir 1
   {
    a++;
    digitalWrite(stp, HIGH);   
    delay(10);               
    digitalWrite(stp, LOW); 
    delay(10);             
   }
  else
   {
    digitalWrite(dir, HIGH);
    a++;
    digitalWrite(stp, HIGH); 
    delay(10);               
    digitalWrite(stp, LOW); 
    delay(10);
   
    if (a>400)    //sweep 200 in dir 2
     {
      a = 0;
      digitalWrite(dir, LOW);
     }
    }
}
Title: Re: Stepper Motor is getting real warm...
Post by: gc9n on May 30, 2015, 04:30 pm
Any help guys...
Title: Re: Stepper Motor is getting real warm...
Post by: Robin2 on May 30, 2015, 07:48 pm
Get a capacitor.

Try the code in the first example in this simple stepper code (http://forum.arduino.cc/index.php?topic=277692.0) as I know it works for me and for others.

How are you powering the motor (volts and amps) ?

Have you the current limit on the A4988 correctly adjusted?

Draw (with pencil) a diagram showing exactly how YOU have everything connected and post a photo of the drawing.

...R
Title: Re: Stepper Motor is getting real warm...
Post by: gc9n on May 30, 2015, 10:18 pm
12v 1amp power for the motor
The current limit what do you mean?

I will post the draw asap
Title: Re: Stepper Motor is getting real warm...
Post by: gc9n on May 31, 2015, 11:10 am
The arduino is connected to the Laptop from the 5v usb cable.

(http://s16.postimg.org/h1zh7rrf9/IMG_20150531_115721.jpg)
this is the drawing
the sketch you told me just vibrates

Code: [Select]
// testing a stepper motor with a Pololu A4988 driver board or equivalent

// this version uses millis() to manage timing rather than delay()
// and the movement is determined by a pair of momentary push switches
// press one and it turns CW, press the other and it turns CCW

byte directionPin = 9;
byte stepPin = 8;

byte buttonCWpin = 10;
byte buttonCCWpin = 11;

boolean buttonCWpressed = true;
boolean buttonCCWpressed = false;

byte ledPin = 13;

unsigned long curMillis;
unsigned long prevStepMillis = 0;
unsigned long millisBetweenSteps = 25; // milliseconds

void setup() {

  Serial.begin(9600);
  Serial.println("Starting Stepper Demo with millis()");

  pinMode(directionPin, OUTPUT);
  pinMode(stepPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
 
  pinMode(buttonCWpin, INPUT_PULLUP);
  pinMode(buttonCCWpin, INPUT_PULLUP);
 
}

void loop() {

curMillis = millis();
readButtons();
actOnButtons();

}

void readButtons() {

buttonCCWpressed = true;
buttonCWpressed = false;

if (digitalRead(buttonCWpin) == LOW) {
buttonCWpressed = true;
}
if (digitalRead(buttonCCWpin) == LOW) {
buttonCCWpressed = true;
}
}

void actOnButtons() {
if (buttonCWpressed == true) {
digitalWrite(directionPin, LOW);
singleStep();
}
if (buttonCCWpressed == true) {
digitalWrite(directionPin, HIGH);
singleStep();
}
}

void singleStep() {
if (curMillis - prevStepMillis >= millisBetweenSteps) {
prevStepMillis += millisBetweenSteps;
digitalWrite(stepPin, HIGH);
digitalWrite(stepPin, LOW);
}
}



Title: Re: Stepper Motor is getting real warm...
Post by: gc9n on May 31, 2015, 01:43 pm
Ok i manage to make it move... it was the poti from the a4988 that i turn clock wise
i then work with full step , i just ground the ms1 ms2 and ms3

BUT the motor power is not what i expect. i need more torque
Title: Re: Stepper Motor is getting real warm...
Post by: Robin2 on May 31, 2015, 05:47 pm
Ok i manage to make it move... it was the poti from the a4988 that i turn clock wise
i then work with full step , i just ground the ms1 ms2 and ms3

BUT the motor power is not what i expect. i need more torque
I guess the first question is "Is the torque as much as the motor specifications say it should be?"

If not, you are going to have to tell us what current setting you have the A4988 set at.

What happens if you change the value of the millisBetweenSteps to make the motor go more slowly?

...R
Title: Re: Stepper Motor is getting real warm...
Post by: gc9n on Jun 02, 2015, 02:41 pm
No the motor can handle more

Holding Torque 39.2mN·m 39.2mN·m
Pull-out Torque 23.2mN·m/800pps 17.4mN·m/2,000pps
Pull-in Torque 27.1mN·m/200pps 26.2mN·m/200pps
Max. Pull-out Pulse Rate 2,000pps 3,900pps
Max. Pull-in Pulse Rate 700pps 700pps


i   can stop it very easy with my hand.

"If not, you are going to have to tell us what current setting you have the A4988 set at."


you mean the poti on a4988 ?
millisBetweenSteps makes no deference,
Title: Re: Stepper Motor is getting real warm...
Post by: Robin2 on Jun 02, 2015, 04:35 pm

"If not, you are going to have to tell us what current setting you have the A4988 set at."


you mean the poti on a4988 ?
Yes.
What current is it set for?

Quote
i   can stop it very easy with my hand
That is not very informative. It is not a very powerful motor. If my maths is correct the holding torque is only 390 gram.cm.  You need to measure the torque, rather than guess. There is a simple system for that in stepper motor basics (http://forum.arduino.cc/index.php?topic=284828.0).

...R