Pages: [1] 2   Go Down
Author Topic: Why so much current?  (Read 918 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Edison Member
*
Karma: 6
Posts: leet
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have 28BYJ-48 with ULN2003 driver
Why 350ma draw when 8 steps in a row every 2 sec?
Constant current.
Would expect a spike every 2 sec.
The Uno is about 50ma, the motor only when moving.
The ULN2003 takes 300ma constantly?  LED's?
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31550
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A stepping motor draws current all the time. It takes most current when it is still and less current when it is moving.
This is because it is producing its maximum torque when it is stationary.
Logged

Offline Offline
Edison Member
*
Karma: 6
Posts: leet
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great answer!  I don't need any torque when it's resting, because of all the gears it stays in place on it's own.
How can I accomplish this with my hardware?
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31550
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Disable the drive current when you are not moving it with a high sided transistor or FET.
The exact details depend on if you have a unipolar or bi polar motor.
However be warned if you are micro stepping the motor you loose the position when you disable the power.
Logged

Offline Offline
Edison Member
*
Karma: 6
Posts: leet
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Tried Googling not sure if it is unipolar or bipolar.  Can it be something else?
I do want to move only 2-8 steps at a time.
Can I use a series resistor to lower the current without loosing the position?
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31550
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
not sure if it is unipolar or bipolar.  Can it be something else?
No one or the other. How have you wired it up? That is the way to tell.

Quote
Can I use a series resistor to lower the current without loosing the position?
You can but you also loose torque.
Logged

Offline Offline
Edison Member
*
Karma: 6
Posts: leet
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Possibly like this.  I can't see inside the motor.  I know there are only 5 wires going to the motor.  So it must be Unipolar?
http://www.eleccircuit.com/uln2003-control-stepper-motor-by-parallel-port

I would use a FET to bypass the resistor when I want to move it.
Maybe only 50ma to keep it's position with no torque applied to it?

Can this motor reverse?
Do I need a different driver IC?
See my other post.
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31550
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I know there are only 5 wires going to the motor.  So it must be Unipolar?
Yes.

Quote
Can this motor reverse?
Yes

Quote
Do I need a different driver IC?
No.

Quote
See my other post.
Link?

You need to put a PNP transistor or p-channel FET as a high sided switch in between the motor's positive supply and the common coil connection to disable the motor.
Logged

Offline Offline
Edison Member
*
Karma: 6
Posts: leet
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://arduino.cc/forum/index.php/topic,86339.0.html
How to reverse it?
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Offline Offline
Edison Member
*
Karma: 6
Posts: leet
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From reading these specifications...
http://www.aliexpress.com/fm-store/315419/211153727-497598231/DC-5V-Gear-Stepper-Motor-4-Phase-Reduction-Step-Motor-Mini-Step-Motor-for-PIC-MCU.html

How many RPM can I expect with no load?
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1023
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OR - keep track internally what your output pattern is and turn off the 4 outputs from your Arduino when you aren't moving. Then when you are ready to move again, turn on the outputs and make your move. If the outputs from the Arduino are off, the outputs from the driver chip are off.

What routine are you using to control the move? Are you using a stepper library? or are you using your own code to control the outputs?

you could do something like this -
int dir = 0;
int steps;
void loop()
{
    dir = 0;   // or -1 for opposite direction
    for(counter = 0, counter< steps,counter++){
      step;
    }
// then do this to turn off the outputs when the move is complete
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
    digitalWrite(6,LOW);
    digitalWrite(7,LOW);
   }

void Step()
{
  if (dir)
  {
    ctr-- ;
  }
  else
  {
    ctr++ ;
  }
  ctr = ctr & 3;

  switch (ctr){
  case 0:
    digitalWrite(4,HIGH);
    digitalWrite(5,LOW);
    digitalWrite(6,LOW);
    digitalWrite(7,LOW);
    break;
  case 1:
    digitalWrite(4,LOW);
    digitalWrite(5,HIGH);
    digitalWrite(6,LOW);
    digitalWrite(7,LOW);
    break;
  case 2:
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
    digitalWrite(6,HIGH);
    digitalWrite(7,LOW);
    break;
  case 3:
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
    digitalWrite(6,LOW);
    digitalWrite(7,HIGH);
    break;
  }
}
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31550
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Post code using the # icon, understandable mistake for some one asking a question but not someone answering one.  It is poor code anyway.

Even if you missed the point about micro stepping values not being retained after restoring the power, it is nothing to do with what you said.

you reverse the motor by changing the sequence you switch the coils.
Logged

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1023
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well Grumpy_Kike -

I posted it as a quick example, and perhaps you could show us some better code? It is hardly complete, but might give someone some idea to work with to develop their own ideas.
Logged

Offline Offline
Edison Member
*
Karma: 6
Posts: leet
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@GrumpyMike - Yes, that's how you do it in theory.  How do I do it using the Stepper library?  I tried step(-1) it goes forward.
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31550
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Look at the motor knob example.
stepper.step(-1) will do it not step(-1)

Logged

Pages: [1] 2   Go Up
Jump to: