how many step-by-step motors can i conect to uno??

hi buddy's look im trying to build a cnc router but i want and arduino board to control my cnc,,, in oder to do that i need to connect 4 step-by-step bipolar motors each one has 4 output wires.... i wa thinking abour arduino uno... or if i can not connect all in uno maybe an arduino mega...

but my first option is arduino uno....

You only need two output pins to control a stepping motor, step and direction. So with 20 outputs you can in theory have 10 motors. Check out the RepRap project, they have some schematics and software you can look at.

You only need two output pins to control a stepping motor, step and direction. So with 20 outputs you can in theory have 10 motors.

Of course, that would be dependent on having a driver for the stepper that can take that information and convert it into the stepping pattern for the stepper.

If you wanted to use "direct drive" (thru transistors, say), and were using 4 wire steppers, then you could drive up to 5 motors, in theory, with 20 outputs (the code might be a little funky to keep the speed up).

If you used I2C-based stepper controllers, you would only need two wires to control ~126 (?) steppers...

If you used I2C-based stepper controllers,

Not seen one of those.

Of course you can expand the arduino's outputs almost infinitely by a number of means.

Not seen one of those.

I had looked it up the other day:

I didn't look closely at it, though (and they have other versions, too) - I think it maybe needs a proper current driver system (likely another IC they supply as part of the family) on the outputs in order to drive the coils of the stepper; I think the chip just does the I2C decoding and interfacing, outputing logic levels for the driver IC...

Seems like a neat part, though!


Seems like a neat part, though!

It does. The data sheet says:-

It is ready to build intelligent peripheral systems where up to 32 drivers can be connected to one I2C master.

It lacks any current feedback control and so that will limit the top speed you can get out of a motor and means you must feed the motor with the voltage you want. However where it scores is that it handles acceleration and deceleration in the chip with out need for processor intervention. That makes it potentially very useful. You need a PCB for it, it's not the sort of thing you can easily prototype. Do you know who stocks them?

ummm still im not taht good in electronics jejje but ummm im using bipolar 4 output each i need to connect for of them and i dont need them to get speed in fact what i need are the steps.. i dont know if im being compressible....

an extra is that for controlling the stepper i will need an extra output voltage.. each motor need 12v to start and arduino only gives me 5v so i need to connect the stepper to an extra device......

however my doubt now is that if ith arduino uno i can connect4 stepper is that im like lost u know reading arduinos page said that uno only have 12 outputs but you said that i can get 20 how is that??

Do you know who stocks them?

No clue. Like I said, this was just something I found yesterday for another post - did a google of "i2c stepper motor driver" and found it. If I were going to look into buying a part like this, my first inclination would be to try Digikey and/or Mouser, among a few others. If I didn't find it there, and I really needed it - I would like contact the manufacturer (On Semi), and find out direct who their distributors for it are (or if it has been superceded by another part)...


said that uno only have 12 outputs but you said that i can get 20 how is that??

According to the "Summary" here:

There are 14 digital and 6 analog I/O lines; there are 12 digital lines, plus pins 0 and 1 (which if disconnected from the USB serial interface, and be repurposed as digital I/O) - the 6 analog lines can also be used for digital I/O - which give a total of 20 digital I/O lines.

Now - since you have already stated that you want to read some sensors (like limit switches or similar?), and you likely want to communicate using a PC with this board for your project, you would have to give up some of those lines for those purposes.

But even if you only used the 12 "left over" digital I/O lines, leaving your USB connected for comms with your PC controlling things, and the 6 I/O pins for analog or digital sensors (limit switches or something) - that would still give you the ability to run between 3 and 6 steppers (in theory), depending on how you set up the motor driver system and software. You could run even more steppers (1 to 3 more) if you were willing to drop the analog I/O lines (but you might find yourself without any lines for your sensors!)...

...and that's just for a standard Arduino based on the ATMega168/328; with a Mega - the number of steppers and sensors can be much larger...


very instersting..... ok i will buy an arduino uno to see how it goes and how could i connect the steppers

each motor need 12v to start and arduino only gives me 5v

Even if you had 5V motors you can't connect them directly to the arduino as it won't supply the current.

Note there are two types of stepping motor bi-polar and unipolar. These require different types of circuits to drive them. The coils need to be switched on in turn to make it move properly. You can either do this in the arduino software or have a driver chip that works out what to switch on next when you give it a step pulse. The other line is needed to tell what direction it is to move in. For more on stepping motors see:- and