steppers on arduino

Hi,

I am after building a humanoid robot using 17 steppers my question is what the best route would be?

Like can they all be run off one arduino board?
Which board would you recommend?
Do I need to use pwm?
With all the steppers will I still be able to use sensors on the same board?
And can 2 or more arduino boards able to run along side each other and work together?

Very new to arduino and any info would be great.

Thanks
Rick

That is ambitious project for someone new to Arduino, but we all have to start somewhere :D.
The short answer is, it depends.
Are you going to be using Unipolar or Bipolar stepper motors?
Are you going to drive the motors directly, through transistors, or use drive circuit?
In general each stepper motor needs 4 output pins from the Arduino (direct driven) so you need 68 digital outputs for the 17 steppers. If you use drive circuit you can get by with 2 pins, one for direction, one for each step. Then you need Arduino with 34 output pins. Steppers are not PWM driven, servos are (if you're using drive circuit).
Arduinos can work side by side if you program them to do that.
You can use sensors on the same Arduino(s) if you have unused input pins.
The board(s) you choose has to have enough I/O pins for your project.

Hi,

Yeah maybe a bit ambitious but i am sure i will get my head around it lol.

The motors are going to be Nema 17 and i believe they can be run both Unipolar or Bipolar but correct me if im wrong.

The motors will be run via drivers probably TB6560.

What board would you recommend to run would a uno suffice or would a mega be better rather someone with experience guild me so i don't make to many mistakes all long the way.

  1. You might also consider using A4988 stepper drivers instead of TB6560. The A4988 has a slightly lower current rating (2A rated, 1.5A more realistically) than the TB6560, but if this is enough, you can purchase A4988 boards inexpensively via eBay.

  2. You don't need 2 pins per driver. The DIR pin (and the microstepping control pins, if you are using them) can be common between all the drivers, because they are only sampled on a clock edge, and you don't need to clock the drivers simultaneously. So that reduces the pin count to 17 for the clocks, and 1 common DIR pin. Since you only need to clock one driver at a time, you can use a demultiplexer to generate the clocks. For example, using 2 x 74HC238 or 1 x 74HC4514 you can generate 16 clocks from 5 pins (4 to select the channel and 1 to pulse the clock). So that's a total of 7 pins to drive all 17 stepper drivers, or a few more if you want to vary the microstepping.

With care, you can use many of the same pins as part of the interface to other devices too.

Make sure you plan for the power needs of the stepper motors. Stepper motors use the most current when they are stopped, and this can be a fairly good amount of current. Nema 17 is only the style of the case on the motor, so its hard to say how much current this may be, or even if the motor is bipolar or unipolar. Depending on the motor you choose you may need something like a 5-10 amp power supply.

If I were building a humanoid robot I would go with servo motors. These only use power when moving, so they are much more efficient, and they can maintain a given position by virtue of a built in sensor. Stepper motors can maintain position by counting steps, but if too much resistance is met they will skip steps and you will lose track of where the motor is. These also only need one pin on the Arduino to run, and are simple to code.

jroorda:
These only use power when moving

I don't think that's quite right - it would be more accurate to say they only use power when they are applying a force.

Hello,

Thanks for all the help, think i might avoid steppers and go with servos as i can reduce weight by using them, and what i have read is that they are easier to program to as jroorda said.

So if i was to get a Mega2560 R3 How many servos could i run?

Thanks
Ricky

makemyideas:
Hello,

Thanks for all the help, think i might avoid steppers and go with servos as i can reduce weight by using them, and what i have read is that they are easier to program to as jroorda said.

So if i was to get a Mega2560 R3 How many servos could i run?

Thanks
Ricky

According to the Servo library documentation, 48 servos: Servo - Arduino Reference.

Now, whether a Mega 2560 has enough ram to be able to run a realistic program with 48 servos or enough cycles to run the program handling 48 servos, I don't know.

If you are only running the Arduino to power the servers, and are using a heftier processor (Rasberry Pi, Beagle Bone Black, or even standard laptop) to do the higher level controls, you might want to think about using a servo controller that plugs into USB directly, such as the Maestro servo controllers that Pololu sell. I've not used them, but I see the banner ad, when I go to pololu.com: Pololu - Maestro USB Servo Controllers

Another place to look is Arcbotics hexy, which is a hexapod that uses an Arduino Leonardo clone to control 18 servos. I actually bought hexy, but it is in the rather large bin of projects to do someday. http://arcbotics.com/products/hexy/

Thanks MichaelMeissner,

For the info and links, i have ordered a Mega2560 R3 and some servos plus the ones laying around and im going to have a play around see what im able to do, and maybe take a few baby steps along the way. nice learning curve :). is their any mistakes or thing i could do that i should avoid doing?

makemyideas:
Thanks MichaelMeissner,

For the info and links, i have ordered a Mega2560 R3 and some servos plus the ones laying around and im going to have a play around see what im able to do, and maybe take a few baby steps along the way. nice learning curve :). is their any mistakes or thing i could do that i should avoid doing?

I've only played with one servo, so I'm not the person to ask.

However, once you get past 1 servo, you need to think about powering the servos separately (and presumably scale up your power suppoly so it has enough watts to run all of your servers, and of course connecting the grounds together). Here is a FAQ for wiring servos: RCArduino: Servo Problems With Arduino - Part 1