controlling four steppers simultaneously via one Arduino.

I'm working on a project to rotate a controlled shaft, a plotter along x-axis, and two other steppers fix on the head, mounted on the plotter.
I've got to control the shaft, using a unipolar stepper, ULN2004 IC, and Arduino. Now, I wanna know how to control other steppers via the same Arduino, simultaneously.

Also, to make the plotter, is it possible to use dc motor, rather than stepper, because i don't need enough accuracy, but control(i.e. back and forth and stop).

Any help would be appreciated. Am new to this, plz help me.

Thank You.

Start by looking at the Blink Without Delay example. Try extending it to blink multiple LEDs at different rates. This will be the same program structure you need for controlling your steppers simultaneously:

  • For each stepper, keep track of what its current phase is, which direction it is going in, when its phase next needs to be changed, and how many more steps it has to go until it should be stopped.
  • In the main loop, read the time using millis() or micros(), and check whether each stepper is due a phase change yet.

If you want to control a DC motor and it needs to go in both directions, you'll need an H-bridge. Best place to start is usually the L293D chip (for low current motors) or L298N chip (for higher current motors). If you're a newbie, I suggest buying a ready-made shield or motor driver board based around one of these chips.

Hello there, thanx to reply. Yes I'm a newbie, but when I've got to control one stepper via uln2004, then i think the other three can be connected the same way using uln2004(means using uln2004 as easy drive).
But my main problem is that arduino IDE uses C programming, i.e. it executes line wise. If I'm rotating a shaft via one stepper, how to run another stepper, without interrupting first one, and if need occurs, how to stop first one, without interrupting second one?

Please answer me, as am new to too, but not totally dumb. am learning day by day....please sort me out.

Thank You.

The Arduino is plenty fast enough that for stepper motor purposes, it will appear to be controlling them simultaneously, just like the extended version of blink without delay suggested will make it seem that LEDs are flashing independently. Take a look at the reprap project - it uses four steppers to do some very fine precision work and guess what the controller is? Yup, Arduino.

Thanx Wildbill.
The main problem am facing is that i can't invest money in buying new boards, even it was too difficult to get an Arduino itself, but somehow i managed.
Now I just wanna know that as I'm using ULN2004 between Arduino and stepper, would it be possible to connect other two in same fashion. However, it seems fine too me to connect them and define left pins on arduino for them, but, now I dont know how to code them to work simultaneously. Like without interrupting one, changing the direction of another.
If there's any possibility, please let me know.
Thanx anyways.