10 stepper motors & Arudino Mega

I am building a functional Iron Man suit.

I have successfully designed and built the repulsors and arc reactor, and the entire circuit is voice controlled using VRBot. I have also mounted a WaveShield on the unit, to hear responses from "Jarvis". However, the next step involves moving pieces of the armor using stepper motors. I have never worked with any kind of motor on a circuit before, so I'm really at the mercy of this forum for answers.

I need to control 10 stepper motors, most of which need to rotate 180 degrees one way, and then back again at the next command. I've looked at the MotorShield from Adafruit, and it only allows for 2 stepper motors. Also, I am using a 5V power source (lithium ion).

So, my first question is, what type of stepper motor can I use with the Arduino Mega? I'm looking at ordering them from Abra Electronics (since I live in Canada) - click on the motors link, than stepper motors, and it will bring up four options, but I'm not sure which ones suit my needs. Also, if none of those seem like what I need, I'm not opposed to ordering from Digikey or something similar. Most of the armor pieces won't require a lot of torque to move, but a few might, and all of the motors I've found exceed 500mA (I think the max current allowed per pin on the Mega is 40mA or 50mA?)

Second question, how do I mount something to the drive shaft? I'm using plastic gears, so I can't really screw into the side... Super glue? I hope it's not a stupid question, lol.

Any help here would be greatly appreciated. If I have to design my own board, a schematic would greatly help me, as I'm still fairly new to microcontrollers and related hardware.

On a side note, does anyone have a good website where I can easily learn how to Multiplex/Charlieplex? I've read that this is the most effective way to run 7 LEDs in parallel, and not exceed the max current draw on one pin.

Thanks so much in advance for your help.

TonyStark

If they 'only' need to turn 180 degrees, then why not use servos?

You can get ones with decent torque, and they're easy to control from the Arduino (note, you'll obviously need a chunky PSU for them).

I don't know how many you can drive from a Mega, so that's worth checking too.

Epoxy and hot glue are great glues, or heavy duty velco, but it might not be accurate.

Also, can't an arduino mega control as many servos as it has PWM ports? I'm sure that was 16...

Also, 0.5 amp motors to move a piece of plastic/metal seems hugely excessive, if you were to use a motor, couldn't you use a smaller motor and some gearing, you'd get a nice motion that way too, less sharp.

(still think servos are your best bet though, as ru said )

Hey Richard,

Thanks for the detailed response. I am making a full-scale functional Iron Man suit.

I'll admit, I'm pretty aware that I've approached some aspects of this costume in a backwards manner. I must also admit I'm fairly new to electronics and circuit design.

However, for some things (ie. the helmet and mask), the design of the costume determined the gears, torque, force etc. I have yet to measure these values, but I will before I select which motors I need.

I chose the Arduino Mega because at the very least it's going to control the lights and sounds of the suit, and if I need another microcontroller/power source for the motors, I can do that.

The current battery I'm using to power the Arduino Mega is here: http://www.liquidware.com/shop/show/BPM/ - I have the 2200 mAh. Again, if I need to build a separate system for the motors, I'm happy to do so, which ever is easiest. I'm looking at ordering servos/stepper motors from this website: www.robotshop.ca

After some research, I'm realizing I don't necessarily need stepper motors to control these pieces. Hobby servos might be powerful enough for some of my purposes, but I won't really know until I measure the torque required for each mechanism. I'm also going to use at least two linear actuators instead of motors, so that should be a little simpler for those mechanisms.

As for the gears, I'm using Lego Technic, as it's lightweight, durable, cheap, and easy to change if my design doesn't work. The motors I'm using won't be designed to be compatible with Lego, so I was just wondering if anyone had any suggestions.

I'll do the measurements for each mechanism, and than post it here. It's looking like I'm going to have to design my own PCB to control the range of motors here, and have a designated power source and microcontroller for it. This is something I'm definitely going to need help with, because I'm not even sure where I would begin. Once I know which motors/servos/actuators I'll be using, perhaps I can message you Richard, and get some info on designing this circuit. If you can suggest an easier (and hopefully, cheaper) method, I'm all ears. Thanks for your patience with my newbieness.

TonyStark

Also, I was just looking at this servo controller: RobotShop | Robot Store | Robots | Robot Parts | Robot Kits | Robot Toys

or this one: RobotShop | Robot Store | Robots | Robot Parts | Robot Kits | Robot Toys

Any thoughts?

hee hee, or this one? RobotShop | Robot Store | Robots | Robot Parts | Robot Kits | Robot Toys

Which of these would be easiest to manipulate/connect with an Arduino?

Why use a servo controller at all? Can't you control them directly from the Arduino, as mentioned previously?

I had originally wanted to do that, but don't I run the risk of drawing too much current from the battery, and then damaging the Arduino?

If I used a servo controller, couldn't I just use an external power source (say, a 5600 mAh remote control car battery) ?

Which method is safer/easier/cheaper?

You'd still power the servos from the secondary source; the only connection to the Arduino would be the control pins (and linking the 0V connections). :slight_smile:

Controlling servos has nothing to do with drawing current from the controller.

It would if I was running them directly from the microcontroller, correct?

You are right, you don't want to power the any motors from your Arduino board. You'd be likely to burn out some components by drawing too much current from the board itself. So you'll need an external power supply. For my motors, I use a generic DC power adapter that I plug into the wall. (You can get cheap ones from a second-hand store for $1-$2... otherwise they're $12+ each) Just check the specs which are printed on the outside of the casing to make sure of the voltage and current they supply.

You can get simple transistors to act as very fast switches to power your motors. Basically, you connect your external DC power supply voltage and ground to the outer two pins of the transistor and the middle is the control line from the Arduino. By sending a PWM signal on the control line, it turns on and off the power very quickly to move the motor.

A nice neat package is the NTE1749 or equivalent (~$15). It's a 4-channel H-Bridge. Basically it powers 4 different control lines, as found on most stepper motors. You may be able to find a different model with more channels or a cheaper one to suit your needs, but this is the one I use.

Your limitation here would be that you need 4 control lines for each stepper motor. The Arduino doesn't have 40 digital output pins as you would need to run 10 stepper motors. Servos commonly use less control lines, so that would probably be a safer bet. But I'd still check how many you require before you buy anything.

As for the drive shaft question. I've done a bit of robotics with legos myself, and ran into the same question. Turns out there's a very good method for mounting gears to drive shafts. Check out the robotics --> motors section of sparkfun's website. (or google "universal mounting hub") It's a round metal hub that connects to the drive shaft with a set screw. The hub has other screw holes that you can use to connect your lego gears. The holes work very nicely because the lego gears also have holes that match up pretty well.

You can do pretty much the same thing with whatever plastic gears you can find at a hobby shop. Just get one that connects to the drive shaft (many have pressure fitting gears), and then you can drill holes in the plastic gear, and then use small nuts/bolts to connect the lego gear you want. That solution works well as a gear adapter for cheap.

In essence, the ATMEGA168 / 328 microcontrollers are fast enough (16-20 Mhz) to control 10 steppers and lights and such, but the difficulty would be getting them all connected to the microcontroller. You could do some multiplexing and resolve that issue, and easily connect the 10 motors, and use a few pins (4) to address which motor you want. Though, multiplexing would cause it so you wouldn't be able to control all of the multiplexed devices at the same time... just one at a time. All that would take is a few AND/OR/NOR/XOR gate chips which are cheap, and do a bit of digital logic.

I think you could do what you want with an Arduino Mega, just requires some imagination / ingenuity... which from your project description sounds like you have plenty of.

I am making a full-scale functional Iron Man suit.

Boggle

I can't believe nobody in this thread has yet done the obvious thing and demanded photos!

Jon

Haha I was going to ask! I wonder what the suit looks like :stuck_out_tongue:

retxed68

I am making a full-scale functional Iron Man suit.

For some definitions of "functional".

Andrew

I can't believe nobody in this thread has yet done the obvious thing and demanded photos!

If he is only thinking about making it I assume there are no photos yet.

Hey everyone,

Sorry for the long delay between replies. I appreciate everyone's input and interest in my little project. I've built a few of the parts of the suit already, but am working between this suit and the briefcase armor from the second movie. I want to have one done by March, and the briefcase armor is surprisingly less demanding (from a technical point of view).

After considering much of the advice here and doing some more research, I realized servos are much better suited for this application. I've ordered (and received) my first servo, to test if the torque is enough for all of my applications. If so, I'll be ordering many more, and attaching them to the Lynxmotion SSC-32 servo controller.

I'm looking into purchasing a 5600 mAh RC battery to power everything too.

Once I have more to show, I'll post a link here with photos/video for all of you to see, if you're interested.

Thanks again for the responses. :slight_smile:

TS

I am very interested in your project Tony!

I am building a modest robot drone army, using an Arduino, the SD21 and 11kg servos.

The prototype looks like a beefed up Lynxmotion Scout with long ape like arms, a chest full of 50C LiPo batteries and an electronics backpack.

The SD21 is easy to use directly. I have the C code to read servo sequencing from file (XML) and push settings over i2c to the SD21 using an USB->i2c connector.

I have only just started with the Arduino but talking to the SD21 should be easier through the Wire library.

I also have some small buggy C/GTK GUIs for directly controlling the servos but eventually I want to rewrite a them to talk to the Arduino over a wireless shield.

Right now I am still ironing out arduino/SD21, no pun intended.

Maybe we could collaborate, but its caveat emptor - I have heard of some bad accidents when testing suits.

(BTW, I would want equal credit)