Controlling an array of 64 small motors

Hi all...

I've been commissioned to do an installation which requires many small moving parts. I need to individually raise or lower 64 objects, each weighing up to 5kg, by about 1 inch in either direction. This will be achieved by a rotating threaded rod/bolt assembly below each object.

It will be easy to make the raising/lowering mechanisms manually adjustable. However, since there are so many of them, each requiring frequent and accurate adjustment, it will be tedious to make the adjustments by hand. Why not automate it somehow?

So... Could anyone suggest ways to tackle this problem? My first thought is a series of 64 motors which can be told to spin a certain amount in either direction, turning the threaded rods and thus raising/lowering the objects by an exact distance. To minimise wiring (highly desirable) each motor would have a controller circuit with an ID number and would "listen" for commands sent to it from a central controller (arduino). I could tell motor number 27 to spin 8.5 turns clockwise, or tell all motors to spin 30 turns anti-clockwise. Hopefully just using a 2-wire interface. That kind of thing. It sounds ridiculously complicated to me, but from past experience with arduino I've learned never to say never... :slight_smile:

How does that idea sound? And could anyone point me in the direction of components to start researching? I don't even know the names of the things I'm talking about... or if they even exist...

Other suggestions??

Cheers,
Jon

If each motor should have an ID number, then you would need some logic (an arduino or maybee something simpler) with each motor, because the motor itself of course can not understand anything but current running through it.

So you could create 64 small controllers with a driver circuit for the motor (H bridge ) and a minimal Arduino . Hook them all up on a RS485 bus. Have a central master that controls all the small controllers.

Just remember that 64 motors create a lot of electronic noise that can cause problemes for communication, and you would still need wiring to all the controllers and motors (the RS485 "bus" and power).

Another problem is that you need motors that can actually move 5 Kg, they need quite a lot of power, and are not cheap.

Thanks MikMo...

So, I've figured that what I probably need are stepper motors, each with its own controller so I don't have to send insane amounts of control information directly to the motors.

Has anyone ever used something like this motor + controller combo?:
http://www.ebay.com.au/itm/Set-2-4-Phase-DC-Gear-Stepper-Motor-ULN2003-Driver-Board-Shield-/290682227578?pt=LH_DefaultDomain_15&hash=item43ae02cb7a

I'm guessing that this unit receives some kind of instructions from an Arduino over a 3 or 4-wire interface, such as "spin left for x turns"...??

Assuming it's powerful enough for my needs (I'll probably end up using some kind of gearing), does anyone know of a simple chip that could interface with the motor controllers in a way that MikMo described? Suppose my central Arduino sent out two bytes of info at a time: the first to select which motor to control, the second to give the motor controller an instruction like "spin right x turns" - all this chip has to do is listen for its unique ID in the first byte, then route the following byte of info through to its respective motor controller.

Hmmm.

Hi jon,

It might be possible to use ATtiny85 or ATtiny84 as the address select/ controller as you can program them to simulate I2C bus Arduino Playground - USIi2c

A bit more info about the project would maybe help. You say to raise/lower 64 objects of about 5KG weight by about 25mm but will the movement be either fully up/down or can it be any position between. Also how fast must it raise/lower.

create 64 small controllers with a driver circuit for the motor (H bridge ) and a minimal Arduino . Hook them all up on a RS485 bus. Have a central master that controls all the small controllers.

That would be my preferred option. Very simple and robust.

Use the USI hardware on the Tiny85s and send address/command as two shiftOuts()s.


Rob

If you're using stepper motors to control an absolute position, you will need some way to find/set the initial reference position. Maybe just parking the motor against a mechanical stop or limit switch?

The electronics side all seems straight forward - making / buying 64 gear boxes and screw drive assemblies seems likely to take much more time and/or money.

Wow. Thanks all - That's all just a little over my head at the moment, but I think I'll get there soon.

Riva:
A bit more info about the project would maybe help. You say to raise/lower 64 objects of about 5KG weight by about 25mm but will the movement be either fully up/down or can it be any position between. Also how fast must it raise/lower.

Sorry Riva - I was a bit vague! Yes, I need to raise/lower the objects by a discrete (measured) distance rather than just all the way up or down, although the speed of movement is quite inconsequential - I'm moving a series of lights and mirrors and other objects in response to infrequent changes in the environment. Nothing needs to happen particularly quickly. Accuracy is the most important thing.

I had a read of that arduino playground article and some other info about the ATtiny85 - sounds promising to me (although at the moment I have no idea what communication protocol that motor controller I linked to uses - can anyone point me in the direction of something useful??).

The other thing that came to mind, rather than using ATtiny85s, was having some kind of ICs that could be allocated an address number using a series of DIP switches or hard-wiring, and which only allowed messages corresponding to their hard-programmed address number to pass through to the motor controller. Does such a thing exist? If so, can anyone let me know what it might be called?

Thanks for the ideas! This is starting to look a little less impossible....

Hmm. And I think I just found half the answer to one of my problems. Here's a guide to controlling the exact same stepper motor controller board that I found on eBay, using Arduino:
http://www.utopiamechanicus.com/article/arduino-stepper-motor-setup-troubleshooting/

Is anyone familiar with the Arduino program the author references ("stepper_oneRevolution") and know whether it could be run on the ATtiny85 rather than Arduino? If so, that sounds like a possible solution to me: Each of the 64 ATtiny85s is connected to a ULN2003 driver board and runs a modified version of the "stepper_oneRevolution" program. Each ATtiny85 is programmed with its own unique 6-bit address number (0-63), and listens for 2-byte instructions over a common serial interface from the central Arduino. The first byte of info is the address, the following byte is a command to turn x number of revolutions in y direction, which the selected ATtiny85 translates into instructions for the ULN2003 board using the "stepper_oneRevolution" code.

I'm thinking out loud, ja?
Anyway. Sound reasonable?

Hi jon,

As PeterH says

If you're using stepper motors to control an absolute position, you will need some way to find/set the initial reference position. Maybe just parking the motor against a mechanical stop or limit switch?

The ATtiny85 only has 6 I/O pins so 4x to control stepper 2x communication leaves no spare pin to connect reference (unless someone has a bright idea). The ATtiny84 has 12 I/O pins so may be more suited.

Each ATtiny85 is programmed with its own unique 6-bit address number (0-63), and listens for 2-byte instructions over a common serial interface from the central Arduino. The first byte of info is the address, the following byte is a command to turn x number of revolutions in y direction, which the selected ATtiny85 translates into instructions for the ULN2003 board using the "stepper_oneRevolution" code.

You should also include a command to make system calibrate as per PeterH quote.