Driving two steppers

Hi,

I know that usely, we use one loop with like one step per motor to drive a robot with steppers. However, I tried something else to potentialy have a better torque and I want your advice. I saw nobody that tried what I did. I connected my two motor drivers in parralel and I programmed them like it was only one motor driver. So they both behave the same. However, I'm controlling my self (not with the library) the two directions pins of the drivers so I can also turn with my robot.

What do you guys think? Will the current of 1.35A be too strong for 4 AA batteries in serie?

Thank you.

Post links to the datasheets for your motors and for your drivers

Post your code.

The only problem drawing 1.35 amps from 4 AA cells is the speed at which the batteries will be depleted. In general stepper motors and batteries don't go together - the motors are very inefficient.

...R

Here's the datasheet of my stepper and of my driver.

Here's my code:

void deplacer(int d) {
  int pas = d / (RAYON * 2 * 3.1416) * 200 / MICROSTEP;
  boolean a;
  if (pas > 0) { //À calibrer
    a = HIGH;
  }
  else {
    a = LOW;
  }

  digitalWrite(SWITCH1, HIGH);
  digitalWrite(SWITCH2, HIGH);
  digitalWrite(DIR2, a);
  stepper.move(pas);
  digitalWrite(SWITCH1, LOW);
  digitalWrite(SWITCH2, LOW);

}

Tell us what [u]you[/u] think, after trying it for a while!

Is there some reason why you have chosen a low-voltage driver? Stepper motors work better with high voltages. Stepper motors are very inefficient and not really suitable for battery power.

You must post a complete program. I can’t make sense of your snippet.

This Simple Stepper Code should work with your driver.

…R
Stepper Motor Basics

Robin2: Is there some reason why you have chosen a low-voltage driver? Stepper motors work better with high voltages. Stepper motors are very inefficient and not really suitable for battery power.

You must post a complete program. I can't make sense of your snippet.

This Simple Stepper Code should work with your driver.

...R Stepper Motor Basics

I posted the only function needed for my program to work. Altought I'm also using pololu library for the DRV8834. I'm using low voltage because for my competition, I can't use more than 4 AA batteries. So I'm not able to achieve a big voltage. I also need to be very precise for my competition that last 2 minutes. So I think that the use a stepper is a good choice in my case.

jremington: Tell us what [u]you[/u] think, after trying it for a while!

So far it works perfectly! I only need to make torque tests to see if I can notice any difference.

Any objections to my idea of running two drivers as the same but controlling the direction by myself? Because I'm gonna solder this circuit this weekend if it still work great and that nobody tell me why it would be a bad idea.

I guess I misunderstood your Original Post.

There should be no problem sending the step instruction from one Arduino I/O pin to two stepper drivers.

I'm not sure it will make any difference compared with using two different pins or two different functions in your code - one for each motor.

By the way, your snippet still does not make sense !

...R

MaxiMax07: Hi,

I know that usely, we use one loop with like one step per motor to drive a robot with steppers. However, I tried something else to potentialy have a better torque and I want your advice. I saw nobody that tried what I did. I connected my two motor drivers in parralel and I programmed them like it was only one motor driver. So they both behave the same. However, I'm controlling my self (not with the library) the two directions pins of the drivers so I can also turn with my robot.

What do you guys think? Will the current of 1.35A be too strong for 4 AA batteries in serie?

Thank you.

You absolutely must never parallel chopper drivers for stepper motors, that will never work and it probably fries both drivers instantly. One stepper, one chopper driver.

Well I can't get a stable torque or straight mouvement with the code with a loop and a few step of each motor per loop.

I returned to my first program and everything is working fine. So I think I'm gonna stick to it.