Arduino Forum

Topics => Robotics => Topic started by: peefour on May 30, 2015, 02:07 am

Title: How to control hundreds stepper motors with one arduino uno?
Post by: peefour on May 30, 2015, 02:07 am
Hi,

we have a big lockers cabinet (hundreds of locks) in our sporting hall. I want to modernise it by making the locks electronic, and control their access via one central keypad, powered by an arduino uno.

I want to replace the mechanic lock mechanisms by stepping motors. Access to each locker is provided through a central keypad. When a user types his secret code, his locker will open.

I want to do this with an arduino uno, but I am puzzled by how to steer so many steppers (as they have many wires).

I want to use stepper BYJ-48

1a) what to use: multiplexers, shift registers, something else?
1b) what IC to use (with most outputs, lowest cost, enough power, ec.)
1c) how to chain them to achieve hundreds outputs?

2) does every stepper needs its own driver IC (ULN2003AN)?

Thanks!

 
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: jremington on May 30, 2015, 08:38 pm
Totally unrealistic!
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: Isaac96 on May 30, 2015, 09:48 pm
Hundreds of steppers? How much current do they draw? The Adafruit Motor Shield v2.3 can control 2 steppers at 13.5 volts and is apparently capable of 1A. You should check the Adafruit website to be absolutely sure.
EDIT: The shields can be daisy-chained together.
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: peefour on May 31, 2015, 06:21 am
they don't have to be steppers, dc motors with gear are also good (maybe even better?)
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: Isaac96 on May 31, 2015, 06:47 pm
The Adafruit Motor Shield v2.3 can handle 4 DC motors. The official Arduino Motor Shield can handle 2.
I am not sure about others.
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: mudassir9999 on May 31, 2015, 08:17 pm
You've to make your own Stepper motor PCB driver board, in which you need to attach  a lot,lot of drivers ICs ,attach bunch of basic electronic items, then by using I2C or SPI you can control the motors.
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: TomGeorge on May 31, 2015, 11:16 pm
Hi,
You could use the electric automotive door lock units. some are now rack and motor type.
Use an array, say 4 x 25 in  each bank.
You will only be actuating one at a time so power requirements won't be astronomical.
This has been done many times before so it is not impossible.

Tom.... :)
A tourist parks up in Queensland use this method as their locker system, for you to store your gear for the days visit.

http://www.gearbest.com/car-gadgets/pp_143912.html?currency=AUD&gclid=CNKgwrr07MUCFUxwvAod4JcAFg

http://www.ebay.com.au/bhp/car-door-locks

http://www.jaycar.com.au/Automotive-%26-Mobile-Security/Car-Electronic-Access-%26-Accessories/Keyless-Access/Slave-Door-Lock-Actuator/p/LR8813
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: peefour on Jun 01, 2015, 04:11 am
all thanks for answering!
As mentioned before it does not have to be a stepper motor, it can be also a dc motor, servo, or something else. Only important requirement is that it needs to be low power (is powered by batteries that need to last min 1 year)

@TomGeorge & @mudassir9999: can you please give more details on how to do this?

thanks dudes!!

Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: Isaac96 on Jun 01, 2015, 04:56 am
Door lock units? You could use solenoids. They only take 1 pin each and you could use ULN2001 Darlingtons and 74HC595 shift registers to get unlimited outputs from 3 pins.
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: CrossRoads on Jun 01, 2015, 05:29 am
Or TPIC6A595, shift register & with 500mA output current sink.
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: mudassir9999 on Jun 01, 2015, 08:19 am
If you're using DC Geared Motor then L293D H-Bridge Motor driver Chip is a better option, This chip can control upto 2 DC motors so you will need 50 of them,These are cheap and abundantly available.

Now these Ics can be controlled by using a PWM or Just by using HIGH and LOW functions..

You'll need many pins to control that number of Motors.So,Arduino Mega has many GPIO pins,You can use it

Just give it a try with 2 motors first, Later work on all 100 motors and send data using I2C to Each

Here is the INSTRUCTABLE guide of controlling the two DC motors with L293Dchip

click here. (http://www.instructables.com/id/Control-your-motors-with-L293D-and-Arduino/step3/Arduino-code/)


Meanwhile i would also prefer to use solenoids..
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: TomGeorge on Jun 01, 2015, 03:14 pm
Hi,

Quote
Only important requirement is that it needs to be low power (is powered by batteries that need to last min 1 year)
Why does the battery have to last a year, can't you power it of a power pack?

Tom.... :)
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: CrossRoads on Jun 01, 2015, 03:52 pm
Quote
Only important requirement is that it needs to be low power (is powered by batteries that need to last min 1 year)
That is going to need a pretty high capacity battery.

Imagine the solenoid locks the cabinet in the unpowered state.
User walks to central location, enters the locker number, enters his security number, his (spring-loaded?) door pops open, and he walks over. When done, he pushes the door closed.
The central station could be designed to be in sleep mode most of the time, powering down the solenoid drive circuit and display until a key is pressed to wake it up.

Small solenoid examples
http://www.ledex.com/miniature-solenoids/miniature-solenoids.html (http://www.ledex.com/miniature-solenoids/miniature-solenoids.html)
This brochure shows the Power (voltage x current) needed for various models
http://www.ledex.com/pdf/Ledex_Shortform.pdf (http://www.ledex.com/pdf/Ledex_Shortform.pdf)
Say you had model that needed 5W, so 5V-1A, and it needed to retract for 1 second to allow the door to pop open. Then you'd need 500mA from a 5V battery for every opening.
"Hundreds of locks", okay, say 300.
Each one opening 2 time a day for say 180 times a year, every other day on average.
500mA x 1 second x 2 x 300 locks x 180 days = 54000mAS, x 1min/60S x 1Hr/60min = 15AH battery.
So you might get by with a 6V motorcycle battery for a year, depending on how much self-discharge it had.  If the system is in a hall tho, why not just power the system from wall power, with say a 4 hour battery backup system for the occasional outage?

I imagine the door would have a part that would push into a recess (like a regular hallway door) so it could be pushed close when the solenoid was extended.
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: MarkT on Jun 01, 2015, 07:39 pm
For low power use you need to be able to power everything down when not active.  Use an actuator that only
needs power to move (not to hold position), obviously.  A small leadscrew actuator or geared down DC
motor (for rotary lock).  Probably need microswitches to detect end-stops.

Try looking on AliBaba / AliExpress for an existing unit that might be affordable?
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: peefour on Jun 01, 2015, 08:50 pm
Hi Guys,

Thanks all for your excellent answers.
I am new to actuators (motors, solenoids, etc.), so sorry for my dumb questions.

@MarkT: I never heard of leadscrew actuators, thanks for mentioning. Do they consume less power than solenoids?

@crossroads: this is indeed the scenario I want. The lockers are meant for outside use, where there is no power supply.

0) I want even to go futher then sleep mode, and use a key of the keypad to power up the whole circuit. The arduino should power off the itself and the whole circuit after unlocking the door. Is this feasable?

My first idea was indeed to use solenoids, but i read that they require more power than motors.
1) Is this true?

That's why I was investgating using motors (dc/gear, step, servo, etc.).

2) I think steppers and servos need constantly to be powered, and thus the idle-current can drain the battery? Is this true? What about the idle-current of solenoids?


3) I have another use case, where I want to lock a suitcase (for equipment), that will be opened and closed 10x a day for 360 days/year. The lock and arduino circuit will be powered by 4 AAA batteries, and needs to work for min 1 year.
using Mr. Crossroads equation:
500mA*1s*10times*360days=1800mAs x 1h/3600s=500mAh=0.5Ahis (this is a bit more than 4 strong AAA batteries: 4*1200mAh=0.48Ah).
The problem is that I still need to power the arduino from this 4 batteries, which will not suffice.
Is a a solenoid also in this case the best option?

4) which type of actuator is the most economical (cheapest, incl. extra circuitry when needed) to use, in these cases?

Thanks guys !!


Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: TomGeorge on Jun 01, 2015, 11:15 pm
Hi,

Quote
The lockers are meant for outside use, where there is no power supply.
Use solar PV, to keep a battery charged.
KISS, keep it simple etc etc etc.

Tom..... :)
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: peefour on Jun 06, 2015, 04:42 pm
Thanks for your answer!

For some cases I can indeed use solar or elektricity from the grid, but in many cases not.
Especially in little portable lockers (suitcase-like), only batteries are possible.

Maybe I should open a new thread for this?

I found a little lock system on 3AA batteries, and inside it was a solenoid of type AKD0521 (Yaxin: Dual Latching Solenoid, Linear Push Pull Hold) or similar like AKD0521ZHK-0521 (Zonhen: Bi-direction / bi-stable keep solenoid).
This solenoid needs a reverse voltage for the opposite movement.

I opened such lock and removed the solenoid. I was amazed that I could not operate with a power supply of 5V-300mA, nor a power supply of 12V-170mA, but I had to use one of 12V-800mA before the solenoid moved.

But still it did work well on the device, and the 3 AA batteries had a lifespan of several months and in standby more than a year!

How is this possible? Did they use a circuit to increase the voltage? How can the solenoid suck so much current out of batteries, while it remained dead with power supply adapters less than 12V-800mA??

Thanks guys!!


I am baffled, anyone has an idea?
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: Isaac96 on Jun 06, 2015, 10:14 pm
Do you still have the lock system? Measure the voltage between the terminals that the solenoid was connected to.
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: peefour on Jun 08, 2015, 05:04 am
thanks for your advise
no I do not have the original locking device, I dismantled it to see what motor drives it.
(Putting it back together is not an option either because I teared it appart )

Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: CrossRoads on Jun 12, 2015, 09:14 pm
0) I want even to go futher then sleep mode, and use a key of the keypad to power up the whole circuit. The arduino should power off the itself and the whole circuit after unlocking the door. Is this feasable?

Yes. Circuit can be powered off even, and awakened with a button press.
All the devices can be powered off when in the locked position. Have a spring loaded door that is pushed open when the lock retracts, and the door have a tongue that can slide over the lock to push close (poor description, go look at any house door, it can close without turning the knob, yes?)

As to which takes more power to pull the lock arm out of the way, you'll have to experiment.
How far does it have to move? How durable does it need to be? How much does it have to resist being broken into? etc.
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: Isaac96 on Jun 12, 2015, 11:37 pm
All the devices can be powered off when in the locked position. Have a spring loaded door that is pushed open when the lock retracts, and the door have a tongue that can slide over the lock to push close (poor description, go look at any house door, it can close without turning the knob, yes?)
Like a wedge, basically. Something like a diode(allows movement in but not out). Make sure you get the wedge in the right direction.
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: peefour on Jun 24, 2015, 03:20 pm
Thanks guys!
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: Isaac96 on Jun 25, 2015, 03:11 am
Any updates? Does it work? Have you gotten anywhere?
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: peefour on Jun 28, 2015, 04:10 pm
Hi Isaac,
Thanks for asking.

I have not yet decided what kind of motors to use.
I like to use solenoids as I see that it works well with an electronic padlock that I have.
I am trying to figuring out how they can supply the high current and voltage (12V/1A) that is required for this bistable holding solenoid. See my post #16 above.

I think that they use a square wave to feed a an inductor, who in its turn charges a big 4700µF capacitor. Ithink that the capacitor is then when discharged able to supply the high voltage and current for a short amount of time, but enough to drive the solenoid.

It seems to me quite cumbersome, and I don't want to use coils. Is there any other method to achieve the same?

Thanks!

Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: peefour on Jun 28, 2015, 04:11 pm
Hi Isaac,
Thanks for asking.

I have not yet decided what kind of motors to use.
I like to use solenoids as I see that it works well with an electronic padlock that I have.
I am trying to figuring out how they can supply the high current and voltage (12V/1A) that is required for this bistable holding solenoid. See my post #16 above.

I think that they use a square wave to feed a an inductor, who in its turn charges a big 4700µF capacitor. Ithink that the capacitor is then when discharged able to supply the high voltage and current for a short amount of time, but enough to drive the solenoid.

It seems to me quite cumbersome, and I don't want to use coils. Is there any other method to achieve the same?

Thanks!

Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: Isaac96 on Jun 28, 2015, 06:19 pm
Look at charge-pump circuits. https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=charge%20pump (https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=charge pump)
Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: andyibanez on Jul 05, 2015, 07:40 pm
I think use servo motor is more usefull if just for locking

Easydriver Stepper is need 2 pin, step and dir (and gnd)

Uno is have 13 digital, 0 and 1 is tx tr,
Is just 12 pins, it mean 6 stepper only

Title: Re: How to control hundreds stepper motors with one arduino uno?
Post by: Isaac96 on Jul 07, 2015, 01:46 am
There are I2C stepper controllers. And the Parallax Servo Controller is serial. It can control 16 servos.