Go Down

Topic: How to drive two steppers at a same time (Read 1 time) previous topic - next topic

mikk

Hello. I want to make robot with stepper motors, I have two of them. And I want to drive them at a same time.
I tried to put in code first one stepper one step and then another stepper one step. But I have no power if I do like this. Is there another options to do it? Please help me.

Sorry for my bad English I'm from Estonia.

wildbill

More details would help - code and schematic. How are you providing power to the steppers? They will need their own power supply. If you really want the steppers to step together, can you use the same connections to them or do they need to step independently too?.

mikk

They must turn independently because I have robot with two driving wheels and back I have one wheel. I had four 1.5 v batteries. And arduino got voltage from 9v battery.

code is here:
Code: [Select]
#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 myStepper1(stepsPerRevolution, 8, 9, 10, 11);
Stepper myStepper2(stepsPerRevolution, 7, 6, 5, 4)

void setup() {

}

void loop() {
  // step one step:
  myStepper1.step(1);
  myStepper2.step(1);
}

wildbill

Can you post a link to the steppers you're using? Guessing though, it sounds like those batteries aren't sufficient .

mikk


Go Up