Torque problem

Hi i hope somebody can help me out, i'm using arduino, easystepper and Nema 17 steppermotor.

Everything works when i press te push button the motor turns, but when i put pressure on the motorshaft it has no power i can holt it with my hand.

here below code and in attachmend layout wiring. Maybe i missing something????? :confused: :confused:

#define DISTANCE 100


int StepCounter = 30;

int Stepping = false;


void setup() {                

  pinMode(8, OUTPUT);     

  pinMode(9, OUTPUT);

  digitalWrite(8, LOW);

  digitalWrite(9, LOW);


  pinMode(3,INPUT);

}


void loop() {

  if (digitalRead(3) == LOW && Stepping == false)

  {

    Stepping = true;

  }


  if (Stepping == true)

  {

    digitalWrite(9, HIGH);

    delayMicroseconds(500);          

    digitalWrite(9, LOW); 

    delayMicroseconds(500);


    StepCounter = StepCounter + 1;


    if (StepCounter == DISTANCE)

    {

      StepCounter = 0;

      Stepping = false;

    }

  }

}

You got the right voltage on M+ to suit the motor?

(Afaik, NEMA numbers have nothing to do with a motor's electrical / mechanical characteristics, but just mean the layout of the mounting holes.)

(Afaik, NEMA numbers have nothing to do with a motor's electrical / mechanical characteristics, but just mean the layout of the mounting holes.)

NEMA 17 is mounting hole specifications.
NEMA 23 is electrical characteristic specifications.

So, yeah, telling us that the motor meets NEMA 17 specs is useless, without telling us what color it is.

OP: What do you have between the stepper motor and the Arduino? The Arduino can not supply anything near the current needed for a stepper motor.

i'm using a nema 17 45Ncm(63.7 oz.in) 2A 2,2V for power i use pc power Supply.
i try this code below and it gifs good power torque.
What i need is that the motor moves 20 steps i pusch the button but with good torque

void setup()
{
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
}

void loop()
{
  digitalWrite(3,!(digitalRead(3)));
 for (int I=0;I<7000;I) // As the easy stepper driver is in microstepping mode
                           // We need to increase the step count.
  {
   digitalWrite(2,HIGH);
   digitalWrite(2,LOW) ;
   delayMicroseconds(2000);
  }
}

i'm using a nema 17 45Ncm(63.7 oz.in) 2A 2,2V for power i use pc power Supply.

What is the stepper motor connected to? What is the power supply connected to?

i try this code below and it gifs good power torque.

OK.

What i need is that the motor moves 20 steps i pusch the button but with good torque

So, what is the problem?

Your motor requires 2A (per coil) to run at its biggest torque.

The easy driver can only deliver 0.15A (min) - 0.75A (max) per coil. That is too low to drive the motor at its max possible torque.
But, at 0.75A it should already produce so much torque that you cannot hold it with your hand.

i try this code below and it gifs good power torque

In your first post you said, there is no power; now you say, that with (another?) code you got good torque ??
Torque is mainly based on your power supply, (a bit) micro stepping and speed (the more speed, the less torque, depending on the characteristics of your stepper).

Questions:

  1. What external power supply (voltage / current values needed!) do you use to power the easy driver?
    -> you said: PC power supply, so 12V? 24V/3A would be much better if you want more speed and torque.
  2. Did you adjust the easy driver current to its max?
  3. How is the setting of micro stepping?

Here i made a video what the motor does, it has no power

it has no power

But,

it gifs good power torque.

I'm confused.

Perhaps if you answered ALL of the questions that have been asked...

Here i made a video what the motor does, it has no power

What do you expect? Running the stepper motor "under powered", maybe even below easy driver's max. potential and then you torture the stepper motor holding it with a level (I thought you would have tried to just hold the plain shaft)...

Pls answer my questions in #5 and we'll know better where your problem lies.

What is the stepper motor connected to?

Its connected to the a pc power supply 12V

Did you adjust the easy driver current to its max?

Yes i turn it to max

Sorry for my bad English

  1. i did use this code, i can hold the motorshaft with my hand
#define DISTANCE 100


int StepCounter = 0;

int Stepping = false;


void setup() {                

  pinMode(8, OUTPUT);     

  pinMode(9, OUTPUT);

  digitalWrite(8, LOW);

  digitalWrite(9, LOW);


  pinMode(3,INPUT);

}


void loop() {

  if (digitalRead(3) == LOW && Stepping == false)

  {

    Stepping = true;

  }


  if (Stepping == true)

  {

    digitalWrite(9, HIGH);

    delay(5);          

    digitalWrite(9, LOW); 

    delay(5);


    StepCounter = StepCounter + 1;


    if (StepCounter == DISTANCE)

    {

      StepCounter = 0;

      Stepping = false;

    }

  }

}
  1. then i tested the motor with this code. the motor moves forward and backwards and i cant hold the shaft, so somethings wrong with the first code thats the one i need, but i dont know what could be wrong
void setup()
{
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
}

void loop()
{
  digitalWrite(3,!(digitalRead(3)));
 for (int I=0;I<7000;I) // As the easy stepper driver is in microstepping mode
                           // We need to increase the step count.
  {
   digitalWrite(2,HIGH);
   digitalWrite(2,LOW) ;
   delayMicroseconds(2000);
  }
}

Hope now it wont confuse you :o :o :slight_smile: :slight_smile:

so somethings wrong with the first code

Aside for the pin numbers, the only (material) difference between the two codes is the time between steps - 2 milliseconds in one case, and 5 in the other case.

First step is for you to explain why you change pins from one code to the other.

Solve, the problem it seems to be a buggy easystepper exchange it for another one and now everything seems to work just fine.

Thank you all for your kind help. Best Regards, Bratko